From 23dff57994490fe0936865c27886f7647c681575 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Tue, 17 Mar 2026 23:12:46 +1000 Subject: [PATCH 01/28] add #ifdef/#ifndef support to xdr parser and generator --- src/cli/guess.rs | 1 + src/curr/generated.rs | 16 +- src/next/generated.rs | 16 +- xdr-generator-rust/generator/src/generator.rs | 64 ++- xdr-generator-rust/generator/src/output.rs | 13 +- .../generator/templates/const.rs.jinja | 3 + .../generator/templates/enum.rs.jinja | 30 ++ .../generator/templates/struct.rs.jinja | 12 + .../generator/templates/type_enum.rs.jinja | 133 ++++- .../templates/typedef_alias.rs.jinja | 3 + .../templates/typedef_newtype.rs.jinja | 63 +++ .../generator/templates/union.rs.jinja | 27 + xdr-generator-rust/xdr-parser/src/ast.rs | 89 ++++ xdr-generator-rust/xdr-parser/src/lexer.rs | 24 + xdr-generator-rust/xdr-parser/src/parser.rs | 220 +++++++- .../xdr-parser/src/tests/lexer.rs | 54 ++ .../xdr-parser/src/tests/parser.rs | 499 +++++++++++++++++- 17 files changed, 1184 insertions(+), 83 deletions(-) diff --git a/src/cli/guess.rs b/src/cli/guess.rs index 3f987e81..cef2c77b 100644 --- a/src/cli/guess.rs +++ b/src/cli/guess.rs @@ -72,6 +72,7 @@ macro_rules! run_x { let mut rr = ResetRead::new(self.input()?); let mut guessed = false; 'variants: for v in crate::$m::TypeVariant::VARIANTS { + let v = *v; rr.reset(); let count: usize = match self.input_format { InputFormat::Single => { diff --git a/src/curr/generated.rs b/src/curr/generated.rs index c2986f3e..c130ddcc 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -51440,7 +51440,9 @@ pub enum TypeVariant { } impl TypeVariant { - pub const VARIANTS: [TypeVariant; 468] = [ + // VARIANTS and VARIANTS_STR are slices (not fixed-size arrays) because + // individual entries may be #[cfg]-gated, so the count varies by enabled features. + pub const VARIANTS: &[TypeVariant] = &[ TypeVariant::Value, TypeVariant::ScpBallot, TypeVariant::ScpStatementType, @@ -51910,7 +51912,7 @@ impl TypeVariant { TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, ]; - pub const VARIANTS_STR: [&'static str; 468] = [ + pub const VARIANTS_STR: &[&str] = &[ "Value", "ScpBallot", "ScpStatementType", @@ -52872,7 +52874,7 @@ impl TypeVariant { #[must_use] #[allow(clippy::too_many_lines)] - pub const fn variants() -> [TypeVariant; 468] { + pub const fn variants() -> &'static [TypeVariant] { Self::VARIANTS } @@ -54570,7 +54572,9 @@ pub enum Type { } impl Type { - pub const VARIANTS: [TypeVariant; 468] = [ + // VARIANTS and VARIANTS_STR are slices (not fixed-size arrays) because + // individual entries may be #[cfg]-gated, so the count varies by enabled features. + pub const VARIANTS: &[TypeVariant] = &[ TypeVariant::Value, TypeVariant::ScpBallot, TypeVariant::ScpStatementType, @@ -55040,7 +55044,7 @@ impl Type { TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, ]; - pub const VARIANTS_STR: [&'static str; 468] = [ + pub const VARIANTS_STR: &[&str] = &[ "Value", "ScpBallot", "ScpStatementType", @@ -69660,7 +69664,7 @@ impl Type { #[must_use] #[allow(clippy::too_many_lines)] - pub const fn variants() -> [TypeVariant; 468] { + pub const fn variants() -> &'static [TypeVariant] { Self::VARIANTS } diff --git a/src/next/generated.rs b/src/next/generated.rs index ab541023..88385a4e 100644 --- a/src/next/generated.rs +++ b/src/next/generated.rs @@ -51440,7 +51440,9 @@ pub enum TypeVariant { } impl TypeVariant { - pub const VARIANTS: [TypeVariant; 468] = [ + // VARIANTS and VARIANTS_STR are slices (not fixed-size arrays) because + // individual entries may be #[cfg]-gated, so the count varies by enabled features. + pub const VARIANTS: &[TypeVariant] = &[ TypeVariant::Value, TypeVariant::ScpBallot, TypeVariant::ScpStatementType, @@ -51910,7 +51912,7 @@ impl TypeVariant { TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, ]; - pub const VARIANTS_STR: [&'static str; 468] = [ + pub const VARIANTS_STR: &[&str] = &[ "Value", "ScpBallot", "ScpStatementType", @@ -52872,7 +52874,7 @@ impl TypeVariant { #[must_use] #[allow(clippy::too_many_lines)] - pub const fn variants() -> [TypeVariant; 468] { + pub const fn variants() -> &'static [TypeVariant] { Self::VARIANTS } @@ -54570,7 +54572,9 @@ pub enum Type { } impl Type { - pub const VARIANTS: [TypeVariant; 468] = [ + // VARIANTS and VARIANTS_STR are slices (not fixed-size arrays) because + // individual entries may be #[cfg]-gated, so the count varies by enabled features. + pub const VARIANTS: &[TypeVariant] = &[ TypeVariant::Value, TypeVariant::ScpBallot, TypeVariant::ScpStatementType, @@ -55040,7 +55044,7 @@ impl Type { TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, ]; - pub const VARIANTS_STR: [&'static str; 468] = [ + pub const VARIANTS_STR: &[&str] = &[ "Value", "ScpBallot", "ScpStatementType", @@ -69660,7 +69664,7 @@ impl Type { #[must_use] #[allow(clippy::too_many_lines)] - pub const fn variants() -> [TypeVariant; 468] { + pub const fn variants() -> &'static [TypeVariant] { Self::VARIANTS } diff --git a/xdr-generator-rust/generator/src/generator.rs b/xdr-generator-rust/generator/src/generator.rs index 839f2ffa..a5dc6a4a 100644 --- a/xdr-generator-rust/generator/src/generator.rs +++ b/xdr-generator-rust/generator/src/generator.rs @@ -9,8 +9,8 @@ use crate::naming::{case_value, field_name, source_comment, type_name}; use crate::options::RustOptions; use crate::output::{ ConstOutput, DefinitionOutput, EnumOutput, EnumStructMemberOutput, GeneratedTemplate, - StructMemberOutput, StructOutput, TypeEnumOutput, TypedefAliasOutput, TypedefNewtypeOutput, - UnionArmOutput, UnionOutput, + StructMemberOutput, StructOutput, TypeEnumEntry, TypeEnumOutput, TypedefAliasOutput, + TypedefNewtypeOutput, UnionArmOutput, UnionOutput, }; use crate::types::{base_type_ref, resolve_type, size_to_string, type_ref}; @@ -53,10 +53,30 @@ impl RustGenerator { definitions.push(output); } - let types: Vec = spec + // Build type enum entries with cfg from definitions. + let mut cfg_by_name: std::collections::HashMap> = + std::collections::HashMap::new(); + for d in spec + .all_definitions() + .filter(|d| !matches!(d, Definition::Const(_))) + { + let name = type_name(d.name()); + let cfg = self.resolve_cfg(d); + let prev = cfg_by_name.insert(name.clone(), cfg); + debug_assert!(prev.is_none(), "duplicate Rust type name: {name}"); + } + + let types: Vec = spec .type_names_parent_first() .iter() - .map(|name| type_name(name)) + .map(|name| { + let rust_name = type_name(name); + let cfg = cfg_by_name.get(&rust_name).cloned().flatten(); + TypeEnumEntry { + name: rust_name, + cfg, + } + }) .collect(); GeneratedTemplate { @@ -67,17 +87,27 @@ impl RustGenerator { } } + /// Resolve the cfg expression for a definition, rendered as a string. + /// + /// This is where additional cfg conditions (e.g. file-based cfg derived + /// from `def.file_index()`) should be combined with the `#ifdef`-derived + /// cfg before rendering. Use `CfgExpr::and()` to combine them. + fn resolve_cfg(&self, def: &Definition) -> Option { + def.cfg().map(|c| c.render()) + } + fn generate_definition(&self, def: &Definition) -> DefinitionOutput { + let cfg = self.resolve_cfg(def); match def { - Definition::Struct(s) => DefinitionOutput::Struct(self.generate_struct(s)), - Definition::Enum(e) => DefinitionOutput::Enum(self.generate_enum(e)), - Definition::Union(u) => DefinitionOutput::Union(self.generate_union(u)), - Definition::Typedef(t) => self.generate_typedef(t), - Definition::Const(c) => DefinitionOutput::Const(self.generate_const(c)), + Definition::Struct(s) => DefinitionOutput::Struct(self.generate_struct(s, cfg)), + Definition::Enum(e) => DefinitionOutput::Enum(self.generate_enum(e, cfg)), + Definition::Union(u) => DefinitionOutput::Union(self.generate_union(u, cfg)), + Definition::Typedef(t) => self.generate_typedef(t, cfg), + Definition::Const(c) => DefinitionOutput::Const(self.generate_const(c, cfg)), } } - fn generate_struct(&self, s: &Struct) -> StructOutput { + fn generate_struct(&self, s: &Struct, cfg: Option) -> StructOutput { let name = type_name(&s.name); let custom_default = self.options.custom_default_impl.contains(&name); let custom_str = self.options.custom_str_impl.contains(&name); @@ -106,10 +136,11 @@ impl RustGenerator { is_custom_str: custom_str, members, member_names, + cfg, } } - fn generate_enum(&self, e: &Enum) -> EnumOutput { + fn generate_enum(&self, e: &Enum, cfg: Option) -> EnumOutput { let name = type_name(&e.name); let custom_default = self.options.custom_default_impl.contains(&name); let custom_str = self.options.custom_str_impl.contains(&name); @@ -131,10 +162,11 @@ impl RustGenerator { has_default: !custom_default, is_custom_str: custom_str, members, + cfg, } } - fn generate_union(&self, u: &Union) -> UnionOutput { + fn generate_union(&self, u: &Union, cfg: Option) -> UnionOutput { let name = type_name(&u.name); let custom_default = self.options.custom_default_impl.contains(&name); let custom_str = self.options.custom_str_impl.contains(&name); @@ -180,10 +212,11 @@ impl RustGenerator { is_custom_str: custom_str, discriminant_type, arms, + cfg, } } - fn generate_typedef(&self, t: &Typedef) -> DefinitionOutput { + fn generate_typedef(&self, t: &Typedef, cfg: Option) -> DefinitionOutput { let name = type_name(&t.name); if is_builtin_type(&t.type_) { @@ -191,6 +224,7 @@ impl RustGenerator { name, source_comment: source_comment(&t.source, "Typedef"), type_ref: base_type_ref(&t.type_, None), + cfg, }); } @@ -225,10 +259,11 @@ impl RustGenerator { custom_debug: is_fixed_opaque_type, custom_display_fromstr: is_fixed_opaque_type && !custom_str && !no_display_fromstr, custom_schemars: is_fixed_opaque_type && !custom_str && !no_display_fromstr, + cfg, }) } - fn generate_const(&self, c: &Const) -> ConstOutput { + fn generate_const(&self, c: &Const, cfg: Option) -> ConstOutput { let value_str = match c.base { IntBase::Hexadecimal => format!("0x{:X}", c.value), IntBase::Decimal => c.value.to_string(), @@ -238,6 +273,7 @@ impl RustGenerator { doc_name: type_name(&c.name), source_comment: source_comment(&c.source, "Const"), value_str, + cfg, } } diff --git a/xdr-generator-rust/generator/src/output.rs b/xdr-generator-rust/generator/src/output.rs index aa1c8017..1e7f4841 100644 --- a/xdr-generator-rust/generator/src/output.rs +++ b/xdr-generator-rust/generator/src/output.rs @@ -25,6 +25,7 @@ pub struct StructOutput { pub is_custom_str: bool, pub members: Vec, pub member_names: String, + pub cfg: Option, } pub struct StructMemberOutput { @@ -40,6 +41,7 @@ pub struct EnumOutput { pub has_default: bool, pub is_custom_str: bool, pub members: Vec, + pub cfg: Option, } pub struct EnumStructMemberOutput { @@ -55,6 +57,7 @@ pub struct UnionOutput { pub is_custom_str: bool, pub discriminant_type: String, pub arms: Vec, + pub cfg: Option, } pub struct UnionArmOutput { @@ -70,6 +73,7 @@ pub struct TypedefAliasOutput { pub name: String, pub source_comment: String, pub type_ref: String, + pub cfg: Option, } pub struct TypedefNewtypeOutput { @@ -88,6 +92,7 @@ pub struct TypedefNewtypeOutput { pub custom_debug: bool, pub custom_display_fromstr: bool, pub custom_schemars: bool, + pub cfg: Option, } pub struct ConstOutput { @@ -95,8 +100,14 @@ pub struct ConstOutput { pub doc_name: String, pub source_comment: String, pub value_str: String, + pub cfg: Option, } pub struct TypeEnumOutput { - pub types: Vec, + pub types: Vec, +} + +pub struct TypeEnumEntry { + pub name: String, + pub cfg: Option, } diff --git a/xdr-generator-rust/generator/templates/const.rs.jinja b/xdr-generator-rust/generator/templates/const.rs.jinja index 8e92f1e2..e874ca10 100644 --- a/xdr-generator-rust/generator/templates/const.rs.jinja +++ b/xdr-generator-rust/generator/templates/const.rs.jinja @@ -1,5 +1,8 @@ {# XDR consts are always emitted as u64 to match the Ruby xdrgen generator, #} {# which uses u64 unconditionally regardless of the const's declared type. #} /// {{ c.doc_name }}{{ c.source_comment }} +{%- if let Some(cfg) = c.cfg %} +#[cfg({{ cfg }})] +{%- endif %} pub const {{ c.name }}: u64 = {{ c.value_str }}; diff --git a/xdr-generator-rust/generator/templates/enum.rs.jinja b/xdr-generator-rust/generator/templates/enum.rs.jinja index 83798d55..efb2fefb 100644 --- a/xdr-generator-rust/generator/templates/enum.rs.jinja +++ b/xdr-generator-rust/generator/templates/enum.rs.jinja @@ -1,5 +1,8 @@ /// {{ e.name }}{{ e.source_comment }} // enum +{%- if let Some(cfg) = e.cfg %} +#[cfg({{ cfg }})] +{%- endif %} {%- if e.has_default %} #[cfg_attr(feature = "alloc", derive(Default))] {%- endif %} @@ -28,6 +31,9 @@ pub enum {{ e.name }} { {%- endfor %} } +{% if let Some(cfg) = e.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl {{ e.name }} { pub const VARIANTS: [{{ e.name }}; {{ e.members.len() }}] = [ {%- for m in e.members %} @@ -51,6 +57,9 @@ impl {{ e.name }} { } } +{% if let Some(cfg) = e.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl Name for {{ e.name }} { #[must_use] fn name(&self) -> &'static str { @@ -58,20 +67,32 @@ impl Name for {{ e.name }} { } } +{% if let Some(cfg) = e.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl Variants<{{ e.name }}> for {{ e.name }} { fn variants() -> slice::Iter<'static, {{ e.name }}> { Self::VARIANTS.iter() } } +{% if let Some(cfg) = e.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl Enum for {{ e.name }} {} +{% if let Some(cfg) = e.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl fmt::Display for {{ e.name }} { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(self.name()) } } +{% if let Some(cfg) = e.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl TryFrom for {{ e.name }} { type Error = Error; @@ -87,6 +108,9 @@ impl TryFrom for {{ e.name }} { } } +{% if let Some(cfg) = e.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl From<{{ e.name }}> for i32 { #[must_use] fn from(e: {{ e.name }}) -> Self { @@ -94,6 +118,9 @@ impl From<{{ e.name }}> for i32 { } } +{% if let Some(cfg) = e.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl ReadXdr for {{ e.name }} { #[cfg(feature = "std")] fn read_xdr(r: &mut Limited) -> Result { @@ -105,6 +132,9 @@ impl ReadXdr for {{ e.name }} { } } +{% if let Some(cfg) = e.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl WriteXdr for {{ e.name }} { #[cfg(feature = "std")] fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { diff --git a/xdr-generator-rust/generator/templates/struct.rs.jinja b/xdr-generator-rust/generator/templates/struct.rs.jinja index 2fa4c13a..baccf29d 100644 --- a/xdr-generator-rust/generator/templates/struct.rs.jinja +++ b/xdr-generator-rust/generator/templates/struct.rs.jinja @@ -1,4 +1,7 @@ /// {{ s.name }}{{ s.source_comment }} +{%- if let Some(cfg) = s.cfg %} +#[cfg({{ cfg }})] +{%- endif %} {%- if s.has_default %} #[cfg_attr(feature = "alloc", derive(Default))] {%- endif %} @@ -31,6 +34,9 @@ pub struct {{ s.name }} { {%- endfor %} } +{% if let Some(cfg) = s.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl ReadXdr for {{ s.name }} { #[cfg(feature = "std")] fn read_xdr(r: &mut Limited) -> Result { @@ -44,6 +50,9 @@ impl ReadXdr for {{ s.name }} { } } +{% if let Some(cfg) = s.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl WriteXdr for {{ s.name }} { #[cfg(feature = "std")] fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { @@ -56,6 +65,9 @@ impl WriteXdr for {{ s.name }} { } } {%- if s.is_custom_str %} +{%- if let Some(cfg) = s.cfg %} +#[cfg({{ cfg }})] +{%- endif %} #[cfg(all(feature = "serde", feature = "alloc"))] impl<'de> serde::Deserialize<'de> for {{ s.name }} { fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de> { diff --git a/xdr-generator-rust/generator/templates/type_enum.rs.jinja b/xdr-generator-rust/generator/templates/type_enum.rs.jinja index b1621f5e..b6e70228 100644 --- a/xdr-generator-rust/generator/templates/type_enum.rs.jinja +++ b/xdr-generator-rust/generator/templates/type_enum.rs.jinja @@ -7,29 +7,49 @@ #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] pub enum TypeVariant { {%- for t in type_variant_enum.types %} - {{ t }}, +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + {{ t.name }}, {%- endfor %} } impl TypeVariant { - pub const VARIANTS: [TypeVariant; {{ type_variant_enum.types.len() }}] = [ {%- for t in type_variant_enum.types %}TypeVariant::{{ t }}, -{%- endfor %} ]; - pub const VARIANTS_STR: [&'static str; {{ type_variant_enum.types.len() }}] = [ {%- for t in type_variant_enum.types %}"{{ t }}", -{%- endfor %} ]; + // VARIANTS and VARIANTS_STR are slices (not fixed-size arrays) because + // individual entries may be #[cfg]-gated, so the count varies by enabled features. + pub const VARIANTS: &[TypeVariant] = &[ +{%- for t in type_variant_enum.types %} +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + TypeVariant::{{ t.name }}, +{%- endfor %} + ]; + pub const VARIANTS_STR: &[&str] = &[ +{%- for t in type_variant_enum.types %} +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + "{{ t.name }}", +{%- endfor %} + ]; #[must_use] #[allow(clippy::too_many_lines)] pub const fn name(&self) -> &'static str { match self { {%- for t in type_variant_enum.types %} - Self::{{ t }} => "{{ t }}", +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + Self::{{ t.name }} => "{{ t.name }}", {%- endfor %} } } #[must_use] #[allow(clippy::too_many_lines)] - pub const fn variants() -> [TypeVariant; {{ type_variant_enum.types.len() }}] { + pub const fn variants() -> &'static [TypeVariant] { Self::VARIANTS } @@ -39,7 +59,10 @@ impl TypeVariant { pub fn json_schema(&self, gen: schemars::gen::SchemaGenerator) -> schemars::schema::RootSchema { match self { {%- for t in type_variant_enum.types %} - Self::{{ t }} => gen.into_root_schema_for::<{{ t }}>(), +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + Self::{{ t.name }} => gen.into_root_schema_for::<{{ t.name }}>(), {%- endfor %} } } @@ -64,7 +87,10 @@ impl core::str::FromStr for TypeVariant { fn from_str(s: &str) -> Result { match s { {%- for t in type_variant_enum.types %} - "{{ t }}" => Ok(Self::{{ t }}), +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + "{{ t.name }}" => Ok(Self::{{ t.name }}), {%- endfor %} _ => Err(Error::Invalid), } @@ -81,22 +107,42 @@ impl core::str::FromStr for TypeVariant { #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] pub enum Type { {%- for t in type_variant_enum.types %} - {{ t }}(Box<{{ t }}>), +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + {{ t.name }}(Box<{{ t.name }}>), {%- endfor %} } impl Type { - pub const VARIANTS: [TypeVariant; {{ type_variant_enum.types.len() }}] = [ {%- for t in type_variant_enum.types %}TypeVariant::{{ t }}, -{%- endfor %} ]; - pub const VARIANTS_STR: [&'static str; {{ type_variant_enum.types.len() }}] = [ {%- for t in type_variant_enum.types %}"{{ t }}", -{%- endfor %} ]; + // VARIANTS and VARIANTS_STR are slices (not fixed-size arrays) because + // individual entries may be #[cfg]-gated, so the count varies by enabled features. + pub const VARIANTS: &[TypeVariant] = &[ +{%- for t in type_variant_enum.types %} +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + TypeVariant::{{ t.name }}, +{%- endfor %} + ]; + pub const VARIANTS_STR: &[&str] = &[ +{%- for t in type_variant_enum.types %} +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + "{{ t.name }}", +{%- endfor %} + ]; #[cfg(feature = "std")] #[allow(clippy::too_many_lines)] pub fn read_xdr(v: TypeVariant, r: &mut Limited) -> Result { match v { {%- for t in type_variant_enum.types %} - TypeVariant::{{ t }} => r.with_limited_depth(|r| Ok(Self::{{ t }}(Box::new({{ t }}::read_xdr(r)?)))), +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + TypeVariant::{{ t.name }} => r.with_limited_depth(|r| Ok(Self::{{ t.name }}(Box::new({{ t.name }}::read_xdr(r)?)))), {%- endfor %} } } @@ -144,7 +190,10 @@ impl Type { pub fn read_xdr_iter(v: TypeVariant, r: &mut Limited) -> Box> + '_> { match v { {%- for t in type_variant_enum.types %} - TypeVariant::{{ t }} => Box::new(ReadXdrIter::<_, {{ t }}>::new(&mut r.inner, r.limits.clone()).map(|r| r.map(|t| Self::{{ t }}(Box::new(t))))), +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + TypeVariant::{{ t.name }} => Box::new(ReadXdrIter::<_, {{ t.name }}>::new(&mut r.inner, r.limits.clone()).map(|r| r.map(|t| Self::{{ t.name }}(Box::new(t))))), {%- endfor %} } } @@ -154,7 +203,10 @@ impl Type { pub fn read_xdr_framed_iter(v: TypeVariant, r: &mut Limited) -> Box> + '_> { match v { {%- for t in type_variant_enum.types %} - TypeVariant::{{ t }} => Box::new(ReadXdrIter::<_, Frame<{{ t }}>>::new(&mut r.inner, r.limits.clone()).map(|r| r.map(|t| Self::{{ t }}(Box::new(t.0))))), +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + TypeVariant::{{ t.name }} => Box::new(ReadXdrIter::<_, Frame<{{ t.name }}>>::new(&mut r.inner, r.limits.clone()).map(|r| r.map(|t| Self::{{ t.name }}(Box::new(t.0))))), {%- endfor %} } } @@ -168,7 +220,10 @@ impl Type { ); match v { {%- for t in type_variant_enum.types %} - TypeVariant::{{ t }} => Box::new(ReadXdrIter::<_, {{ t }}>::new(dec, r.limits.clone()).map(|r| r.map(|t| Self::{{ t }}(Box::new(t))))), +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + TypeVariant::{{ t.name }} => Box::new(ReadXdrIter::<_, {{ t.name }}>::new(dec, r.limits.clone()).map(|r| r.map(|t| Self::{{ t.name }}(Box::new(t))))), {%- endfor %} } } @@ -204,7 +259,10 @@ impl Type { pub fn from_json(v: TypeVariant, r: impl Read) -> Result { match v { {%- for t in type_variant_enum.types %} - TypeVariant::{{ t }} => Ok(Self::{{ t }}(Box::new(serde_json::from_reader(r)?))), +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + TypeVariant::{{ t.name }} => Ok(Self::{{ t.name }}(Box::new(serde_json::from_reader(r)?))), {%- endfor %} } } @@ -214,7 +272,10 @@ impl Type { pub fn deserialize_json<'r, R: serde_json::de::Read<'r>>(v: TypeVariant, r: &mut serde_json::de::Deserializer) -> Result { match v { {%- for t in type_variant_enum.types %} - TypeVariant::{{ t }} => Ok(Self::{{ t }}(Box::new(serde::de::Deserialize::deserialize(r)?))), +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + TypeVariant::{{ t.name }} => Ok(Self::{{ t.name }}(Box::new(serde::de::Deserialize::deserialize(r)?))), {%- endfor %} } } @@ -224,7 +285,10 @@ impl Type { pub fn arbitrary(v: TypeVariant, u: &mut arbitrary::Unstructured<'_>) -> Result { match v { {%- for t in type_variant_enum.types %} - TypeVariant::{{ t }} => Ok(Self::{{ t }}(Box::new({{ t }}::arbitrary(u)?))), +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + TypeVariant::{{ t.name }} => Ok(Self::{{ t.name }}(Box::new({{ t.name }}::arbitrary(u)?))), {%- endfor %} } } @@ -235,7 +299,10 @@ impl Type { pub fn default(v: TypeVariant) -> Self { match v { {%- for t in type_variant_enum.types %} - TypeVariant::{{ t }} => Self::{{ t }}(Box::default()), +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + TypeVariant::{{ t.name }} => Self::{{ t.name }}(Box::default()), {%- endfor %} } } @@ -247,7 +314,10 @@ impl Type { #[allow(clippy::match_same_arms)] match self { {%- for t in type_variant_enum.types %} - Self::{{ t }}(ref v) => v.as_ref(), +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + Self::{{ t.name }}(ref v) => v.as_ref(), {%- endfor %} } } @@ -257,14 +327,17 @@ impl Type { pub const fn name(&self) -> &'static str { match self { {%- for t in type_variant_enum.types %} - Self::{{ t }}(_) => "{{ t }}", +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + Self::{{ t.name }}(_) => "{{ t.name }}", {%- endfor %} } } #[must_use] #[allow(clippy::too_many_lines)] - pub const fn variants() -> [TypeVariant; {{ type_variant_enum.types.len() }}] { + pub const fn variants() -> &'static [TypeVariant] { Self::VARIANTS } @@ -273,7 +346,10 @@ impl Type { pub const fn variant(&self) -> TypeVariant { match self { {%- for t in type_variant_enum.types %} - Self::{{ t }}(_) => TypeVariant::{{ t }}, +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + Self::{{ t.name }}(_) => TypeVariant::{{ t.name }}, {%- endfor %} } } @@ -298,7 +374,10 @@ impl WriteXdr for Type { fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { match self { {%- for t in type_variant_enum.types %} - Self::{{ t }}(v) => v.write_xdr(w), +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + Self::{{ t.name }}(v) => v.write_xdr(w), {%- endfor %} } } diff --git a/xdr-generator-rust/generator/templates/typedef_alias.rs.jinja b/xdr-generator-rust/generator/templates/typedef_alias.rs.jinja index 80621336..bc461699 100644 --- a/xdr-generator-rust/generator/templates/typedef_alias.rs.jinja +++ b/xdr-generator-rust/generator/templates/typedef_alias.rs.jinja @@ -1,3 +1,6 @@ /// {{ t.name }}{{ t.source_comment }} +{%- if let Some(cfg) = t.cfg %} +#[cfg({{ cfg }})] +{%- endif %} pub type {{ t.name }} = {{ t.type_ref }}; diff --git a/xdr-generator-rust/generator/templates/typedef_newtype.rs.jinja b/xdr-generator-rust/generator/templates/typedef_newtype.rs.jinja index bd95b2f1..b4de126d 100644 --- a/xdr-generator-rust/generator/templates/typedef_newtype.rs.jinja +++ b/xdr-generator-rust/generator/templates/typedef_newtype.rs.jinja @@ -1,4 +1,7 @@ /// {{ t.name }}{{ t.source_comment }} +{%- if let Some(cfg) = t.cfg %} +#[cfg({{ cfg }})] +{%- endif %} #[cfg_eval::cfg_eval] {%- if t.has_default && !t.is_var_array %} #[cfg_attr(feature = "alloc", derive(Default))] @@ -39,6 +42,9 @@ pub struct {{ t.name }}(pub {{ t.type_ref }}); {%- endif %} {% if t.custom_debug -%} +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl core::fmt::Debug for {{ t.name }} { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let v = &self.0; @@ -52,6 +58,9 @@ impl core::fmt::Debug for {{ t.name }} { } {%- endif %} {%- if t.custom_display_fromstr %} +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl core::fmt::Display for {{ t.name }} { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let v = &self.0; @@ -62,6 +71,9 @@ impl core::fmt::Display for {{ t.name }} { } } +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} #[cfg(feature = "alloc")] impl core::str::FromStr for {{ t.name }} { type Err = Error; @@ -71,6 +83,9 @@ impl core::str::FromStr for {{ t.name }} { } {%- endif %} {%- if t.custom_schemars %} +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} #[cfg(feature = "schemars")] impl schemars::JsonSchema for {{ t.name }} { fn schema_name() -> String { @@ -105,6 +120,9 @@ impl schemars::JsonSchema for {{ t.name }} { } } {%- endif %} +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl From<{{ t.name }}> for {{ t.type_ref }} { #[must_use] fn from(x: {{ t.name }}) -> Self { @@ -112,6 +130,9 @@ impl From<{{ t.name }}> for {{ t.type_ref }} { } } +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl From<{{ t.type_ref }}> for {{ t.name }} { #[must_use] fn from(x: {{ t.type_ref }}) -> Self { @@ -119,6 +140,9 @@ impl From<{{ t.type_ref }}> for {{ t.name }} { } } +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl AsRef<{{ t.type_ref }}> for {{ t.name }} { #[must_use] fn as_ref(&self) -> &{{ t.type_ref }} { @@ -126,6 +150,9 @@ impl AsRef<{{ t.type_ref }}> for {{ t.name }} { } } +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl ReadXdr for {{ t.name }} { #[cfg(feature = "std")] fn read_xdr(r: &mut Limited) -> Result { @@ -137,6 +164,9 @@ impl ReadXdr for {{ t.name }} { } } +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl WriteXdr for {{ t.name }} { #[cfg(feature = "std")] fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { @@ -145,6 +175,9 @@ impl WriteXdr for {{ t.name }} { } {%- if t.is_fixed_array %} +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl {{ t.name }} { #[must_use] pub fn as_slice(&self) -> &[{{ t.element_type }}] { @@ -152,6 +185,9 @@ impl {{ t.name }} { } } +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} #[cfg(feature = "alloc")] impl TryFrom> for {{ t.name }} { type Error = Error; @@ -160,6 +196,9 @@ impl TryFrom> for {{ t.name }} { } } +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} #[cfg(feature = "alloc")] impl TryFrom<&Vec<{{ t.element_type }}>> for {{ t.name }} { type Error = Error; @@ -168,6 +207,9 @@ impl TryFrom<&Vec<{{ t.element_type }}>> for {{ t.name }} { } } +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl TryFrom<&[{{ t.element_type }}]> for {{ t.name }} { type Error = Error; fn try_from(x: &[{{ t.element_type }}]) -> Result { @@ -175,6 +217,9 @@ impl TryFrom<&[{{ t.element_type }}]> for {{ t.name }} { } } +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl AsRef<[{{ t.element_type }}]> for {{ t.name }} { #[must_use] fn as_ref(&self) -> &[{{ t.element_type }}] { @@ -184,6 +229,9 @@ impl AsRef<[{{ t.element_type }}]> for {{ t.name }} { {%- endif %} {%- if t.is_var_array %} +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl Deref for {{ t.name }} { type Target = {{ t.type_ref }}; fn deref(&self) -> &Self::Target { @@ -191,6 +239,9 @@ impl Deref for {{ t.name }} { } } +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl From<{{ t.name }}> for Vec<{{ t.element_type }}> { #[must_use] fn from(x: {{ t.name }}) -> Self { @@ -198,6 +249,9 @@ impl From<{{ t.name }}> for Vec<{{ t.element_type }}> { } } +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl TryFrom> for {{ t.name }} { type Error = Error; fn try_from(x: Vec<{{ t.element_type }}>) -> Result { @@ -205,6 +259,9 @@ impl TryFrom> for {{ t.name }} { } } +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} #[cfg(feature = "alloc")] impl TryFrom<&Vec<{{ t.element_type }}>> for {{ t.name }} { type Error = Error; @@ -213,6 +270,9 @@ impl TryFrom<&Vec<{{ t.element_type }}>> for {{ t.name }} { } } +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl AsRef> for {{ t.name }} { #[must_use] fn as_ref(&self) -> &Vec<{{ t.element_type }}> { @@ -220,6 +280,9 @@ impl AsRef> for {{ t.name }} { } } +{% if let Some(cfg) = t.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl AsRef<[{{ t.element_type }}]> for {{ t.name }} { #[cfg(feature = "alloc")] #[must_use] diff --git a/xdr-generator-rust/generator/templates/union.rs.jinja b/xdr-generator-rust/generator/templates/union.rs.jinja index d83a8bbd..4951ce6a 100644 --- a/xdr-generator-rust/generator/templates/union.rs.jinja +++ b/xdr-generator-rust/generator/templates/union.rs.jinja @@ -1,5 +1,8 @@ /// {{ u.name }}{{ u.source_comment }} // union with discriminant {{ u.discriminant_type }} +{%- if let Some(cfg) = u.cfg %} +#[cfg({{ cfg }})] +{%- endif %} #[cfg_eval::cfg_eval] #[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] #[cfg_attr(feature = "arbitrary", derive(Arbitrary))] @@ -37,6 +40,9 @@ pub enum {{ u.name }} { } {%- if u.has_default %} +{% if let Some(cfg) = u.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} #[cfg(feature = "alloc")] impl Default for {{ u.name }} { fn default() -> Self { @@ -49,6 +55,9 @@ impl Default for {{ u.name }} { } {%- endif %} +{% if let Some(cfg) = u.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl {{ u.name }} { pub const VARIANTS: [{{ u.discriminant_type }}; {{ u.arms.len() }}] = [ {%- for arm in u.arms %} @@ -90,6 +99,9 @@ impl {{ u.name }} { } } +{% if let Some(cfg) = u.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl Name for {{ u.name }} { #[must_use] fn name(&self) -> &'static str { @@ -97,6 +109,9 @@ impl Name for {{ u.name }} { } } +{% if let Some(cfg) = u.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl Discriminant<{{ u.discriminant_type }}> for {{ u.name }} { #[must_use] fn discriminant(&self) -> {{ u.discriminant_type }} { @@ -104,14 +119,23 @@ impl Discriminant<{{ u.discriminant_type }}> for {{ u.name }} { } } +{% if let Some(cfg) = u.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl Variants<{{ u.discriminant_type }}> for {{ u.name }} { fn variants() -> slice::Iter<'static, {{ u.discriminant_type }}> { Self::VARIANTS.iter() } } +{% if let Some(cfg) = u.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl Union<{{ u.discriminant_type }}> for {{ u.name }} {} +{% if let Some(cfg) = u.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl ReadXdr for {{ u.name }} { #[cfg(feature = "std")] fn read_xdr(r: &mut Limited) -> Result { @@ -134,6 +158,9 @@ impl ReadXdr for {{ u.name }} { } } +{% if let Some(cfg) = u.cfg -%} +#[cfg({{ cfg }})] +{% endif -%} impl WriteXdr for {{ u.name }} { #[cfg(feature = "std")] fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { diff --git a/xdr-generator-rust/xdr-parser/src/ast.rs b/xdr-generator-rust/xdr-parser/src/ast.rs index ce19ba0e..74ef1932 100644 --- a/xdr-generator-rust/xdr-parser/src/ast.rs +++ b/xdr-generator-rust/xdr-parser/src/ast.rs @@ -91,6 +91,62 @@ impl XdrSpec { pub struct Namespace { pub name: String, pub definitions: Vec, + pub namespaces: Vec, +} + +/// A conditional compilation expression, mapping XDR `#ifdef`/`#ifndef`/`#elif` +/// directives to Rust `#[cfg(feature = "...")]` attributes. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum CfgExpr { + /// `#[cfg(feature = "name")]` + Feature(String), + /// `#[cfg(not(...))]` + Not(Box), + /// `#[cfg(all(...))]` + All(Vec), +} + +impl CfgExpr { + /// Negate this expression, simplifying double negation. + /// `Not(x)` becomes `x`, anything else becomes `Not(self)`. + pub fn negate(self) -> CfgExpr { + match self { + CfgExpr::Not(inner) => *inner, + other => CfgExpr::Not(Box::new(other)), + } + } + + /// Combine two cfg expressions with `all(...)`, flattening nested `All`. + /// + /// Useful for combining an `#ifdef`-derived cfg with a file-based cfg. + pub fn and(self, other: CfgExpr) -> CfgExpr { + let mut parts = Vec::new(); + match self { + CfgExpr::All(inner) => parts.extend(inner), + other_expr => parts.push(other_expr), + } + match other { + CfgExpr::All(inner) => parts.extend(inner), + other_expr => parts.push(other_expr), + } + if parts.len() == 1 { + parts.into_iter().next().unwrap() + } else { + CfgExpr::All(parts) + } + } + + /// Render as a Rust `#[cfg(...)]` attribute string (without the outer `#[cfg()]`). + pub fn render(&self) -> String { + match self { + CfgExpr::Feature(name) => format!("feature = \"{name}\""), + CfgExpr::Not(inner) => format!("not({})", inner.render()), + CfgExpr::All(exprs) => { + let parts: Vec = exprs.iter().map(|e| e.render()).collect(); + format!("all({})", parts.join(", ")) + } + } + } } /// A top-level definition. @@ -145,6 +201,28 @@ impl Definition { Definition::Const(c) => c.file_index, } } + + /// Get the cfg expression for conditional compilation, if any. + pub fn cfg(&self) -> Option<&CfgExpr> { + match self { + Definition::Struct(s) => s.cfg.as_ref(), + Definition::Enum(e) => e.cfg.as_ref(), + Definition::Union(u) => u.cfg.as_ref(), + Definition::Typedef(t) => t.cfg.as_ref(), + Definition::Const(c) => c.cfg.as_ref(), + } + } + + /// Set the cfg expression for conditional compilation. + pub fn set_cfg(&mut self, cfg: Option) { + match self { + Definition::Struct(s) => s.cfg = cfg, + Definition::Enum(e) => e.cfg = cfg, + Definition::Union(u) => u.cfg = cfg, + Definition::Typedef(t) => t.cfg = cfg, + Definition::Const(c) => c.cfg = cfg, + } + } } /// A struct definition. @@ -160,6 +238,8 @@ pub struct Struct { pub parent: Option, /// Index into `XdrSpec::files` for the file this was parsed from. pub file_index: usize, + /// Conditional compilation expression from `#ifdef`/`#ifndef`. + pub cfg: Option, } /// An enum definition. @@ -173,6 +253,8 @@ pub struct Enum { pub source: String, /// Index into `XdrSpec::files` for the file this was parsed from. pub file_index: usize, + /// Conditional compilation expression from `#ifdef`/`#ifndef`. + pub cfg: Option, } impl Enum { @@ -194,6 +276,7 @@ impl Enum { member_prefix, source, file_index: 0, + cfg: None, } } } @@ -212,6 +295,8 @@ pub struct Union { pub parent: Option, /// Index into `XdrSpec::files` for the file this was parsed from. pub file_index: usize, + /// Conditional compilation expression from `#ifdef`/`#ifndef`. + pub cfg: Option, } /// A typedef definition. @@ -223,6 +308,8 @@ pub struct Typedef { pub source: String, /// Index into `XdrSpec::files` for the file this was parsed from. pub file_index: usize, + /// Conditional compilation expression from `#ifdef`/`#ifndef`. + pub cfg: Option, } /// A const definition. @@ -236,6 +323,8 @@ pub struct Const { pub source: String, /// Index into `XdrSpec::files` for the file this was parsed from. pub file_index: usize, + /// Conditional compilation expression from `#ifdef`/`#ifndef`. + pub cfg: Option, } /// XDR type specification. diff --git a/xdr-generator-rust/xdr-parser/src/lexer.rs b/xdr-generator-rust/xdr-parser/src/lexer.rs index 50e87a19..fba34a31 100644 --- a/xdr-generator-rust/xdr-parser/src/lexer.rs +++ b/xdr-generator-rust/xdr-parser/src/lexer.rs @@ -85,6 +85,18 @@ pub enum Token { #[token("=")] Eq, + // Preprocessor conditionals + #[regex(r"#ifdef[ \t]+([a-zA-Z_][a-zA-Z0-9_]*)", parse_directive_ident)] + IfDef(std::string::String), + #[regex(r"#ifndef[ \t]+([a-zA-Z_][a-zA-Z0-9_]*)", parse_directive_ident)] + IfNDef(std::string::String), + #[regex(r"#elif[ \t]+([a-zA-Z_][a-zA-Z0-9_]*)", parse_directive_ident)] + Elif(std::string::String), + #[regex(r"#else")] + Else, + #[regex(r"#endif")] + EndIf, + // End of file (not produced by Logos, added manually) Eof, } @@ -96,6 +108,18 @@ pub enum IntBase { Hexadecimal, } +fn parse_directive_ident(lex: &logos::Lexer) -> Option { + // The regex captures "#ifdef IDENT", "#ifndef IDENT", or "#elif IDENT". + // Extract the identifier (last whitespace-separated token). + let slice = lex.slice(); + let ident = slice.rsplit(|c: char| c.is_ascii_whitespace()).next()?; + if ident.is_empty() { + None + } else { + Some(ident.to_string()) + } +} + fn parse_hex(lex: &logos::Lexer) -> Option<(i64, IntBase)> { let slice = lex.slice(); // Parse as u64 first to handle the full range of hex values (e.g., 0xFFFFFFFFFFFFFFFF), diff --git a/xdr-generator-rust/xdr-parser/src/parser.rs b/xdr-generator-rust/xdr-parser/src/parser.rs index 29b17a4f..c4510615 100644 --- a/xdr-generator-rust/xdr-parser/src/parser.rs +++ b/xdr-generator-rust/xdr-parser/src/parser.rs @@ -78,6 +78,8 @@ struct Parser { global_values: HashMap, /// Index of the file currently being parsed file_index: usize, + /// Stack of cfg conditions from enclosing `#ifdef`/`#ifndef`/`#elif`/`#else` blocks. + cfg_stack: Vec, } impl Parser { @@ -93,6 +95,7 @@ impl Parser { root_parent: None, global_values, file_index: 0, + cfg_stack: Vec::new(), }) } @@ -100,31 +103,158 @@ impl Parser { fn parse(&mut self) -> Result { let mut spec = XdrSpec::default(); - while *self.peek() != Token::Eof { - // Skip any extra semicolons at the top level + self.parse_definitions_until(&mut spec.definitions, &mut spec.namespaces, |tok| { + *tok == Token::Eof + })?; + + // Any remaining extracted definitions (shouldn't be any, but just in case) + for extracted in self.extracted_definitions.drain(..) { + spec.definitions.push(extracted); + } + + Ok(spec) + } + + /// Parse definitions until `stop` returns true. + /// Handles `#ifdef`/`#ifndef`/`#elif`/`#else`/`#endif` blocks. + fn parse_definitions_until( + &mut self, + definitions: &mut Vec, + namespaces: &mut Vec, + stop: impl Fn(&Token) -> bool, + ) -> Result<(), ParseError> { + while !stop(self.peek()) { + // Skip any extra semicolons while *self.peek() == Token::Semi { self.advance(); } - if *self.peek() == Token::Eof { + if stop(self.peek()) { break; } - match self.peek() { + match self.peek().clone() { Token::Namespace => { let ns = self.parse_namespace()?; - spec.namespaces.push(ns); + namespaces.push(ns); + } + Token::IfDef(_) | Token::IfNDef(_) => { + self.parse_ifdef_block(definitions, namespaces)?; + } + Token::Else | Token::EndIf => { + return Err(self.make_unexpected_directive_error()); + } + Token::Elif(_) => { + return Err(self.make_unexpected_directive_error()); } _ => { - self.parse_definition_into(&mut spec.definitions)?; + self.parse_definition_into(definitions)?; } } } + Ok(()) + } - // Any remaining extracted definitions (shouldn't be any, but just in case) - for extracted in self.extracted_definitions.drain(..) { - spec.definitions.push(extracted); + /// Parse an `#ifdef`/`#ifndef` block including `#elif`/`#else`/`#endif`. + fn parse_ifdef_block( + &mut self, + definitions: &mut Vec, + namespaces: &mut Vec, + ) -> Result<(), ParseError> { + // Parse the initial #ifdef/#ifndef + let first_cfg = match self.peek().clone() { + Token::IfDef(name) => { + self.advance(); + CfgExpr::Feature(name) + } + Token::IfNDef(name) => { + self.advance(); + CfgExpr::Not(Box::new(CfgExpr::Feature(name))) + } + _ => unreachable!(), + }; + + // Track the actual condition for each branch (for #elif/#else negation) + let mut seen_conditions = vec![first_cfg.clone()]; + + // Parse the #ifdef body + self.cfg_stack.push(first_cfg); + self.parse_definitions_until(definitions, namespaces, |tok| { + matches!( + tok, + Token::Elif(_) | Token::Else | Token::EndIf | Token::Eof + ) + })?; + self.cfg_stack.pop(); + + // Handle #elif branches + while let Token::Elif(elif_name) = self.peek().clone() { + self.advance(); + + // #elif FOO means: none of the previous branches matched AND feature = "FOO" + let elif_feature = CfgExpr::Feature(elif_name); + let mut parts: Vec = + seen_conditions.iter().map(|c| c.clone().negate()).collect(); + parts.push(elif_feature.clone()); + let elif_cfg = CfgExpr::All(parts); + + seen_conditions.push(elif_feature); + + self.cfg_stack.push(elif_cfg); + self.parse_definitions_until(definitions, namespaces, |tok| { + matches!( + tok, + Token::Elif(_) | Token::Else | Token::EndIf | Token::Eof + ) + })?; + self.cfg_stack.pop(); } - Ok(spec) + // Handle #else + if *self.peek() == Token::Else { + self.advance(); + + // #else means: none of the previous conditions were true + let else_cfg = if seen_conditions.len() == 1 { + seen_conditions.into_iter().next().unwrap().negate() + } else { + let negated: Vec = + seen_conditions.into_iter().map(|c| c.negate()).collect(); + CfgExpr::All(negated) + }; + + self.cfg_stack.push(else_cfg); + self.parse_definitions_until(definitions, namespaces, |tok| { + matches!(tok, Token::EndIf | Token::Eof) + })?; + self.cfg_stack.pop(); + } + + // Expect #endif + if *self.peek() == Token::EndIf { + self.advance(); + } else { + return Err(self.unexpected_token_error("#endif".to_string(), self.peek().clone())); + } + + Ok(()) + } + + /// Compute the current cfg expression from the cfg_stack. + fn current_cfg(&self) -> Option { + match self.cfg_stack.len() { + 0 => None, + 1 => Some(self.cfg_stack[0].clone()), + _ => { + // Flatten nested All() expressions for cleaner output. + let mut parts = Vec::new(); + for expr in &self.cfg_stack { + match expr { + CfgExpr::All(inner) => parts.extend(inner.iter().cloned()), + other => parts.push(other.clone()), + } + } + Some(CfgExpr::All(parts)) + } + } } fn parse_namespace(&mut self) -> Result { @@ -133,21 +263,18 @@ impl Parser { self.expect(Token::LBrace)?; let mut definitions = Vec::new(); - while *self.peek() != Token::RBrace && *self.peek() != Token::Eof { - // Skip any extra semicolons - while *self.peek() == Token::Semi { - self.advance(); - } - if *self.peek() == Token::RBrace { - break; - } - - self.parse_definition_into(&mut definitions)?; - } + let mut namespaces = Vec::new(); + self.parse_definitions_until(&mut definitions, &mut namespaces, |tok| { + matches!(tok, Token::RBrace | Token::Eof) + })?; self.expect(Token::RBrace)?; - Ok(Namespace { name, definitions }) + Ok(Namespace { + name, + definitions, + namespaces, + }) } /// Parse a single definition, prepending any extracted nested definitions @@ -155,7 +282,7 @@ impl Parser { fn parse_definition_into(&mut self, out: &mut Vec) -> Result<(), ParseError> { let extract_start = self.extracted_definitions.len(); - let def = self.parse_definition()?; + let def = self.parse_definition(extract_start)?; // Insert any newly extracted definitions before this definition for extracted in self.extracted_definitions.drain(extract_start..) { @@ -166,11 +293,13 @@ impl Parser { Ok(()) } - fn parse_definition(&mut self) -> Result { + fn parse_definition(&mut self, extract_start: usize) -> Result { // Mark the start of this definition for source extraction self.def_start_pos = self.pos; - match self.peek() { + let cfg = self.current_cfg(); + + let mut def = match self.peek() { Token::Struct => self.parse_struct().map(Definition::Struct), Token::Enum => self.parse_enum().map(Definition::Enum), Token::Union => self.parse_union().map(Definition::Union), @@ -180,7 +309,21 @@ impl Parser { "struct, enum, union, typedef, or const".to_string(), other.clone(), )), + }?; + + def.set_cfg(cfg.clone()); + + // Also set cfg on any extracted nested definitions from this definition. + // Only apply to definitions extracted during this parse (from extract_start). + if cfg.is_some() { + for extracted in &mut self.extracted_definitions[extract_start..] { + if extracted.cfg().is_none() { + extracted.set_cfg(cfg.clone()); + } + } } + + Ok(def) } fn parse_struct(&mut self) -> Result { @@ -215,6 +358,7 @@ impl Parser { is_nested: false, parent: None, file_index: self.file_index, + cfg: None, }) } @@ -314,6 +458,7 @@ impl Parser { is_nested: false, parent: None, file_index: self.file_index, + cfg: None, }) } @@ -335,6 +480,7 @@ impl Parser { type_, source, file_index: self.file_index, + cfg: None, }) } @@ -356,6 +502,7 @@ impl Parser { base, source, file_index: self.file_index, + cfg: None, }) } @@ -539,6 +686,7 @@ impl Parser { is_nested: true, parent: self.root_parent.clone(), file_index: self.file_index, + cfg: None, }; self.extracted_definitions @@ -835,6 +983,21 @@ impl Parser { } /// Create an `UnexpectedToken` error with the current position. + fn make_unexpected_directive_error(&self) -> ParseError { + let directive = match self.peek() { + Token::Else => "else", + Token::EndIf => "endif", + Token::Elif(_) => "elif", + _ => "unknown", + }; + let (line, col) = self.current_position(); + ParseError::UnexpectedDirective { + directive: directive.to_string(), + line, + col, + } + } + fn unexpected_token_error(&self, expected: String, got: Token) -> ParseError { let (line, col) = self.current_position(); ParseError::UnexpectedToken { @@ -913,6 +1076,7 @@ impl Parser { is_nested: true, parent: self.root_parent.clone(), file_index: self.file_index, + cfg: None, }; // Fix up parent relationships for any definitions extracted during union parsing @@ -994,6 +1158,12 @@ pub enum ParseError { UnsupportedDefaultArm { line: usize, col: usize }, #[error("{line}:{col}: integer value {value} overflows target type")] IntegerOverflow { value: i64, line: usize, col: usize }, + #[error("{line}:{col}: unexpected #{directive} outside of #ifdef block")] + UnexpectedDirective { + directive: String, + line: usize, + col: usize, + }, } /// Result of `parse_type`: either a regular AST type or an anonymous union diff --git a/xdr-generator-rust/xdr-parser/src/tests/lexer.rs b/xdr-generator-rust/xdr-parser/src/tests/lexer.rs index 0803a038..39e5207a 100644 --- a/xdr-generator-rust/xdr-parser/src/tests/lexer.rs +++ b/xdr-generator-rust/xdr-parser/src/tests/lexer.rs @@ -1,5 +1,59 @@ use crate::lexer::{IntBase, Lexer, Token}; +#[test] +fn test_ifdef_tokens() { + let input = "#ifdef FEATURE_X\nstruct Foo {};\n#endif"; + let lexer = Lexer::new(input); + let (spanned_tokens, _) = lexer.tokenize_with_spans().unwrap(); + let tokens: Vec = spanned_tokens.into_iter().map(|st| st.token).collect(); + assert_eq!( + tokens, + vec![ + Token::IfDef("FEATURE_X".into()), + Token::Struct, + Token::Ident("Foo".into()), + Token::LBrace, + Token::RBrace, + Token::Semi, + Token::EndIf, + Token::Eof, + ] + ); +} + +#[test] +fn test_ifndef_token() { + let input = "#ifndef MY_FEATURE"; + let lexer = Lexer::new(input); + let (spanned_tokens, _) = lexer.tokenize_with_spans().unwrap(); + let tokens: Vec = spanned_tokens.into_iter().map(|st| st.token).collect(); + assert_eq!( + tokens, + vec![Token::IfNDef("MY_FEATURE".into()), Token::Eof,] + ); +} + +#[test] +fn test_elif_token() { + let input = "#elif OTHER_FEATURE"; + let lexer = Lexer::new(input); + let (spanned_tokens, _) = lexer.tokenize_with_spans().unwrap(); + let tokens: Vec = spanned_tokens.into_iter().map(|st| st.token).collect(); + assert_eq!( + tokens, + vec![Token::Elif("OTHER_FEATURE".into()), Token::Eof,] + ); +} + +#[test] +fn test_else_endif_tokens() { + let input = "#else\n#endif"; + let lexer = Lexer::new(input); + let (spanned_tokens, _) = lexer.tokenize_with_spans().unwrap(); + let tokens: Vec = spanned_tokens.into_iter().map(|st| st.token).collect(); + assert_eq!(tokens, vec![Token::Else, Token::EndIf, Token::Eof,]); +} + #[test] fn test_simple() { let input = "struct Foo { int x; };"; diff --git a/xdr-generator-rust/xdr-parser/src/tests/parser.rs b/xdr-generator-rust/xdr-parser/src/tests/parser.rs index 5fed8ba4..ddfb52c3 100644 --- a/xdr-generator-rust/xdr-parser/src/tests/parser.rs +++ b/xdr-generator-rust/xdr-parser/src/tests/parser.rs @@ -1,4 +1,6 @@ -use crate::ast::{Definition, Enum, EnumMember, Size, Struct, StructMember, Type, Typedef}; +use crate::ast::{ + CfgExpr, Definition, Enum, EnumMember, Size, Struct, StructMember, Type, Typedef, +}; use crate::parser::parse; #[test] @@ -19,10 +21,11 @@ fn test_parse_struct() { type_: Type::UnsignedHyper, }, ], - source: "struct Foo { int x; unsigned hyper y; }".to_string(), + source: "struct Foo { int x; unsigned hyper y; };".to_string(), is_nested: false, parent: None, file_index: 0, + cfg: None, })] ); } @@ -53,8 +56,9 @@ fn test_parse_enum() { }, ], member_prefix: String::new(), - source: "enum Color { RED = 0, GREEN = 1, BLUE = 2 }".to_string(), + source: "enum Color { RED = 0, GREEN = 1, BLUE = 2 };".to_string(), file_index: 0, + cfg: None, })] ); } @@ -68,8 +72,9 @@ fn test_parse_typedef() { [Definition::Typedef(Typedef { name: "Hash".to_string(), type_: Type::OpaqueFixed(Size::Literal(32)), - source: "typedef opaque Hash[32]".to_string(), + source: "typedef opaque Hash[32];".to_string(), file_index: 0, + cfg: None, })] ); } @@ -118,3 +123,489 @@ fn test_deeply_nested_parents_assigned_during_parse() { "inline struct parent should be the top-level union" ); } + +// ============================================================================= +// #ifdef / #ifndef / #elif / #else / #endif tests +// ============================================================================= + +#[test] +fn test_ifdef_simple() { + let input = r#" + #ifdef FEATURE_X + struct Foo { int x; }; + #endif + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 1); + assert_eq!(spec.definitions[0].name(), "Foo"); + assert_eq!( + spec.definitions[0].cfg(), + Some(&CfgExpr::Feature("FEATURE_X".to_string())) + ); +} + +#[test] +fn test_ifndef_simple() { + let input = r#" + #ifndef FEATURE_X + struct Foo { int x; }; + #endif + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 1); + assert_eq!( + spec.definitions[0].cfg(), + Some(&CfgExpr::Not(Box::new(CfgExpr::Feature( + "FEATURE_X".to_string() + )))) + ); +} + +#[test] +fn test_ifdef_else() { + let input = r#" + #ifdef FEATURE_X + struct Foo { int x; }; + #else + struct Bar { int y; }; + #endif + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 2); + + assert_eq!(spec.definitions[0].name(), "Foo"); + assert_eq!( + spec.definitions[0].cfg(), + Some(&CfgExpr::Feature("FEATURE_X".to_string())) + ); + + assert_eq!(spec.definitions[1].name(), "Bar"); + assert_eq!( + spec.definitions[1].cfg(), + Some(&CfgExpr::Not(Box::new(CfgExpr::Feature( + "FEATURE_X".to_string() + )))) + ); +} + +#[test] +fn test_ifndef_else() { + let input = r#" + #ifndef FEATURE_X + struct Foo { int x; }; + #else + struct Bar { int y; }; + #endif + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 2); + + // #ifndef FEATURE_X => not(feature = "FEATURE_X") + assert_eq!(spec.definitions[0].name(), "Foo"); + assert_eq!( + spec.definitions[0].cfg(), + Some(&CfgExpr::Not(Box::new(CfgExpr::Feature( + "FEATURE_X".to_string() + )))) + ); + + // #else of #ifndef => feature = "FEATURE_X" + assert_eq!(spec.definitions[1].name(), "Bar"); + assert_eq!( + spec.definitions[1].cfg(), + Some(&CfgExpr::Feature("FEATURE_X".to_string())) + ); +} + +#[test] +fn test_ifdef_elif() { + let input = r#" + #ifdef FEATURE_A + struct Foo { int x; }; + #elif FEATURE_B + struct Bar { int y; }; + #endif + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 2); + + assert_eq!(spec.definitions[0].name(), "Foo"); + assert_eq!( + spec.definitions[0].cfg(), + Some(&CfgExpr::Feature("FEATURE_A".to_string())) + ); + + assert_eq!(spec.definitions[1].name(), "Bar"); + assert_eq!( + spec.definitions[1].cfg(), + Some(&CfgExpr::All(vec![ + CfgExpr::Not(Box::new(CfgExpr::Feature("FEATURE_A".to_string()))), + CfgExpr::Feature("FEATURE_B".to_string()), + ])) + ); +} + +#[test] +fn test_ifdef_elif_else() { + let input = r#" + #ifdef FEATURE_A + struct Foo { int x; }; + #elif FEATURE_B + struct Bar { int y; }; + #else + struct Baz { int z; }; + #endif + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 3); + + assert_eq!(spec.definitions[0].name(), "Foo"); + assert_eq!( + spec.definitions[0].cfg(), + Some(&CfgExpr::Feature("FEATURE_A".to_string())) + ); + + assert_eq!(spec.definitions[1].name(), "Bar"); + assert_eq!( + spec.definitions[1].cfg(), + Some(&CfgExpr::All(vec![ + CfgExpr::Not(Box::new(CfgExpr::Feature("FEATURE_A".to_string()))), + CfgExpr::Feature("FEATURE_B".to_string()), + ])) + ); + + assert_eq!(spec.definitions[2].name(), "Baz"); + assert_eq!( + spec.definitions[2].cfg(), + Some(&CfgExpr::All(vec![ + CfgExpr::Not(Box::new(CfgExpr::Feature("FEATURE_A".to_string()))), + CfgExpr::Not(Box::new(CfgExpr::Feature("FEATURE_B".to_string()))), + ])) + ); +} + +#[test] +fn test_ifdef_multiple_definitions() { + let input = r#" + #ifdef FEATURE_X + struct Foo { int x; }; + struct Bar { int y; }; + const MAX_SIZE = 100; + #endif + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 3); + + for def in &spec.definitions { + assert_eq!(def.cfg(), Some(&CfgExpr::Feature("FEATURE_X".to_string()))); + } +} + +#[test] +fn test_ifdef_mixed_with_unconditional() { + let input = r#" + struct Always { int x; }; + #ifdef FEATURE_X + struct Sometimes { int y; }; + #endif + struct AlsoAlways { int z; }; + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 3); + + assert_eq!(spec.definitions[0].name(), "Always"); + assert_eq!(spec.definitions[0].cfg(), None); + + assert_eq!(spec.definitions[1].name(), "Sometimes"); + assert_eq!( + spec.definitions[1].cfg(), + Some(&CfgExpr::Feature("FEATURE_X".to_string())) + ); + + assert_eq!(spec.definitions[2].name(), "AlsoAlways"); + assert_eq!(spec.definitions[2].cfg(), None); +} + +#[test] +fn test_ifdef_nested() { + let input = r#" + #ifdef FEATURE_A + #ifdef FEATURE_B + struct Both { int x; }; + #endif + #endif + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 1); + assert_eq!(spec.definitions[0].name(), "Both"); + assert_eq!( + spec.definitions[0].cfg(), + Some(&CfgExpr::All(vec![ + CfgExpr::Feature("FEATURE_A".to_string()), + CfgExpr::Feature("FEATURE_B".to_string()), + ])) + ); +} + +#[test] +fn test_ifdef_const() { + let input = r#" + #ifdef FEATURE_X + const MAX_SIZE = 100; + #endif + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 1); + assert_eq!(spec.definitions[0].name(), "MAX_SIZE"); + assert_eq!( + spec.definitions[0].cfg(), + Some(&CfgExpr::Feature("FEATURE_X".to_string())) + ); +} + +#[test] +fn test_ifdef_enum() { + let input = r#" + #ifdef FEATURE_X + enum Color { RED = 0, GREEN = 1 }; + #endif + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 1); + assert_eq!(spec.definitions[0].name(), "Color"); + assert_eq!( + spec.definitions[0].cfg(), + Some(&CfgExpr::Feature("FEATURE_X".to_string())) + ); +} + +#[test] +fn test_ifdef_typedef() { + let input = r#" + #ifdef FEATURE_X + typedef opaque Hash[32]; + #endif + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 1); + assert_eq!(spec.definitions[0].name(), "Hash"); + assert_eq!( + spec.definitions[0].cfg(), + Some(&CfgExpr::Feature("FEATURE_X".to_string())) + ); +} + +#[test] +fn test_ifdef_union() { + let input = r#" + #ifdef FEATURE_X + union Foo switch (int v) { + case 0: void; + }; + #endif + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 1); + assert_eq!(spec.definitions[0].name(), "Foo"); + assert_eq!( + spec.definitions[0].cfg(), + Some(&CfgExpr::Feature("FEATURE_X".to_string())) + ); +} + +#[test] +fn test_ifdef_empty_block() { + let input = r#" + #ifdef FEATURE_X + #endif + struct Foo { int x; }; + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 1); + assert_eq!(spec.definitions[0].name(), "Foo"); + assert_eq!(spec.definitions[0].cfg(), None); +} + +#[test] +fn test_ifndef_elif() { + let input = r#" + #ifndef FEATURE_A + struct Foo { int x; }; + #elif FEATURE_B + struct Bar { int y; }; + #endif + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 2); + + // #ifndef FEATURE_A => not(feature = "FEATURE_A") + assert_eq!(spec.definitions[0].name(), "Foo"); + assert_eq!( + spec.definitions[0].cfg(), + Some(&CfgExpr::Not(Box::new(CfgExpr::Feature( + "FEATURE_A".to_string() + )))) + ); + + // #elif FEATURE_B after #ifndef FEATURE_A => + // all(feature = "FEATURE_A", feature = "FEATURE_B") + // (negation of not(feature = "A") simplifies to feature = "A") + assert_eq!(spec.definitions[1].name(), "Bar"); + assert_eq!( + spec.definitions[1].cfg(), + Some(&CfgExpr::All(vec![ + CfgExpr::Feature("FEATURE_A".to_string()), + CfgExpr::Feature("FEATURE_B".to_string()), + ])) + ); +} + +#[test] +fn test_ifndef_elif_else() { + let input = r#" + #ifndef FEATURE_A + struct Foo { int x; }; + #elif FEATURE_B + struct Bar { int y; }; + #else + struct Baz { int z; }; + #endif + "#; + let spec = parse(input).unwrap(); + assert_eq!(spec.definitions.len(), 3); + + // #ifndef FEATURE_A => not(feature = "FEATURE_A") + assert_eq!(spec.definitions[0].name(), "Foo"); + assert_eq!( + spec.definitions[0].cfg(), + Some(&CfgExpr::Not(Box::new(CfgExpr::Feature( + "FEATURE_A".to_string() + )))) + ); + + // #elif FEATURE_B => all(feature = "FEATURE_A", feature = "FEATURE_B") + assert_eq!(spec.definitions[1].name(), "Bar"); + assert_eq!( + spec.definitions[1].cfg(), + Some(&CfgExpr::All(vec![ + CfgExpr::Feature("FEATURE_A".to_string()), + CfgExpr::Feature("FEATURE_B".to_string()), + ])) + ); + + // #else => all(feature = "FEATURE_A", not(feature = "FEATURE_B")) + assert_eq!(spec.definitions[2].name(), "Baz"); + assert_eq!( + spec.definitions[2].cfg(), + Some(&CfgExpr::All(vec![ + CfgExpr::Feature("FEATURE_A".to_string()), + CfgExpr::Not(Box::new(CfgExpr::Feature("FEATURE_B".to_string()))), + ])) + ); +} + +#[test] +fn test_ifdef_nested_types_inherit_cfg() { + let input = r#" + #ifdef FEATURE_X + union Outer switch (int v) { + case 0: + struct { int x; } innerField; + }; + #endif + "#; + let spec = parse(input).unwrap(); + + // Both the outer union and the extracted inner struct should have the cfg + let cfg = CfgExpr::Feature("FEATURE_X".to_string()); + for def in &spec.definitions { + assert_eq!( + def.cfg(), + Some(&cfg), + "definition '{}' should have cfg", + def.name() + ); + } +} + +#[test] +fn test_stray_else_error() { + let input = "#else\nstruct Foo { int x; };"; + let result = parse(input); + assert!(result.is_err()); + let err = result.unwrap_err().to_string(); + assert!(err.contains("else"), "error should mention #else: {err}"); +} + +#[test] +fn test_stray_endif_error() { + let input = "#endif"; + let result = parse(input); + assert!(result.is_err()); + let err = result.unwrap_err().to_string(); + assert!(err.contains("endif"), "error should mention #endif: {err}"); +} + +#[test] +fn test_cfg_expr_negate() { + // negate(Feature) => Not(Feature) + let expr = CfgExpr::Feature("X".to_string()); + assert_eq!( + expr.negate(), + CfgExpr::Not(Box::new(CfgExpr::Feature("X".to_string()))) + ); + + // negate(Not(Feature)) => Feature (double-negation elimination) + let expr = CfgExpr::Not(Box::new(CfgExpr::Feature("X".to_string()))); + assert_eq!(expr.negate(), CfgExpr::Feature("X".to_string())); +} + +#[test] +fn test_cfg_expr_and() { + // Feature AND Feature => All + let a = CfgExpr::Feature("A".to_string()); + let b = CfgExpr::Feature("B".to_string()); + assert_eq!( + a.and(b), + CfgExpr::All(vec![ + CfgExpr::Feature("A".to_string()), + CfgExpr::Feature("B".to_string()), + ]) + ); + + // All AND Feature => flattened All + let a = CfgExpr::All(vec![ + CfgExpr::Feature("A".to_string()), + CfgExpr::Feature("B".to_string()), + ]); + let c = CfgExpr::Feature("C".to_string()); + assert_eq!( + a.and(c), + CfgExpr::All(vec![ + CfgExpr::Feature("A".to_string()), + CfgExpr::Feature("B".to_string()), + CfgExpr::Feature("C".to_string()), + ]) + ); +} + +#[test] +fn test_cfg_expr_render_feature() { + let expr = CfgExpr::Feature("FEATURE_X".to_string()); + assert_eq!(expr.render(), r#"feature = "FEATURE_X""#); +} + +#[test] +fn test_cfg_expr_render_not() { + let expr = CfgExpr::Not(Box::new(CfgExpr::Feature("FEATURE_X".to_string()))); + assert_eq!(expr.render(), r#"not(feature = "FEATURE_X")"#); +} + +#[test] +fn test_cfg_expr_render_all() { + let expr = CfgExpr::All(vec![ + CfgExpr::Feature("A".to_string()), + CfgExpr::Not(Box::new(CfgExpr::Feature("B".to_string()))), + ]); + assert_eq!(expr.render(), r#"all(feature = "A", not(feature = "B"))"#); +} From 342d0c8b0f5eeaefe5835d7381f25a0b9dec9acc Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Tue, 17 Mar 2026 23:20:19 +1000 Subject: [PATCH 02/28] remove unnecessary reference on VARIANTS_STR --- src/cli/compare.rs | 2 +- src/cli/decode.rs | 2 +- src/cli/encode.rs | 2 +- src/cli/generate/arbitrary.rs | 2 +- src/cli/generate/default.rs | 2 +- src/cli/types/list.rs | 4 ++-- src/cli/types/schema.rs | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cli/compare.rs b/src/cli/compare.rs index cc479c98..c62211ca 100644 --- a/src/cli/compare.rs +++ b/src/cli/compare.rs @@ -68,7 +68,7 @@ macro_rules! run_x { let f1 = File::open(&self.left).map_err(Error::ReadFile)?; let f2 = File::open(&self.right).map_err(Error::ReadFile)?; let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) + Error::UnknownType(self.r#type.clone(), crate::$m::TypeVariant::VARIANTS_STR) })?; let (t1, t2) = match self.input { InputFormat::Single => { diff --git a/src/cli/decode.rs b/src/cli/decode.rs index f13f2ba2..712c55a6 100644 --- a/src/cli/decode.rs +++ b/src/cli/decode.rs @@ -80,7 +80,7 @@ macro_rules! run_x { fn $f(&self) -> Result<(), Error> { let mut input = util::parse_input(&self.input).map_err(Error::ReadFile)?; let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) + Error::UnknownType(self.r#type.clone(), crate::$m::TypeVariant::VARIANTS_STR) })?; for f in &mut input { match self.input_format { diff --git a/src/cli/encode.rs b/src/cli/encode.rs index abc968d2..a43dd863 100644 --- a/src/cli/encode.rs +++ b/src/cli/encode.rs @@ -116,7 +116,7 @@ macro_rules! run_x { use crate::$m::WriteXdr; let mut input = util::parse_input(&self.input).map_err(Error::ReadFile)?; let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) + Error::UnknownType(self.r#type.clone(), crate::$m::TypeVariant::VARIANTS_STR) })?; for f in &mut input { match self.input_format { diff --git a/src/cli/generate/arbitrary.rs b/src/cli/generate/arbitrary.rs index 7061cb47..1f5d4630 100644 --- a/src/cli/generate/arbitrary.rs +++ b/src/cli/generate/arbitrary.rs @@ -99,7 +99,7 @@ macro_rules! run_x { fn $f(&self) -> Result<(), Error> { use crate::$m::WriteXdr; let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) + Error::UnknownType(self.r#type.clone(), crate::$m::TypeVariant::VARIANTS_STR) })?; let r = rand::random::<[u8; 10_240]>(); let mut u = Unstructured::new(&r); diff --git a/src/cli/generate/default.rs b/src/cli/generate/default.rs index 13ed7ee3..90d71eb7 100644 --- a/src/cli/generate/default.rs +++ b/src/cli/generate/default.rs @@ -98,7 +98,7 @@ macro_rules! run_x { fn $f(&self) -> Result<(), Error> { use crate::$m::WriteXdr; let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) + Error::UnknownType(self.r#type.clone(), crate::$m::TypeVariant::VARIANTS_STR) })?; let v = crate::$m::Type::default(r#type); match self.output_format { diff --git a/src/cli/types/list.rs b/src/cli/types/list.rs index c235b20d..3c9542bb 100644 --- a/src/cli/types/list.rs +++ b/src/cli/types/list.rs @@ -48,8 +48,8 @@ impl Cmd { fn types(channel: &Channel) -> Vec<&'static str> { let types: &[&str] = match channel { - Channel::Curr => &crate::curr::TypeVariant::VARIANTS_STR, - Channel::Next => &crate::next::TypeVariant::VARIANTS_STR, + Channel::Curr => crate::curr::TypeVariant::VARIANTS_STR, + Channel::Next => crate::next::TypeVariant::VARIANTS_STR, }; let mut types: Vec<&'static str> = types.to_vec(); types.sort_unstable(); diff --git a/src/cli/types/schema.rs b/src/cli/types/schema.rs index 67d6a315..bd701e73 100644 --- a/src/cli/types/schema.rs +++ b/src/cli/types/schema.rs @@ -38,7 +38,7 @@ macro_rules! run_x { fn $f(&self) -> Result<(), Error> { use std::str::FromStr; let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) + Error::UnknownType(self.r#type.clone(), crate::$m::TypeVariant::VARIANTS_STR) })?; let settings = match self.output { OutputFormat::JsonSchemaDraft201909 => schemars::settings_draft201909(), From fb663d4c17a847063e6935e56770f3033bcea4e9 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Tue, 17 Mar 2026 23:32:47 +1000 Subject: [PATCH 03/28] change VARIANTS and VARIANTS_STR from slices to fixed-size arrays --- src/cli/compare.rs | 2 +- src/cli/decode.rs | 2 +- src/cli/encode.rs | 2 +- src/cli/generate/arbitrary.rs | 2 +- src/cli/generate/default.rs | 2 +- src/cli/guess.rs | 1 - src/cli/types/list.rs | 4 +- src/cli/types/schema.rs | 2 +- src/curr/generated.rs | 1900 ++++++++++++++++- src/next/generated.rs | 1900 ++++++++++++++++- .../generator/templates/type_enum.rs.jinja | 52 +- 11 files changed, 3830 insertions(+), 39 deletions(-) diff --git a/src/cli/compare.rs b/src/cli/compare.rs index c62211ca..cc479c98 100644 --- a/src/cli/compare.rs +++ b/src/cli/compare.rs @@ -68,7 +68,7 @@ macro_rules! run_x { let f1 = File::open(&self.left).map_err(Error::ReadFile)?; let f2 = File::open(&self.right).map_err(Error::ReadFile)?; let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), crate::$m::TypeVariant::VARIANTS_STR) + Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) })?; let (t1, t2) = match self.input { InputFormat::Single => { diff --git a/src/cli/decode.rs b/src/cli/decode.rs index 712c55a6..f13f2ba2 100644 --- a/src/cli/decode.rs +++ b/src/cli/decode.rs @@ -80,7 +80,7 @@ macro_rules! run_x { fn $f(&self) -> Result<(), Error> { let mut input = util::parse_input(&self.input).map_err(Error::ReadFile)?; let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), crate::$m::TypeVariant::VARIANTS_STR) + Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) })?; for f in &mut input { match self.input_format { diff --git a/src/cli/encode.rs b/src/cli/encode.rs index a43dd863..abc968d2 100644 --- a/src/cli/encode.rs +++ b/src/cli/encode.rs @@ -116,7 +116,7 @@ macro_rules! run_x { use crate::$m::WriteXdr; let mut input = util::parse_input(&self.input).map_err(Error::ReadFile)?; let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), crate::$m::TypeVariant::VARIANTS_STR) + Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) })?; for f in &mut input { match self.input_format { diff --git a/src/cli/generate/arbitrary.rs b/src/cli/generate/arbitrary.rs index 1f5d4630..7061cb47 100644 --- a/src/cli/generate/arbitrary.rs +++ b/src/cli/generate/arbitrary.rs @@ -99,7 +99,7 @@ macro_rules! run_x { fn $f(&self) -> Result<(), Error> { use crate::$m::WriteXdr; let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), crate::$m::TypeVariant::VARIANTS_STR) + Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) })?; let r = rand::random::<[u8; 10_240]>(); let mut u = Unstructured::new(&r); diff --git a/src/cli/generate/default.rs b/src/cli/generate/default.rs index 90d71eb7..13ed7ee3 100644 --- a/src/cli/generate/default.rs +++ b/src/cli/generate/default.rs @@ -98,7 +98,7 @@ macro_rules! run_x { fn $f(&self) -> Result<(), Error> { use crate::$m::WriteXdr; let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), crate::$m::TypeVariant::VARIANTS_STR) + Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) })?; let v = crate::$m::Type::default(r#type); match self.output_format { diff --git a/src/cli/guess.rs b/src/cli/guess.rs index cef2c77b..3f987e81 100644 --- a/src/cli/guess.rs +++ b/src/cli/guess.rs @@ -72,7 +72,6 @@ macro_rules! run_x { let mut rr = ResetRead::new(self.input()?); let mut guessed = false; 'variants: for v in crate::$m::TypeVariant::VARIANTS { - let v = *v; rr.reset(); let count: usize = match self.input_format { InputFormat::Single => { diff --git a/src/cli/types/list.rs b/src/cli/types/list.rs index 3c9542bb..c235b20d 100644 --- a/src/cli/types/list.rs +++ b/src/cli/types/list.rs @@ -48,8 +48,8 @@ impl Cmd { fn types(channel: &Channel) -> Vec<&'static str> { let types: &[&str] = match channel { - Channel::Curr => crate::curr::TypeVariant::VARIANTS_STR, - Channel::Next => crate::next::TypeVariant::VARIANTS_STR, + Channel::Curr => &crate::curr::TypeVariant::VARIANTS_STR, + Channel::Next => &crate::next::TypeVariant::VARIANTS_STR, }; let mut types: Vec<&'static str> = types.to_vec(); types.sort_unstable(); diff --git a/src/cli/types/schema.rs b/src/cli/types/schema.rs index bd701e73..67d6a315 100644 --- a/src/cli/types/schema.rs +++ b/src/cli/types/schema.rs @@ -38,7 +38,7 @@ macro_rules! run_x { fn $f(&self) -> Result<(), Error> { use std::str::FromStr; let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), crate::$m::TypeVariant::VARIANTS_STR) + Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) })?; let settings = match self.output { OutputFormat::JsonSchemaDraft201909 => schemars::settings_draft201909(), diff --git a/src/curr/generated.rs b/src/curr/generated.rs index c130ddcc..6cc1f713 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -51440,9 +51440,9 @@ pub enum TypeVariant { } impl TypeVariant { - // VARIANTS and VARIANTS_STR are slices (not fixed-size arrays) because - // individual entries may be #[cfg]-gated, so the count varies by enabled features. - pub const VARIANTS: &[TypeVariant] = &[ + // Private const slice used to compute the variant count, supporting + // cfg-gated entries whose presence varies by enabled features. + const _VARIANTS: &[TypeVariant] = &[ TypeVariant::Value, TypeVariant::ScpBallot, TypeVariant::ScpStatementType, @@ -51912,7 +51912,947 @@ impl TypeVariant { TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, ]; - pub const VARIANTS_STR: &[&str] = &[ + pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = [ + TypeVariant::Value, + TypeVariant::ScpBallot, + TypeVariant::ScpStatementType, + TypeVariant::ScpNomination, + TypeVariant::ScpStatement, + TypeVariant::ScpStatementPledges, + TypeVariant::ScpStatementPrepare, + TypeVariant::ScpStatementConfirm, + TypeVariant::ScpStatementExternalize, + TypeVariant::ScpEnvelope, + TypeVariant::ScpQuorumSet, + TypeVariant::EncodedLedgerKey, + TypeVariant::ConfigSettingContractExecutionLanesV0, + TypeVariant::ConfigSettingContractComputeV0, + TypeVariant::ConfigSettingContractParallelComputeV0, + TypeVariant::ConfigSettingContractLedgerCostV0, + TypeVariant::ConfigSettingContractLedgerCostExtV0, + TypeVariant::ConfigSettingContractHistoricalDataV0, + TypeVariant::ConfigSettingContractEventsV0, + TypeVariant::ConfigSettingContractBandwidthV0, + TypeVariant::ContractCostType, + TypeVariant::ContractCostParamEntry, + TypeVariant::StateArchivalSettings, + TypeVariant::EvictionIterator, + TypeVariant::ConfigSettingScpTiming, + TypeVariant::FrozenLedgerKeys, + TypeVariant::FrozenLedgerKeysDelta, + TypeVariant::FreezeBypassTxs, + TypeVariant::FreezeBypassTxsDelta, + TypeVariant::ContractCostParams, + TypeVariant::ConfigSettingId, + TypeVariant::ConfigSettingEntry, + TypeVariant::ScEnvMetaKind, + TypeVariant::ScEnvMetaEntry, + TypeVariant::ScEnvMetaEntryInterfaceVersion, + TypeVariant::ScMetaV0, + TypeVariant::ScMetaKind, + TypeVariant::ScMetaEntry, + TypeVariant::ScSpecType, + TypeVariant::ScSpecTypeOption, + TypeVariant::ScSpecTypeResult, + TypeVariant::ScSpecTypeVec, + TypeVariant::ScSpecTypeMap, + TypeVariant::ScSpecTypeTuple, + TypeVariant::ScSpecTypeBytesN, + TypeVariant::ScSpecTypeUdt, + TypeVariant::ScSpecTypeDef, + TypeVariant::ScSpecUdtStructFieldV0, + TypeVariant::ScSpecUdtStructV0, + TypeVariant::ScSpecUdtUnionCaseVoidV0, + TypeVariant::ScSpecUdtUnionCaseTupleV0, + TypeVariant::ScSpecUdtUnionCaseV0Kind, + TypeVariant::ScSpecUdtUnionCaseV0, + TypeVariant::ScSpecUdtUnionV0, + TypeVariant::ScSpecUdtEnumCaseV0, + TypeVariant::ScSpecUdtEnumV0, + TypeVariant::ScSpecUdtErrorEnumCaseV0, + TypeVariant::ScSpecUdtErrorEnumV0, + TypeVariant::ScSpecFunctionInputV0, + TypeVariant::ScSpecFunctionV0, + TypeVariant::ScSpecEventParamLocationV0, + TypeVariant::ScSpecEventParamV0, + TypeVariant::ScSpecEventDataFormat, + TypeVariant::ScSpecEventV0, + TypeVariant::ScSpecEntryKind, + TypeVariant::ScSpecEntry, + TypeVariant::ScValType, + TypeVariant::ScErrorType, + TypeVariant::ScErrorCode, + TypeVariant::ScError, + TypeVariant::UInt128Parts, + TypeVariant::Int128Parts, + TypeVariant::UInt256Parts, + TypeVariant::Int256Parts, + TypeVariant::ContractExecutableType, + TypeVariant::ContractExecutable, + TypeVariant::ScAddressType, + TypeVariant::MuxedEd25519Account, + TypeVariant::ScAddress, + TypeVariant::ScVec, + TypeVariant::ScMap, + TypeVariant::ScBytes, + TypeVariant::ScString, + TypeVariant::ScSymbol, + TypeVariant::ScNonceKey, + TypeVariant::ScContractInstance, + TypeVariant::ScVal, + TypeVariant::ScMapEntry, + TypeVariant::LedgerCloseMetaBatch, + TypeVariant::StoredTransactionSet, + TypeVariant::StoredDebugTransactionSet, + TypeVariant::PersistedScpStateV0, + TypeVariant::PersistedScpStateV1, + TypeVariant::PersistedScpState, + TypeVariant::Thresholds, + TypeVariant::String32, + TypeVariant::String64, + TypeVariant::SequenceNumber, + TypeVariant::DataValue, + TypeVariant::AssetCode4, + TypeVariant::AssetCode12, + TypeVariant::AssetType, + TypeVariant::AssetCode, + TypeVariant::AlphaNum4, + TypeVariant::AlphaNum12, + TypeVariant::Asset, + TypeVariant::Price, + TypeVariant::Liabilities, + TypeVariant::ThresholdIndexes, + TypeVariant::LedgerEntryType, + TypeVariant::Signer, + TypeVariant::AccountFlags, + TypeVariant::SponsorshipDescriptor, + TypeVariant::AccountEntryExtensionV3, + TypeVariant::AccountEntryExtensionV2, + TypeVariant::AccountEntryExtensionV2Ext, + TypeVariant::AccountEntryExtensionV1, + TypeVariant::AccountEntryExtensionV1Ext, + TypeVariant::AccountEntry, + TypeVariant::AccountEntryExt, + TypeVariant::TrustLineFlags, + TypeVariant::LiquidityPoolType, + TypeVariant::TrustLineAsset, + TypeVariant::TrustLineEntryExtensionV2, + TypeVariant::TrustLineEntryExtensionV2Ext, + TypeVariant::TrustLineEntry, + TypeVariant::TrustLineEntryExt, + TypeVariant::TrustLineEntryV1, + TypeVariant::TrustLineEntryV1Ext, + TypeVariant::OfferEntryFlags, + TypeVariant::OfferEntry, + TypeVariant::OfferEntryExt, + TypeVariant::DataEntry, + TypeVariant::DataEntryExt, + TypeVariant::ClaimPredicateType, + TypeVariant::ClaimPredicate, + TypeVariant::ClaimantType, + TypeVariant::Claimant, + TypeVariant::ClaimantV0, + TypeVariant::ClaimableBalanceFlags, + TypeVariant::ClaimableBalanceEntryExtensionV1, + TypeVariant::ClaimableBalanceEntryExtensionV1Ext, + TypeVariant::ClaimableBalanceEntry, + TypeVariant::ClaimableBalanceEntryExt, + TypeVariant::LiquidityPoolConstantProductParameters, + TypeVariant::LiquidityPoolEntry, + TypeVariant::LiquidityPoolEntryBody, + TypeVariant::LiquidityPoolEntryConstantProduct, + TypeVariant::ContractDataDurability, + TypeVariant::ContractDataEntry, + TypeVariant::ContractCodeCostInputs, + TypeVariant::ContractCodeEntry, + TypeVariant::ContractCodeEntryExt, + TypeVariant::ContractCodeEntryV1, + TypeVariant::TtlEntry, + TypeVariant::LedgerEntryExtensionV1, + TypeVariant::LedgerEntryExtensionV1Ext, + TypeVariant::LedgerEntry, + TypeVariant::LedgerEntryData, + TypeVariant::LedgerEntryExt, + TypeVariant::LedgerKey, + TypeVariant::LedgerKeyAccount, + TypeVariant::LedgerKeyTrustLine, + TypeVariant::LedgerKeyOffer, + TypeVariant::LedgerKeyData, + TypeVariant::LedgerKeyClaimableBalance, + TypeVariant::LedgerKeyLiquidityPool, + TypeVariant::LedgerKeyContractData, + TypeVariant::LedgerKeyContractCode, + TypeVariant::LedgerKeyConfigSetting, + TypeVariant::LedgerKeyTtl, + TypeVariant::EnvelopeType, + TypeVariant::BucketListType, + TypeVariant::BucketEntryType, + TypeVariant::HotArchiveBucketEntryType, + TypeVariant::BucketMetadata, + TypeVariant::BucketMetadataExt, + TypeVariant::BucketEntry, + TypeVariant::HotArchiveBucketEntry, + TypeVariant::UpgradeType, + TypeVariant::StellarValueType, + TypeVariant::LedgerCloseValueSignature, + TypeVariant::StellarValue, + TypeVariant::StellarValueExt, + TypeVariant::LedgerHeaderFlags, + TypeVariant::LedgerHeaderExtensionV1, + TypeVariant::LedgerHeaderExtensionV1Ext, + TypeVariant::LedgerHeader, + TypeVariant::LedgerHeaderExt, + TypeVariant::LedgerUpgradeType, + TypeVariant::ConfigUpgradeSetKey, + TypeVariant::LedgerUpgrade, + TypeVariant::ConfigUpgradeSet, + TypeVariant::TxSetComponentType, + TypeVariant::DependentTxCluster, + TypeVariant::ParallelTxExecutionStage, + TypeVariant::ParallelTxsComponent, + TypeVariant::TxSetComponent, + TypeVariant::TxSetComponentTxsMaybeDiscountedFee, + TypeVariant::TransactionPhase, + TypeVariant::TransactionSet, + TypeVariant::TransactionSetV1, + TypeVariant::GeneralizedTransactionSet, + TypeVariant::TransactionResultPair, + TypeVariant::TransactionResultSet, + TypeVariant::TransactionHistoryEntry, + TypeVariant::TransactionHistoryEntryExt, + TypeVariant::TransactionHistoryResultEntry, + TypeVariant::TransactionHistoryResultEntryExt, + TypeVariant::LedgerHeaderHistoryEntry, + TypeVariant::LedgerHeaderHistoryEntryExt, + TypeVariant::LedgerScpMessages, + TypeVariant::ScpHistoryEntryV0, + TypeVariant::ScpHistoryEntry, + TypeVariant::LedgerEntryChangeType, + TypeVariant::LedgerEntryChange, + TypeVariant::LedgerEntryChanges, + TypeVariant::OperationMeta, + TypeVariant::TransactionMetaV1, + TypeVariant::TransactionMetaV2, + TypeVariant::ContractEventType, + TypeVariant::ContractEvent, + TypeVariant::ContractEventBody, + TypeVariant::ContractEventV0, + TypeVariant::DiagnosticEvent, + TypeVariant::SorobanTransactionMetaExtV1, + TypeVariant::SorobanTransactionMetaExt, + TypeVariant::SorobanTransactionMeta, + TypeVariant::TransactionMetaV3, + TypeVariant::OperationMetaV2, + TypeVariant::SorobanTransactionMetaV2, + TypeVariant::TransactionEventStage, + TypeVariant::TransactionEvent, + TypeVariant::TransactionMetaV4, + TypeVariant::InvokeHostFunctionSuccessPreImage, + TypeVariant::TransactionMeta, + TypeVariant::TransactionResultMeta, + TypeVariant::TransactionResultMetaV1, + TypeVariant::UpgradeEntryMeta, + TypeVariant::LedgerCloseMetaV0, + TypeVariant::LedgerCloseMetaExtV1, + TypeVariant::LedgerCloseMetaExt, + TypeVariant::LedgerCloseMetaV1, + TypeVariant::LedgerCloseMetaV2, + TypeVariant::LedgerCloseMeta, + TypeVariant::ErrorCode, + TypeVariant::SError, + TypeVariant::SendMore, + TypeVariant::SendMoreExtended, + TypeVariant::AuthCert, + TypeVariant::Hello, + TypeVariant::Auth, + TypeVariant::IpAddrType, + TypeVariant::PeerAddress, + TypeVariant::PeerAddressIp, + TypeVariant::MessageType, + TypeVariant::DontHave, + TypeVariant::SurveyMessageCommandType, + TypeVariant::SurveyMessageResponseType, + TypeVariant::TimeSlicedSurveyStartCollectingMessage, + TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage, + TypeVariant::TimeSlicedSurveyStopCollectingMessage, + TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage, + TypeVariant::SurveyRequestMessage, + TypeVariant::TimeSlicedSurveyRequestMessage, + TypeVariant::SignedTimeSlicedSurveyRequestMessage, + TypeVariant::EncryptedBody, + TypeVariant::SurveyResponseMessage, + TypeVariant::TimeSlicedSurveyResponseMessage, + TypeVariant::SignedTimeSlicedSurveyResponseMessage, + TypeVariant::PeerStats, + TypeVariant::TimeSlicedNodeData, + TypeVariant::TimeSlicedPeerData, + TypeVariant::TimeSlicedPeerDataList, + TypeVariant::TopologyResponseBodyV2, + TypeVariant::SurveyResponseBody, + TypeVariant::TxAdvertVector, + TypeVariant::FloodAdvert, + TypeVariant::TxDemandVector, + TypeVariant::FloodDemand, + TypeVariant::StellarMessage, + TypeVariant::AuthenticatedMessage, + TypeVariant::AuthenticatedMessageV0, + TypeVariant::LiquidityPoolParameters, + TypeVariant::MuxedAccount, + TypeVariant::MuxedAccountMed25519, + TypeVariant::DecoratedSignature, + TypeVariant::OperationType, + TypeVariant::CreateAccountOp, + TypeVariant::PaymentOp, + TypeVariant::PathPaymentStrictReceiveOp, + TypeVariant::PathPaymentStrictSendOp, + TypeVariant::ManageSellOfferOp, + TypeVariant::ManageBuyOfferOp, + TypeVariant::CreatePassiveSellOfferOp, + TypeVariant::SetOptionsOp, + TypeVariant::ChangeTrustAsset, + TypeVariant::ChangeTrustOp, + TypeVariant::AllowTrustOp, + TypeVariant::ManageDataOp, + TypeVariant::BumpSequenceOp, + TypeVariant::CreateClaimableBalanceOp, + TypeVariant::ClaimClaimableBalanceOp, + TypeVariant::BeginSponsoringFutureReservesOp, + TypeVariant::RevokeSponsorshipType, + TypeVariant::RevokeSponsorshipOp, + TypeVariant::RevokeSponsorshipOpSigner, + TypeVariant::ClawbackOp, + TypeVariant::ClawbackClaimableBalanceOp, + TypeVariant::SetTrustLineFlagsOp, + TypeVariant::LiquidityPoolDepositOp, + TypeVariant::LiquidityPoolWithdrawOp, + TypeVariant::HostFunctionType, + TypeVariant::ContractIdPreimageType, + TypeVariant::ContractIdPreimage, + TypeVariant::ContractIdPreimageFromAddress, + TypeVariant::CreateContractArgs, + TypeVariant::CreateContractArgsV2, + TypeVariant::InvokeContractArgs, + TypeVariant::HostFunction, + TypeVariant::SorobanAuthorizedFunctionType, + TypeVariant::SorobanAuthorizedFunction, + TypeVariant::SorobanAuthorizedInvocation, + TypeVariant::SorobanAddressCredentials, + TypeVariant::SorobanCredentialsType, + TypeVariant::SorobanCredentials, + TypeVariant::SorobanAuthorizationEntry, + TypeVariant::SorobanAuthorizationEntries, + TypeVariant::InvokeHostFunctionOp, + TypeVariant::ExtendFootprintTtlOp, + TypeVariant::RestoreFootprintOp, + TypeVariant::Operation, + TypeVariant::OperationBody, + TypeVariant::HashIdPreimage, + TypeVariant::HashIdPreimageOperationId, + TypeVariant::HashIdPreimageRevokeId, + TypeVariant::HashIdPreimageContractId, + TypeVariant::HashIdPreimageSorobanAuthorization, + TypeVariant::MemoType, + TypeVariant::Memo, + TypeVariant::TimeBounds, + TypeVariant::LedgerBounds, + TypeVariant::PreconditionsV2, + TypeVariant::PreconditionType, + TypeVariant::Preconditions, + TypeVariant::LedgerFootprint, + TypeVariant::SorobanResources, + TypeVariant::SorobanResourcesExtV0, + TypeVariant::SorobanTransactionData, + TypeVariant::SorobanTransactionDataExt, + TypeVariant::TransactionV0, + TypeVariant::TransactionV0Ext, + TypeVariant::TransactionV0Envelope, + TypeVariant::Transaction, + TypeVariant::TransactionExt, + TypeVariant::TransactionV1Envelope, + TypeVariant::FeeBumpTransaction, + TypeVariant::FeeBumpTransactionInnerTx, + TypeVariant::FeeBumpTransactionExt, + TypeVariant::FeeBumpTransactionEnvelope, + TypeVariant::TransactionEnvelope, + TypeVariant::TransactionSignaturePayload, + TypeVariant::TransactionSignaturePayloadTaggedTransaction, + TypeVariant::ClaimAtomType, + TypeVariant::ClaimOfferAtomV0, + TypeVariant::ClaimOfferAtom, + TypeVariant::ClaimLiquidityAtom, + TypeVariant::ClaimAtom, + TypeVariant::CreateAccountResultCode, + TypeVariant::CreateAccountResult, + TypeVariant::PaymentResultCode, + TypeVariant::PaymentResult, + TypeVariant::PathPaymentStrictReceiveResultCode, + TypeVariant::SimplePaymentResult, + TypeVariant::PathPaymentStrictReceiveResult, + TypeVariant::PathPaymentStrictReceiveResultSuccess, + TypeVariant::PathPaymentStrictSendResultCode, + TypeVariant::PathPaymentStrictSendResult, + TypeVariant::PathPaymentStrictSendResultSuccess, + TypeVariant::ManageSellOfferResultCode, + TypeVariant::ManageOfferEffect, + TypeVariant::ManageOfferSuccessResult, + TypeVariant::ManageOfferSuccessResultOffer, + TypeVariant::ManageSellOfferResult, + TypeVariant::ManageBuyOfferResultCode, + TypeVariant::ManageBuyOfferResult, + TypeVariant::SetOptionsResultCode, + TypeVariant::SetOptionsResult, + TypeVariant::ChangeTrustResultCode, + TypeVariant::ChangeTrustResult, + TypeVariant::AllowTrustResultCode, + TypeVariant::AllowTrustResult, + TypeVariant::AccountMergeResultCode, + TypeVariant::AccountMergeResult, + TypeVariant::InflationResultCode, + TypeVariant::InflationPayout, + TypeVariant::InflationResult, + TypeVariant::ManageDataResultCode, + TypeVariant::ManageDataResult, + TypeVariant::BumpSequenceResultCode, + TypeVariant::BumpSequenceResult, + TypeVariant::CreateClaimableBalanceResultCode, + TypeVariant::CreateClaimableBalanceResult, + TypeVariant::ClaimClaimableBalanceResultCode, + TypeVariant::ClaimClaimableBalanceResult, + TypeVariant::BeginSponsoringFutureReservesResultCode, + TypeVariant::BeginSponsoringFutureReservesResult, + TypeVariant::EndSponsoringFutureReservesResultCode, + TypeVariant::EndSponsoringFutureReservesResult, + TypeVariant::RevokeSponsorshipResultCode, + TypeVariant::RevokeSponsorshipResult, + TypeVariant::ClawbackResultCode, + TypeVariant::ClawbackResult, + TypeVariant::ClawbackClaimableBalanceResultCode, + TypeVariant::ClawbackClaimableBalanceResult, + TypeVariant::SetTrustLineFlagsResultCode, + TypeVariant::SetTrustLineFlagsResult, + TypeVariant::LiquidityPoolDepositResultCode, + TypeVariant::LiquidityPoolDepositResult, + TypeVariant::LiquidityPoolWithdrawResultCode, + TypeVariant::LiquidityPoolWithdrawResult, + TypeVariant::InvokeHostFunctionResultCode, + TypeVariant::InvokeHostFunctionResult, + TypeVariant::ExtendFootprintTtlResultCode, + TypeVariant::ExtendFootprintTtlResult, + TypeVariant::RestoreFootprintResultCode, + TypeVariant::RestoreFootprintResult, + TypeVariant::OperationResultCode, + TypeVariant::OperationResult, + TypeVariant::OperationResultTr, + TypeVariant::TransactionResultCode, + TypeVariant::InnerTransactionResult, + TypeVariant::InnerTransactionResultResult, + TypeVariant::InnerTransactionResultExt, + TypeVariant::InnerTransactionResultPair, + TypeVariant::TransactionResult, + TypeVariant::TransactionResultResult, + TypeVariant::TransactionResultExt, + TypeVariant::Hash, + TypeVariant::Uint256, + TypeVariant::Uint32, + TypeVariant::Int32, + TypeVariant::Uint64, + TypeVariant::Int64, + TypeVariant::TimePoint, + TypeVariant::Duration, + TypeVariant::ExtensionPoint, + TypeVariant::CryptoKeyType, + TypeVariant::PublicKeyType, + TypeVariant::SignerKeyType, + TypeVariant::PublicKey, + TypeVariant::SignerKey, + TypeVariant::SignerKeyEd25519SignedPayload, + TypeVariant::Signature, + TypeVariant::SignatureHint, + TypeVariant::NodeId, + TypeVariant::AccountId, + TypeVariant::ContractId, + TypeVariant::Curve25519Secret, + TypeVariant::Curve25519Public, + TypeVariant::HmacSha256Key, + TypeVariant::HmacSha256Mac, + TypeVariant::ShortHashSeed, + TypeVariant::BinaryFuseFilterType, + TypeVariant::SerializedBinaryFuseFilter, + TypeVariant::PoolId, + TypeVariant::ClaimableBalanceIdType, + TypeVariant::ClaimableBalanceId, + ]; + const _VARIANTS_STR: &[&str] = &[ + "Value", + "ScpBallot", + "ScpStatementType", + "ScpNomination", + "ScpStatement", + "ScpStatementPledges", + "ScpStatementPrepare", + "ScpStatementConfirm", + "ScpStatementExternalize", + "ScpEnvelope", + "ScpQuorumSet", + "EncodedLedgerKey", + "ConfigSettingContractExecutionLanesV0", + "ConfigSettingContractComputeV0", + "ConfigSettingContractParallelComputeV0", + "ConfigSettingContractLedgerCostV0", + "ConfigSettingContractLedgerCostExtV0", + "ConfigSettingContractHistoricalDataV0", + "ConfigSettingContractEventsV0", + "ConfigSettingContractBandwidthV0", + "ContractCostType", + "ContractCostParamEntry", + "StateArchivalSettings", + "EvictionIterator", + "ConfigSettingScpTiming", + "FrozenLedgerKeys", + "FrozenLedgerKeysDelta", + "FreezeBypassTxs", + "FreezeBypassTxsDelta", + "ContractCostParams", + "ConfigSettingId", + "ConfigSettingEntry", + "ScEnvMetaKind", + "ScEnvMetaEntry", + "ScEnvMetaEntryInterfaceVersion", + "ScMetaV0", + "ScMetaKind", + "ScMetaEntry", + "ScSpecType", + "ScSpecTypeOption", + "ScSpecTypeResult", + "ScSpecTypeVec", + "ScSpecTypeMap", + "ScSpecTypeTuple", + "ScSpecTypeBytesN", + "ScSpecTypeUdt", + "ScSpecTypeDef", + "ScSpecUdtStructFieldV0", + "ScSpecUdtStructV0", + "ScSpecUdtUnionCaseVoidV0", + "ScSpecUdtUnionCaseTupleV0", + "ScSpecUdtUnionCaseV0Kind", + "ScSpecUdtUnionCaseV0", + "ScSpecUdtUnionV0", + "ScSpecUdtEnumCaseV0", + "ScSpecUdtEnumV0", + "ScSpecUdtErrorEnumCaseV0", + "ScSpecUdtErrorEnumV0", + "ScSpecFunctionInputV0", + "ScSpecFunctionV0", + "ScSpecEventParamLocationV0", + "ScSpecEventParamV0", + "ScSpecEventDataFormat", + "ScSpecEventV0", + "ScSpecEntryKind", + "ScSpecEntry", + "ScValType", + "ScErrorType", + "ScErrorCode", + "ScError", + "UInt128Parts", + "Int128Parts", + "UInt256Parts", + "Int256Parts", + "ContractExecutableType", + "ContractExecutable", + "ScAddressType", + "MuxedEd25519Account", + "ScAddress", + "ScVec", + "ScMap", + "ScBytes", + "ScString", + "ScSymbol", + "ScNonceKey", + "ScContractInstance", + "ScVal", + "ScMapEntry", + "LedgerCloseMetaBatch", + "StoredTransactionSet", + "StoredDebugTransactionSet", + "PersistedScpStateV0", + "PersistedScpStateV1", + "PersistedScpState", + "Thresholds", + "String32", + "String64", + "SequenceNumber", + "DataValue", + "AssetCode4", + "AssetCode12", + "AssetType", + "AssetCode", + "AlphaNum4", + "AlphaNum12", + "Asset", + "Price", + "Liabilities", + "ThresholdIndexes", + "LedgerEntryType", + "Signer", + "AccountFlags", + "SponsorshipDescriptor", + "AccountEntryExtensionV3", + "AccountEntryExtensionV2", + "AccountEntryExtensionV2Ext", + "AccountEntryExtensionV1", + "AccountEntryExtensionV1Ext", + "AccountEntry", + "AccountEntryExt", + "TrustLineFlags", + "LiquidityPoolType", + "TrustLineAsset", + "TrustLineEntryExtensionV2", + "TrustLineEntryExtensionV2Ext", + "TrustLineEntry", + "TrustLineEntryExt", + "TrustLineEntryV1", + "TrustLineEntryV1Ext", + "OfferEntryFlags", + "OfferEntry", + "OfferEntryExt", + "DataEntry", + "DataEntryExt", + "ClaimPredicateType", + "ClaimPredicate", + "ClaimantType", + "Claimant", + "ClaimantV0", + "ClaimableBalanceFlags", + "ClaimableBalanceEntryExtensionV1", + "ClaimableBalanceEntryExtensionV1Ext", + "ClaimableBalanceEntry", + "ClaimableBalanceEntryExt", + "LiquidityPoolConstantProductParameters", + "LiquidityPoolEntry", + "LiquidityPoolEntryBody", + "LiquidityPoolEntryConstantProduct", + "ContractDataDurability", + "ContractDataEntry", + "ContractCodeCostInputs", + "ContractCodeEntry", + "ContractCodeEntryExt", + "ContractCodeEntryV1", + "TtlEntry", + "LedgerEntryExtensionV1", + "LedgerEntryExtensionV1Ext", + "LedgerEntry", + "LedgerEntryData", + "LedgerEntryExt", + "LedgerKey", + "LedgerKeyAccount", + "LedgerKeyTrustLine", + "LedgerKeyOffer", + "LedgerKeyData", + "LedgerKeyClaimableBalance", + "LedgerKeyLiquidityPool", + "LedgerKeyContractData", + "LedgerKeyContractCode", + "LedgerKeyConfigSetting", + "LedgerKeyTtl", + "EnvelopeType", + "BucketListType", + "BucketEntryType", + "HotArchiveBucketEntryType", + "BucketMetadata", + "BucketMetadataExt", + "BucketEntry", + "HotArchiveBucketEntry", + "UpgradeType", + "StellarValueType", + "LedgerCloseValueSignature", + "StellarValue", + "StellarValueExt", + "LedgerHeaderFlags", + "LedgerHeaderExtensionV1", + "LedgerHeaderExtensionV1Ext", + "LedgerHeader", + "LedgerHeaderExt", + "LedgerUpgradeType", + "ConfigUpgradeSetKey", + "LedgerUpgrade", + "ConfigUpgradeSet", + "TxSetComponentType", + "DependentTxCluster", + "ParallelTxExecutionStage", + "ParallelTxsComponent", + "TxSetComponent", + "TxSetComponentTxsMaybeDiscountedFee", + "TransactionPhase", + "TransactionSet", + "TransactionSetV1", + "GeneralizedTransactionSet", + "TransactionResultPair", + "TransactionResultSet", + "TransactionHistoryEntry", + "TransactionHistoryEntryExt", + "TransactionHistoryResultEntry", + "TransactionHistoryResultEntryExt", + "LedgerHeaderHistoryEntry", + "LedgerHeaderHistoryEntryExt", + "LedgerScpMessages", + "ScpHistoryEntryV0", + "ScpHistoryEntry", + "LedgerEntryChangeType", + "LedgerEntryChange", + "LedgerEntryChanges", + "OperationMeta", + "TransactionMetaV1", + "TransactionMetaV2", + "ContractEventType", + "ContractEvent", + "ContractEventBody", + "ContractEventV0", + "DiagnosticEvent", + "SorobanTransactionMetaExtV1", + "SorobanTransactionMetaExt", + "SorobanTransactionMeta", + "TransactionMetaV3", + "OperationMetaV2", + "SorobanTransactionMetaV2", + "TransactionEventStage", + "TransactionEvent", + "TransactionMetaV4", + "InvokeHostFunctionSuccessPreImage", + "TransactionMeta", + "TransactionResultMeta", + "TransactionResultMetaV1", + "UpgradeEntryMeta", + "LedgerCloseMetaV0", + "LedgerCloseMetaExtV1", + "LedgerCloseMetaExt", + "LedgerCloseMetaV1", + "LedgerCloseMetaV2", + "LedgerCloseMeta", + "ErrorCode", + "SError", + "SendMore", + "SendMoreExtended", + "AuthCert", + "Hello", + "Auth", + "IpAddrType", + "PeerAddress", + "PeerAddressIp", + "MessageType", + "DontHave", + "SurveyMessageCommandType", + "SurveyMessageResponseType", + "TimeSlicedSurveyStartCollectingMessage", + "SignedTimeSlicedSurveyStartCollectingMessage", + "TimeSlicedSurveyStopCollectingMessage", + "SignedTimeSlicedSurveyStopCollectingMessage", + "SurveyRequestMessage", + "TimeSlicedSurveyRequestMessage", + "SignedTimeSlicedSurveyRequestMessage", + "EncryptedBody", + "SurveyResponseMessage", + "TimeSlicedSurveyResponseMessage", + "SignedTimeSlicedSurveyResponseMessage", + "PeerStats", + "TimeSlicedNodeData", + "TimeSlicedPeerData", + "TimeSlicedPeerDataList", + "TopologyResponseBodyV2", + "SurveyResponseBody", + "TxAdvertVector", + "FloodAdvert", + "TxDemandVector", + "FloodDemand", + "StellarMessage", + "AuthenticatedMessage", + "AuthenticatedMessageV0", + "LiquidityPoolParameters", + "MuxedAccount", + "MuxedAccountMed25519", + "DecoratedSignature", + "OperationType", + "CreateAccountOp", + "PaymentOp", + "PathPaymentStrictReceiveOp", + "PathPaymentStrictSendOp", + "ManageSellOfferOp", + "ManageBuyOfferOp", + "CreatePassiveSellOfferOp", + "SetOptionsOp", + "ChangeTrustAsset", + "ChangeTrustOp", + "AllowTrustOp", + "ManageDataOp", + "BumpSequenceOp", + "CreateClaimableBalanceOp", + "ClaimClaimableBalanceOp", + "BeginSponsoringFutureReservesOp", + "RevokeSponsorshipType", + "RevokeSponsorshipOp", + "RevokeSponsorshipOpSigner", + "ClawbackOp", + "ClawbackClaimableBalanceOp", + "SetTrustLineFlagsOp", + "LiquidityPoolDepositOp", + "LiquidityPoolWithdrawOp", + "HostFunctionType", + "ContractIdPreimageType", + "ContractIdPreimage", + "ContractIdPreimageFromAddress", + "CreateContractArgs", + "CreateContractArgsV2", + "InvokeContractArgs", + "HostFunction", + "SorobanAuthorizedFunctionType", + "SorobanAuthorizedFunction", + "SorobanAuthorizedInvocation", + "SorobanAddressCredentials", + "SorobanCredentialsType", + "SorobanCredentials", + "SorobanAuthorizationEntry", + "SorobanAuthorizationEntries", + "InvokeHostFunctionOp", + "ExtendFootprintTtlOp", + "RestoreFootprintOp", + "Operation", + "OperationBody", + "HashIdPreimage", + "HashIdPreimageOperationId", + "HashIdPreimageRevokeId", + "HashIdPreimageContractId", + "HashIdPreimageSorobanAuthorization", + "MemoType", + "Memo", + "TimeBounds", + "LedgerBounds", + "PreconditionsV2", + "PreconditionType", + "Preconditions", + "LedgerFootprint", + "SorobanResources", + "SorobanResourcesExtV0", + "SorobanTransactionData", + "SorobanTransactionDataExt", + "TransactionV0", + "TransactionV0Ext", + "TransactionV0Envelope", + "Transaction", + "TransactionExt", + "TransactionV1Envelope", + "FeeBumpTransaction", + "FeeBumpTransactionInnerTx", + "FeeBumpTransactionExt", + "FeeBumpTransactionEnvelope", + "TransactionEnvelope", + "TransactionSignaturePayload", + "TransactionSignaturePayloadTaggedTransaction", + "ClaimAtomType", + "ClaimOfferAtomV0", + "ClaimOfferAtom", + "ClaimLiquidityAtom", + "ClaimAtom", + "CreateAccountResultCode", + "CreateAccountResult", + "PaymentResultCode", + "PaymentResult", + "PathPaymentStrictReceiveResultCode", + "SimplePaymentResult", + "PathPaymentStrictReceiveResult", + "PathPaymentStrictReceiveResultSuccess", + "PathPaymentStrictSendResultCode", + "PathPaymentStrictSendResult", + "PathPaymentStrictSendResultSuccess", + "ManageSellOfferResultCode", + "ManageOfferEffect", + "ManageOfferSuccessResult", + "ManageOfferSuccessResultOffer", + "ManageSellOfferResult", + "ManageBuyOfferResultCode", + "ManageBuyOfferResult", + "SetOptionsResultCode", + "SetOptionsResult", + "ChangeTrustResultCode", + "ChangeTrustResult", + "AllowTrustResultCode", + "AllowTrustResult", + "AccountMergeResultCode", + "AccountMergeResult", + "InflationResultCode", + "InflationPayout", + "InflationResult", + "ManageDataResultCode", + "ManageDataResult", + "BumpSequenceResultCode", + "BumpSequenceResult", + "CreateClaimableBalanceResultCode", + "CreateClaimableBalanceResult", + "ClaimClaimableBalanceResultCode", + "ClaimClaimableBalanceResult", + "BeginSponsoringFutureReservesResultCode", + "BeginSponsoringFutureReservesResult", + "EndSponsoringFutureReservesResultCode", + "EndSponsoringFutureReservesResult", + "RevokeSponsorshipResultCode", + "RevokeSponsorshipResult", + "ClawbackResultCode", + "ClawbackResult", + "ClawbackClaimableBalanceResultCode", + "ClawbackClaimableBalanceResult", + "SetTrustLineFlagsResultCode", + "SetTrustLineFlagsResult", + "LiquidityPoolDepositResultCode", + "LiquidityPoolDepositResult", + "LiquidityPoolWithdrawResultCode", + "LiquidityPoolWithdrawResult", + "InvokeHostFunctionResultCode", + "InvokeHostFunctionResult", + "ExtendFootprintTtlResultCode", + "ExtendFootprintTtlResult", + "RestoreFootprintResultCode", + "RestoreFootprintResult", + "OperationResultCode", + "OperationResult", + "OperationResultTr", + "TransactionResultCode", + "InnerTransactionResult", + "InnerTransactionResultResult", + "InnerTransactionResultExt", + "InnerTransactionResultPair", + "TransactionResult", + "TransactionResultResult", + "TransactionResultExt", + "Hash", + "Uint256", + "Uint32", + "Int32", + "Uint64", + "Int64", + "TimePoint", + "Duration", + "ExtensionPoint", + "CryptoKeyType", + "PublicKeyType", + "SignerKeyType", + "PublicKey", + "SignerKey", + "SignerKeyEd25519SignedPayload", + "Signature", + "SignatureHint", + "NodeId", + "AccountId", + "ContractId", + "Curve25519Secret", + "Curve25519Public", + "HmacSha256Key", + "HmacSha256Mac", + "ShortHashSeed", + "BinaryFuseFilterType", + "SerializedBinaryFuseFilter", + "PoolId", + "ClaimableBalanceIdType", + "ClaimableBalanceId", + ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = [ "Value", "ScpBallot", "ScpStatementType", @@ -52874,7 +53814,7 @@ impl TypeVariant { #[must_use] #[allow(clippy::too_many_lines)] - pub const fn variants() -> &'static [TypeVariant] { + pub const fn variants() -> [TypeVariant; Self::_VARIANTS.len()] { Self::VARIANTS } @@ -54572,9 +55512,479 @@ pub enum Type { } impl Type { - // VARIANTS and VARIANTS_STR are slices (not fixed-size arrays) because - // individual entries may be #[cfg]-gated, so the count varies by enabled features. - pub const VARIANTS: &[TypeVariant] = &[ + // Private const slices used to compute the variant count, supporting + // cfg-gated entries whose presence varies by enabled features. + const _VARIANTS: &[TypeVariant] = &[ + TypeVariant::Value, + TypeVariant::ScpBallot, + TypeVariant::ScpStatementType, + TypeVariant::ScpNomination, + TypeVariant::ScpStatement, + TypeVariant::ScpStatementPledges, + TypeVariant::ScpStatementPrepare, + TypeVariant::ScpStatementConfirm, + TypeVariant::ScpStatementExternalize, + TypeVariant::ScpEnvelope, + TypeVariant::ScpQuorumSet, + TypeVariant::EncodedLedgerKey, + TypeVariant::ConfigSettingContractExecutionLanesV0, + TypeVariant::ConfigSettingContractComputeV0, + TypeVariant::ConfigSettingContractParallelComputeV0, + TypeVariant::ConfigSettingContractLedgerCostV0, + TypeVariant::ConfigSettingContractLedgerCostExtV0, + TypeVariant::ConfigSettingContractHistoricalDataV0, + TypeVariant::ConfigSettingContractEventsV0, + TypeVariant::ConfigSettingContractBandwidthV0, + TypeVariant::ContractCostType, + TypeVariant::ContractCostParamEntry, + TypeVariant::StateArchivalSettings, + TypeVariant::EvictionIterator, + TypeVariant::ConfigSettingScpTiming, + TypeVariant::FrozenLedgerKeys, + TypeVariant::FrozenLedgerKeysDelta, + TypeVariant::FreezeBypassTxs, + TypeVariant::FreezeBypassTxsDelta, + TypeVariant::ContractCostParams, + TypeVariant::ConfigSettingId, + TypeVariant::ConfigSettingEntry, + TypeVariant::ScEnvMetaKind, + TypeVariant::ScEnvMetaEntry, + TypeVariant::ScEnvMetaEntryInterfaceVersion, + TypeVariant::ScMetaV0, + TypeVariant::ScMetaKind, + TypeVariant::ScMetaEntry, + TypeVariant::ScSpecType, + TypeVariant::ScSpecTypeOption, + TypeVariant::ScSpecTypeResult, + TypeVariant::ScSpecTypeVec, + TypeVariant::ScSpecTypeMap, + TypeVariant::ScSpecTypeTuple, + TypeVariant::ScSpecTypeBytesN, + TypeVariant::ScSpecTypeUdt, + TypeVariant::ScSpecTypeDef, + TypeVariant::ScSpecUdtStructFieldV0, + TypeVariant::ScSpecUdtStructV0, + TypeVariant::ScSpecUdtUnionCaseVoidV0, + TypeVariant::ScSpecUdtUnionCaseTupleV0, + TypeVariant::ScSpecUdtUnionCaseV0Kind, + TypeVariant::ScSpecUdtUnionCaseV0, + TypeVariant::ScSpecUdtUnionV0, + TypeVariant::ScSpecUdtEnumCaseV0, + TypeVariant::ScSpecUdtEnumV0, + TypeVariant::ScSpecUdtErrorEnumCaseV0, + TypeVariant::ScSpecUdtErrorEnumV0, + TypeVariant::ScSpecFunctionInputV0, + TypeVariant::ScSpecFunctionV0, + TypeVariant::ScSpecEventParamLocationV0, + TypeVariant::ScSpecEventParamV0, + TypeVariant::ScSpecEventDataFormat, + TypeVariant::ScSpecEventV0, + TypeVariant::ScSpecEntryKind, + TypeVariant::ScSpecEntry, + TypeVariant::ScValType, + TypeVariant::ScErrorType, + TypeVariant::ScErrorCode, + TypeVariant::ScError, + TypeVariant::UInt128Parts, + TypeVariant::Int128Parts, + TypeVariant::UInt256Parts, + TypeVariant::Int256Parts, + TypeVariant::ContractExecutableType, + TypeVariant::ContractExecutable, + TypeVariant::ScAddressType, + TypeVariant::MuxedEd25519Account, + TypeVariant::ScAddress, + TypeVariant::ScVec, + TypeVariant::ScMap, + TypeVariant::ScBytes, + TypeVariant::ScString, + TypeVariant::ScSymbol, + TypeVariant::ScNonceKey, + TypeVariant::ScContractInstance, + TypeVariant::ScVal, + TypeVariant::ScMapEntry, + TypeVariant::LedgerCloseMetaBatch, + TypeVariant::StoredTransactionSet, + TypeVariant::StoredDebugTransactionSet, + TypeVariant::PersistedScpStateV0, + TypeVariant::PersistedScpStateV1, + TypeVariant::PersistedScpState, + TypeVariant::Thresholds, + TypeVariant::String32, + TypeVariant::String64, + TypeVariant::SequenceNumber, + TypeVariant::DataValue, + TypeVariant::AssetCode4, + TypeVariant::AssetCode12, + TypeVariant::AssetType, + TypeVariant::AssetCode, + TypeVariant::AlphaNum4, + TypeVariant::AlphaNum12, + TypeVariant::Asset, + TypeVariant::Price, + TypeVariant::Liabilities, + TypeVariant::ThresholdIndexes, + TypeVariant::LedgerEntryType, + TypeVariant::Signer, + TypeVariant::AccountFlags, + TypeVariant::SponsorshipDescriptor, + TypeVariant::AccountEntryExtensionV3, + TypeVariant::AccountEntryExtensionV2, + TypeVariant::AccountEntryExtensionV2Ext, + TypeVariant::AccountEntryExtensionV1, + TypeVariant::AccountEntryExtensionV1Ext, + TypeVariant::AccountEntry, + TypeVariant::AccountEntryExt, + TypeVariant::TrustLineFlags, + TypeVariant::LiquidityPoolType, + TypeVariant::TrustLineAsset, + TypeVariant::TrustLineEntryExtensionV2, + TypeVariant::TrustLineEntryExtensionV2Ext, + TypeVariant::TrustLineEntry, + TypeVariant::TrustLineEntryExt, + TypeVariant::TrustLineEntryV1, + TypeVariant::TrustLineEntryV1Ext, + TypeVariant::OfferEntryFlags, + TypeVariant::OfferEntry, + TypeVariant::OfferEntryExt, + TypeVariant::DataEntry, + TypeVariant::DataEntryExt, + TypeVariant::ClaimPredicateType, + TypeVariant::ClaimPredicate, + TypeVariant::ClaimantType, + TypeVariant::Claimant, + TypeVariant::ClaimantV0, + TypeVariant::ClaimableBalanceFlags, + TypeVariant::ClaimableBalanceEntryExtensionV1, + TypeVariant::ClaimableBalanceEntryExtensionV1Ext, + TypeVariant::ClaimableBalanceEntry, + TypeVariant::ClaimableBalanceEntryExt, + TypeVariant::LiquidityPoolConstantProductParameters, + TypeVariant::LiquidityPoolEntry, + TypeVariant::LiquidityPoolEntryBody, + TypeVariant::LiquidityPoolEntryConstantProduct, + TypeVariant::ContractDataDurability, + TypeVariant::ContractDataEntry, + TypeVariant::ContractCodeCostInputs, + TypeVariant::ContractCodeEntry, + TypeVariant::ContractCodeEntryExt, + TypeVariant::ContractCodeEntryV1, + TypeVariant::TtlEntry, + TypeVariant::LedgerEntryExtensionV1, + TypeVariant::LedgerEntryExtensionV1Ext, + TypeVariant::LedgerEntry, + TypeVariant::LedgerEntryData, + TypeVariant::LedgerEntryExt, + TypeVariant::LedgerKey, + TypeVariant::LedgerKeyAccount, + TypeVariant::LedgerKeyTrustLine, + TypeVariant::LedgerKeyOffer, + TypeVariant::LedgerKeyData, + TypeVariant::LedgerKeyClaimableBalance, + TypeVariant::LedgerKeyLiquidityPool, + TypeVariant::LedgerKeyContractData, + TypeVariant::LedgerKeyContractCode, + TypeVariant::LedgerKeyConfigSetting, + TypeVariant::LedgerKeyTtl, + TypeVariant::EnvelopeType, + TypeVariant::BucketListType, + TypeVariant::BucketEntryType, + TypeVariant::HotArchiveBucketEntryType, + TypeVariant::BucketMetadata, + TypeVariant::BucketMetadataExt, + TypeVariant::BucketEntry, + TypeVariant::HotArchiveBucketEntry, + TypeVariant::UpgradeType, + TypeVariant::StellarValueType, + TypeVariant::LedgerCloseValueSignature, + TypeVariant::StellarValue, + TypeVariant::StellarValueExt, + TypeVariant::LedgerHeaderFlags, + TypeVariant::LedgerHeaderExtensionV1, + TypeVariant::LedgerHeaderExtensionV1Ext, + TypeVariant::LedgerHeader, + TypeVariant::LedgerHeaderExt, + TypeVariant::LedgerUpgradeType, + TypeVariant::ConfigUpgradeSetKey, + TypeVariant::LedgerUpgrade, + TypeVariant::ConfigUpgradeSet, + TypeVariant::TxSetComponentType, + TypeVariant::DependentTxCluster, + TypeVariant::ParallelTxExecutionStage, + TypeVariant::ParallelTxsComponent, + TypeVariant::TxSetComponent, + TypeVariant::TxSetComponentTxsMaybeDiscountedFee, + TypeVariant::TransactionPhase, + TypeVariant::TransactionSet, + TypeVariant::TransactionSetV1, + TypeVariant::GeneralizedTransactionSet, + TypeVariant::TransactionResultPair, + TypeVariant::TransactionResultSet, + TypeVariant::TransactionHistoryEntry, + TypeVariant::TransactionHistoryEntryExt, + TypeVariant::TransactionHistoryResultEntry, + TypeVariant::TransactionHistoryResultEntryExt, + TypeVariant::LedgerHeaderHistoryEntry, + TypeVariant::LedgerHeaderHistoryEntryExt, + TypeVariant::LedgerScpMessages, + TypeVariant::ScpHistoryEntryV0, + TypeVariant::ScpHistoryEntry, + TypeVariant::LedgerEntryChangeType, + TypeVariant::LedgerEntryChange, + TypeVariant::LedgerEntryChanges, + TypeVariant::OperationMeta, + TypeVariant::TransactionMetaV1, + TypeVariant::TransactionMetaV2, + TypeVariant::ContractEventType, + TypeVariant::ContractEvent, + TypeVariant::ContractEventBody, + TypeVariant::ContractEventV0, + TypeVariant::DiagnosticEvent, + TypeVariant::SorobanTransactionMetaExtV1, + TypeVariant::SorobanTransactionMetaExt, + TypeVariant::SorobanTransactionMeta, + TypeVariant::TransactionMetaV3, + TypeVariant::OperationMetaV2, + TypeVariant::SorobanTransactionMetaV2, + TypeVariant::TransactionEventStage, + TypeVariant::TransactionEvent, + TypeVariant::TransactionMetaV4, + TypeVariant::InvokeHostFunctionSuccessPreImage, + TypeVariant::TransactionMeta, + TypeVariant::TransactionResultMeta, + TypeVariant::TransactionResultMetaV1, + TypeVariant::UpgradeEntryMeta, + TypeVariant::LedgerCloseMetaV0, + TypeVariant::LedgerCloseMetaExtV1, + TypeVariant::LedgerCloseMetaExt, + TypeVariant::LedgerCloseMetaV1, + TypeVariant::LedgerCloseMetaV2, + TypeVariant::LedgerCloseMeta, + TypeVariant::ErrorCode, + TypeVariant::SError, + TypeVariant::SendMore, + TypeVariant::SendMoreExtended, + TypeVariant::AuthCert, + TypeVariant::Hello, + TypeVariant::Auth, + TypeVariant::IpAddrType, + TypeVariant::PeerAddress, + TypeVariant::PeerAddressIp, + TypeVariant::MessageType, + TypeVariant::DontHave, + TypeVariant::SurveyMessageCommandType, + TypeVariant::SurveyMessageResponseType, + TypeVariant::TimeSlicedSurveyStartCollectingMessage, + TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage, + TypeVariant::TimeSlicedSurveyStopCollectingMessage, + TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage, + TypeVariant::SurveyRequestMessage, + TypeVariant::TimeSlicedSurveyRequestMessage, + TypeVariant::SignedTimeSlicedSurveyRequestMessage, + TypeVariant::EncryptedBody, + TypeVariant::SurveyResponseMessage, + TypeVariant::TimeSlicedSurveyResponseMessage, + TypeVariant::SignedTimeSlicedSurveyResponseMessage, + TypeVariant::PeerStats, + TypeVariant::TimeSlicedNodeData, + TypeVariant::TimeSlicedPeerData, + TypeVariant::TimeSlicedPeerDataList, + TypeVariant::TopologyResponseBodyV2, + TypeVariant::SurveyResponseBody, + TypeVariant::TxAdvertVector, + TypeVariant::FloodAdvert, + TypeVariant::TxDemandVector, + TypeVariant::FloodDemand, + TypeVariant::StellarMessage, + TypeVariant::AuthenticatedMessage, + TypeVariant::AuthenticatedMessageV0, + TypeVariant::LiquidityPoolParameters, + TypeVariant::MuxedAccount, + TypeVariant::MuxedAccountMed25519, + TypeVariant::DecoratedSignature, + TypeVariant::OperationType, + TypeVariant::CreateAccountOp, + TypeVariant::PaymentOp, + TypeVariant::PathPaymentStrictReceiveOp, + TypeVariant::PathPaymentStrictSendOp, + TypeVariant::ManageSellOfferOp, + TypeVariant::ManageBuyOfferOp, + TypeVariant::CreatePassiveSellOfferOp, + TypeVariant::SetOptionsOp, + TypeVariant::ChangeTrustAsset, + TypeVariant::ChangeTrustOp, + TypeVariant::AllowTrustOp, + TypeVariant::ManageDataOp, + TypeVariant::BumpSequenceOp, + TypeVariant::CreateClaimableBalanceOp, + TypeVariant::ClaimClaimableBalanceOp, + TypeVariant::BeginSponsoringFutureReservesOp, + TypeVariant::RevokeSponsorshipType, + TypeVariant::RevokeSponsorshipOp, + TypeVariant::RevokeSponsorshipOpSigner, + TypeVariant::ClawbackOp, + TypeVariant::ClawbackClaimableBalanceOp, + TypeVariant::SetTrustLineFlagsOp, + TypeVariant::LiquidityPoolDepositOp, + TypeVariant::LiquidityPoolWithdrawOp, + TypeVariant::HostFunctionType, + TypeVariant::ContractIdPreimageType, + TypeVariant::ContractIdPreimage, + TypeVariant::ContractIdPreimageFromAddress, + TypeVariant::CreateContractArgs, + TypeVariant::CreateContractArgsV2, + TypeVariant::InvokeContractArgs, + TypeVariant::HostFunction, + TypeVariant::SorobanAuthorizedFunctionType, + TypeVariant::SorobanAuthorizedFunction, + TypeVariant::SorobanAuthorizedInvocation, + TypeVariant::SorobanAddressCredentials, + TypeVariant::SorobanCredentialsType, + TypeVariant::SorobanCredentials, + TypeVariant::SorobanAuthorizationEntry, + TypeVariant::SorobanAuthorizationEntries, + TypeVariant::InvokeHostFunctionOp, + TypeVariant::ExtendFootprintTtlOp, + TypeVariant::RestoreFootprintOp, + TypeVariant::Operation, + TypeVariant::OperationBody, + TypeVariant::HashIdPreimage, + TypeVariant::HashIdPreimageOperationId, + TypeVariant::HashIdPreimageRevokeId, + TypeVariant::HashIdPreimageContractId, + TypeVariant::HashIdPreimageSorobanAuthorization, + TypeVariant::MemoType, + TypeVariant::Memo, + TypeVariant::TimeBounds, + TypeVariant::LedgerBounds, + TypeVariant::PreconditionsV2, + TypeVariant::PreconditionType, + TypeVariant::Preconditions, + TypeVariant::LedgerFootprint, + TypeVariant::SorobanResources, + TypeVariant::SorobanResourcesExtV0, + TypeVariant::SorobanTransactionData, + TypeVariant::SorobanTransactionDataExt, + TypeVariant::TransactionV0, + TypeVariant::TransactionV0Ext, + TypeVariant::TransactionV0Envelope, + TypeVariant::Transaction, + TypeVariant::TransactionExt, + TypeVariant::TransactionV1Envelope, + TypeVariant::FeeBumpTransaction, + TypeVariant::FeeBumpTransactionInnerTx, + TypeVariant::FeeBumpTransactionExt, + TypeVariant::FeeBumpTransactionEnvelope, + TypeVariant::TransactionEnvelope, + TypeVariant::TransactionSignaturePayload, + TypeVariant::TransactionSignaturePayloadTaggedTransaction, + TypeVariant::ClaimAtomType, + TypeVariant::ClaimOfferAtomV0, + TypeVariant::ClaimOfferAtom, + TypeVariant::ClaimLiquidityAtom, + TypeVariant::ClaimAtom, + TypeVariant::CreateAccountResultCode, + TypeVariant::CreateAccountResult, + TypeVariant::PaymentResultCode, + TypeVariant::PaymentResult, + TypeVariant::PathPaymentStrictReceiveResultCode, + TypeVariant::SimplePaymentResult, + TypeVariant::PathPaymentStrictReceiveResult, + TypeVariant::PathPaymentStrictReceiveResultSuccess, + TypeVariant::PathPaymentStrictSendResultCode, + TypeVariant::PathPaymentStrictSendResult, + TypeVariant::PathPaymentStrictSendResultSuccess, + TypeVariant::ManageSellOfferResultCode, + TypeVariant::ManageOfferEffect, + TypeVariant::ManageOfferSuccessResult, + TypeVariant::ManageOfferSuccessResultOffer, + TypeVariant::ManageSellOfferResult, + TypeVariant::ManageBuyOfferResultCode, + TypeVariant::ManageBuyOfferResult, + TypeVariant::SetOptionsResultCode, + TypeVariant::SetOptionsResult, + TypeVariant::ChangeTrustResultCode, + TypeVariant::ChangeTrustResult, + TypeVariant::AllowTrustResultCode, + TypeVariant::AllowTrustResult, + TypeVariant::AccountMergeResultCode, + TypeVariant::AccountMergeResult, + TypeVariant::InflationResultCode, + TypeVariant::InflationPayout, + TypeVariant::InflationResult, + TypeVariant::ManageDataResultCode, + TypeVariant::ManageDataResult, + TypeVariant::BumpSequenceResultCode, + TypeVariant::BumpSequenceResult, + TypeVariant::CreateClaimableBalanceResultCode, + TypeVariant::CreateClaimableBalanceResult, + TypeVariant::ClaimClaimableBalanceResultCode, + TypeVariant::ClaimClaimableBalanceResult, + TypeVariant::BeginSponsoringFutureReservesResultCode, + TypeVariant::BeginSponsoringFutureReservesResult, + TypeVariant::EndSponsoringFutureReservesResultCode, + TypeVariant::EndSponsoringFutureReservesResult, + TypeVariant::RevokeSponsorshipResultCode, + TypeVariant::RevokeSponsorshipResult, + TypeVariant::ClawbackResultCode, + TypeVariant::ClawbackResult, + TypeVariant::ClawbackClaimableBalanceResultCode, + TypeVariant::ClawbackClaimableBalanceResult, + TypeVariant::SetTrustLineFlagsResultCode, + TypeVariant::SetTrustLineFlagsResult, + TypeVariant::LiquidityPoolDepositResultCode, + TypeVariant::LiquidityPoolDepositResult, + TypeVariant::LiquidityPoolWithdrawResultCode, + TypeVariant::LiquidityPoolWithdrawResult, + TypeVariant::InvokeHostFunctionResultCode, + TypeVariant::InvokeHostFunctionResult, + TypeVariant::ExtendFootprintTtlResultCode, + TypeVariant::ExtendFootprintTtlResult, + TypeVariant::RestoreFootprintResultCode, + TypeVariant::RestoreFootprintResult, + TypeVariant::OperationResultCode, + TypeVariant::OperationResult, + TypeVariant::OperationResultTr, + TypeVariant::TransactionResultCode, + TypeVariant::InnerTransactionResult, + TypeVariant::InnerTransactionResultResult, + TypeVariant::InnerTransactionResultExt, + TypeVariant::InnerTransactionResultPair, + TypeVariant::TransactionResult, + TypeVariant::TransactionResultResult, + TypeVariant::TransactionResultExt, + TypeVariant::Hash, + TypeVariant::Uint256, + TypeVariant::Uint32, + TypeVariant::Int32, + TypeVariant::Uint64, + TypeVariant::Int64, + TypeVariant::TimePoint, + TypeVariant::Duration, + TypeVariant::ExtensionPoint, + TypeVariant::CryptoKeyType, + TypeVariant::PublicKeyType, + TypeVariant::SignerKeyType, + TypeVariant::PublicKey, + TypeVariant::SignerKey, + TypeVariant::SignerKeyEd25519SignedPayload, + TypeVariant::Signature, + TypeVariant::SignatureHint, + TypeVariant::NodeId, + TypeVariant::AccountId, + TypeVariant::ContractId, + TypeVariant::Curve25519Secret, + TypeVariant::Curve25519Public, + TypeVariant::HmacSha256Key, + TypeVariant::HmacSha256Mac, + TypeVariant::ShortHashSeed, + TypeVariant::BinaryFuseFilterType, + TypeVariant::SerializedBinaryFuseFilter, + TypeVariant::PoolId, + TypeVariant::ClaimableBalanceIdType, + TypeVariant::ClaimableBalanceId, + ]; + pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = [ TypeVariant::Value, TypeVariant::ScpBallot, TypeVariant::ScpStatementType, @@ -55044,7 +56454,477 @@ impl Type { TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, ]; - pub const VARIANTS_STR: &[&str] = &[ + const _VARIANTS_STR: &[&str] = &[ + "Value", + "ScpBallot", + "ScpStatementType", + "ScpNomination", + "ScpStatement", + "ScpStatementPledges", + "ScpStatementPrepare", + "ScpStatementConfirm", + "ScpStatementExternalize", + "ScpEnvelope", + "ScpQuorumSet", + "EncodedLedgerKey", + "ConfigSettingContractExecutionLanesV0", + "ConfigSettingContractComputeV0", + "ConfigSettingContractParallelComputeV0", + "ConfigSettingContractLedgerCostV0", + "ConfigSettingContractLedgerCostExtV0", + "ConfigSettingContractHistoricalDataV0", + "ConfigSettingContractEventsV0", + "ConfigSettingContractBandwidthV0", + "ContractCostType", + "ContractCostParamEntry", + "StateArchivalSettings", + "EvictionIterator", + "ConfigSettingScpTiming", + "FrozenLedgerKeys", + "FrozenLedgerKeysDelta", + "FreezeBypassTxs", + "FreezeBypassTxsDelta", + "ContractCostParams", + "ConfigSettingId", + "ConfigSettingEntry", + "ScEnvMetaKind", + "ScEnvMetaEntry", + "ScEnvMetaEntryInterfaceVersion", + "ScMetaV0", + "ScMetaKind", + "ScMetaEntry", + "ScSpecType", + "ScSpecTypeOption", + "ScSpecTypeResult", + "ScSpecTypeVec", + "ScSpecTypeMap", + "ScSpecTypeTuple", + "ScSpecTypeBytesN", + "ScSpecTypeUdt", + "ScSpecTypeDef", + "ScSpecUdtStructFieldV0", + "ScSpecUdtStructV0", + "ScSpecUdtUnionCaseVoidV0", + "ScSpecUdtUnionCaseTupleV0", + "ScSpecUdtUnionCaseV0Kind", + "ScSpecUdtUnionCaseV0", + "ScSpecUdtUnionV0", + "ScSpecUdtEnumCaseV0", + "ScSpecUdtEnumV0", + "ScSpecUdtErrorEnumCaseV0", + "ScSpecUdtErrorEnumV0", + "ScSpecFunctionInputV0", + "ScSpecFunctionV0", + "ScSpecEventParamLocationV0", + "ScSpecEventParamV0", + "ScSpecEventDataFormat", + "ScSpecEventV0", + "ScSpecEntryKind", + "ScSpecEntry", + "ScValType", + "ScErrorType", + "ScErrorCode", + "ScError", + "UInt128Parts", + "Int128Parts", + "UInt256Parts", + "Int256Parts", + "ContractExecutableType", + "ContractExecutable", + "ScAddressType", + "MuxedEd25519Account", + "ScAddress", + "ScVec", + "ScMap", + "ScBytes", + "ScString", + "ScSymbol", + "ScNonceKey", + "ScContractInstance", + "ScVal", + "ScMapEntry", + "LedgerCloseMetaBatch", + "StoredTransactionSet", + "StoredDebugTransactionSet", + "PersistedScpStateV0", + "PersistedScpStateV1", + "PersistedScpState", + "Thresholds", + "String32", + "String64", + "SequenceNumber", + "DataValue", + "AssetCode4", + "AssetCode12", + "AssetType", + "AssetCode", + "AlphaNum4", + "AlphaNum12", + "Asset", + "Price", + "Liabilities", + "ThresholdIndexes", + "LedgerEntryType", + "Signer", + "AccountFlags", + "SponsorshipDescriptor", + "AccountEntryExtensionV3", + "AccountEntryExtensionV2", + "AccountEntryExtensionV2Ext", + "AccountEntryExtensionV1", + "AccountEntryExtensionV1Ext", + "AccountEntry", + "AccountEntryExt", + "TrustLineFlags", + "LiquidityPoolType", + "TrustLineAsset", + "TrustLineEntryExtensionV2", + "TrustLineEntryExtensionV2Ext", + "TrustLineEntry", + "TrustLineEntryExt", + "TrustLineEntryV1", + "TrustLineEntryV1Ext", + "OfferEntryFlags", + "OfferEntry", + "OfferEntryExt", + "DataEntry", + "DataEntryExt", + "ClaimPredicateType", + "ClaimPredicate", + "ClaimantType", + "Claimant", + "ClaimantV0", + "ClaimableBalanceFlags", + "ClaimableBalanceEntryExtensionV1", + "ClaimableBalanceEntryExtensionV1Ext", + "ClaimableBalanceEntry", + "ClaimableBalanceEntryExt", + "LiquidityPoolConstantProductParameters", + "LiquidityPoolEntry", + "LiquidityPoolEntryBody", + "LiquidityPoolEntryConstantProduct", + "ContractDataDurability", + "ContractDataEntry", + "ContractCodeCostInputs", + "ContractCodeEntry", + "ContractCodeEntryExt", + "ContractCodeEntryV1", + "TtlEntry", + "LedgerEntryExtensionV1", + "LedgerEntryExtensionV1Ext", + "LedgerEntry", + "LedgerEntryData", + "LedgerEntryExt", + "LedgerKey", + "LedgerKeyAccount", + "LedgerKeyTrustLine", + "LedgerKeyOffer", + "LedgerKeyData", + "LedgerKeyClaimableBalance", + "LedgerKeyLiquidityPool", + "LedgerKeyContractData", + "LedgerKeyContractCode", + "LedgerKeyConfigSetting", + "LedgerKeyTtl", + "EnvelopeType", + "BucketListType", + "BucketEntryType", + "HotArchiveBucketEntryType", + "BucketMetadata", + "BucketMetadataExt", + "BucketEntry", + "HotArchiveBucketEntry", + "UpgradeType", + "StellarValueType", + "LedgerCloseValueSignature", + "StellarValue", + "StellarValueExt", + "LedgerHeaderFlags", + "LedgerHeaderExtensionV1", + "LedgerHeaderExtensionV1Ext", + "LedgerHeader", + "LedgerHeaderExt", + "LedgerUpgradeType", + "ConfigUpgradeSetKey", + "LedgerUpgrade", + "ConfigUpgradeSet", + "TxSetComponentType", + "DependentTxCluster", + "ParallelTxExecutionStage", + "ParallelTxsComponent", + "TxSetComponent", + "TxSetComponentTxsMaybeDiscountedFee", + "TransactionPhase", + "TransactionSet", + "TransactionSetV1", + "GeneralizedTransactionSet", + "TransactionResultPair", + "TransactionResultSet", + "TransactionHistoryEntry", + "TransactionHistoryEntryExt", + "TransactionHistoryResultEntry", + "TransactionHistoryResultEntryExt", + "LedgerHeaderHistoryEntry", + "LedgerHeaderHistoryEntryExt", + "LedgerScpMessages", + "ScpHistoryEntryV0", + "ScpHistoryEntry", + "LedgerEntryChangeType", + "LedgerEntryChange", + "LedgerEntryChanges", + "OperationMeta", + "TransactionMetaV1", + "TransactionMetaV2", + "ContractEventType", + "ContractEvent", + "ContractEventBody", + "ContractEventV0", + "DiagnosticEvent", + "SorobanTransactionMetaExtV1", + "SorobanTransactionMetaExt", + "SorobanTransactionMeta", + "TransactionMetaV3", + "OperationMetaV2", + "SorobanTransactionMetaV2", + "TransactionEventStage", + "TransactionEvent", + "TransactionMetaV4", + "InvokeHostFunctionSuccessPreImage", + "TransactionMeta", + "TransactionResultMeta", + "TransactionResultMetaV1", + "UpgradeEntryMeta", + "LedgerCloseMetaV0", + "LedgerCloseMetaExtV1", + "LedgerCloseMetaExt", + "LedgerCloseMetaV1", + "LedgerCloseMetaV2", + "LedgerCloseMeta", + "ErrorCode", + "SError", + "SendMore", + "SendMoreExtended", + "AuthCert", + "Hello", + "Auth", + "IpAddrType", + "PeerAddress", + "PeerAddressIp", + "MessageType", + "DontHave", + "SurveyMessageCommandType", + "SurveyMessageResponseType", + "TimeSlicedSurveyStartCollectingMessage", + "SignedTimeSlicedSurveyStartCollectingMessage", + "TimeSlicedSurveyStopCollectingMessage", + "SignedTimeSlicedSurveyStopCollectingMessage", + "SurveyRequestMessage", + "TimeSlicedSurveyRequestMessage", + "SignedTimeSlicedSurveyRequestMessage", + "EncryptedBody", + "SurveyResponseMessage", + "TimeSlicedSurveyResponseMessage", + "SignedTimeSlicedSurveyResponseMessage", + "PeerStats", + "TimeSlicedNodeData", + "TimeSlicedPeerData", + "TimeSlicedPeerDataList", + "TopologyResponseBodyV2", + "SurveyResponseBody", + "TxAdvertVector", + "FloodAdvert", + "TxDemandVector", + "FloodDemand", + "StellarMessage", + "AuthenticatedMessage", + "AuthenticatedMessageV0", + "LiquidityPoolParameters", + "MuxedAccount", + "MuxedAccountMed25519", + "DecoratedSignature", + "OperationType", + "CreateAccountOp", + "PaymentOp", + "PathPaymentStrictReceiveOp", + "PathPaymentStrictSendOp", + "ManageSellOfferOp", + "ManageBuyOfferOp", + "CreatePassiveSellOfferOp", + "SetOptionsOp", + "ChangeTrustAsset", + "ChangeTrustOp", + "AllowTrustOp", + "ManageDataOp", + "BumpSequenceOp", + "CreateClaimableBalanceOp", + "ClaimClaimableBalanceOp", + "BeginSponsoringFutureReservesOp", + "RevokeSponsorshipType", + "RevokeSponsorshipOp", + "RevokeSponsorshipOpSigner", + "ClawbackOp", + "ClawbackClaimableBalanceOp", + "SetTrustLineFlagsOp", + "LiquidityPoolDepositOp", + "LiquidityPoolWithdrawOp", + "HostFunctionType", + "ContractIdPreimageType", + "ContractIdPreimage", + "ContractIdPreimageFromAddress", + "CreateContractArgs", + "CreateContractArgsV2", + "InvokeContractArgs", + "HostFunction", + "SorobanAuthorizedFunctionType", + "SorobanAuthorizedFunction", + "SorobanAuthorizedInvocation", + "SorobanAddressCredentials", + "SorobanCredentialsType", + "SorobanCredentials", + "SorobanAuthorizationEntry", + "SorobanAuthorizationEntries", + "InvokeHostFunctionOp", + "ExtendFootprintTtlOp", + "RestoreFootprintOp", + "Operation", + "OperationBody", + "HashIdPreimage", + "HashIdPreimageOperationId", + "HashIdPreimageRevokeId", + "HashIdPreimageContractId", + "HashIdPreimageSorobanAuthorization", + "MemoType", + "Memo", + "TimeBounds", + "LedgerBounds", + "PreconditionsV2", + "PreconditionType", + "Preconditions", + "LedgerFootprint", + "SorobanResources", + "SorobanResourcesExtV0", + "SorobanTransactionData", + "SorobanTransactionDataExt", + "TransactionV0", + "TransactionV0Ext", + "TransactionV0Envelope", + "Transaction", + "TransactionExt", + "TransactionV1Envelope", + "FeeBumpTransaction", + "FeeBumpTransactionInnerTx", + "FeeBumpTransactionExt", + "FeeBumpTransactionEnvelope", + "TransactionEnvelope", + "TransactionSignaturePayload", + "TransactionSignaturePayloadTaggedTransaction", + "ClaimAtomType", + "ClaimOfferAtomV0", + "ClaimOfferAtom", + "ClaimLiquidityAtom", + "ClaimAtom", + "CreateAccountResultCode", + "CreateAccountResult", + "PaymentResultCode", + "PaymentResult", + "PathPaymentStrictReceiveResultCode", + "SimplePaymentResult", + "PathPaymentStrictReceiveResult", + "PathPaymentStrictReceiveResultSuccess", + "PathPaymentStrictSendResultCode", + "PathPaymentStrictSendResult", + "PathPaymentStrictSendResultSuccess", + "ManageSellOfferResultCode", + "ManageOfferEffect", + "ManageOfferSuccessResult", + "ManageOfferSuccessResultOffer", + "ManageSellOfferResult", + "ManageBuyOfferResultCode", + "ManageBuyOfferResult", + "SetOptionsResultCode", + "SetOptionsResult", + "ChangeTrustResultCode", + "ChangeTrustResult", + "AllowTrustResultCode", + "AllowTrustResult", + "AccountMergeResultCode", + "AccountMergeResult", + "InflationResultCode", + "InflationPayout", + "InflationResult", + "ManageDataResultCode", + "ManageDataResult", + "BumpSequenceResultCode", + "BumpSequenceResult", + "CreateClaimableBalanceResultCode", + "CreateClaimableBalanceResult", + "ClaimClaimableBalanceResultCode", + "ClaimClaimableBalanceResult", + "BeginSponsoringFutureReservesResultCode", + "BeginSponsoringFutureReservesResult", + "EndSponsoringFutureReservesResultCode", + "EndSponsoringFutureReservesResult", + "RevokeSponsorshipResultCode", + "RevokeSponsorshipResult", + "ClawbackResultCode", + "ClawbackResult", + "ClawbackClaimableBalanceResultCode", + "ClawbackClaimableBalanceResult", + "SetTrustLineFlagsResultCode", + "SetTrustLineFlagsResult", + "LiquidityPoolDepositResultCode", + "LiquidityPoolDepositResult", + "LiquidityPoolWithdrawResultCode", + "LiquidityPoolWithdrawResult", + "InvokeHostFunctionResultCode", + "InvokeHostFunctionResult", + "ExtendFootprintTtlResultCode", + "ExtendFootprintTtlResult", + "RestoreFootprintResultCode", + "RestoreFootprintResult", + "OperationResultCode", + "OperationResult", + "OperationResultTr", + "TransactionResultCode", + "InnerTransactionResult", + "InnerTransactionResultResult", + "InnerTransactionResultExt", + "InnerTransactionResultPair", + "TransactionResult", + "TransactionResultResult", + "TransactionResultExt", + "Hash", + "Uint256", + "Uint32", + "Int32", + "Uint64", + "Int64", + "TimePoint", + "Duration", + "ExtensionPoint", + "CryptoKeyType", + "PublicKeyType", + "SignerKeyType", + "PublicKey", + "SignerKey", + "SignerKeyEd25519SignedPayload", + "Signature", + "SignatureHint", + "NodeId", + "AccountId", + "ContractId", + "Curve25519Secret", + "Curve25519Public", + "HmacSha256Key", + "HmacSha256Mac", + "ShortHashSeed", + "BinaryFuseFilterType", + "SerializedBinaryFuseFilter", + "PoolId", + "ClaimableBalanceIdType", + "ClaimableBalanceId", + ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = [ "Value", "ScpBallot", "ScpStatementType", @@ -69664,7 +71544,7 @@ impl Type { #[must_use] #[allow(clippy::too_many_lines)] - pub const fn variants() -> &'static [TypeVariant] { + pub const fn variants() -> [TypeVariant; Self::_VARIANTS.len()] { Self::VARIANTS } diff --git a/src/next/generated.rs b/src/next/generated.rs index 88385a4e..95e7c226 100644 --- a/src/next/generated.rs +++ b/src/next/generated.rs @@ -51440,9 +51440,9 @@ pub enum TypeVariant { } impl TypeVariant { - // VARIANTS and VARIANTS_STR are slices (not fixed-size arrays) because - // individual entries may be #[cfg]-gated, so the count varies by enabled features. - pub const VARIANTS: &[TypeVariant] = &[ + // Private const slice used to compute the variant count, supporting + // cfg-gated entries whose presence varies by enabled features. + const _VARIANTS: &[TypeVariant] = &[ TypeVariant::Value, TypeVariant::ScpBallot, TypeVariant::ScpStatementType, @@ -51912,7 +51912,947 @@ impl TypeVariant { TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, ]; - pub const VARIANTS_STR: &[&str] = &[ + pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = [ + TypeVariant::Value, + TypeVariant::ScpBallot, + TypeVariant::ScpStatementType, + TypeVariant::ScpNomination, + TypeVariant::ScpStatement, + TypeVariant::ScpStatementPledges, + TypeVariant::ScpStatementPrepare, + TypeVariant::ScpStatementConfirm, + TypeVariant::ScpStatementExternalize, + TypeVariant::ScpEnvelope, + TypeVariant::ScpQuorumSet, + TypeVariant::EncodedLedgerKey, + TypeVariant::ConfigSettingContractExecutionLanesV0, + TypeVariant::ConfigSettingContractComputeV0, + TypeVariant::ConfigSettingContractParallelComputeV0, + TypeVariant::ConfigSettingContractLedgerCostV0, + TypeVariant::ConfigSettingContractLedgerCostExtV0, + TypeVariant::ConfigSettingContractHistoricalDataV0, + TypeVariant::ConfigSettingContractEventsV0, + TypeVariant::ConfigSettingContractBandwidthV0, + TypeVariant::ContractCostType, + TypeVariant::ContractCostParamEntry, + TypeVariant::StateArchivalSettings, + TypeVariant::EvictionIterator, + TypeVariant::ConfigSettingScpTiming, + TypeVariant::FrozenLedgerKeys, + TypeVariant::FrozenLedgerKeysDelta, + TypeVariant::FreezeBypassTxs, + TypeVariant::FreezeBypassTxsDelta, + TypeVariant::ContractCostParams, + TypeVariant::ConfigSettingId, + TypeVariant::ConfigSettingEntry, + TypeVariant::ScEnvMetaKind, + TypeVariant::ScEnvMetaEntry, + TypeVariant::ScEnvMetaEntryInterfaceVersion, + TypeVariant::ScMetaV0, + TypeVariant::ScMetaKind, + TypeVariant::ScMetaEntry, + TypeVariant::ScSpecType, + TypeVariant::ScSpecTypeOption, + TypeVariant::ScSpecTypeResult, + TypeVariant::ScSpecTypeVec, + TypeVariant::ScSpecTypeMap, + TypeVariant::ScSpecTypeTuple, + TypeVariant::ScSpecTypeBytesN, + TypeVariant::ScSpecTypeUdt, + TypeVariant::ScSpecTypeDef, + TypeVariant::ScSpecUdtStructFieldV0, + TypeVariant::ScSpecUdtStructV0, + TypeVariant::ScSpecUdtUnionCaseVoidV0, + TypeVariant::ScSpecUdtUnionCaseTupleV0, + TypeVariant::ScSpecUdtUnionCaseV0Kind, + TypeVariant::ScSpecUdtUnionCaseV0, + TypeVariant::ScSpecUdtUnionV0, + TypeVariant::ScSpecUdtEnumCaseV0, + TypeVariant::ScSpecUdtEnumV0, + TypeVariant::ScSpecUdtErrorEnumCaseV0, + TypeVariant::ScSpecUdtErrorEnumV0, + TypeVariant::ScSpecFunctionInputV0, + TypeVariant::ScSpecFunctionV0, + TypeVariant::ScSpecEventParamLocationV0, + TypeVariant::ScSpecEventParamV0, + TypeVariant::ScSpecEventDataFormat, + TypeVariant::ScSpecEventV0, + TypeVariant::ScSpecEntryKind, + TypeVariant::ScSpecEntry, + TypeVariant::ScValType, + TypeVariant::ScErrorType, + TypeVariant::ScErrorCode, + TypeVariant::ScError, + TypeVariant::UInt128Parts, + TypeVariant::Int128Parts, + TypeVariant::UInt256Parts, + TypeVariant::Int256Parts, + TypeVariant::ContractExecutableType, + TypeVariant::ContractExecutable, + TypeVariant::ScAddressType, + TypeVariant::MuxedEd25519Account, + TypeVariant::ScAddress, + TypeVariant::ScVec, + TypeVariant::ScMap, + TypeVariant::ScBytes, + TypeVariant::ScString, + TypeVariant::ScSymbol, + TypeVariant::ScNonceKey, + TypeVariant::ScContractInstance, + TypeVariant::ScVal, + TypeVariant::ScMapEntry, + TypeVariant::LedgerCloseMetaBatch, + TypeVariant::StoredTransactionSet, + TypeVariant::StoredDebugTransactionSet, + TypeVariant::PersistedScpStateV0, + TypeVariant::PersistedScpStateV1, + TypeVariant::PersistedScpState, + TypeVariant::Thresholds, + TypeVariant::String32, + TypeVariant::String64, + TypeVariant::SequenceNumber, + TypeVariant::DataValue, + TypeVariant::AssetCode4, + TypeVariant::AssetCode12, + TypeVariant::AssetType, + TypeVariant::AssetCode, + TypeVariant::AlphaNum4, + TypeVariant::AlphaNum12, + TypeVariant::Asset, + TypeVariant::Price, + TypeVariant::Liabilities, + TypeVariant::ThresholdIndexes, + TypeVariant::LedgerEntryType, + TypeVariant::Signer, + TypeVariant::AccountFlags, + TypeVariant::SponsorshipDescriptor, + TypeVariant::AccountEntryExtensionV3, + TypeVariant::AccountEntryExtensionV2, + TypeVariant::AccountEntryExtensionV2Ext, + TypeVariant::AccountEntryExtensionV1, + TypeVariant::AccountEntryExtensionV1Ext, + TypeVariant::AccountEntry, + TypeVariant::AccountEntryExt, + TypeVariant::TrustLineFlags, + TypeVariant::LiquidityPoolType, + TypeVariant::TrustLineAsset, + TypeVariant::TrustLineEntryExtensionV2, + TypeVariant::TrustLineEntryExtensionV2Ext, + TypeVariant::TrustLineEntry, + TypeVariant::TrustLineEntryExt, + TypeVariant::TrustLineEntryV1, + TypeVariant::TrustLineEntryV1Ext, + TypeVariant::OfferEntryFlags, + TypeVariant::OfferEntry, + TypeVariant::OfferEntryExt, + TypeVariant::DataEntry, + TypeVariant::DataEntryExt, + TypeVariant::ClaimPredicateType, + TypeVariant::ClaimPredicate, + TypeVariant::ClaimantType, + TypeVariant::Claimant, + TypeVariant::ClaimantV0, + TypeVariant::ClaimableBalanceFlags, + TypeVariant::ClaimableBalanceEntryExtensionV1, + TypeVariant::ClaimableBalanceEntryExtensionV1Ext, + TypeVariant::ClaimableBalanceEntry, + TypeVariant::ClaimableBalanceEntryExt, + TypeVariant::LiquidityPoolConstantProductParameters, + TypeVariant::LiquidityPoolEntry, + TypeVariant::LiquidityPoolEntryBody, + TypeVariant::LiquidityPoolEntryConstantProduct, + TypeVariant::ContractDataDurability, + TypeVariant::ContractDataEntry, + TypeVariant::ContractCodeCostInputs, + TypeVariant::ContractCodeEntry, + TypeVariant::ContractCodeEntryExt, + TypeVariant::ContractCodeEntryV1, + TypeVariant::TtlEntry, + TypeVariant::LedgerEntryExtensionV1, + TypeVariant::LedgerEntryExtensionV1Ext, + TypeVariant::LedgerEntry, + TypeVariant::LedgerEntryData, + TypeVariant::LedgerEntryExt, + TypeVariant::LedgerKey, + TypeVariant::LedgerKeyAccount, + TypeVariant::LedgerKeyTrustLine, + TypeVariant::LedgerKeyOffer, + TypeVariant::LedgerKeyData, + TypeVariant::LedgerKeyClaimableBalance, + TypeVariant::LedgerKeyLiquidityPool, + TypeVariant::LedgerKeyContractData, + TypeVariant::LedgerKeyContractCode, + TypeVariant::LedgerKeyConfigSetting, + TypeVariant::LedgerKeyTtl, + TypeVariant::EnvelopeType, + TypeVariant::BucketListType, + TypeVariant::BucketEntryType, + TypeVariant::HotArchiveBucketEntryType, + TypeVariant::BucketMetadata, + TypeVariant::BucketMetadataExt, + TypeVariant::BucketEntry, + TypeVariant::HotArchiveBucketEntry, + TypeVariant::UpgradeType, + TypeVariant::StellarValueType, + TypeVariant::LedgerCloseValueSignature, + TypeVariant::StellarValue, + TypeVariant::StellarValueExt, + TypeVariant::LedgerHeaderFlags, + TypeVariant::LedgerHeaderExtensionV1, + TypeVariant::LedgerHeaderExtensionV1Ext, + TypeVariant::LedgerHeader, + TypeVariant::LedgerHeaderExt, + TypeVariant::LedgerUpgradeType, + TypeVariant::ConfigUpgradeSetKey, + TypeVariant::LedgerUpgrade, + TypeVariant::ConfigUpgradeSet, + TypeVariant::TxSetComponentType, + TypeVariant::DependentTxCluster, + TypeVariant::ParallelTxExecutionStage, + TypeVariant::ParallelTxsComponent, + TypeVariant::TxSetComponent, + TypeVariant::TxSetComponentTxsMaybeDiscountedFee, + TypeVariant::TransactionPhase, + TypeVariant::TransactionSet, + TypeVariant::TransactionSetV1, + TypeVariant::GeneralizedTransactionSet, + TypeVariant::TransactionResultPair, + TypeVariant::TransactionResultSet, + TypeVariant::TransactionHistoryEntry, + TypeVariant::TransactionHistoryEntryExt, + TypeVariant::TransactionHistoryResultEntry, + TypeVariant::TransactionHistoryResultEntryExt, + TypeVariant::LedgerHeaderHistoryEntry, + TypeVariant::LedgerHeaderHistoryEntryExt, + TypeVariant::LedgerScpMessages, + TypeVariant::ScpHistoryEntryV0, + TypeVariant::ScpHistoryEntry, + TypeVariant::LedgerEntryChangeType, + TypeVariant::LedgerEntryChange, + TypeVariant::LedgerEntryChanges, + TypeVariant::OperationMeta, + TypeVariant::TransactionMetaV1, + TypeVariant::TransactionMetaV2, + TypeVariant::ContractEventType, + TypeVariant::ContractEvent, + TypeVariant::ContractEventBody, + TypeVariant::ContractEventV0, + TypeVariant::DiagnosticEvent, + TypeVariant::SorobanTransactionMetaExtV1, + TypeVariant::SorobanTransactionMetaExt, + TypeVariant::SorobanTransactionMeta, + TypeVariant::TransactionMetaV3, + TypeVariant::OperationMetaV2, + TypeVariant::SorobanTransactionMetaV2, + TypeVariant::TransactionEventStage, + TypeVariant::TransactionEvent, + TypeVariant::TransactionMetaV4, + TypeVariant::InvokeHostFunctionSuccessPreImage, + TypeVariant::TransactionMeta, + TypeVariant::TransactionResultMeta, + TypeVariant::TransactionResultMetaV1, + TypeVariant::UpgradeEntryMeta, + TypeVariant::LedgerCloseMetaV0, + TypeVariant::LedgerCloseMetaExtV1, + TypeVariant::LedgerCloseMetaExt, + TypeVariant::LedgerCloseMetaV1, + TypeVariant::LedgerCloseMetaV2, + TypeVariant::LedgerCloseMeta, + TypeVariant::ErrorCode, + TypeVariant::SError, + TypeVariant::SendMore, + TypeVariant::SendMoreExtended, + TypeVariant::AuthCert, + TypeVariant::Hello, + TypeVariant::Auth, + TypeVariant::IpAddrType, + TypeVariant::PeerAddress, + TypeVariant::PeerAddressIp, + TypeVariant::MessageType, + TypeVariant::DontHave, + TypeVariant::SurveyMessageCommandType, + TypeVariant::SurveyMessageResponseType, + TypeVariant::TimeSlicedSurveyStartCollectingMessage, + TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage, + TypeVariant::TimeSlicedSurveyStopCollectingMessage, + TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage, + TypeVariant::SurveyRequestMessage, + TypeVariant::TimeSlicedSurveyRequestMessage, + TypeVariant::SignedTimeSlicedSurveyRequestMessage, + TypeVariant::EncryptedBody, + TypeVariant::SurveyResponseMessage, + TypeVariant::TimeSlicedSurveyResponseMessage, + TypeVariant::SignedTimeSlicedSurveyResponseMessage, + TypeVariant::PeerStats, + TypeVariant::TimeSlicedNodeData, + TypeVariant::TimeSlicedPeerData, + TypeVariant::TimeSlicedPeerDataList, + TypeVariant::TopologyResponseBodyV2, + TypeVariant::SurveyResponseBody, + TypeVariant::TxAdvertVector, + TypeVariant::FloodAdvert, + TypeVariant::TxDemandVector, + TypeVariant::FloodDemand, + TypeVariant::StellarMessage, + TypeVariant::AuthenticatedMessage, + TypeVariant::AuthenticatedMessageV0, + TypeVariant::LiquidityPoolParameters, + TypeVariant::MuxedAccount, + TypeVariant::MuxedAccountMed25519, + TypeVariant::DecoratedSignature, + TypeVariant::OperationType, + TypeVariant::CreateAccountOp, + TypeVariant::PaymentOp, + TypeVariant::PathPaymentStrictReceiveOp, + TypeVariant::PathPaymentStrictSendOp, + TypeVariant::ManageSellOfferOp, + TypeVariant::ManageBuyOfferOp, + TypeVariant::CreatePassiveSellOfferOp, + TypeVariant::SetOptionsOp, + TypeVariant::ChangeTrustAsset, + TypeVariant::ChangeTrustOp, + TypeVariant::AllowTrustOp, + TypeVariant::ManageDataOp, + TypeVariant::BumpSequenceOp, + TypeVariant::CreateClaimableBalanceOp, + TypeVariant::ClaimClaimableBalanceOp, + TypeVariant::BeginSponsoringFutureReservesOp, + TypeVariant::RevokeSponsorshipType, + TypeVariant::RevokeSponsorshipOp, + TypeVariant::RevokeSponsorshipOpSigner, + TypeVariant::ClawbackOp, + TypeVariant::ClawbackClaimableBalanceOp, + TypeVariant::SetTrustLineFlagsOp, + TypeVariant::LiquidityPoolDepositOp, + TypeVariant::LiquidityPoolWithdrawOp, + TypeVariant::HostFunctionType, + TypeVariant::ContractIdPreimageType, + TypeVariant::ContractIdPreimage, + TypeVariant::ContractIdPreimageFromAddress, + TypeVariant::CreateContractArgs, + TypeVariant::CreateContractArgsV2, + TypeVariant::InvokeContractArgs, + TypeVariant::HostFunction, + TypeVariant::SorobanAuthorizedFunctionType, + TypeVariant::SorobanAuthorizedFunction, + TypeVariant::SorobanAuthorizedInvocation, + TypeVariant::SorobanAddressCredentials, + TypeVariant::SorobanCredentialsType, + TypeVariant::SorobanCredentials, + TypeVariant::SorobanAuthorizationEntry, + TypeVariant::SorobanAuthorizationEntries, + TypeVariant::InvokeHostFunctionOp, + TypeVariant::ExtendFootprintTtlOp, + TypeVariant::RestoreFootprintOp, + TypeVariant::Operation, + TypeVariant::OperationBody, + TypeVariant::HashIdPreimage, + TypeVariant::HashIdPreimageOperationId, + TypeVariant::HashIdPreimageRevokeId, + TypeVariant::HashIdPreimageContractId, + TypeVariant::HashIdPreimageSorobanAuthorization, + TypeVariant::MemoType, + TypeVariant::Memo, + TypeVariant::TimeBounds, + TypeVariant::LedgerBounds, + TypeVariant::PreconditionsV2, + TypeVariant::PreconditionType, + TypeVariant::Preconditions, + TypeVariant::LedgerFootprint, + TypeVariant::SorobanResources, + TypeVariant::SorobanResourcesExtV0, + TypeVariant::SorobanTransactionData, + TypeVariant::SorobanTransactionDataExt, + TypeVariant::TransactionV0, + TypeVariant::TransactionV0Ext, + TypeVariant::TransactionV0Envelope, + TypeVariant::Transaction, + TypeVariant::TransactionExt, + TypeVariant::TransactionV1Envelope, + TypeVariant::FeeBumpTransaction, + TypeVariant::FeeBumpTransactionInnerTx, + TypeVariant::FeeBumpTransactionExt, + TypeVariant::FeeBumpTransactionEnvelope, + TypeVariant::TransactionEnvelope, + TypeVariant::TransactionSignaturePayload, + TypeVariant::TransactionSignaturePayloadTaggedTransaction, + TypeVariant::ClaimAtomType, + TypeVariant::ClaimOfferAtomV0, + TypeVariant::ClaimOfferAtom, + TypeVariant::ClaimLiquidityAtom, + TypeVariant::ClaimAtom, + TypeVariant::CreateAccountResultCode, + TypeVariant::CreateAccountResult, + TypeVariant::PaymentResultCode, + TypeVariant::PaymentResult, + TypeVariant::PathPaymentStrictReceiveResultCode, + TypeVariant::SimplePaymentResult, + TypeVariant::PathPaymentStrictReceiveResult, + TypeVariant::PathPaymentStrictReceiveResultSuccess, + TypeVariant::PathPaymentStrictSendResultCode, + TypeVariant::PathPaymentStrictSendResult, + TypeVariant::PathPaymentStrictSendResultSuccess, + TypeVariant::ManageSellOfferResultCode, + TypeVariant::ManageOfferEffect, + TypeVariant::ManageOfferSuccessResult, + TypeVariant::ManageOfferSuccessResultOffer, + TypeVariant::ManageSellOfferResult, + TypeVariant::ManageBuyOfferResultCode, + TypeVariant::ManageBuyOfferResult, + TypeVariant::SetOptionsResultCode, + TypeVariant::SetOptionsResult, + TypeVariant::ChangeTrustResultCode, + TypeVariant::ChangeTrustResult, + TypeVariant::AllowTrustResultCode, + TypeVariant::AllowTrustResult, + TypeVariant::AccountMergeResultCode, + TypeVariant::AccountMergeResult, + TypeVariant::InflationResultCode, + TypeVariant::InflationPayout, + TypeVariant::InflationResult, + TypeVariant::ManageDataResultCode, + TypeVariant::ManageDataResult, + TypeVariant::BumpSequenceResultCode, + TypeVariant::BumpSequenceResult, + TypeVariant::CreateClaimableBalanceResultCode, + TypeVariant::CreateClaimableBalanceResult, + TypeVariant::ClaimClaimableBalanceResultCode, + TypeVariant::ClaimClaimableBalanceResult, + TypeVariant::BeginSponsoringFutureReservesResultCode, + TypeVariant::BeginSponsoringFutureReservesResult, + TypeVariant::EndSponsoringFutureReservesResultCode, + TypeVariant::EndSponsoringFutureReservesResult, + TypeVariant::RevokeSponsorshipResultCode, + TypeVariant::RevokeSponsorshipResult, + TypeVariant::ClawbackResultCode, + TypeVariant::ClawbackResult, + TypeVariant::ClawbackClaimableBalanceResultCode, + TypeVariant::ClawbackClaimableBalanceResult, + TypeVariant::SetTrustLineFlagsResultCode, + TypeVariant::SetTrustLineFlagsResult, + TypeVariant::LiquidityPoolDepositResultCode, + TypeVariant::LiquidityPoolDepositResult, + TypeVariant::LiquidityPoolWithdrawResultCode, + TypeVariant::LiquidityPoolWithdrawResult, + TypeVariant::InvokeHostFunctionResultCode, + TypeVariant::InvokeHostFunctionResult, + TypeVariant::ExtendFootprintTtlResultCode, + TypeVariant::ExtendFootprintTtlResult, + TypeVariant::RestoreFootprintResultCode, + TypeVariant::RestoreFootprintResult, + TypeVariant::OperationResultCode, + TypeVariant::OperationResult, + TypeVariant::OperationResultTr, + TypeVariant::TransactionResultCode, + TypeVariant::InnerTransactionResult, + TypeVariant::InnerTransactionResultResult, + TypeVariant::InnerTransactionResultExt, + TypeVariant::InnerTransactionResultPair, + TypeVariant::TransactionResult, + TypeVariant::TransactionResultResult, + TypeVariant::TransactionResultExt, + TypeVariant::Hash, + TypeVariant::Uint256, + TypeVariant::Uint32, + TypeVariant::Int32, + TypeVariant::Uint64, + TypeVariant::Int64, + TypeVariant::TimePoint, + TypeVariant::Duration, + TypeVariant::ExtensionPoint, + TypeVariant::CryptoKeyType, + TypeVariant::PublicKeyType, + TypeVariant::SignerKeyType, + TypeVariant::PublicKey, + TypeVariant::SignerKey, + TypeVariant::SignerKeyEd25519SignedPayload, + TypeVariant::Signature, + TypeVariant::SignatureHint, + TypeVariant::NodeId, + TypeVariant::AccountId, + TypeVariant::ContractId, + TypeVariant::Curve25519Secret, + TypeVariant::Curve25519Public, + TypeVariant::HmacSha256Key, + TypeVariant::HmacSha256Mac, + TypeVariant::ShortHashSeed, + TypeVariant::BinaryFuseFilterType, + TypeVariant::SerializedBinaryFuseFilter, + TypeVariant::PoolId, + TypeVariant::ClaimableBalanceIdType, + TypeVariant::ClaimableBalanceId, + ]; + const _VARIANTS_STR: &[&str] = &[ + "Value", + "ScpBallot", + "ScpStatementType", + "ScpNomination", + "ScpStatement", + "ScpStatementPledges", + "ScpStatementPrepare", + "ScpStatementConfirm", + "ScpStatementExternalize", + "ScpEnvelope", + "ScpQuorumSet", + "EncodedLedgerKey", + "ConfigSettingContractExecutionLanesV0", + "ConfigSettingContractComputeV0", + "ConfigSettingContractParallelComputeV0", + "ConfigSettingContractLedgerCostV0", + "ConfigSettingContractLedgerCostExtV0", + "ConfigSettingContractHistoricalDataV0", + "ConfigSettingContractEventsV0", + "ConfigSettingContractBandwidthV0", + "ContractCostType", + "ContractCostParamEntry", + "StateArchivalSettings", + "EvictionIterator", + "ConfigSettingScpTiming", + "FrozenLedgerKeys", + "FrozenLedgerKeysDelta", + "FreezeBypassTxs", + "FreezeBypassTxsDelta", + "ContractCostParams", + "ConfigSettingId", + "ConfigSettingEntry", + "ScEnvMetaKind", + "ScEnvMetaEntry", + "ScEnvMetaEntryInterfaceVersion", + "ScMetaV0", + "ScMetaKind", + "ScMetaEntry", + "ScSpecType", + "ScSpecTypeOption", + "ScSpecTypeResult", + "ScSpecTypeVec", + "ScSpecTypeMap", + "ScSpecTypeTuple", + "ScSpecTypeBytesN", + "ScSpecTypeUdt", + "ScSpecTypeDef", + "ScSpecUdtStructFieldV0", + "ScSpecUdtStructV0", + "ScSpecUdtUnionCaseVoidV0", + "ScSpecUdtUnionCaseTupleV0", + "ScSpecUdtUnionCaseV0Kind", + "ScSpecUdtUnionCaseV0", + "ScSpecUdtUnionV0", + "ScSpecUdtEnumCaseV0", + "ScSpecUdtEnumV0", + "ScSpecUdtErrorEnumCaseV0", + "ScSpecUdtErrorEnumV0", + "ScSpecFunctionInputV0", + "ScSpecFunctionV0", + "ScSpecEventParamLocationV0", + "ScSpecEventParamV0", + "ScSpecEventDataFormat", + "ScSpecEventV0", + "ScSpecEntryKind", + "ScSpecEntry", + "ScValType", + "ScErrorType", + "ScErrorCode", + "ScError", + "UInt128Parts", + "Int128Parts", + "UInt256Parts", + "Int256Parts", + "ContractExecutableType", + "ContractExecutable", + "ScAddressType", + "MuxedEd25519Account", + "ScAddress", + "ScVec", + "ScMap", + "ScBytes", + "ScString", + "ScSymbol", + "ScNonceKey", + "ScContractInstance", + "ScVal", + "ScMapEntry", + "LedgerCloseMetaBatch", + "StoredTransactionSet", + "StoredDebugTransactionSet", + "PersistedScpStateV0", + "PersistedScpStateV1", + "PersistedScpState", + "Thresholds", + "String32", + "String64", + "SequenceNumber", + "DataValue", + "AssetCode4", + "AssetCode12", + "AssetType", + "AssetCode", + "AlphaNum4", + "AlphaNum12", + "Asset", + "Price", + "Liabilities", + "ThresholdIndexes", + "LedgerEntryType", + "Signer", + "AccountFlags", + "SponsorshipDescriptor", + "AccountEntryExtensionV3", + "AccountEntryExtensionV2", + "AccountEntryExtensionV2Ext", + "AccountEntryExtensionV1", + "AccountEntryExtensionV1Ext", + "AccountEntry", + "AccountEntryExt", + "TrustLineFlags", + "LiquidityPoolType", + "TrustLineAsset", + "TrustLineEntryExtensionV2", + "TrustLineEntryExtensionV2Ext", + "TrustLineEntry", + "TrustLineEntryExt", + "TrustLineEntryV1", + "TrustLineEntryV1Ext", + "OfferEntryFlags", + "OfferEntry", + "OfferEntryExt", + "DataEntry", + "DataEntryExt", + "ClaimPredicateType", + "ClaimPredicate", + "ClaimantType", + "Claimant", + "ClaimantV0", + "ClaimableBalanceFlags", + "ClaimableBalanceEntryExtensionV1", + "ClaimableBalanceEntryExtensionV1Ext", + "ClaimableBalanceEntry", + "ClaimableBalanceEntryExt", + "LiquidityPoolConstantProductParameters", + "LiquidityPoolEntry", + "LiquidityPoolEntryBody", + "LiquidityPoolEntryConstantProduct", + "ContractDataDurability", + "ContractDataEntry", + "ContractCodeCostInputs", + "ContractCodeEntry", + "ContractCodeEntryExt", + "ContractCodeEntryV1", + "TtlEntry", + "LedgerEntryExtensionV1", + "LedgerEntryExtensionV1Ext", + "LedgerEntry", + "LedgerEntryData", + "LedgerEntryExt", + "LedgerKey", + "LedgerKeyAccount", + "LedgerKeyTrustLine", + "LedgerKeyOffer", + "LedgerKeyData", + "LedgerKeyClaimableBalance", + "LedgerKeyLiquidityPool", + "LedgerKeyContractData", + "LedgerKeyContractCode", + "LedgerKeyConfigSetting", + "LedgerKeyTtl", + "EnvelopeType", + "BucketListType", + "BucketEntryType", + "HotArchiveBucketEntryType", + "BucketMetadata", + "BucketMetadataExt", + "BucketEntry", + "HotArchiveBucketEntry", + "UpgradeType", + "StellarValueType", + "LedgerCloseValueSignature", + "StellarValue", + "StellarValueExt", + "LedgerHeaderFlags", + "LedgerHeaderExtensionV1", + "LedgerHeaderExtensionV1Ext", + "LedgerHeader", + "LedgerHeaderExt", + "LedgerUpgradeType", + "ConfigUpgradeSetKey", + "LedgerUpgrade", + "ConfigUpgradeSet", + "TxSetComponentType", + "DependentTxCluster", + "ParallelTxExecutionStage", + "ParallelTxsComponent", + "TxSetComponent", + "TxSetComponentTxsMaybeDiscountedFee", + "TransactionPhase", + "TransactionSet", + "TransactionSetV1", + "GeneralizedTransactionSet", + "TransactionResultPair", + "TransactionResultSet", + "TransactionHistoryEntry", + "TransactionHistoryEntryExt", + "TransactionHistoryResultEntry", + "TransactionHistoryResultEntryExt", + "LedgerHeaderHistoryEntry", + "LedgerHeaderHistoryEntryExt", + "LedgerScpMessages", + "ScpHistoryEntryV0", + "ScpHistoryEntry", + "LedgerEntryChangeType", + "LedgerEntryChange", + "LedgerEntryChanges", + "OperationMeta", + "TransactionMetaV1", + "TransactionMetaV2", + "ContractEventType", + "ContractEvent", + "ContractEventBody", + "ContractEventV0", + "DiagnosticEvent", + "SorobanTransactionMetaExtV1", + "SorobanTransactionMetaExt", + "SorobanTransactionMeta", + "TransactionMetaV3", + "OperationMetaV2", + "SorobanTransactionMetaV2", + "TransactionEventStage", + "TransactionEvent", + "TransactionMetaV4", + "InvokeHostFunctionSuccessPreImage", + "TransactionMeta", + "TransactionResultMeta", + "TransactionResultMetaV1", + "UpgradeEntryMeta", + "LedgerCloseMetaV0", + "LedgerCloseMetaExtV1", + "LedgerCloseMetaExt", + "LedgerCloseMetaV1", + "LedgerCloseMetaV2", + "LedgerCloseMeta", + "ErrorCode", + "SError", + "SendMore", + "SendMoreExtended", + "AuthCert", + "Hello", + "Auth", + "IpAddrType", + "PeerAddress", + "PeerAddressIp", + "MessageType", + "DontHave", + "SurveyMessageCommandType", + "SurveyMessageResponseType", + "TimeSlicedSurveyStartCollectingMessage", + "SignedTimeSlicedSurveyStartCollectingMessage", + "TimeSlicedSurveyStopCollectingMessage", + "SignedTimeSlicedSurveyStopCollectingMessage", + "SurveyRequestMessage", + "TimeSlicedSurveyRequestMessage", + "SignedTimeSlicedSurveyRequestMessage", + "EncryptedBody", + "SurveyResponseMessage", + "TimeSlicedSurveyResponseMessage", + "SignedTimeSlicedSurveyResponseMessage", + "PeerStats", + "TimeSlicedNodeData", + "TimeSlicedPeerData", + "TimeSlicedPeerDataList", + "TopologyResponseBodyV2", + "SurveyResponseBody", + "TxAdvertVector", + "FloodAdvert", + "TxDemandVector", + "FloodDemand", + "StellarMessage", + "AuthenticatedMessage", + "AuthenticatedMessageV0", + "LiquidityPoolParameters", + "MuxedAccount", + "MuxedAccountMed25519", + "DecoratedSignature", + "OperationType", + "CreateAccountOp", + "PaymentOp", + "PathPaymentStrictReceiveOp", + "PathPaymentStrictSendOp", + "ManageSellOfferOp", + "ManageBuyOfferOp", + "CreatePassiveSellOfferOp", + "SetOptionsOp", + "ChangeTrustAsset", + "ChangeTrustOp", + "AllowTrustOp", + "ManageDataOp", + "BumpSequenceOp", + "CreateClaimableBalanceOp", + "ClaimClaimableBalanceOp", + "BeginSponsoringFutureReservesOp", + "RevokeSponsorshipType", + "RevokeSponsorshipOp", + "RevokeSponsorshipOpSigner", + "ClawbackOp", + "ClawbackClaimableBalanceOp", + "SetTrustLineFlagsOp", + "LiquidityPoolDepositOp", + "LiquidityPoolWithdrawOp", + "HostFunctionType", + "ContractIdPreimageType", + "ContractIdPreimage", + "ContractIdPreimageFromAddress", + "CreateContractArgs", + "CreateContractArgsV2", + "InvokeContractArgs", + "HostFunction", + "SorobanAuthorizedFunctionType", + "SorobanAuthorizedFunction", + "SorobanAuthorizedInvocation", + "SorobanAddressCredentials", + "SorobanCredentialsType", + "SorobanCredentials", + "SorobanAuthorizationEntry", + "SorobanAuthorizationEntries", + "InvokeHostFunctionOp", + "ExtendFootprintTtlOp", + "RestoreFootprintOp", + "Operation", + "OperationBody", + "HashIdPreimage", + "HashIdPreimageOperationId", + "HashIdPreimageRevokeId", + "HashIdPreimageContractId", + "HashIdPreimageSorobanAuthorization", + "MemoType", + "Memo", + "TimeBounds", + "LedgerBounds", + "PreconditionsV2", + "PreconditionType", + "Preconditions", + "LedgerFootprint", + "SorobanResources", + "SorobanResourcesExtV0", + "SorobanTransactionData", + "SorobanTransactionDataExt", + "TransactionV0", + "TransactionV0Ext", + "TransactionV0Envelope", + "Transaction", + "TransactionExt", + "TransactionV1Envelope", + "FeeBumpTransaction", + "FeeBumpTransactionInnerTx", + "FeeBumpTransactionExt", + "FeeBumpTransactionEnvelope", + "TransactionEnvelope", + "TransactionSignaturePayload", + "TransactionSignaturePayloadTaggedTransaction", + "ClaimAtomType", + "ClaimOfferAtomV0", + "ClaimOfferAtom", + "ClaimLiquidityAtom", + "ClaimAtom", + "CreateAccountResultCode", + "CreateAccountResult", + "PaymentResultCode", + "PaymentResult", + "PathPaymentStrictReceiveResultCode", + "SimplePaymentResult", + "PathPaymentStrictReceiveResult", + "PathPaymentStrictReceiveResultSuccess", + "PathPaymentStrictSendResultCode", + "PathPaymentStrictSendResult", + "PathPaymentStrictSendResultSuccess", + "ManageSellOfferResultCode", + "ManageOfferEffect", + "ManageOfferSuccessResult", + "ManageOfferSuccessResultOffer", + "ManageSellOfferResult", + "ManageBuyOfferResultCode", + "ManageBuyOfferResult", + "SetOptionsResultCode", + "SetOptionsResult", + "ChangeTrustResultCode", + "ChangeTrustResult", + "AllowTrustResultCode", + "AllowTrustResult", + "AccountMergeResultCode", + "AccountMergeResult", + "InflationResultCode", + "InflationPayout", + "InflationResult", + "ManageDataResultCode", + "ManageDataResult", + "BumpSequenceResultCode", + "BumpSequenceResult", + "CreateClaimableBalanceResultCode", + "CreateClaimableBalanceResult", + "ClaimClaimableBalanceResultCode", + "ClaimClaimableBalanceResult", + "BeginSponsoringFutureReservesResultCode", + "BeginSponsoringFutureReservesResult", + "EndSponsoringFutureReservesResultCode", + "EndSponsoringFutureReservesResult", + "RevokeSponsorshipResultCode", + "RevokeSponsorshipResult", + "ClawbackResultCode", + "ClawbackResult", + "ClawbackClaimableBalanceResultCode", + "ClawbackClaimableBalanceResult", + "SetTrustLineFlagsResultCode", + "SetTrustLineFlagsResult", + "LiquidityPoolDepositResultCode", + "LiquidityPoolDepositResult", + "LiquidityPoolWithdrawResultCode", + "LiquidityPoolWithdrawResult", + "InvokeHostFunctionResultCode", + "InvokeHostFunctionResult", + "ExtendFootprintTtlResultCode", + "ExtendFootprintTtlResult", + "RestoreFootprintResultCode", + "RestoreFootprintResult", + "OperationResultCode", + "OperationResult", + "OperationResultTr", + "TransactionResultCode", + "InnerTransactionResult", + "InnerTransactionResultResult", + "InnerTransactionResultExt", + "InnerTransactionResultPair", + "TransactionResult", + "TransactionResultResult", + "TransactionResultExt", + "Hash", + "Uint256", + "Uint32", + "Int32", + "Uint64", + "Int64", + "TimePoint", + "Duration", + "ExtensionPoint", + "CryptoKeyType", + "PublicKeyType", + "SignerKeyType", + "PublicKey", + "SignerKey", + "SignerKeyEd25519SignedPayload", + "Signature", + "SignatureHint", + "NodeId", + "AccountId", + "ContractId", + "Curve25519Secret", + "Curve25519Public", + "HmacSha256Key", + "HmacSha256Mac", + "ShortHashSeed", + "BinaryFuseFilterType", + "SerializedBinaryFuseFilter", + "PoolId", + "ClaimableBalanceIdType", + "ClaimableBalanceId", + ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = [ "Value", "ScpBallot", "ScpStatementType", @@ -52874,7 +53814,7 @@ impl TypeVariant { #[must_use] #[allow(clippy::too_many_lines)] - pub const fn variants() -> &'static [TypeVariant] { + pub const fn variants() -> [TypeVariant; Self::_VARIANTS.len()] { Self::VARIANTS } @@ -54572,9 +55512,479 @@ pub enum Type { } impl Type { - // VARIANTS and VARIANTS_STR are slices (not fixed-size arrays) because - // individual entries may be #[cfg]-gated, so the count varies by enabled features. - pub const VARIANTS: &[TypeVariant] = &[ + // Private const slices used to compute the variant count, supporting + // cfg-gated entries whose presence varies by enabled features. + const _VARIANTS: &[TypeVariant] = &[ + TypeVariant::Value, + TypeVariant::ScpBallot, + TypeVariant::ScpStatementType, + TypeVariant::ScpNomination, + TypeVariant::ScpStatement, + TypeVariant::ScpStatementPledges, + TypeVariant::ScpStatementPrepare, + TypeVariant::ScpStatementConfirm, + TypeVariant::ScpStatementExternalize, + TypeVariant::ScpEnvelope, + TypeVariant::ScpQuorumSet, + TypeVariant::EncodedLedgerKey, + TypeVariant::ConfigSettingContractExecutionLanesV0, + TypeVariant::ConfigSettingContractComputeV0, + TypeVariant::ConfigSettingContractParallelComputeV0, + TypeVariant::ConfigSettingContractLedgerCostV0, + TypeVariant::ConfigSettingContractLedgerCostExtV0, + TypeVariant::ConfigSettingContractHistoricalDataV0, + TypeVariant::ConfigSettingContractEventsV0, + TypeVariant::ConfigSettingContractBandwidthV0, + TypeVariant::ContractCostType, + TypeVariant::ContractCostParamEntry, + TypeVariant::StateArchivalSettings, + TypeVariant::EvictionIterator, + TypeVariant::ConfigSettingScpTiming, + TypeVariant::FrozenLedgerKeys, + TypeVariant::FrozenLedgerKeysDelta, + TypeVariant::FreezeBypassTxs, + TypeVariant::FreezeBypassTxsDelta, + TypeVariant::ContractCostParams, + TypeVariant::ConfigSettingId, + TypeVariant::ConfigSettingEntry, + TypeVariant::ScEnvMetaKind, + TypeVariant::ScEnvMetaEntry, + TypeVariant::ScEnvMetaEntryInterfaceVersion, + TypeVariant::ScMetaV0, + TypeVariant::ScMetaKind, + TypeVariant::ScMetaEntry, + TypeVariant::ScSpecType, + TypeVariant::ScSpecTypeOption, + TypeVariant::ScSpecTypeResult, + TypeVariant::ScSpecTypeVec, + TypeVariant::ScSpecTypeMap, + TypeVariant::ScSpecTypeTuple, + TypeVariant::ScSpecTypeBytesN, + TypeVariant::ScSpecTypeUdt, + TypeVariant::ScSpecTypeDef, + TypeVariant::ScSpecUdtStructFieldV0, + TypeVariant::ScSpecUdtStructV0, + TypeVariant::ScSpecUdtUnionCaseVoidV0, + TypeVariant::ScSpecUdtUnionCaseTupleV0, + TypeVariant::ScSpecUdtUnionCaseV0Kind, + TypeVariant::ScSpecUdtUnionCaseV0, + TypeVariant::ScSpecUdtUnionV0, + TypeVariant::ScSpecUdtEnumCaseV0, + TypeVariant::ScSpecUdtEnumV0, + TypeVariant::ScSpecUdtErrorEnumCaseV0, + TypeVariant::ScSpecUdtErrorEnumV0, + TypeVariant::ScSpecFunctionInputV0, + TypeVariant::ScSpecFunctionV0, + TypeVariant::ScSpecEventParamLocationV0, + TypeVariant::ScSpecEventParamV0, + TypeVariant::ScSpecEventDataFormat, + TypeVariant::ScSpecEventV0, + TypeVariant::ScSpecEntryKind, + TypeVariant::ScSpecEntry, + TypeVariant::ScValType, + TypeVariant::ScErrorType, + TypeVariant::ScErrorCode, + TypeVariant::ScError, + TypeVariant::UInt128Parts, + TypeVariant::Int128Parts, + TypeVariant::UInt256Parts, + TypeVariant::Int256Parts, + TypeVariant::ContractExecutableType, + TypeVariant::ContractExecutable, + TypeVariant::ScAddressType, + TypeVariant::MuxedEd25519Account, + TypeVariant::ScAddress, + TypeVariant::ScVec, + TypeVariant::ScMap, + TypeVariant::ScBytes, + TypeVariant::ScString, + TypeVariant::ScSymbol, + TypeVariant::ScNonceKey, + TypeVariant::ScContractInstance, + TypeVariant::ScVal, + TypeVariant::ScMapEntry, + TypeVariant::LedgerCloseMetaBatch, + TypeVariant::StoredTransactionSet, + TypeVariant::StoredDebugTransactionSet, + TypeVariant::PersistedScpStateV0, + TypeVariant::PersistedScpStateV1, + TypeVariant::PersistedScpState, + TypeVariant::Thresholds, + TypeVariant::String32, + TypeVariant::String64, + TypeVariant::SequenceNumber, + TypeVariant::DataValue, + TypeVariant::AssetCode4, + TypeVariant::AssetCode12, + TypeVariant::AssetType, + TypeVariant::AssetCode, + TypeVariant::AlphaNum4, + TypeVariant::AlphaNum12, + TypeVariant::Asset, + TypeVariant::Price, + TypeVariant::Liabilities, + TypeVariant::ThresholdIndexes, + TypeVariant::LedgerEntryType, + TypeVariant::Signer, + TypeVariant::AccountFlags, + TypeVariant::SponsorshipDescriptor, + TypeVariant::AccountEntryExtensionV3, + TypeVariant::AccountEntryExtensionV2, + TypeVariant::AccountEntryExtensionV2Ext, + TypeVariant::AccountEntryExtensionV1, + TypeVariant::AccountEntryExtensionV1Ext, + TypeVariant::AccountEntry, + TypeVariant::AccountEntryExt, + TypeVariant::TrustLineFlags, + TypeVariant::LiquidityPoolType, + TypeVariant::TrustLineAsset, + TypeVariant::TrustLineEntryExtensionV2, + TypeVariant::TrustLineEntryExtensionV2Ext, + TypeVariant::TrustLineEntry, + TypeVariant::TrustLineEntryExt, + TypeVariant::TrustLineEntryV1, + TypeVariant::TrustLineEntryV1Ext, + TypeVariant::OfferEntryFlags, + TypeVariant::OfferEntry, + TypeVariant::OfferEntryExt, + TypeVariant::DataEntry, + TypeVariant::DataEntryExt, + TypeVariant::ClaimPredicateType, + TypeVariant::ClaimPredicate, + TypeVariant::ClaimantType, + TypeVariant::Claimant, + TypeVariant::ClaimantV0, + TypeVariant::ClaimableBalanceFlags, + TypeVariant::ClaimableBalanceEntryExtensionV1, + TypeVariant::ClaimableBalanceEntryExtensionV1Ext, + TypeVariant::ClaimableBalanceEntry, + TypeVariant::ClaimableBalanceEntryExt, + TypeVariant::LiquidityPoolConstantProductParameters, + TypeVariant::LiquidityPoolEntry, + TypeVariant::LiquidityPoolEntryBody, + TypeVariant::LiquidityPoolEntryConstantProduct, + TypeVariant::ContractDataDurability, + TypeVariant::ContractDataEntry, + TypeVariant::ContractCodeCostInputs, + TypeVariant::ContractCodeEntry, + TypeVariant::ContractCodeEntryExt, + TypeVariant::ContractCodeEntryV1, + TypeVariant::TtlEntry, + TypeVariant::LedgerEntryExtensionV1, + TypeVariant::LedgerEntryExtensionV1Ext, + TypeVariant::LedgerEntry, + TypeVariant::LedgerEntryData, + TypeVariant::LedgerEntryExt, + TypeVariant::LedgerKey, + TypeVariant::LedgerKeyAccount, + TypeVariant::LedgerKeyTrustLine, + TypeVariant::LedgerKeyOffer, + TypeVariant::LedgerKeyData, + TypeVariant::LedgerKeyClaimableBalance, + TypeVariant::LedgerKeyLiquidityPool, + TypeVariant::LedgerKeyContractData, + TypeVariant::LedgerKeyContractCode, + TypeVariant::LedgerKeyConfigSetting, + TypeVariant::LedgerKeyTtl, + TypeVariant::EnvelopeType, + TypeVariant::BucketListType, + TypeVariant::BucketEntryType, + TypeVariant::HotArchiveBucketEntryType, + TypeVariant::BucketMetadata, + TypeVariant::BucketMetadataExt, + TypeVariant::BucketEntry, + TypeVariant::HotArchiveBucketEntry, + TypeVariant::UpgradeType, + TypeVariant::StellarValueType, + TypeVariant::LedgerCloseValueSignature, + TypeVariant::StellarValue, + TypeVariant::StellarValueExt, + TypeVariant::LedgerHeaderFlags, + TypeVariant::LedgerHeaderExtensionV1, + TypeVariant::LedgerHeaderExtensionV1Ext, + TypeVariant::LedgerHeader, + TypeVariant::LedgerHeaderExt, + TypeVariant::LedgerUpgradeType, + TypeVariant::ConfigUpgradeSetKey, + TypeVariant::LedgerUpgrade, + TypeVariant::ConfigUpgradeSet, + TypeVariant::TxSetComponentType, + TypeVariant::DependentTxCluster, + TypeVariant::ParallelTxExecutionStage, + TypeVariant::ParallelTxsComponent, + TypeVariant::TxSetComponent, + TypeVariant::TxSetComponentTxsMaybeDiscountedFee, + TypeVariant::TransactionPhase, + TypeVariant::TransactionSet, + TypeVariant::TransactionSetV1, + TypeVariant::GeneralizedTransactionSet, + TypeVariant::TransactionResultPair, + TypeVariant::TransactionResultSet, + TypeVariant::TransactionHistoryEntry, + TypeVariant::TransactionHistoryEntryExt, + TypeVariant::TransactionHistoryResultEntry, + TypeVariant::TransactionHistoryResultEntryExt, + TypeVariant::LedgerHeaderHistoryEntry, + TypeVariant::LedgerHeaderHistoryEntryExt, + TypeVariant::LedgerScpMessages, + TypeVariant::ScpHistoryEntryV0, + TypeVariant::ScpHistoryEntry, + TypeVariant::LedgerEntryChangeType, + TypeVariant::LedgerEntryChange, + TypeVariant::LedgerEntryChanges, + TypeVariant::OperationMeta, + TypeVariant::TransactionMetaV1, + TypeVariant::TransactionMetaV2, + TypeVariant::ContractEventType, + TypeVariant::ContractEvent, + TypeVariant::ContractEventBody, + TypeVariant::ContractEventV0, + TypeVariant::DiagnosticEvent, + TypeVariant::SorobanTransactionMetaExtV1, + TypeVariant::SorobanTransactionMetaExt, + TypeVariant::SorobanTransactionMeta, + TypeVariant::TransactionMetaV3, + TypeVariant::OperationMetaV2, + TypeVariant::SorobanTransactionMetaV2, + TypeVariant::TransactionEventStage, + TypeVariant::TransactionEvent, + TypeVariant::TransactionMetaV4, + TypeVariant::InvokeHostFunctionSuccessPreImage, + TypeVariant::TransactionMeta, + TypeVariant::TransactionResultMeta, + TypeVariant::TransactionResultMetaV1, + TypeVariant::UpgradeEntryMeta, + TypeVariant::LedgerCloseMetaV0, + TypeVariant::LedgerCloseMetaExtV1, + TypeVariant::LedgerCloseMetaExt, + TypeVariant::LedgerCloseMetaV1, + TypeVariant::LedgerCloseMetaV2, + TypeVariant::LedgerCloseMeta, + TypeVariant::ErrorCode, + TypeVariant::SError, + TypeVariant::SendMore, + TypeVariant::SendMoreExtended, + TypeVariant::AuthCert, + TypeVariant::Hello, + TypeVariant::Auth, + TypeVariant::IpAddrType, + TypeVariant::PeerAddress, + TypeVariant::PeerAddressIp, + TypeVariant::MessageType, + TypeVariant::DontHave, + TypeVariant::SurveyMessageCommandType, + TypeVariant::SurveyMessageResponseType, + TypeVariant::TimeSlicedSurveyStartCollectingMessage, + TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage, + TypeVariant::TimeSlicedSurveyStopCollectingMessage, + TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage, + TypeVariant::SurveyRequestMessage, + TypeVariant::TimeSlicedSurveyRequestMessage, + TypeVariant::SignedTimeSlicedSurveyRequestMessage, + TypeVariant::EncryptedBody, + TypeVariant::SurveyResponseMessage, + TypeVariant::TimeSlicedSurveyResponseMessage, + TypeVariant::SignedTimeSlicedSurveyResponseMessage, + TypeVariant::PeerStats, + TypeVariant::TimeSlicedNodeData, + TypeVariant::TimeSlicedPeerData, + TypeVariant::TimeSlicedPeerDataList, + TypeVariant::TopologyResponseBodyV2, + TypeVariant::SurveyResponseBody, + TypeVariant::TxAdvertVector, + TypeVariant::FloodAdvert, + TypeVariant::TxDemandVector, + TypeVariant::FloodDemand, + TypeVariant::StellarMessage, + TypeVariant::AuthenticatedMessage, + TypeVariant::AuthenticatedMessageV0, + TypeVariant::LiquidityPoolParameters, + TypeVariant::MuxedAccount, + TypeVariant::MuxedAccountMed25519, + TypeVariant::DecoratedSignature, + TypeVariant::OperationType, + TypeVariant::CreateAccountOp, + TypeVariant::PaymentOp, + TypeVariant::PathPaymentStrictReceiveOp, + TypeVariant::PathPaymentStrictSendOp, + TypeVariant::ManageSellOfferOp, + TypeVariant::ManageBuyOfferOp, + TypeVariant::CreatePassiveSellOfferOp, + TypeVariant::SetOptionsOp, + TypeVariant::ChangeTrustAsset, + TypeVariant::ChangeTrustOp, + TypeVariant::AllowTrustOp, + TypeVariant::ManageDataOp, + TypeVariant::BumpSequenceOp, + TypeVariant::CreateClaimableBalanceOp, + TypeVariant::ClaimClaimableBalanceOp, + TypeVariant::BeginSponsoringFutureReservesOp, + TypeVariant::RevokeSponsorshipType, + TypeVariant::RevokeSponsorshipOp, + TypeVariant::RevokeSponsorshipOpSigner, + TypeVariant::ClawbackOp, + TypeVariant::ClawbackClaimableBalanceOp, + TypeVariant::SetTrustLineFlagsOp, + TypeVariant::LiquidityPoolDepositOp, + TypeVariant::LiquidityPoolWithdrawOp, + TypeVariant::HostFunctionType, + TypeVariant::ContractIdPreimageType, + TypeVariant::ContractIdPreimage, + TypeVariant::ContractIdPreimageFromAddress, + TypeVariant::CreateContractArgs, + TypeVariant::CreateContractArgsV2, + TypeVariant::InvokeContractArgs, + TypeVariant::HostFunction, + TypeVariant::SorobanAuthorizedFunctionType, + TypeVariant::SorobanAuthorizedFunction, + TypeVariant::SorobanAuthorizedInvocation, + TypeVariant::SorobanAddressCredentials, + TypeVariant::SorobanCredentialsType, + TypeVariant::SorobanCredentials, + TypeVariant::SorobanAuthorizationEntry, + TypeVariant::SorobanAuthorizationEntries, + TypeVariant::InvokeHostFunctionOp, + TypeVariant::ExtendFootprintTtlOp, + TypeVariant::RestoreFootprintOp, + TypeVariant::Operation, + TypeVariant::OperationBody, + TypeVariant::HashIdPreimage, + TypeVariant::HashIdPreimageOperationId, + TypeVariant::HashIdPreimageRevokeId, + TypeVariant::HashIdPreimageContractId, + TypeVariant::HashIdPreimageSorobanAuthorization, + TypeVariant::MemoType, + TypeVariant::Memo, + TypeVariant::TimeBounds, + TypeVariant::LedgerBounds, + TypeVariant::PreconditionsV2, + TypeVariant::PreconditionType, + TypeVariant::Preconditions, + TypeVariant::LedgerFootprint, + TypeVariant::SorobanResources, + TypeVariant::SorobanResourcesExtV0, + TypeVariant::SorobanTransactionData, + TypeVariant::SorobanTransactionDataExt, + TypeVariant::TransactionV0, + TypeVariant::TransactionV0Ext, + TypeVariant::TransactionV0Envelope, + TypeVariant::Transaction, + TypeVariant::TransactionExt, + TypeVariant::TransactionV1Envelope, + TypeVariant::FeeBumpTransaction, + TypeVariant::FeeBumpTransactionInnerTx, + TypeVariant::FeeBumpTransactionExt, + TypeVariant::FeeBumpTransactionEnvelope, + TypeVariant::TransactionEnvelope, + TypeVariant::TransactionSignaturePayload, + TypeVariant::TransactionSignaturePayloadTaggedTransaction, + TypeVariant::ClaimAtomType, + TypeVariant::ClaimOfferAtomV0, + TypeVariant::ClaimOfferAtom, + TypeVariant::ClaimLiquidityAtom, + TypeVariant::ClaimAtom, + TypeVariant::CreateAccountResultCode, + TypeVariant::CreateAccountResult, + TypeVariant::PaymentResultCode, + TypeVariant::PaymentResult, + TypeVariant::PathPaymentStrictReceiveResultCode, + TypeVariant::SimplePaymentResult, + TypeVariant::PathPaymentStrictReceiveResult, + TypeVariant::PathPaymentStrictReceiveResultSuccess, + TypeVariant::PathPaymentStrictSendResultCode, + TypeVariant::PathPaymentStrictSendResult, + TypeVariant::PathPaymentStrictSendResultSuccess, + TypeVariant::ManageSellOfferResultCode, + TypeVariant::ManageOfferEffect, + TypeVariant::ManageOfferSuccessResult, + TypeVariant::ManageOfferSuccessResultOffer, + TypeVariant::ManageSellOfferResult, + TypeVariant::ManageBuyOfferResultCode, + TypeVariant::ManageBuyOfferResult, + TypeVariant::SetOptionsResultCode, + TypeVariant::SetOptionsResult, + TypeVariant::ChangeTrustResultCode, + TypeVariant::ChangeTrustResult, + TypeVariant::AllowTrustResultCode, + TypeVariant::AllowTrustResult, + TypeVariant::AccountMergeResultCode, + TypeVariant::AccountMergeResult, + TypeVariant::InflationResultCode, + TypeVariant::InflationPayout, + TypeVariant::InflationResult, + TypeVariant::ManageDataResultCode, + TypeVariant::ManageDataResult, + TypeVariant::BumpSequenceResultCode, + TypeVariant::BumpSequenceResult, + TypeVariant::CreateClaimableBalanceResultCode, + TypeVariant::CreateClaimableBalanceResult, + TypeVariant::ClaimClaimableBalanceResultCode, + TypeVariant::ClaimClaimableBalanceResult, + TypeVariant::BeginSponsoringFutureReservesResultCode, + TypeVariant::BeginSponsoringFutureReservesResult, + TypeVariant::EndSponsoringFutureReservesResultCode, + TypeVariant::EndSponsoringFutureReservesResult, + TypeVariant::RevokeSponsorshipResultCode, + TypeVariant::RevokeSponsorshipResult, + TypeVariant::ClawbackResultCode, + TypeVariant::ClawbackResult, + TypeVariant::ClawbackClaimableBalanceResultCode, + TypeVariant::ClawbackClaimableBalanceResult, + TypeVariant::SetTrustLineFlagsResultCode, + TypeVariant::SetTrustLineFlagsResult, + TypeVariant::LiquidityPoolDepositResultCode, + TypeVariant::LiquidityPoolDepositResult, + TypeVariant::LiquidityPoolWithdrawResultCode, + TypeVariant::LiquidityPoolWithdrawResult, + TypeVariant::InvokeHostFunctionResultCode, + TypeVariant::InvokeHostFunctionResult, + TypeVariant::ExtendFootprintTtlResultCode, + TypeVariant::ExtendFootprintTtlResult, + TypeVariant::RestoreFootprintResultCode, + TypeVariant::RestoreFootprintResult, + TypeVariant::OperationResultCode, + TypeVariant::OperationResult, + TypeVariant::OperationResultTr, + TypeVariant::TransactionResultCode, + TypeVariant::InnerTransactionResult, + TypeVariant::InnerTransactionResultResult, + TypeVariant::InnerTransactionResultExt, + TypeVariant::InnerTransactionResultPair, + TypeVariant::TransactionResult, + TypeVariant::TransactionResultResult, + TypeVariant::TransactionResultExt, + TypeVariant::Hash, + TypeVariant::Uint256, + TypeVariant::Uint32, + TypeVariant::Int32, + TypeVariant::Uint64, + TypeVariant::Int64, + TypeVariant::TimePoint, + TypeVariant::Duration, + TypeVariant::ExtensionPoint, + TypeVariant::CryptoKeyType, + TypeVariant::PublicKeyType, + TypeVariant::SignerKeyType, + TypeVariant::PublicKey, + TypeVariant::SignerKey, + TypeVariant::SignerKeyEd25519SignedPayload, + TypeVariant::Signature, + TypeVariant::SignatureHint, + TypeVariant::NodeId, + TypeVariant::AccountId, + TypeVariant::ContractId, + TypeVariant::Curve25519Secret, + TypeVariant::Curve25519Public, + TypeVariant::HmacSha256Key, + TypeVariant::HmacSha256Mac, + TypeVariant::ShortHashSeed, + TypeVariant::BinaryFuseFilterType, + TypeVariant::SerializedBinaryFuseFilter, + TypeVariant::PoolId, + TypeVariant::ClaimableBalanceIdType, + TypeVariant::ClaimableBalanceId, + ]; + pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = [ TypeVariant::Value, TypeVariant::ScpBallot, TypeVariant::ScpStatementType, @@ -55044,7 +56454,477 @@ impl Type { TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, ]; - pub const VARIANTS_STR: &[&str] = &[ + const _VARIANTS_STR: &[&str] = &[ + "Value", + "ScpBallot", + "ScpStatementType", + "ScpNomination", + "ScpStatement", + "ScpStatementPledges", + "ScpStatementPrepare", + "ScpStatementConfirm", + "ScpStatementExternalize", + "ScpEnvelope", + "ScpQuorumSet", + "EncodedLedgerKey", + "ConfigSettingContractExecutionLanesV0", + "ConfigSettingContractComputeV0", + "ConfigSettingContractParallelComputeV0", + "ConfigSettingContractLedgerCostV0", + "ConfigSettingContractLedgerCostExtV0", + "ConfigSettingContractHistoricalDataV0", + "ConfigSettingContractEventsV0", + "ConfigSettingContractBandwidthV0", + "ContractCostType", + "ContractCostParamEntry", + "StateArchivalSettings", + "EvictionIterator", + "ConfigSettingScpTiming", + "FrozenLedgerKeys", + "FrozenLedgerKeysDelta", + "FreezeBypassTxs", + "FreezeBypassTxsDelta", + "ContractCostParams", + "ConfigSettingId", + "ConfigSettingEntry", + "ScEnvMetaKind", + "ScEnvMetaEntry", + "ScEnvMetaEntryInterfaceVersion", + "ScMetaV0", + "ScMetaKind", + "ScMetaEntry", + "ScSpecType", + "ScSpecTypeOption", + "ScSpecTypeResult", + "ScSpecTypeVec", + "ScSpecTypeMap", + "ScSpecTypeTuple", + "ScSpecTypeBytesN", + "ScSpecTypeUdt", + "ScSpecTypeDef", + "ScSpecUdtStructFieldV0", + "ScSpecUdtStructV0", + "ScSpecUdtUnionCaseVoidV0", + "ScSpecUdtUnionCaseTupleV0", + "ScSpecUdtUnionCaseV0Kind", + "ScSpecUdtUnionCaseV0", + "ScSpecUdtUnionV0", + "ScSpecUdtEnumCaseV0", + "ScSpecUdtEnumV0", + "ScSpecUdtErrorEnumCaseV0", + "ScSpecUdtErrorEnumV0", + "ScSpecFunctionInputV0", + "ScSpecFunctionV0", + "ScSpecEventParamLocationV0", + "ScSpecEventParamV0", + "ScSpecEventDataFormat", + "ScSpecEventV0", + "ScSpecEntryKind", + "ScSpecEntry", + "ScValType", + "ScErrorType", + "ScErrorCode", + "ScError", + "UInt128Parts", + "Int128Parts", + "UInt256Parts", + "Int256Parts", + "ContractExecutableType", + "ContractExecutable", + "ScAddressType", + "MuxedEd25519Account", + "ScAddress", + "ScVec", + "ScMap", + "ScBytes", + "ScString", + "ScSymbol", + "ScNonceKey", + "ScContractInstance", + "ScVal", + "ScMapEntry", + "LedgerCloseMetaBatch", + "StoredTransactionSet", + "StoredDebugTransactionSet", + "PersistedScpStateV0", + "PersistedScpStateV1", + "PersistedScpState", + "Thresholds", + "String32", + "String64", + "SequenceNumber", + "DataValue", + "AssetCode4", + "AssetCode12", + "AssetType", + "AssetCode", + "AlphaNum4", + "AlphaNum12", + "Asset", + "Price", + "Liabilities", + "ThresholdIndexes", + "LedgerEntryType", + "Signer", + "AccountFlags", + "SponsorshipDescriptor", + "AccountEntryExtensionV3", + "AccountEntryExtensionV2", + "AccountEntryExtensionV2Ext", + "AccountEntryExtensionV1", + "AccountEntryExtensionV1Ext", + "AccountEntry", + "AccountEntryExt", + "TrustLineFlags", + "LiquidityPoolType", + "TrustLineAsset", + "TrustLineEntryExtensionV2", + "TrustLineEntryExtensionV2Ext", + "TrustLineEntry", + "TrustLineEntryExt", + "TrustLineEntryV1", + "TrustLineEntryV1Ext", + "OfferEntryFlags", + "OfferEntry", + "OfferEntryExt", + "DataEntry", + "DataEntryExt", + "ClaimPredicateType", + "ClaimPredicate", + "ClaimantType", + "Claimant", + "ClaimantV0", + "ClaimableBalanceFlags", + "ClaimableBalanceEntryExtensionV1", + "ClaimableBalanceEntryExtensionV1Ext", + "ClaimableBalanceEntry", + "ClaimableBalanceEntryExt", + "LiquidityPoolConstantProductParameters", + "LiquidityPoolEntry", + "LiquidityPoolEntryBody", + "LiquidityPoolEntryConstantProduct", + "ContractDataDurability", + "ContractDataEntry", + "ContractCodeCostInputs", + "ContractCodeEntry", + "ContractCodeEntryExt", + "ContractCodeEntryV1", + "TtlEntry", + "LedgerEntryExtensionV1", + "LedgerEntryExtensionV1Ext", + "LedgerEntry", + "LedgerEntryData", + "LedgerEntryExt", + "LedgerKey", + "LedgerKeyAccount", + "LedgerKeyTrustLine", + "LedgerKeyOffer", + "LedgerKeyData", + "LedgerKeyClaimableBalance", + "LedgerKeyLiquidityPool", + "LedgerKeyContractData", + "LedgerKeyContractCode", + "LedgerKeyConfigSetting", + "LedgerKeyTtl", + "EnvelopeType", + "BucketListType", + "BucketEntryType", + "HotArchiveBucketEntryType", + "BucketMetadata", + "BucketMetadataExt", + "BucketEntry", + "HotArchiveBucketEntry", + "UpgradeType", + "StellarValueType", + "LedgerCloseValueSignature", + "StellarValue", + "StellarValueExt", + "LedgerHeaderFlags", + "LedgerHeaderExtensionV1", + "LedgerHeaderExtensionV1Ext", + "LedgerHeader", + "LedgerHeaderExt", + "LedgerUpgradeType", + "ConfigUpgradeSetKey", + "LedgerUpgrade", + "ConfigUpgradeSet", + "TxSetComponentType", + "DependentTxCluster", + "ParallelTxExecutionStage", + "ParallelTxsComponent", + "TxSetComponent", + "TxSetComponentTxsMaybeDiscountedFee", + "TransactionPhase", + "TransactionSet", + "TransactionSetV1", + "GeneralizedTransactionSet", + "TransactionResultPair", + "TransactionResultSet", + "TransactionHistoryEntry", + "TransactionHistoryEntryExt", + "TransactionHistoryResultEntry", + "TransactionHistoryResultEntryExt", + "LedgerHeaderHistoryEntry", + "LedgerHeaderHistoryEntryExt", + "LedgerScpMessages", + "ScpHistoryEntryV0", + "ScpHistoryEntry", + "LedgerEntryChangeType", + "LedgerEntryChange", + "LedgerEntryChanges", + "OperationMeta", + "TransactionMetaV1", + "TransactionMetaV2", + "ContractEventType", + "ContractEvent", + "ContractEventBody", + "ContractEventV0", + "DiagnosticEvent", + "SorobanTransactionMetaExtV1", + "SorobanTransactionMetaExt", + "SorobanTransactionMeta", + "TransactionMetaV3", + "OperationMetaV2", + "SorobanTransactionMetaV2", + "TransactionEventStage", + "TransactionEvent", + "TransactionMetaV4", + "InvokeHostFunctionSuccessPreImage", + "TransactionMeta", + "TransactionResultMeta", + "TransactionResultMetaV1", + "UpgradeEntryMeta", + "LedgerCloseMetaV0", + "LedgerCloseMetaExtV1", + "LedgerCloseMetaExt", + "LedgerCloseMetaV1", + "LedgerCloseMetaV2", + "LedgerCloseMeta", + "ErrorCode", + "SError", + "SendMore", + "SendMoreExtended", + "AuthCert", + "Hello", + "Auth", + "IpAddrType", + "PeerAddress", + "PeerAddressIp", + "MessageType", + "DontHave", + "SurveyMessageCommandType", + "SurveyMessageResponseType", + "TimeSlicedSurveyStartCollectingMessage", + "SignedTimeSlicedSurveyStartCollectingMessage", + "TimeSlicedSurveyStopCollectingMessage", + "SignedTimeSlicedSurveyStopCollectingMessage", + "SurveyRequestMessage", + "TimeSlicedSurveyRequestMessage", + "SignedTimeSlicedSurveyRequestMessage", + "EncryptedBody", + "SurveyResponseMessage", + "TimeSlicedSurveyResponseMessage", + "SignedTimeSlicedSurveyResponseMessage", + "PeerStats", + "TimeSlicedNodeData", + "TimeSlicedPeerData", + "TimeSlicedPeerDataList", + "TopologyResponseBodyV2", + "SurveyResponseBody", + "TxAdvertVector", + "FloodAdvert", + "TxDemandVector", + "FloodDemand", + "StellarMessage", + "AuthenticatedMessage", + "AuthenticatedMessageV0", + "LiquidityPoolParameters", + "MuxedAccount", + "MuxedAccountMed25519", + "DecoratedSignature", + "OperationType", + "CreateAccountOp", + "PaymentOp", + "PathPaymentStrictReceiveOp", + "PathPaymentStrictSendOp", + "ManageSellOfferOp", + "ManageBuyOfferOp", + "CreatePassiveSellOfferOp", + "SetOptionsOp", + "ChangeTrustAsset", + "ChangeTrustOp", + "AllowTrustOp", + "ManageDataOp", + "BumpSequenceOp", + "CreateClaimableBalanceOp", + "ClaimClaimableBalanceOp", + "BeginSponsoringFutureReservesOp", + "RevokeSponsorshipType", + "RevokeSponsorshipOp", + "RevokeSponsorshipOpSigner", + "ClawbackOp", + "ClawbackClaimableBalanceOp", + "SetTrustLineFlagsOp", + "LiquidityPoolDepositOp", + "LiquidityPoolWithdrawOp", + "HostFunctionType", + "ContractIdPreimageType", + "ContractIdPreimage", + "ContractIdPreimageFromAddress", + "CreateContractArgs", + "CreateContractArgsV2", + "InvokeContractArgs", + "HostFunction", + "SorobanAuthorizedFunctionType", + "SorobanAuthorizedFunction", + "SorobanAuthorizedInvocation", + "SorobanAddressCredentials", + "SorobanCredentialsType", + "SorobanCredentials", + "SorobanAuthorizationEntry", + "SorobanAuthorizationEntries", + "InvokeHostFunctionOp", + "ExtendFootprintTtlOp", + "RestoreFootprintOp", + "Operation", + "OperationBody", + "HashIdPreimage", + "HashIdPreimageOperationId", + "HashIdPreimageRevokeId", + "HashIdPreimageContractId", + "HashIdPreimageSorobanAuthorization", + "MemoType", + "Memo", + "TimeBounds", + "LedgerBounds", + "PreconditionsV2", + "PreconditionType", + "Preconditions", + "LedgerFootprint", + "SorobanResources", + "SorobanResourcesExtV0", + "SorobanTransactionData", + "SorobanTransactionDataExt", + "TransactionV0", + "TransactionV0Ext", + "TransactionV0Envelope", + "Transaction", + "TransactionExt", + "TransactionV1Envelope", + "FeeBumpTransaction", + "FeeBumpTransactionInnerTx", + "FeeBumpTransactionExt", + "FeeBumpTransactionEnvelope", + "TransactionEnvelope", + "TransactionSignaturePayload", + "TransactionSignaturePayloadTaggedTransaction", + "ClaimAtomType", + "ClaimOfferAtomV0", + "ClaimOfferAtom", + "ClaimLiquidityAtom", + "ClaimAtom", + "CreateAccountResultCode", + "CreateAccountResult", + "PaymentResultCode", + "PaymentResult", + "PathPaymentStrictReceiveResultCode", + "SimplePaymentResult", + "PathPaymentStrictReceiveResult", + "PathPaymentStrictReceiveResultSuccess", + "PathPaymentStrictSendResultCode", + "PathPaymentStrictSendResult", + "PathPaymentStrictSendResultSuccess", + "ManageSellOfferResultCode", + "ManageOfferEffect", + "ManageOfferSuccessResult", + "ManageOfferSuccessResultOffer", + "ManageSellOfferResult", + "ManageBuyOfferResultCode", + "ManageBuyOfferResult", + "SetOptionsResultCode", + "SetOptionsResult", + "ChangeTrustResultCode", + "ChangeTrustResult", + "AllowTrustResultCode", + "AllowTrustResult", + "AccountMergeResultCode", + "AccountMergeResult", + "InflationResultCode", + "InflationPayout", + "InflationResult", + "ManageDataResultCode", + "ManageDataResult", + "BumpSequenceResultCode", + "BumpSequenceResult", + "CreateClaimableBalanceResultCode", + "CreateClaimableBalanceResult", + "ClaimClaimableBalanceResultCode", + "ClaimClaimableBalanceResult", + "BeginSponsoringFutureReservesResultCode", + "BeginSponsoringFutureReservesResult", + "EndSponsoringFutureReservesResultCode", + "EndSponsoringFutureReservesResult", + "RevokeSponsorshipResultCode", + "RevokeSponsorshipResult", + "ClawbackResultCode", + "ClawbackResult", + "ClawbackClaimableBalanceResultCode", + "ClawbackClaimableBalanceResult", + "SetTrustLineFlagsResultCode", + "SetTrustLineFlagsResult", + "LiquidityPoolDepositResultCode", + "LiquidityPoolDepositResult", + "LiquidityPoolWithdrawResultCode", + "LiquidityPoolWithdrawResult", + "InvokeHostFunctionResultCode", + "InvokeHostFunctionResult", + "ExtendFootprintTtlResultCode", + "ExtendFootprintTtlResult", + "RestoreFootprintResultCode", + "RestoreFootprintResult", + "OperationResultCode", + "OperationResult", + "OperationResultTr", + "TransactionResultCode", + "InnerTransactionResult", + "InnerTransactionResultResult", + "InnerTransactionResultExt", + "InnerTransactionResultPair", + "TransactionResult", + "TransactionResultResult", + "TransactionResultExt", + "Hash", + "Uint256", + "Uint32", + "Int32", + "Uint64", + "Int64", + "TimePoint", + "Duration", + "ExtensionPoint", + "CryptoKeyType", + "PublicKeyType", + "SignerKeyType", + "PublicKey", + "SignerKey", + "SignerKeyEd25519SignedPayload", + "Signature", + "SignatureHint", + "NodeId", + "AccountId", + "ContractId", + "Curve25519Secret", + "Curve25519Public", + "HmacSha256Key", + "HmacSha256Mac", + "ShortHashSeed", + "BinaryFuseFilterType", + "SerializedBinaryFuseFilter", + "PoolId", + "ClaimableBalanceIdType", + "ClaimableBalanceId", + ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = [ "Value", "ScpBallot", "ScpStatementType", @@ -69664,7 +71544,7 @@ impl Type { #[must_use] #[allow(clippy::too_many_lines)] - pub const fn variants() -> &'static [TypeVariant] { + pub const fn variants() -> [TypeVariant; Self::_VARIANTS.len()] { Self::VARIANTS } diff --git a/xdr-generator-rust/generator/templates/type_enum.rs.jinja b/xdr-generator-rust/generator/templates/type_enum.rs.jinja index b6e70228..2953d2ad 100644 --- a/xdr-generator-rust/generator/templates/type_enum.rs.jinja +++ b/xdr-generator-rust/generator/templates/type_enum.rs.jinja @@ -15,9 +15,9 @@ pub enum TypeVariant { } impl TypeVariant { - // VARIANTS and VARIANTS_STR are slices (not fixed-size arrays) because - // individual entries may be #[cfg]-gated, so the count varies by enabled features. - pub const VARIANTS: &[TypeVariant] = &[ + // Private const slice used to compute the variant count, supporting + // cfg-gated entries whose presence varies by enabled features. + const _VARIANTS: &[TypeVariant] = &[ {%- for t in type_variant_enum.types %} {%- if let Some(cfg) = t.cfg %} #[cfg({{ cfg }})] @@ -25,7 +25,23 @@ impl TypeVariant { TypeVariant::{{ t.name }}, {%- endfor %} ]; - pub const VARIANTS_STR: &[&str] = &[ + pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = [ +{%- for t in type_variant_enum.types %} +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + TypeVariant::{{ t.name }}, +{%- endfor %} + ]; + const _VARIANTS_STR: &[&str] = &[ +{%- for t in type_variant_enum.types %} +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + "{{ t.name }}", +{%- endfor %} + ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = [ {%- for t in type_variant_enum.types %} {%- if let Some(cfg) = t.cfg %} #[cfg({{ cfg }})] @@ -49,7 +65,7 @@ impl TypeVariant { #[must_use] #[allow(clippy::too_many_lines)] - pub const fn variants() -> &'static [TypeVariant] { + pub const fn variants() -> [TypeVariant; Self::_VARIANTS.len()] { Self::VARIANTS } @@ -115,9 +131,9 @@ pub enum Type { } impl Type { - // VARIANTS and VARIANTS_STR are slices (not fixed-size arrays) because - // individual entries may be #[cfg]-gated, so the count varies by enabled features. - pub const VARIANTS: &[TypeVariant] = &[ + // Private const slices used to compute the variant count, supporting + // cfg-gated entries whose presence varies by enabled features. + const _VARIANTS: &[TypeVariant] = &[ {%- for t in type_variant_enum.types %} {%- if let Some(cfg) = t.cfg %} #[cfg({{ cfg }})] @@ -125,7 +141,23 @@ impl Type { TypeVariant::{{ t.name }}, {%- endfor %} ]; - pub const VARIANTS_STR: &[&str] = &[ + pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = [ +{%- for t in type_variant_enum.types %} +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + TypeVariant::{{ t.name }}, +{%- endfor %} + ]; + const _VARIANTS_STR: &[&str] = &[ +{%- for t in type_variant_enum.types %} +{%- if let Some(cfg) = t.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + "{{ t.name }}", +{%- endfor %} + ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = [ {%- for t in type_variant_enum.types %} {%- if let Some(cfg) = t.cfg %} #[cfg({{ cfg }})] @@ -337,7 +369,7 @@ impl Type { #[must_use] #[allow(clippy::too_many_lines)] - pub const fn variants() -> &'static [TypeVariant] { + pub const fn variants() -> [TypeVariant; Self::_VARIANTS.len()] { Self::VARIANTS } From c95d121b2d72a372b371a0d5df53b8be85b9140c Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 18 Mar 2026 07:24:15 +1000 Subject: [PATCH 04/28] derive VARIANTS from _VARIANTS using const loop --- src/curr/generated.rs | 7242 ++++++----------- src/next/generated.rs | 7242 ++++++----------- .../generator/templates/type_enum.rs.jinja | 68 +- 3 files changed, 5434 insertions(+), 9118 deletions(-) diff --git a/src/curr/generated.rs b/src/curr/generated.rs index 6cc1f713..888d252f 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -51912,4548 +51912,15 @@ impl TypeVariant { TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, ]; - pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = [ - TypeVariant::Value, - TypeVariant::ScpBallot, - TypeVariant::ScpStatementType, - TypeVariant::ScpNomination, - TypeVariant::ScpStatement, - TypeVariant::ScpStatementPledges, - TypeVariant::ScpStatementPrepare, - TypeVariant::ScpStatementConfirm, - TypeVariant::ScpStatementExternalize, - TypeVariant::ScpEnvelope, - TypeVariant::ScpQuorumSet, - TypeVariant::EncodedLedgerKey, - TypeVariant::ConfigSettingContractExecutionLanesV0, - TypeVariant::ConfigSettingContractComputeV0, - TypeVariant::ConfigSettingContractParallelComputeV0, - TypeVariant::ConfigSettingContractLedgerCostV0, - TypeVariant::ConfigSettingContractLedgerCostExtV0, - TypeVariant::ConfigSettingContractHistoricalDataV0, - TypeVariant::ConfigSettingContractEventsV0, - TypeVariant::ConfigSettingContractBandwidthV0, - TypeVariant::ContractCostType, - TypeVariant::ContractCostParamEntry, - TypeVariant::StateArchivalSettings, - TypeVariant::EvictionIterator, - TypeVariant::ConfigSettingScpTiming, - TypeVariant::FrozenLedgerKeys, - TypeVariant::FrozenLedgerKeysDelta, - TypeVariant::FreezeBypassTxs, - TypeVariant::FreezeBypassTxsDelta, - TypeVariant::ContractCostParams, - TypeVariant::ConfigSettingId, - TypeVariant::ConfigSettingEntry, - TypeVariant::ScEnvMetaKind, - TypeVariant::ScEnvMetaEntry, - TypeVariant::ScEnvMetaEntryInterfaceVersion, - TypeVariant::ScMetaV0, - TypeVariant::ScMetaKind, - TypeVariant::ScMetaEntry, - TypeVariant::ScSpecType, - TypeVariant::ScSpecTypeOption, - TypeVariant::ScSpecTypeResult, - TypeVariant::ScSpecTypeVec, - TypeVariant::ScSpecTypeMap, - TypeVariant::ScSpecTypeTuple, - TypeVariant::ScSpecTypeBytesN, - TypeVariant::ScSpecTypeUdt, - TypeVariant::ScSpecTypeDef, - TypeVariant::ScSpecUdtStructFieldV0, - TypeVariant::ScSpecUdtStructV0, - TypeVariant::ScSpecUdtUnionCaseVoidV0, - TypeVariant::ScSpecUdtUnionCaseTupleV0, - TypeVariant::ScSpecUdtUnionCaseV0Kind, - TypeVariant::ScSpecUdtUnionCaseV0, - TypeVariant::ScSpecUdtUnionV0, - TypeVariant::ScSpecUdtEnumCaseV0, - TypeVariant::ScSpecUdtEnumV0, - TypeVariant::ScSpecUdtErrorEnumCaseV0, - TypeVariant::ScSpecUdtErrorEnumV0, - TypeVariant::ScSpecFunctionInputV0, - TypeVariant::ScSpecFunctionV0, - TypeVariant::ScSpecEventParamLocationV0, - TypeVariant::ScSpecEventParamV0, - TypeVariant::ScSpecEventDataFormat, - TypeVariant::ScSpecEventV0, - TypeVariant::ScSpecEntryKind, - TypeVariant::ScSpecEntry, - TypeVariant::ScValType, - TypeVariant::ScErrorType, - TypeVariant::ScErrorCode, - TypeVariant::ScError, - TypeVariant::UInt128Parts, - TypeVariant::Int128Parts, - TypeVariant::UInt256Parts, - TypeVariant::Int256Parts, - TypeVariant::ContractExecutableType, - TypeVariant::ContractExecutable, - TypeVariant::ScAddressType, - TypeVariant::MuxedEd25519Account, - TypeVariant::ScAddress, - TypeVariant::ScVec, - TypeVariant::ScMap, - TypeVariant::ScBytes, - TypeVariant::ScString, - TypeVariant::ScSymbol, - TypeVariant::ScNonceKey, - TypeVariant::ScContractInstance, - TypeVariant::ScVal, - TypeVariant::ScMapEntry, - TypeVariant::LedgerCloseMetaBatch, - TypeVariant::StoredTransactionSet, - TypeVariant::StoredDebugTransactionSet, - TypeVariant::PersistedScpStateV0, - TypeVariant::PersistedScpStateV1, - TypeVariant::PersistedScpState, - TypeVariant::Thresholds, - TypeVariant::String32, - TypeVariant::String64, - TypeVariant::SequenceNumber, - TypeVariant::DataValue, - TypeVariant::AssetCode4, - TypeVariant::AssetCode12, - TypeVariant::AssetType, - TypeVariant::AssetCode, - TypeVariant::AlphaNum4, - TypeVariant::AlphaNum12, - TypeVariant::Asset, - TypeVariant::Price, - TypeVariant::Liabilities, - TypeVariant::ThresholdIndexes, - TypeVariant::LedgerEntryType, - TypeVariant::Signer, - TypeVariant::AccountFlags, - TypeVariant::SponsorshipDescriptor, - TypeVariant::AccountEntryExtensionV3, - TypeVariant::AccountEntryExtensionV2, - TypeVariant::AccountEntryExtensionV2Ext, - TypeVariant::AccountEntryExtensionV1, - TypeVariant::AccountEntryExtensionV1Ext, - TypeVariant::AccountEntry, - TypeVariant::AccountEntryExt, - TypeVariant::TrustLineFlags, - TypeVariant::LiquidityPoolType, - TypeVariant::TrustLineAsset, - TypeVariant::TrustLineEntryExtensionV2, - TypeVariant::TrustLineEntryExtensionV2Ext, - TypeVariant::TrustLineEntry, - TypeVariant::TrustLineEntryExt, - TypeVariant::TrustLineEntryV1, - TypeVariant::TrustLineEntryV1Ext, - TypeVariant::OfferEntryFlags, - TypeVariant::OfferEntry, - TypeVariant::OfferEntryExt, - TypeVariant::DataEntry, - TypeVariant::DataEntryExt, - TypeVariant::ClaimPredicateType, - TypeVariant::ClaimPredicate, - TypeVariant::ClaimantType, - TypeVariant::Claimant, - TypeVariant::ClaimantV0, - TypeVariant::ClaimableBalanceFlags, - TypeVariant::ClaimableBalanceEntryExtensionV1, - TypeVariant::ClaimableBalanceEntryExtensionV1Ext, - TypeVariant::ClaimableBalanceEntry, - TypeVariant::ClaimableBalanceEntryExt, - TypeVariant::LiquidityPoolConstantProductParameters, - TypeVariant::LiquidityPoolEntry, - TypeVariant::LiquidityPoolEntryBody, - TypeVariant::LiquidityPoolEntryConstantProduct, - TypeVariant::ContractDataDurability, - TypeVariant::ContractDataEntry, - TypeVariant::ContractCodeCostInputs, - TypeVariant::ContractCodeEntry, - TypeVariant::ContractCodeEntryExt, - TypeVariant::ContractCodeEntryV1, - TypeVariant::TtlEntry, - TypeVariant::LedgerEntryExtensionV1, - TypeVariant::LedgerEntryExtensionV1Ext, - TypeVariant::LedgerEntry, - TypeVariant::LedgerEntryData, - TypeVariant::LedgerEntryExt, - TypeVariant::LedgerKey, - TypeVariant::LedgerKeyAccount, - TypeVariant::LedgerKeyTrustLine, - TypeVariant::LedgerKeyOffer, - TypeVariant::LedgerKeyData, - TypeVariant::LedgerKeyClaimableBalance, - TypeVariant::LedgerKeyLiquidityPool, - TypeVariant::LedgerKeyContractData, - TypeVariant::LedgerKeyContractCode, - TypeVariant::LedgerKeyConfigSetting, - TypeVariant::LedgerKeyTtl, - TypeVariant::EnvelopeType, - TypeVariant::BucketListType, - TypeVariant::BucketEntryType, - TypeVariant::HotArchiveBucketEntryType, - TypeVariant::BucketMetadata, - TypeVariant::BucketMetadataExt, - TypeVariant::BucketEntry, - TypeVariant::HotArchiveBucketEntry, - TypeVariant::UpgradeType, - TypeVariant::StellarValueType, - TypeVariant::LedgerCloseValueSignature, - TypeVariant::StellarValue, - TypeVariant::StellarValueExt, - TypeVariant::LedgerHeaderFlags, - TypeVariant::LedgerHeaderExtensionV1, - TypeVariant::LedgerHeaderExtensionV1Ext, - TypeVariant::LedgerHeader, - TypeVariant::LedgerHeaderExt, - TypeVariant::LedgerUpgradeType, - TypeVariant::ConfigUpgradeSetKey, - TypeVariant::LedgerUpgrade, - TypeVariant::ConfigUpgradeSet, - TypeVariant::TxSetComponentType, - TypeVariant::DependentTxCluster, - TypeVariant::ParallelTxExecutionStage, - TypeVariant::ParallelTxsComponent, - TypeVariant::TxSetComponent, - TypeVariant::TxSetComponentTxsMaybeDiscountedFee, - TypeVariant::TransactionPhase, - TypeVariant::TransactionSet, - TypeVariant::TransactionSetV1, - TypeVariant::GeneralizedTransactionSet, - TypeVariant::TransactionResultPair, - TypeVariant::TransactionResultSet, - TypeVariant::TransactionHistoryEntry, - TypeVariant::TransactionHistoryEntryExt, - TypeVariant::TransactionHistoryResultEntry, - TypeVariant::TransactionHistoryResultEntryExt, - TypeVariant::LedgerHeaderHistoryEntry, - TypeVariant::LedgerHeaderHistoryEntryExt, - TypeVariant::LedgerScpMessages, - TypeVariant::ScpHistoryEntryV0, - TypeVariant::ScpHistoryEntry, - TypeVariant::LedgerEntryChangeType, - TypeVariant::LedgerEntryChange, - TypeVariant::LedgerEntryChanges, - TypeVariant::OperationMeta, - TypeVariant::TransactionMetaV1, - TypeVariant::TransactionMetaV2, - TypeVariant::ContractEventType, - TypeVariant::ContractEvent, - TypeVariant::ContractEventBody, - TypeVariant::ContractEventV0, - TypeVariant::DiagnosticEvent, - TypeVariant::SorobanTransactionMetaExtV1, - TypeVariant::SorobanTransactionMetaExt, - TypeVariant::SorobanTransactionMeta, - TypeVariant::TransactionMetaV3, - TypeVariant::OperationMetaV2, - TypeVariant::SorobanTransactionMetaV2, - TypeVariant::TransactionEventStage, - TypeVariant::TransactionEvent, - TypeVariant::TransactionMetaV4, - TypeVariant::InvokeHostFunctionSuccessPreImage, - TypeVariant::TransactionMeta, - TypeVariant::TransactionResultMeta, - TypeVariant::TransactionResultMetaV1, - TypeVariant::UpgradeEntryMeta, - TypeVariant::LedgerCloseMetaV0, - TypeVariant::LedgerCloseMetaExtV1, - TypeVariant::LedgerCloseMetaExt, - TypeVariant::LedgerCloseMetaV1, - TypeVariant::LedgerCloseMetaV2, - TypeVariant::LedgerCloseMeta, - TypeVariant::ErrorCode, - TypeVariant::SError, - TypeVariant::SendMore, - TypeVariant::SendMoreExtended, - TypeVariant::AuthCert, - TypeVariant::Hello, - TypeVariant::Auth, - TypeVariant::IpAddrType, - TypeVariant::PeerAddress, - TypeVariant::PeerAddressIp, - TypeVariant::MessageType, - TypeVariant::DontHave, - TypeVariant::SurveyMessageCommandType, - TypeVariant::SurveyMessageResponseType, - TypeVariant::TimeSlicedSurveyStartCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage, - TypeVariant::TimeSlicedSurveyStopCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage, - TypeVariant::SurveyRequestMessage, - TypeVariant::TimeSlicedSurveyRequestMessage, - TypeVariant::SignedTimeSlicedSurveyRequestMessage, - TypeVariant::EncryptedBody, - TypeVariant::SurveyResponseMessage, - TypeVariant::TimeSlicedSurveyResponseMessage, - TypeVariant::SignedTimeSlicedSurveyResponseMessage, - TypeVariant::PeerStats, - TypeVariant::TimeSlicedNodeData, - TypeVariant::TimeSlicedPeerData, - TypeVariant::TimeSlicedPeerDataList, - TypeVariant::TopologyResponseBodyV2, - TypeVariant::SurveyResponseBody, - TypeVariant::TxAdvertVector, - TypeVariant::FloodAdvert, - TypeVariant::TxDemandVector, - TypeVariant::FloodDemand, - TypeVariant::StellarMessage, - TypeVariant::AuthenticatedMessage, - TypeVariant::AuthenticatedMessageV0, - TypeVariant::LiquidityPoolParameters, - TypeVariant::MuxedAccount, - TypeVariant::MuxedAccountMed25519, - TypeVariant::DecoratedSignature, - TypeVariant::OperationType, - TypeVariant::CreateAccountOp, - TypeVariant::PaymentOp, - TypeVariant::PathPaymentStrictReceiveOp, - TypeVariant::PathPaymentStrictSendOp, - TypeVariant::ManageSellOfferOp, - TypeVariant::ManageBuyOfferOp, - TypeVariant::CreatePassiveSellOfferOp, - TypeVariant::SetOptionsOp, - TypeVariant::ChangeTrustAsset, - TypeVariant::ChangeTrustOp, - TypeVariant::AllowTrustOp, - TypeVariant::ManageDataOp, - TypeVariant::BumpSequenceOp, - TypeVariant::CreateClaimableBalanceOp, - TypeVariant::ClaimClaimableBalanceOp, - TypeVariant::BeginSponsoringFutureReservesOp, - TypeVariant::RevokeSponsorshipType, - TypeVariant::RevokeSponsorshipOp, - TypeVariant::RevokeSponsorshipOpSigner, - TypeVariant::ClawbackOp, - TypeVariant::ClawbackClaimableBalanceOp, - TypeVariant::SetTrustLineFlagsOp, - TypeVariant::LiquidityPoolDepositOp, - TypeVariant::LiquidityPoolWithdrawOp, - TypeVariant::HostFunctionType, - TypeVariant::ContractIdPreimageType, - TypeVariant::ContractIdPreimage, - TypeVariant::ContractIdPreimageFromAddress, - TypeVariant::CreateContractArgs, - TypeVariant::CreateContractArgsV2, - TypeVariant::InvokeContractArgs, - TypeVariant::HostFunction, - TypeVariant::SorobanAuthorizedFunctionType, - TypeVariant::SorobanAuthorizedFunction, - TypeVariant::SorobanAuthorizedInvocation, - TypeVariant::SorobanAddressCredentials, - TypeVariant::SorobanCredentialsType, - TypeVariant::SorobanCredentials, - TypeVariant::SorobanAuthorizationEntry, - TypeVariant::SorobanAuthorizationEntries, - TypeVariant::InvokeHostFunctionOp, - TypeVariant::ExtendFootprintTtlOp, - TypeVariant::RestoreFootprintOp, - TypeVariant::Operation, - TypeVariant::OperationBody, - TypeVariant::HashIdPreimage, - TypeVariant::HashIdPreimageOperationId, - TypeVariant::HashIdPreimageRevokeId, - TypeVariant::HashIdPreimageContractId, - TypeVariant::HashIdPreimageSorobanAuthorization, - TypeVariant::MemoType, - TypeVariant::Memo, - TypeVariant::TimeBounds, - TypeVariant::LedgerBounds, - TypeVariant::PreconditionsV2, - TypeVariant::PreconditionType, - TypeVariant::Preconditions, - TypeVariant::LedgerFootprint, - TypeVariant::SorobanResources, - TypeVariant::SorobanResourcesExtV0, - TypeVariant::SorobanTransactionData, - TypeVariant::SorobanTransactionDataExt, - TypeVariant::TransactionV0, - TypeVariant::TransactionV0Ext, - TypeVariant::TransactionV0Envelope, - TypeVariant::Transaction, - TypeVariant::TransactionExt, - TypeVariant::TransactionV1Envelope, - TypeVariant::FeeBumpTransaction, - TypeVariant::FeeBumpTransactionInnerTx, - TypeVariant::FeeBumpTransactionExt, - TypeVariant::FeeBumpTransactionEnvelope, - TypeVariant::TransactionEnvelope, - TypeVariant::TransactionSignaturePayload, - TypeVariant::TransactionSignaturePayloadTaggedTransaction, - TypeVariant::ClaimAtomType, - TypeVariant::ClaimOfferAtomV0, - TypeVariant::ClaimOfferAtom, - TypeVariant::ClaimLiquidityAtom, - TypeVariant::ClaimAtom, - TypeVariant::CreateAccountResultCode, - TypeVariant::CreateAccountResult, - TypeVariant::PaymentResultCode, - TypeVariant::PaymentResult, - TypeVariant::PathPaymentStrictReceiveResultCode, - TypeVariant::SimplePaymentResult, - TypeVariant::PathPaymentStrictReceiveResult, - TypeVariant::PathPaymentStrictReceiveResultSuccess, - TypeVariant::PathPaymentStrictSendResultCode, - TypeVariant::PathPaymentStrictSendResult, - TypeVariant::PathPaymentStrictSendResultSuccess, - TypeVariant::ManageSellOfferResultCode, - TypeVariant::ManageOfferEffect, - TypeVariant::ManageOfferSuccessResult, - TypeVariant::ManageOfferSuccessResultOffer, - TypeVariant::ManageSellOfferResult, - TypeVariant::ManageBuyOfferResultCode, - TypeVariant::ManageBuyOfferResult, - TypeVariant::SetOptionsResultCode, - TypeVariant::SetOptionsResult, - TypeVariant::ChangeTrustResultCode, - TypeVariant::ChangeTrustResult, - TypeVariant::AllowTrustResultCode, - TypeVariant::AllowTrustResult, - TypeVariant::AccountMergeResultCode, - TypeVariant::AccountMergeResult, - TypeVariant::InflationResultCode, - TypeVariant::InflationPayout, - TypeVariant::InflationResult, - TypeVariant::ManageDataResultCode, - TypeVariant::ManageDataResult, - TypeVariant::BumpSequenceResultCode, - TypeVariant::BumpSequenceResult, - TypeVariant::CreateClaimableBalanceResultCode, - TypeVariant::CreateClaimableBalanceResult, - TypeVariant::ClaimClaimableBalanceResultCode, - TypeVariant::ClaimClaimableBalanceResult, - TypeVariant::BeginSponsoringFutureReservesResultCode, - TypeVariant::BeginSponsoringFutureReservesResult, - TypeVariant::EndSponsoringFutureReservesResultCode, - TypeVariant::EndSponsoringFutureReservesResult, - TypeVariant::RevokeSponsorshipResultCode, - TypeVariant::RevokeSponsorshipResult, - TypeVariant::ClawbackResultCode, - TypeVariant::ClawbackResult, - TypeVariant::ClawbackClaimableBalanceResultCode, - TypeVariant::ClawbackClaimableBalanceResult, - TypeVariant::SetTrustLineFlagsResultCode, - TypeVariant::SetTrustLineFlagsResult, - TypeVariant::LiquidityPoolDepositResultCode, - TypeVariant::LiquidityPoolDepositResult, - TypeVariant::LiquidityPoolWithdrawResultCode, - TypeVariant::LiquidityPoolWithdrawResult, - TypeVariant::InvokeHostFunctionResultCode, - TypeVariant::InvokeHostFunctionResult, - TypeVariant::ExtendFootprintTtlResultCode, - TypeVariant::ExtendFootprintTtlResult, - TypeVariant::RestoreFootprintResultCode, - TypeVariant::RestoreFootprintResult, - TypeVariant::OperationResultCode, - TypeVariant::OperationResult, - TypeVariant::OperationResultTr, - TypeVariant::TransactionResultCode, - TypeVariant::InnerTransactionResult, - TypeVariant::InnerTransactionResultResult, - TypeVariant::InnerTransactionResultExt, - TypeVariant::InnerTransactionResultPair, - TypeVariant::TransactionResult, - TypeVariant::TransactionResultResult, - TypeVariant::TransactionResultExt, - TypeVariant::Hash, - TypeVariant::Uint256, - TypeVariant::Uint32, - TypeVariant::Int32, - TypeVariant::Uint64, - TypeVariant::Int64, - TypeVariant::TimePoint, - TypeVariant::Duration, - TypeVariant::ExtensionPoint, - TypeVariant::CryptoKeyType, - TypeVariant::PublicKeyType, - TypeVariant::SignerKeyType, - TypeVariant::PublicKey, - TypeVariant::SignerKey, - TypeVariant::SignerKeyEd25519SignedPayload, - TypeVariant::Signature, - TypeVariant::SignatureHint, - TypeVariant::NodeId, - TypeVariant::AccountId, - TypeVariant::ContractId, - TypeVariant::Curve25519Secret, - TypeVariant::Curve25519Public, - TypeVariant::HmacSha256Key, - TypeVariant::HmacSha256Mac, - TypeVariant::ShortHashSeed, - TypeVariant::BinaryFuseFilterType, - TypeVariant::SerializedBinaryFuseFilter, - TypeVariant::PoolId, - TypeVariant::ClaimableBalanceIdType, - TypeVariant::ClaimableBalanceId, - ]; - const _VARIANTS_STR: &[&str] = &[ - "Value", - "ScpBallot", - "ScpStatementType", - "ScpNomination", - "ScpStatement", - "ScpStatementPledges", - "ScpStatementPrepare", - "ScpStatementConfirm", - "ScpStatementExternalize", - "ScpEnvelope", - "ScpQuorumSet", - "EncodedLedgerKey", - "ConfigSettingContractExecutionLanesV0", - "ConfigSettingContractComputeV0", - "ConfigSettingContractParallelComputeV0", - "ConfigSettingContractLedgerCostV0", - "ConfigSettingContractLedgerCostExtV0", - "ConfigSettingContractHistoricalDataV0", - "ConfigSettingContractEventsV0", - "ConfigSettingContractBandwidthV0", - "ContractCostType", - "ContractCostParamEntry", - "StateArchivalSettings", - "EvictionIterator", - "ConfigSettingScpTiming", - "FrozenLedgerKeys", - "FrozenLedgerKeysDelta", - "FreezeBypassTxs", - "FreezeBypassTxsDelta", - "ContractCostParams", - "ConfigSettingId", - "ConfigSettingEntry", - "ScEnvMetaKind", - "ScEnvMetaEntry", - "ScEnvMetaEntryInterfaceVersion", - "ScMetaV0", - "ScMetaKind", - "ScMetaEntry", - "ScSpecType", - "ScSpecTypeOption", - "ScSpecTypeResult", - "ScSpecTypeVec", - "ScSpecTypeMap", - "ScSpecTypeTuple", - "ScSpecTypeBytesN", - "ScSpecTypeUdt", - "ScSpecTypeDef", - "ScSpecUdtStructFieldV0", - "ScSpecUdtStructV0", - "ScSpecUdtUnionCaseVoidV0", - "ScSpecUdtUnionCaseTupleV0", - "ScSpecUdtUnionCaseV0Kind", - "ScSpecUdtUnionCaseV0", - "ScSpecUdtUnionV0", - "ScSpecUdtEnumCaseV0", - "ScSpecUdtEnumV0", - "ScSpecUdtErrorEnumCaseV0", - "ScSpecUdtErrorEnumV0", - "ScSpecFunctionInputV0", - "ScSpecFunctionV0", - "ScSpecEventParamLocationV0", - "ScSpecEventParamV0", - "ScSpecEventDataFormat", - "ScSpecEventV0", - "ScSpecEntryKind", - "ScSpecEntry", - "ScValType", - "ScErrorType", - "ScErrorCode", - "ScError", - "UInt128Parts", - "Int128Parts", - "UInt256Parts", - "Int256Parts", - "ContractExecutableType", - "ContractExecutable", - "ScAddressType", - "MuxedEd25519Account", - "ScAddress", - "ScVec", - "ScMap", - "ScBytes", - "ScString", - "ScSymbol", - "ScNonceKey", - "ScContractInstance", - "ScVal", - "ScMapEntry", - "LedgerCloseMetaBatch", - "StoredTransactionSet", - "StoredDebugTransactionSet", - "PersistedScpStateV0", - "PersistedScpStateV1", - "PersistedScpState", - "Thresholds", - "String32", - "String64", - "SequenceNumber", - "DataValue", - "AssetCode4", - "AssetCode12", - "AssetType", - "AssetCode", - "AlphaNum4", - "AlphaNum12", - "Asset", - "Price", - "Liabilities", - "ThresholdIndexes", - "LedgerEntryType", - "Signer", - "AccountFlags", - "SponsorshipDescriptor", - "AccountEntryExtensionV3", - "AccountEntryExtensionV2", - "AccountEntryExtensionV2Ext", - "AccountEntryExtensionV1", - "AccountEntryExtensionV1Ext", - "AccountEntry", - "AccountEntryExt", - "TrustLineFlags", - "LiquidityPoolType", - "TrustLineAsset", - "TrustLineEntryExtensionV2", - "TrustLineEntryExtensionV2Ext", - "TrustLineEntry", - "TrustLineEntryExt", - "TrustLineEntryV1", - "TrustLineEntryV1Ext", - "OfferEntryFlags", - "OfferEntry", - "OfferEntryExt", - "DataEntry", - "DataEntryExt", - "ClaimPredicateType", - "ClaimPredicate", - "ClaimantType", - "Claimant", - "ClaimantV0", - "ClaimableBalanceFlags", - "ClaimableBalanceEntryExtensionV1", - "ClaimableBalanceEntryExtensionV1Ext", - "ClaimableBalanceEntry", - "ClaimableBalanceEntryExt", - "LiquidityPoolConstantProductParameters", - "LiquidityPoolEntry", - "LiquidityPoolEntryBody", - "LiquidityPoolEntryConstantProduct", - "ContractDataDurability", - "ContractDataEntry", - "ContractCodeCostInputs", - "ContractCodeEntry", - "ContractCodeEntryExt", - "ContractCodeEntryV1", - "TtlEntry", - "LedgerEntryExtensionV1", - "LedgerEntryExtensionV1Ext", - "LedgerEntry", - "LedgerEntryData", - "LedgerEntryExt", - "LedgerKey", - "LedgerKeyAccount", - "LedgerKeyTrustLine", - "LedgerKeyOffer", - "LedgerKeyData", - "LedgerKeyClaimableBalance", - "LedgerKeyLiquidityPool", - "LedgerKeyContractData", - "LedgerKeyContractCode", - "LedgerKeyConfigSetting", - "LedgerKeyTtl", - "EnvelopeType", - "BucketListType", - "BucketEntryType", - "HotArchiveBucketEntryType", - "BucketMetadata", - "BucketMetadataExt", - "BucketEntry", - "HotArchiveBucketEntry", - "UpgradeType", - "StellarValueType", - "LedgerCloseValueSignature", - "StellarValue", - "StellarValueExt", - "LedgerHeaderFlags", - "LedgerHeaderExtensionV1", - "LedgerHeaderExtensionV1Ext", - "LedgerHeader", - "LedgerHeaderExt", - "LedgerUpgradeType", - "ConfigUpgradeSetKey", - "LedgerUpgrade", - "ConfigUpgradeSet", - "TxSetComponentType", - "DependentTxCluster", - "ParallelTxExecutionStage", - "ParallelTxsComponent", - "TxSetComponent", - "TxSetComponentTxsMaybeDiscountedFee", - "TransactionPhase", - "TransactionSet", - "TransactionSetV1", - "GeneralizedTransactionSet", - "TransactionResultPair", - "TransactionResultSet", - "TransactionHistoryEntry", - "TransactionHistoryEntryExt", - "TransactionHistoryResultEntry", - "TransactionHistoryResultEntryExt", - "LedgerHeaderHistoryEntry", - "LedgerHeaderHistoryEntryExt", - "LedgerScpMessages", - "ScpHistoryEntryV0", - "ScpHistoryEntry", - "LedgerEntryChangeType", - "LedgerEntryChange", - "LedgerEntryChanges", - "OperationMeta", - "TransactionMetaV1", - "TransactionMetaV2", - "ContractEventType", - "ContractEvent", - "ContractEventBody", - "ContractEventV0", - "DiagnosticEvent", - "SorobanTransactionMetaExtV1", - "SorobanTransactionMetaExt", - "SorobanTransactionMeta", - "TransactionMetaV3", - "OperationMetaV2", - "SorobanTransactionMetaV2", - "TransactionEventStage", - "TransactionEvent", - "TransactionMetaV4", - "InvokeHostFunctionSuccessPreImage", - "TransactionMeta", - "TransactionResultMeta", - "TransactionResultMetaV1", - "UpgradeEntryMeta", - "LedgerCloseMetaV0", - "LedgerCloseMetaExtV1", - "LedgerCloseMetaExt", - "LedgerCloseMetaV1", - "LedgerCloseMetaV2", - "LedgerCloseMeta", - "ErrorCode", - "SError", - "SendMore", - "SendMoreExtended", - "AuthCert", - "Hello", - "Auth", - "IpAddrType", - "PeerAddress", - "PeerAddressIp", - "MessageType", - "DontHave", - "SurveyMessageCommandType", - "SurveyMessageResponseType", - "TimeSlicedSurveyStartCollectingMessage", - "SignedTimeSlicedSurveyStartCollectingMessage", - "TimeSlicedSurveyStopCollectingMessage", - "SignedTimeSlicedSurveyStopCollectingMessage", - "SurveyRequestMessage", - "TimeSlicedSurveyRequestMessage", - "SignedTimeSlicedSurveyRequestMessage", - "EncryptedBody", - "SurveyResponseMessage", - "TimeSlicedSurveyResponseMessage", - "SignedTimeSlicedSurveyResponseMessage", - "PeerStats", - "TimeSlicedNodeData", - "TimeSlicedPeerData", - "TimeSlicedPeerDataList", - "TopologyResponseBodyV2", - "SurveyResponseBody", - "TxAdvertVector", - "FloodAdvert", - "TxDemandVector", - "FloodDemand", - "StellarMessage", - "AuthenticatedMessage", - "AuthenticatedMessageV0", - "LiquidityPoolParameters", - "MuxedAccount", - "MuxedAccountMed25519", - "DecoratedSignature", - "OperationType", - "CreateAccountOp", - "PaymentOp", - "PathPaymentStrictReceiveOp", - "PathPaymentStrictSendOp", - "ManageSellOfferOp", - "ManageBuyOfferOp", - "CreatePassiveSellOfferOp", - "SetOptionsOp", - "ChangeTrustAsset", - "ChangeTrustOp", - "AllowTrustOp", - "ManageDataOp", - "BumpSequenceOp", - "CreateClaimableBalanceOp", - "ClaimClaimableBalanceOp", - "BeginSponsoringFutureReservesOp", - "RevokeSponsorshipType", - "RevokeSponsorshipOp", - "RevokeSponsorshipOpSigner", - "ClawbackOp", - "ClawbackClaimableBalanceOp", - "SetTrustLineFlagsOp", - "LiquidityPoolDepositOp", - "LiquidityPoolWithdrawOp", - "HostFunctionType", - "ContractIdPreimageType", - "ContractIdPreimage", - "ContractIdPreimageFromAddress", - "CreateContractArgs", - "CreateContractArgsV2", - "InvokeContractArgs", - "HostFunction", - "SorobanAuthorizedFunctionType", - "SorobanAuthorizedFunction", - "SorobanAuthorizedInvocation", - "SorobanAddressCredentials", - "SorobanCredentialsType", - "SorobanCredentials", - "SorobanAuthorizationEntry", - "SorobanAuthorizationEntries", - "InvokeHostFunctionOp", - "ExtendFootprintTtlOp", - "RestoreFootprintOp", - "Operation", - "OperationBody", - "HashIdPreimage", - "HashIdPreimageOperationId", - "HashIdPreimageRevokeId", - "HashIdPreimageContractId", - "HashIdPreimageSorobanAuthorization", - "MemoType", - "Memo", - "TimeBounds", - "LedgerBounds", - "PreconditionsV2", - "PreconditionType", - "Preconditions", - "LedgerFootprint", - "SorobanResources", - "SorobanResourcesExtV0", - "SorobanTransactionData", - "SorobanTransactionDataExt", - "TransactionV0", - "TransactionV0Ext", - "TransactionV0Envelope", - "Transaction", - "TransactionExt", - "TransactionV1Envelope", - "FeeBumpTransaction", - "FeeBumpTransactionInnerTx", - "FeeBumpTransactionExt", - "FeeBumpTransactionEnvelope", - "TransactionEnvelope", - "TransactionSignaturePayload", - "TransactionSignaturePayloadTaggedTransaction", - "ClaimAtomType", - "ClaimOfferAtomV0", - "ClaimOfferAtom", - "ClaimLiquidityAtom", - "ClaimAtom", - "CreateAccountResultCode", - "CreateAccountResult", - "PaymentResultCode", - "PaymentResult", - "PathPaymentStrictReceiveResultCode", - "SimplePaymentResult", - "PathPaymentStrictReceiveResult", - "PathPaymentStrictReceiveResultSuccess", - "PathPaymentStrictSendResultCode", - "PathPaymentStrictSendResult", - "PathPaymentStrictSendResultSuccess", - "ManageSellOfferResultCode", - "ManageOfferEffect", - "ManageOfferSuccessResult", - "ManageOfferSuccessResultOffer", - "ManageSellOfferResult", - "ManageBuyOfferResultCode", - "ManageBuyOfferResult", - "SetOptionsResultCode", - "SetOptionsResult", - "ChangeTrustResultCode", - "ChangeTrustResult", - "AllowTrustResultCode", - "AllowTrustResult", - "AccountMergeResultCode", - "AccountMergeResult", - "InflationResultCode", - "InflationPayout", - "InflationResult", - "ManageDataResultCode", - "ManageDataResult", - "BumpSequenceResultCode", - "BumpSequenceResult", - "CreateClaimableBalanceResultCode", - "CreateClaimableBalanceResult", - "ClaimClaimableBalanceResultCode", - "ClaimClaimableBalanceResult", - "BeginSponsoringFutureReservesResultCode", - "BeginSponsoringFutureReservesResult", - "EndSponsoringFutureReservesResultCode", - "EndSponsoringFutureReservesResult", - "RevokeSponsorshipResultCode", - "RevokeSponsorshipResult", - "ClawbackResultCode", - "ClawbackResult", - "ClawbackClaimableBalanceResultCode", - "ClawbackClaimableBalanceResult", - "SetTrustLineFlagsResultCode", - "SetTrustLineFlagsResult", - "LiquidityPoolDepositResultCode", - "LiquidityPoolDepositResult", - "LiquidityPoolWithdrawResultCode", - "LiquidityPoolWithdrawResult", - "InvokeHostFunctionResultCode", - "InvokeHostFunctionResult", - "ExtendFootprintTtlResultCode", - "ExtendFootprintTtlResult", - "RestoreFootprintResultCode", - "RestoreFootprintResult", - "OperationResultCode", - "OperationResult", - "OperationResultTr", - "TransactionResultCode", - "InnerTransactionResult", - "InnerTransactionResultResult", - "InnerTransactionResultExt", - "InnerTransactionResultPair", - "TransactionResult", - "TransactionResultResult", - "TransactionResultExt", - "Hash", - "Uint256", - "Uint32", - "Int32", - "Uint64", - "Int64", - "TimePoint", - "Duration", - "ExtensionPoint", - "CryptoKeyType", - "PublicKeyType", - "SignerKeyType", - "PublicKey", - "SignerKey", - "SignerKeyEd25519SignedPayload", - "Signature", - "SignatureHint", - "NodeId", - "AccountId", - "ContractId", - "Curve25519Secret", - "Curve25519Public", - "HmacSha256Key", - "HmacSha256Mac", - "ShortHashSeed", - "BinaryFuseFilterType", - "SerializedBinaryFuseFilter", - "PoolId", - "ClaimableBalanceIdType", - "ClaimableBalanceId", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = [ - "Value", - "ScpBallot", - "ScpStatementType", - "ScpNomination", - "ScpStatement", - "ScpStatementPledges", - "ScpStatementPrepare", - "ScpStatementConfirm", - "ScpStatementExternalize", - "ScpEnvelope", - "ScpQuorumSet", - "EncodedLedgerKey", - "ConfigSettingContractExecutionLanesV0", - "ConfigSettingContractComputeV0", - "ConfigSettingContractParallelComputeV0", - "ConfigSettingContractLedgerCostV0", - "ConfigSettingContractLedgerCostExtV0", - "ConfigSettingContractHistoricalDataV0", - "ConfigSettingContractEventsV0", - "ConfigSettingContractBandwidthV0", - "ContractCostType", - "ContractCostParamEntry", - "StateArchivalSettings", - "EvictionIterator", - "ConfigSettingScpTiming", - "FrozenLedgerKeys", - "FrozenLedgerKeysDelta", - "FreezeBypassTxs", - "FreezeBypassTxsDelta", - "ContractCostParams", - "ConfigSettingId", - "ConfigSettingEntry", - "ScEnvMetaKind", - "ScEnvMetaEntry", - "ScEnvMetaEntryInterfaceVersion", - "ScMetaV0", - "ScMetaKind", - "ScMetaEntry", - "ScSpecType", - "ScSpecTypeOption", - "ScSpecTypeResult", - "ScSpecTypeVec", - "ScSpecTypeMap", - "ScSpecTypeTuple", - "ScSpecTypeBytesN", - "ScSpecTypeUdt", - "ScSpecTypeDef", - "ScSpecUdtStructFieldV0", - "ScSpecUdtStructV0", - "ScSpecUdtUnionCaseVoidV0", - "ScSpecUdtUnionCaseTupleV0", - "ScSpecUdtUnionCaseV0Kind", - "ScSpecUdtUnionCaseV0", - "ScSpecUdtUnionV0", - "ScSpecUdtEnumCaseV0", - "ScSpecUdtEnumV0", - "ScSpecUdtErrorEnumCaseV0", - "ScSpecUdtErrorEnumV0", - "ScSpecFunctionInputV0", - "ScSpecFunctionV0", - "ScSpecEventParamLocationV0", - "ScSpecEventParamV0", - "ScSpecEventDataFormat", - "ScSpecEventV0", - "ScSpecEntryKind", - "ScSpecEntry", - "ScValType", - "ScErrorType", - "ScErrorCode", - "ScError", - "UInt128Parts", - "Int128Parts", - "UInt256Parts", - "Int256Parts", - "ContractExecutableType", - "ContractExecutable", - "ScAddressType", - "MuxedEd25519Account", - "ScAddress", - "ScVec", - "ScMap", - "ScBytes", - "ScString", - "ScSymbol", - "ScNonceKey", - "ScContractInstance", - "ScVal", - "ScMapEntry", - "LedgerCloseMetaBatch", - "StoredTransactionSet", - "StoredDebugTransactionSet", - "PersistedScpStateV0", - "PersistedScpStateV1", - "PersistedScpState", - "Thresholds", - "String32", - "String64", - "SequenceNumber", - "DataValue", - "AssetCode4", - "AssetCode12", - "AssetType", - "AssetCode", - "AlphaNum4", - "AlphaNum12", - "Asset", - "Price", - "Liabilities", - "ThresholdIndexes", - "LedgerEntryType", - "Signer", - "AccountFlags", - "SponsorshipDescriptor", - "AccountEntryExtensionV3", - "AccountEntryExtensionV2", - "AccountEntryExtensionV2Ext", - "AccountEntryExtensionV1", - "AccountEntryExtensionV1Ext", - "AccountEntry", - "AccountEntryExt", - "TrustLineFlags", - "LiquidityPoolType", - "TrustLineAsset", - "TrustLineEntryExtensionV2", - "TrustLineEntryExtensionV2Ext", - "TrustLineEntry", - "TrustLineEntryExt", - "TrustLineEntryV1", - "TrustLineEntryV1Ext", - "OfferEntryFlags", - "OfferEntry", - "OfferEntryExt", - "DataEntry", - "DataEntryExt", - "ClaimPredicateType", - "ClaimPredicate", - "ClaimantType", - "Claimant", - "ClaimantV0", - "ClaimableBalanceFlags", - "ClaimableBalanceEntryExtensionV1", - "ClaimableBalanceEntryExtensionV1Ext", - "ClaimableBalanceEntry", - "ClaimableBalanceEntryExt", - "LiquidityPoolConstantProductParameters", - "LiquidityPoolEntry", - "LiquidityPoolEntryBody", - "LiquidityPoolEntryConstantProduct", - "ContractDataDurability", - "ContractDataEntry", - "ContractCodeCostInputs", - "ContractCodeEntry", - "ContractCodeEntryExt", - "ContractCodeEntryV1", - "TtlEntry", - "LedgerEntryExtensionV1", - "LedgerEntryExtensionV1Ext", - "LedgerEntry", - "LedgerEntryData", - "LedgerEntryExt", - "LedgerKey", - "LedgerKeyAccount", - "LedgerKeyTrustLine", - "LedgerKeyOffer", - "LedgerKeyData", - "LedgerKeyClaimableBalance", - "LedgerKeyLiquidityPool", - "LedgerKeyContractData", - "LedgerKeyContractCode", - "LedgerKeyConfigSetting", - "LedgerKeyTtl", - "EnvelopeType", - "BucketListType", - "BucketEntryType", - "HotArchiveBucketEntryType", - "BucketMetadata", - "BucketMetadataExt", - "BucketEntry", - "HotArchiveBucketEntry", - "UpgradeType", - "StellarValueType", - "LedgerCloseValueSignature", - "StellarValue", - "StellarValueExt", - "LedgerHeaderFlags", - "LedgerHeaderExtensionV1", - "LedgerHeaderExtensionV1Ext", - "LedgerHeader", - "LedgerHeaderExt", - "LedgerUpgradeType", - "ConfigUpgradeSetKey", - "LedgerUpgrade", - "ConfigUpgradeSet", - "TxSetComponentType", - "DependentTxCluster", - "ParallelTxExecutionStage", - "ParallelTxsComponent", - "TxSetComponent", - "TxSetComponentTxsMaybeDiscountedFee", - "TransactionPhase", - "TransactionSet", - "TransactionSetV1", - "GeneralizedTransactionSet", - "TransactionResultPair", - "TransactionResultSet", - "TransactionHistoryEntry", - "TransactionHistoryEntryExt", - "TransactionHistoryResultEntry", - "TransactionHistoryResultEntryExt", - "LedgerHeaderHistoryEntry", - "LedgerHeaderHistoryEntryExt", - "LedgerScpMessages", - "ScpHistoryEntryV0", - "ScpHistoryEntry", - "LedgerEntryChangeType", - "LedgerEntryChange", - "LedgerEntryChanges", - "OperationMeta", - "TransactionMetaV1", - "TransactionMetaV2", - "ContractEventType", - "ContractEvent", - "ContractEventBody", - "ContractEventV0", - "DiagnosticEvent", - "SorobanTransactionMetaExtV1", - "SorobanTransactionMetaExt", - "SorobanTransactionMeta", - "TransactionMetaV3", - "OperationMetaV2", - "SorobanTransactionMetaV2", - "TransactionEventStage", - "TransactionEvent", - "TransactionMetaV4", - "InvokeHostFunctionSuccessPreImage", - "TransactionMeta", - "TransactionResultMeta", - "TransactionResultMetaV1", - "UpgradeEntryMeta", - "LedgerCloseMetaV0", - "LedgerCloseMetaExtV1", - "LedgerCloseMetaExt", - "LedgerCloseMetaV1", - "LedgerCloseMetaV2", - "LedgerCloseMeta", - "ErrorCode", - "SError", - "SendMore", - "SendMoreExtended", - "AuthCert", - "Hello", - "Auth", - "IpAddrType", - "PeerAddress", - "PeerAddressIp", - "MessageType", - "DontHave", - "SurveyMessageCommandType", - "SurveyMessageResponseType", - "TimeSlicedSurveyStartCollectingMessage", - "SignedTimeSlicedSurveyStartCollectingMessage", - "TimeSlicedSurveyStopCollectingMessage", - "SignedTimeSlicedSurveyStopCollectingMessage", - "SurveyRequestMessage", - "TimeSlicedSurveyRequestMessage", - "SignedTimeSlicedSurveyRequestMessage", - "EncryptedBody", - "SurveyResponseMessage", - "TimeSlicedSurveyResponseMessage", - "SignedTimeSlicedSurveyResponseMessage", - "PeerStats", - "TimeSlicedNodeData", - "TimeSlicedPeerData", - "TimeSlicedPeerDataList", - "TopologyResponseBodyV2", - "SurveyResponseBody", - "TxAdvertVector", - "FloodAdvert", - "TxDemandVector", - "FloodDemand", - "StellarMessage", - "AuthenticatedMessage", - "AuthenticatedMessageV0", - "LiquidityPoolParameters", - "MuxedAccount", - "MuxedAccountMed25519", - "DecoratedSignature", - "OperationType", - "CreateAccountOp", - "PaymentOp", - "PathPaymentStrictReceiveOp", - "PathPaymentStrictSendOp", - "ManageSellOfferOp", - "ManageBuyOfferOp", - "CreatePassiveSellOfferOp", - "SetOptionsOp", - "ChangeTrustAsset", - "ChangeTrustOp", - "AllowTrustOp", - "ManageDataOp", - "BumpSequenceOp", - "CreateClaimableBalanceOp", - "ClaimClaimableBalanceOp", - "BeginSponsoringFutureReservesOp", - "RevokeSponsorshipType", - "RevokeSponsorshipOp", - "RevokeSponsorshipOpSigner", - "ClawbackOp", - "ClawbackClaimableBalanceOp", - "SetTrustLineFlagsOp", - "LiquidityPoolDepositOp", - "LiquidityPoolWithdrawOp", - "HostFunctionType", - "ContractIdPreimageType", - "ContractIdPreimage", - "ContractIdPreimageFromAddress", - "CreateContractArgs", - "CreateContractArgsV2", - "InvokeContractArgs", - "HostFunction", - "SorobanAuthorizedFunctionType", - "SorobanAuthorizedFunction", - "SorobanAuthorizedInvocation", - "SorobanAddressCredentials", - "SorobanCredentialsType", - "SorobanCredentials", - "SorobanAuthorizationEntry", - "SorobanAuthorizationEntries", - "InvokeHostFunctionOp", - "ExtendFootprintTtlOp", - "RestoreFootprintOp", - "Operation", - "OperationBody", - "HashIdPreimage", - "HashIdPreimageOperationId", - "HashIdPreimageRevokeId", - "HashIdPreimageContractId", - "HashIdPreimageSorobanAuthorization", - "MemoType", - "Memo", - "TimeBounds", - "LedgerBounds", - "PreconditionsV2", - "PreconditionType", - "Preconditions", - "LedgerFootprint", - "SorobanResources", - "SorobanResourcesExtV0", - "SorobanTransactionData", - "SorobanTransactionDataExt", - "TransactionV0", - "TransactionV0Ext", - "TransactionV0Envelope", - "Transaction", - "TransactionExt", - "TransactionV1Envelope", - "FeeBumpTransaction", - "FeeBumpTransactionInnerTx", - "FeeBumpTransactionExt", - "FeeBumpTransactionEnvelope", - "TransactionEnvelope", - "TransactionSignaturePayload", - "TransactionSignaturePayloadTaggedTransaction", - "ClaimAtomType", - "ClaimOfferAtomV0", - "ClaimOfferAtom", - "ClaimLiquidityAtom", - "ClaimAtom", - "CreateAccountResultCode", - "CreateAccountResult", - "PaymentResultCode", - "PaymentResult", - "PathPaymentStrictReceiveResultCode", - "SimplePaymentResult", - "PathPaymentStrictReceiveResult", - "PathPaymentStrictReceiveResultSuccess", - "PathPaymentStrictSendResultCode", - "PathPaymentStrictSendResult", - "PathPaymentStrictSendResultSuccess", - "ManageSellOfferResultCode", - "ManageOfferEffect", - "ManageOfferSuccessResult", - "ManageOfferSuccessResultOffer", - "ManageSellOfferResult", - "ManageBuyOfferResultCode", - "ManageBuyOfferResult", - "SetOptionsResultCode", - "SetOptionsResult", - "ChangeTrustResultCode", - "ChangeTrustResult", - "AllowTrustResultCode", - "AllowTrustResult", - "AccountMergeResultCode", - "AccountMergeResult", - "InflationResultCode", - "InflationPayout", - "InflationResult", - "ManageDataResultCode", - "ManageDataResult", - "BumpSequenceResultCode", - "BumpSequenceResult", - "CreateClaimableBalanceResultCode", - "CreateClaimableBalanceResult", - "ClaimClaimableBalanceResultCode", - "ClaimClaimableBalanceResult", - "BeginSponsoringFutureReservesResultCode", - "BeginSponsoringFutureReservesResult", - "EndSponsoringFutureReservesResultCode", - "EndSponsoringFutureReservesResult", - "RevokeSponsorshipResultCode", - "RevokeSponsorshipResult", - "ClawbackResultCode", - "ClawbackResult", - "ClawbackClaimableBalanceResultCode", - "ClawbackClaimableBalanceResult", - "SetTrustLineFlagsResultCode", - "SetTrustLineFlagsResult", - "LiquidityPoolDepositResultCode", - "LiquidityPoolDepositResult", - "LiquidityPoolWithdrawResultCode", - "LiquidityPoolWithdrawResult", - "InvokeHostFunctionResultCode", - "InvokeHostFunctionResult", - "ExtendFootprintTtlResultCode", - "ExtendFootprintTtlResult", - "RestoreFootprintResultCode", - "RestoreFootprintResult", - "OperationResultCode", - "OperationResult", - "OperationResultTr", - "TransactionResultCode", - "InnerTransactionResult", - "InnerTransactionResultResult", - "InnerTransactionResultExt", - "InnerTransactionResultPair", - "TransactionResult", - "TransactionResultResult", - "TransactionResultExt", - "Hash", - "Uint256", - "Uint32", - "Int32", - "Uint64", - "Int64", - "TimePoint", - "Duration", - "ExtensionPoint", - "CryptoKeyType", - "PublicKeyType", - "SignerKeyType", - "PublicKey", - "SignerKey", - "SignerKeyEd25519SignedPayload", - "Signature", - "SignatureHint", - "NodeId", - "AccountId", - "ContractId", - "Curve25519Secret", - "Curve25519Public", - "HmacSha256Key", - "HmacSha256Mac", - "ShortHashSeed", - "BinaryFuseFilterType", - "SerializedBinaryFuseFilter", - "PoolId", - "ClaimableBalanceIdType", - "ClaimableBalanceId", - ]; - - #[must_use] - #[allow(clippy::too_many_lines)] - pub const fn name(&self) -> &'static str { - match self { - Self::Value => "Value", - Self::ScpBallot => "ScpBallot", - Self::ScpStatementType => "ScpStatementType", - Self::ScpNomination => "ScpNomination", - Self::ScpStatement => "ScpStatement", - Self::ScpStatementPledges => "ScpStatementPledges", - Self::ScpStatementPrepare => "ScpStatementPrepare", - Self::ScpStatementConfirm => "ScpStatementConfirm", - Self::ScpStatementExternalize => "ScpStatementExternalize", - Self::ScpEnvelope => "ScpEnvelope", - Self::ScpQuorumSet => "ScpQuorumSet", - Self::EncodedLedgerKey => "EncodedLedgerKey", - Self::ConfigSettingContractExecutionLanesV0 => "ConfigSettingContractExecutionLanesV0", - Self::ConfigSettingContractComputeV0 => "ConfigSettingContractComputeV0", - Self::ConfigSettingContractParallelComputeV0 => { - "ConfigSettingContractParallelComputeV0" - } - Self::ConfigSettingContractLedgerCostV0 => "ConfigSettingContractLedgerCostV0", - Self::ConfigSettingContractLedgerCostExtV0 => "ConfigSettingContractLedgerCostExtV0", - Self::ConfigSettingContractHistoricalDataV0 => "ConfigSettingContractHistoricalDataV0", - Self::ConfigSettingContractEventsV0 => "ConfigSettingContractEventsV0", - Self::ConfigSettingContractBandwidthV0 => "ConfigSettingContractBandwidthV0", - Self::ContractCostType => "ContractCostType", - Self::ContractCostParamEntry => "ContractCostParamEntry", - Self::StateArchivalSettings => "StateArchivalSettings", - Self::EvictionIterator => "EvictionIterator", - Self::ConfigSettingScpTiming => "ConfigSettingScpTiming", - Self::FrozenLedgerKeys => "FrozenLedgerKeys", - Self::FrozenLedgerKeysDelta => "FrozenLedgerKeysDelta", - Self::FreezeBypassTxs => "FreezeBypassTxs", - Self::FreezeBypassTxsDelta => "FreezeBypassTxsDelta", - Self::ContractCostParams => "ContractCostParams", - Self::ConfigSettingId => "ConfigSettingId", - Self::ConfigSettingEntry => "ConfigSettingEntry", - Self::ScEnvMetaKind => "ScEnvMetaKind", - Self::ScEnvMetaEntry => "ScEnvMetaEntry", - Self::ScEnvMetaEntryInterfaceVersion => "ScEnvMetaEntryInterfaceVersion", - Self::ScMetaV0 => "ScMetaV0", - Self::ScMetaKind => "ScMetaKind", - Self::ScMetaEntry => "ScMetaEntry", - Self::ScSpecType => "ScSpecType", - Self::ScSpecTypeOption => "ScSpecTypeOption", - Self::ScSpecTypeResult => "ScSpecTypeResult", - Self::ScSpecTypeVec => "ScSpecTypeVec", - Self::ScSpecTypeMap => "ScSpecTypeMap", - Self::ScSpecTypeTuple => "ScSpecTypeTuple", - Self::ScSpecTypeBytesN => "ScSpecTypeBytesN", - Self::ScSpecTypeUdt => "ScSpecTypeUdt", - Self::ScSpecTypeDef => "ScSpecTypeDef", - Self::ScSpecUdtStructFieldV0 => "ScSpecUdtStructFieldV0", - Self::ScSpecUdtStructV0 => "ScSpecUdtStructV0", - Self::ScSpecUdtUnionCaseVoidV0 => "ScSpecUdtUnionCaseVoidV0", - Self::ScSpecUdtUnionCaseTupleV0 => "ScSpecUdtUnionCaseTupleV0", - Self::ScSpecUdtUnionCaseV0Kind => "ScSpecUdtUnionCaseV0Kind", - Self::ScSpecUdtUnionCaseV0 => "ScSpecUdtUnionCaseV0", - Self::ScSpecUdtUnionV0 => "ScSpecUdtUnionV0", - Self::ScSpecUdtEnumCaseV0 => "ScSpecUdtEnumCaseV0", - Self::ScSpecUdtEnumV0 => "ScSpecUdtEnumV0", - Self::ScSpecUdtErrorEnumCaseV0 => "ScSpecUdtErrorEnumCaseV0", - Self::ScSpecUdtErrorEnumV0 => "ScSpecUdtErrorEnumV0", - Self::ScSpecFunctionInputV0 => "ScSpecFunctionInputV0", - Self::ScSpecFunctionV0 => "ScSpecFunctionV0", - Self::ScSpecEventParamLocationV0 => "ScSpecEventParamLocationV0", - Self::ScSpecEventParamV0 => "ScSpecEventParamV0", - Self::ScSpecEventDataFormat => "ScSpecEventDataFormat", - Self::ScSpecEventV0 => "ScSpecEventV0", - Self::ScSpecEntryKind => "ScSpecEntryKind", - Self::ScSpecEntry => "ScSpecEntry", - Self::ScValType => "ScValType", - Self::ScErrorType => "ScErrorType", - Self::ScErrorCode => "ScErrorCode", - Self::ScError => "ScError", - Self::UInt128Parts => "UInt128Parts", - Self::Int128Parts => "Int128Parts", - Self::UInt256Parts => "UInt256Parts", - Self::Int256Parts => "Int256Parts", - Self::ContractExecutableType => "ContractExecutableType", - Self::ContractExecutable => "ContractExecutable", - Self::ScAddressType => "ScAddressType", - Self::MuxedEd25519Account => "MuxedEd25519Account", - Self::ScAddress => "ScAddress", - Self::ScVec => "ScVec", - Self::ScMap => "ScMap", - Self::ScBytes => "ScBytes", - Self::ScString => "ScString", - Self::ScSymbol => "ScSymbol", - Self::ScNonceKey => "ScNonceKey", - Self::ScContractInstance => "ScContractInstance", - Self::ScVal => "ScVal", - Self::ScMapEntry => "ScMapEntry", - Self::LedgerCloseMetaBatch => "LedgerCloseMetaBatch", - Self::StoredTransactionSet => "StoredTransactionSet", - Self::StoredDebugTransactionSet => "StoredDebugTransactionSet", - Self::PersistedScpStateV0 => "PersistedScpStateV0", - Self::PersistedScpStateV1 => "PersistedScpStateV1", - Self::PersistedScpState => "PersistedScpState", - Self::Thresholds => "Thresholds", - Self::String32 => "String32", - Self::String64 => "String64", - Self::SequenceNumber => "SequenceNumber", - Self::DataValue => "DataValue", - Self::AssetCode4 => "AssetCode4", - Self::AssetCode12 => "AssetCode12", - Self::AssetType => "AssetType", - Self::AssetCode => "AssetCode", - Self::AlphaNum4 => "AlphaNum4", - Self::AlphaNum12 => "AlphaNum12", - Self::Asset => "Asset", - Self::Price => "Price", - Self::Liabilities => "Liabilities", - Self::ThresholdIndexes => "ThresholdIndexes", - Self::LedgerEntryType => "LedgerEntryType", - Self::Signer => "Signer", - Self::AccountFlags => "AccountFlags", - Self::SponsorshipDescriptor => "SponsorshipDescriptor", - Self::AccountEntryExtensionV3 => "AccountEntryExtensionV3", - Self::AccountEntryExtensionV2 => "AccountEntryExtensionV2", - Self::AccountEntryExtensionV2Ext => "AccountEntryExtensionV2Ext", - Self::AccountEntryExtensionV1 => "AccountEntryExtensionV1", - Self::AccountEntryExtensionV1Ext => "AccountEntryExtensionV1Ext", - Self::AccountEntry => "AccountEntry", - Self::AccountEntryExt => "AccountEntryExt", - Self::TrustLineFlags => "TrustLineFlags", - Self::LiquidityPoolType => "LiquidityPoolType", - Self::TrustLineAsset => "TrustLineAsset", - Self::TrustLineEntryExtensionV2 => "TrustLineEntryExtensionV2", - Self::TrustLineEntryExtensionV2Ext => "TrustLineEntryExtensionV2Ext", - Self::TrustLineEntry => "TrustLineEntry", - Self::TrustLineEntryExt => "TrustLineEntryExt", - Self::TrustLineEntryV1 => "TrustLineEntryV1", - Self::TrustLineEntryV1Ext => "TrustLineEntryV1Ext", - Self::OfferEntryFlags => "OfferEntryFlags", - Self::OfferEntry => "OfferEntry", - Self::OfferEntryExt => "OfferEntryExt", - Self::DataEntry => "DataEntry", - Self::DataEntryExt => "DataEntryExt", - Self::ClaimPredicateType => "ClaimPredicateType", - Self::ClaimPredicate => "ClaimPredicate", - Self::ClaimantType => "ClaimantType", - Self::Claimant => "Claimant", - Self::ClaimantV0 => "ClaimantV0", - Self::ClaimableBalanceFlags => "ClaimableBalanceFlags", - Self::ClaimableBalanceEntryExtensionV1 => "ClaimableBalanceEntryExtensionV1", - Self::ClaimableBalanceEntryExtensionV1Ext => "ClaimableBalanceEntryExtensionV1Ext", - Self::ClaimableBalanceEntry => "ClaimableBalanceEntry", - Self::ClaimableBalanceEntryExt => "ClaimableBalanceEntryExt", - Self::LiquidityPoolConstantProductParameters => { - "LiquidityPoolConstantProductParameters" - } - Self::LiquidityPoolEntry => "LiquidityPoolEntry", - Self::LiquidityPoolEntryBody => "LiquidityPoolEntryBody", - Self::LiquidityPoolEntryConstantProduct => "LiquidityPoolEntryConstantProduct", - Self::ContractDataDurability => "ContractDataDurability", - Self::ContractDataEntry => "ContractDataEntry", - Self::ContractCodeCostInputs => "ContractCodeCostInputs", - Self::ContractCodeEntry => "ContractCodeEntry", - Self::ContractCodeEntryExt => "ContractCodeEntryExt", - Self::ContractCodeEntryV1 => "ContractCodeEntryV1", - Self::TtlEntry => "TtlEntry", - Self::LedgerEntryExtensionV1 => "LedgerEntryExtensionV1", - Self::LedgerEntryExtensionV1Ext => "LedgerEntryExtensionV1Ext", - Self::LedgerEntry => "LedgerEntry", - Self::LedgerEntryData => "LedgerEntryData", - Self::LedgerEntryExt => "LedgerEntryExt", - Self::LedgerKey => "LedgerKey", - Self::LedgerKeyAccount => "LedgerKeyAccount", - Self::LedgerKeyTrustLine => "LedgerKeyTrustLine", - Self::LedgerKeyOffer => "LedgerKeyOffer", - Self::LedgerKeyData => "LedgerKeyData", - Self::LedgerKeyClaimableBalance => "LedgerKeyClaimableBalance", - Self::LedgerKeyLiquidityPool => "LedgerKeyLiquidityPool", - Self::LedgerKeyContractData => "LedgerKeyContractData", - Self::LedgerKeyContractCode => "LedgerKeyContractCode", - Self::LedgerKeyConfigSetting => "LedgerKeyConfigSetting", - Self::LedgerKeyTtl => "LedgerKeyTtl", - Self::EnvelopeType => "EnvelopeType", - Self::BucketListType => "BucketListType", - Self::BucketEntryType => "BucketEntryType", - Self::HotArchiveBucketEntryType => "HotArchiveBucketEntryType", - Self::BucketMetadata => "BucketMetadata", - Self::BucketMetadataExt => "BucketMetadataExt", - Self::BucketEntry => "BucketEntry", - Self::HotArchiveBucketEntry => "HotArchiveBucketEntry", - Self::UpgradeType => "UpgradeType", - Self::StellarValueType => "StellarValueType", - Self::LedgerCloseValueSignature => "LedgerCloseValueSignature", - Self::StellarValue => "StellarValue", - Self::StellarValueExt => "StellarValueExt", - Self::LedgerHeaderFlags => "LedgerHeaderFlags", - Self::LedgerHeaderExtensionV1 => "LedgerHeaderExtensionV1", - Self::LedgerHeaderExtensionV1Ext => "LedgerHeaderExtensionV1Ext", - Self::LedgerHeader => "LedgerHeader", - Self::LedgerHeaderExt => "LedgerHeaderExt", - Self::LedgerUpgradeType => "LedgerUpgradeType", - Self::ConfigUpgradeSetKey => "ConfigUpgradeSetKey", - Self::LedgerUpgrade => "LedgerUpgrade", - Self::ConfigUpgradeSet => "ConfigUpgradeSet", - Self::TxSetComponentType => "TxSetComponentType", - Self::DependentTxCluster => "DependentTxCluster", - Self::ParallelTxExecutionStage => "ParallelTxExecutionStage", - Self::ParallelTxsComponent => "ParallelTxsComponent", - Self::TxSetComponent => "TxSetComponent", - Self::TxSetComponentTxsMaybeDiscountedFee => "TxSetComponentTxsMaybeDiscountedFee", - Self::TransactionPhase => "TransactionPhase", - Self::TransactionSet => "TransactionSet", - Self::TransactionSetV1 => "TransactionSetV1", - Self::GeneralizedTransactionSet => "GeneralizedTransactionSet", - Self::TransactionResultPair => "TransactionResultPair", - Self::TransactionResultSet => "TransactionResultSet", - Self::TransactionHistoryEntry => "TransactionHistoryEntry", - Self::TransactionHistoryEntryExt => "TransactionHistoryEntryExt", - Self::TransactionHistoryResultEntry => "TransactionHistoryResultEntry", - Self::TransactionHistoryResultEntryExt => "TransactionHistoryResultEntryExt", - Self::LedgerHeaderHistoryEntry => "LedgerHeaderHistoryEntry", - Self::LedgerHeaderHistoryEntryExt => "LedgerHeaderHistoryEntryExt", - Self::LedgerScpMessages => "LedgerScpMessages", - Self::ScpHistoryEntryV0 => "ScpHistoryEntryV0", - Self::ScpHistoryEntry => "ScpHistoryEntry", - Self::LedgerEntryChangeType => "LedgerEntryChangeType", - Self::LedgerEntryChange => "LedgerEntryChange", - Self::LedgerEntryChanges => "LedgerEntryChanges", - Self::OperationMeta => "OperationMeta", - Self::TransactionMetaV1 => "TransactionMetaV1", - Self::TransactionMetaV2 => "TransactionMetaV2", - Self::ContractEventType => "ContractEventType", - Self::ContractEvent => "ContractEvent", - Self::ContractEventBody => "ContractEventBody", - Self::ContractEventV0 => "ContractEventV0", - Self::DiagnosticEvent => "DiagnosticEvent", - Self::SorobanTransactionMetaExtV1 => "SorobanTransactionMetaExtV1", - Self::SorobanTransactionMetaExt => "SorobanTransactionMetaExt", - Self::SorobanTransactionMeta => "SorobanTransactionMeta", - Self::TransactionMetaV3 => "TransactionMetaV3", - Self::OperationMetaV2 => "OperationMetaV2", - Self::SorobanTransactionMetaV2 => "SorobanTransactionMetaV2", - Self::TransactionEventStage => "TransactionEventStage", - Self::TransactionEvent => "TransactionEvent", - Self::TransactionMetaV4 => "TransactionMetaV4", - Self::InvokeHostFunctionSuccessPreImage => "InvokeHostFunctionSuccessPreImage", - Self::TransactionMeta => "TransactionMeta", - Self::TransactionResultMeta => "TransactionResultMeta", - Self::TransactionResultMetaV1 => "TransactionResultMetaV1", - Self::UpgradeEntryMeta => "UpgradeEntryMeta", - Self::LedgerCloseMetaV0 => "LedgerCloseMetaV0", - Self::LedgerCloseMetaExtV1 => "LedgerCloseMetaExtV1", - Self::LedgerCloseMetaExt => "LedgerCloseMetaExt", - Self::LedgerCloseMetaV1 => "LedgerCloseMetaV1", - Self::LedgerCloseMetaV2 => "LedgerCloseMetaV2", - Self::LedgerCloseMeta => "LedgerCloseMeta", - Self::ErrorCode => "ErrorCode", - Self::SError => "SError", - Self::SendMore => "SendMore", - Self::SendMoreExtended => "SendMoreExtended", - Self::AuthCert => "AuthCert", - Self::Hello => "Hello", - Self::Auth => "Auth", - Self::IpAddrType => "IpAddrType", - Self::PeerAddress => "PeerAddress", - Self::PeerAddressIp => "PeerAddressIp", - Self::MessageType => "MessageType", - Self::DontHave => "DontHave", - Self::SurveyMessageCommandType => "SurveyMessageCommandType", - Self::SurveyMessageResponseType => "SurveyMessageResponseType", - Self::TimeSlicedSurveyStartCollectingMessage => { - "TimeSlicedSurveyStartCollectingMessage" - } - Self::SignedTimeSlicedSurveyStartCollectingMessage => { - "SignedTimeSlicedSurveyStartCollectingMessage" - } - Self::TimeSlicedSurveyStopCollectingMessage => "TimeSlicedSurveyStopCollectingMessage", - Self::SignedTimeSlicedSurveyStopCollectingMessage => { - "SignedTimeSlicedSurveyStopCollectingMessage" - } - Self::SurveyRequestMessage => "SurveyRequestMessage", - Self::TimeSlicedSurveyRequestMessage => "TimeSlicedSurveyRequestMessage", - Self::SignedTimeSlicedSurveyRequestMessage => "SignedTimeSlicedSurveyRequestMessage", - Self::EncryptedBody => "EncryptedBody", - Self::SurveyResponseMessage => "SurveyResponseMessage", - Self::TimeSlicedSurveyResponseMessage => "TimeSlicedSurveyResponseMessage", - Self::SignedTimeSlicedSurveyResponseMessage => "SignedTimeSlicedSurveyResponseMessage", - Self::PeerStats => "PeerStats", - Self::TimeSlicedNodeData => "TimeSlicedNodeData", - Self::TimeSlicedPeerData => "TimeSlicedPeerData", - Self::TimeSlicedPeerDataList => "TimeSlicedPeerDataList", - Self::TopologyResponseBodyV2 => "TopologyResponseBodyV2", - Self::SurveyResponseBody => "SurveyResponseBody", - Self::TxAdvertVector => "TxAdvertVector", - Self::FloodAdvert => "FloodAdvert", - Self::TxDemandVector => "TxDemandVector", - Self::FloodDemand => "FloodDemand", - Self::StellarMessage => "StellarMessage", - Self::AuthenticatedMessage => "AuthenticatedMessage", - Self::AuthenticatedMessageV0 => "AuthenticatedMessageV0", - Self::LiquidityPoolParameters => "LiquidityPoolParameters", - Self::MuxedAccount => "MuxedAccount", - Self::MuxedAccountMed25519 => "MuxedAccountMed25519", - Self::DecoratedSignature => "DecoratedSignature", - Self::OperationType => "OperationType", - Self::CreateAccountOp => "CreateAccountOp", - Self::PaymentOp => "PaymentOp", - Self::PathPaymentStrictReceiveOp => "PathPaymentStrictReceiveOp", - Self::PathPaymentStrictSendOp => "PathPaymentStrictSendOp", - Self::ManageSellOfferOp => "ManageSellOfferOp", - Self::ManageBuyOfferOp => "ManageBuyOfferOp", - Self::CreatePassiveSellOfferOp => "CreatePassiveSellOfferOp", - Self::SetOptionsOp => "SetOptionsOp", - Self::ChangeTrustAsset => "ChangeTrustAsset", - Self::ChangeTrustOp => "ChangeTrustOp", - Self::AllowTrustOp => "AllowTrustOp", - Self::ManageDataOp => "ManageDataOp", - Self::BumpSequenceOp => "BumpSequenceOp", - Self::CreateClaimableBalanceOp => "CreateClaimableBalanceOp", - Self::ClaimClaimableBalanceOp => "ClaimClaimableBalanceOp", - Self::BeginSponsoringFutureReservesOp => "BeginSponsoringFutureReservesOp", - Self::RevokeSponsorshipType => "RevokeSponsorshipType", - Self::RevokeSponsorshipOp => "RevokeSponsorshipOp", - Self::RevokeSponsorshipOpSigner => "RevokeSponsorshipOpSigner", - Self::ClawbackOp => "ClawbackOp", - Self::ClawbackClaimableBalanceOp => "ClawbackClaimableBalanceOp", - Self::SetTrustLineFlagsOp => "SetTrustLineFlagsOp", - Self::LiquidityPoolDepositOp => "LiquidityPoolDepositOp", - Self::LiquidityPoolWithdrawOp => "LiquidityPoolWithdrawOp", - Self::HostFunctionType => "HostFunctionType", - Self::ContractIdPreimageType => "ContractIdPreimageType", - Self::ContractIdPreimage => "ContractIdPreimage", - Self::ContractIdPreimageFromAddress => "ContractIdPreimageFromAddress", - Self::CreateContractArgs => "CreateContractArgs", - Self::CreateContractArgsV2 => "CreateContractArgsV2", - Self::InvokeContractArgs => "InvokeContractArgs", - Self::HostFunction => "HostFunction", - Self::SorobanAuthorizedFunctionType => "SorobanAuthorizedFunctionType", - Self::SorobanAuthorizedFunction => "SorobanAuthorizedFunction", - Self::SorobanAuthorizedInvocation => "SorobanAuthorizedInvocation", - Self::SorobanAddressCredentials => "SorobanAddressCredentials", - Self::SorobanCredentialsType => "SorobanCredentialsType", - Self::SorobanCredentials => "SorobanCredentials", - Self::SorobanAuthorizationEntry => "SorobanAuthorizationEntry", - Self::SorobanAuthorizationEntries => "SorobanAuthorizationEntries", - Self::InvokeHostFunctionOp => "InvokeHostFunctionOp", - Self::ExtendFootprintTtlOp => "ExtendFootprintTtlOp", - Self::RestoreFootprintOp => "RestoreFootprintOp", - Self::Operation => "Operation", - Self::OperationBody => "OperationBody", - Self::HashIdPreimage => "HashIdPreimage", - Self::HashIdPreimageOperationId => "HashIdPreimageOperationId", - Self::HashIdPreimageRevokeId => "HashIdPreimageRevokeId", - Self::HashIdPreimageContractId => "HashIdPreimageContractId", - Self::HashIdPreimageSorobanAuthorization => "HashIdPreimageSorobanAuthorization", - Self::MemoType => "MemoType", - Self::Memo => "Memo", - Self::TimeBounds => "TimeBounds", - Self::LedgerBounds => "LedgerBounds", - Self::PreconditionsV2 => "PreconditionsV2", - Self::PreconditionType => "PreconditionType", - Self::Preconditions => "Preconditions", - Self::LedgerFootprint => "LedgerFootprint", - Self::SorobanResources => "SorobanResources", - Self::SorobanResourcesExtV0 => "SorobanResourcesExtV0", - Self::SorobanTransactionData => "SorobanTransactionData", - Self::SorobanTransactionDataExt => "SorobanTransactionDataExt", - Self::TransactionV0 => "TransactionV0", - Self::TransactionV0Ext => "TransactionV0Ext", - Self::TransactionV0Envelope => "TransactionV0Envelope", - Self::Transaction => "Transaction", - Self::TransactionExt => "TransactionExt", - Self::TransactionV1Envelope => "TransactionV1Envelope", - Self::FeeBumpTransaction => "FeeBumpTransaction", - Self::FeeBumpTransactionInnerTx => "FeeBumpTransactionInnerTx", - Self::FeeBumpTransactionExt => "FeeBumpTransactionExt", - Self::FeeBumpTransactionEnvelope => "FeeBumpTransactionEnvelope", - Self::TransactionEnvelope => "TransactionEnvelope", - Self::TransactionSignaturePayload => "TransactionSignaturePayload", - Self::TransactionSignaturePayloadTaggedTransaction => { - "TransactionSignaturePayloadTaggedTransaction" - } - Self::ClaimAtomType => "ClaimAtomType", - Self::ClaimOfferAtomV0 => "ClaimOfferAtomV0", - Self::ClaimOfferAtom => "ClaimOfferAtom", - Self::ClaimLiquidityAtom => "ClaimLiquidityAtom", - Self::ClaimAtom => "ClaimAtom", - Self::CreateAccountResultCode => "CreateAccountResultCode", - Self::CreateAccountResult => "CreateAccountResult", - Self::PaymentResultCode => "PaymentResultCode", - Self::PaymentResult => "PaymentResult", - Self::PathPaymentStrictReceiveResultCode => "PathPaymentStrictReceiveResultCode", - Self::SimplePaymentResult => "SimplePaymentResult", - Self::PathPaymentStrictReceiveResult => "PathPaymentStrictReceiveResult", - Self::PathPaymentStrictReceiveResultSuccess => "PathPaymentStrictReceiveResultSuccess", - Self::PathPaymentStrictSendResultCode => "PathPaymentStrictSendResultCode", - Self::PathPaymentStrictSendResult => "PathPaymentStrictSendResult", - Self::PathPaymentStrictSendResultSuccess => "PathPaymentStrictSendResultSuccess", - Self::ManageSellOfferResultCode => "ManageSellOfferResultCode", - Self::ManageOfferEffect => "ManageOfferEffect", - Self::ManageOfferSuccessResult => "ManageOfferSuccessResult", - Self::ManageOfferSuccessResultOffer => "ManageOfferSuccessResultOffer", - Self::ManageSellOfferResult => "ManageSellOfferResult", - Self::ManageBuyOfferResultCode => "ManageBuyOfferResultCode", - Self::ManageBuyOfferResult => "ManageBuyOfferResult", - Self::SetOptionsResultCode => "SetOptionsResultCode", - Self::SetOptionsResult => "SetOptionsResult", - Self::ChangeTrustResultCode => "ChangeTrustResultCode", - Self::ChangeTrustResult => "ChangeTrustResult", - Self::AllowTrustResultCode => "AllowTrustResultCode", - Self::AllowTrustResult => "AllowTrustResult", - Self::AccountMergeResultCode => "AccountMergeResultCode", - Self::AccountMergeResult => "AccountMergeResult", - Self::InflationResultCode => "InflationResultCode", - Self::InflationPayout => "InflationPayout", - Self::InflationResult => "InflationResult", - Self::ManageDataResultCode => "ManageDataResultCode", - Self::ManageDataResult => "ManageDataResult", - Self::BumpSequenceResultCode => "BumpSequenceResultCode", - Self::BumpSequenceResult => "BumpSequenceResult", - Self::CreateClaimableBalanceResultCode => "CreateClaimableBalanceResultCode", - Self::CreateClaimableBalanceResult => "CreateClaimableBalanceResult", - Self::ClaimClaimableBalanceResultCode => "ClaimClaimableBalanceResultCode", - Self::ClaimClaimableBalanceResult => "ClaimClaimableBalanceResult", - Self::BeginSponsoringFutureReservesResultCode => { - "BeginSponsoringFutureReservesResultCode" - } - Self::BeginSponsoringFutureReservesResult => "BeginSponsoringFutureReservesResult", - Self::EndSponsoringFutureReservesResultCode => "EndSponsoringFutureReservesResultCode", - Self::EndSponsoringFutureReservesResult => "EndSponsoringFutureReservesResult", - Self::RevokeSponsorshipResultCode => "RevokeSponsorshipResultCode", - Self::RevokeSponsorshipResult => "RevokeSponsorshipResult", - Self::ClawbackResultCode => "ClawbackResultCode", - Self::ClawbackResult => "ClawbackResult", - Self::ClawbackClaimableBalanceResultCode => "ClawbackClaimableBalanceResultCode", - Self::ClawbackClaimableBalanceResult => "ClawbackClaimableBalanceResult", - Self::SetTrustLineFlagsResultCode => "SetTrustLineFlagsResultCode", - Self::SetTrustLineFlagsResult => "SetTrustLineFlagsResult", - Self::LiquidityPoolDepositResultCode => "LiquidityPoolDepositResultCode", - Self::LiquidityPoolDepositResult => "LiquidityPoolDepositResult", - Self::LiquidityPoolWithdrawResultCode => "LiquidityPoolWithdrawResultCode", - Self::LiquidityPoolWithdrawResult => "LiquidityPoolWithdrawResult", - Self::InvokeHostFunctionResultCode => "InvokeHostFunctionResultCode", - Self::InvokeHostFunctionResult => "InvokeHostFunctionResult", - Self::ExtendFootprintTtlResultCode => "ExtendFootprintTtlResultCode", - Self::ExtendFootprintTtlResult => "ExtendFootprintTtlResult", - Self::RestoreFootprintResultCode => "RestoreFootprintResultCode", - Self::RestoreFootprintResult => "RestoreFootprintResult", - Self::OperationResultCode => "OperationResultCode", - Self::OperationResult => "OperationResult", - Self::OperationResultTr => "OperationResultTr", - Self::TransactionResultCode => "TransactionResultCode", - Self::InnerTransactionResult => "InnerTransactionResult", - Self::InnerTransactionResultResult => "InnerTransactionResultResult", - Self::InnerTransactionResultExt => "InnerTransactionResultExt", - Self::InnerTransactionResultPair => "InnerTransactionResultPair", - Self::TransactionResult => "TransactionResult", - Self::TransactionResultResult => "TransactionResultResult", - Self::TransactionResultExt => "TransactionResultExt", - Self::Hash => "Hash", - Self::Uint256 => "Uint256", - Self::Uint32 => "Uint32", - Self::Int32 => "Int32", - Self::Uint64 => "Uint64", - Self::Int64 => "Int64", - Self::TimePoint => "TimePoint", - Self::Duration => "Duration", - Self::ExtensionPoint => "ExtensionPoint", - Self::CryptoKeyType => "CryptoKeyType", - Self::PublicKeyType => "PublicKeyType", - Self::SignerKeyType => "SignerKeyType", - Self::PublicKey => "PublicKey", - Self::SignerKey => "SignerKey", - Self::SignerKeyEd25519SignedPayload => "SignerKeyEd25519SignedPayload", - Self::Signature => "Signature", - Self::SignatureHint => "SignatureHint", - Self::NodeId => "NodeId", - Self::AccountId => "AccountId", - Self::ContractId => "ContractId", - Self::Curve25519Secret => "Curve25519Secret", - Self::Curve25519Public => "Curve25519Public", - Self::HmacSha256Key => "HmacSha256Key", - Self::HmacSha256Mac => "HmacSha256Mac", - Self::ShortHashSeed => "ShortHashSeed", - Self::BinaryFuseFilterType => "BinaryFuseFilterType", - Self::SerializedBinaryFuseFilter => "SerializedBinaryFuseFilter", - Self::PoolId => "PoolId", - Self::ClaimableBalanceIdType => "ClaimableBalanceIdType", - Self::ClaimableBalanceId => "ClaimableBalanceId", - } - } - - #[must_use] - #[allow(clippy::too_many_lines)] - pub const fn variants() -> [TypeVariant; Self::_VARIANTS.len()] { - Self::VARIANTS - } - - #[cfg(feature = "schemars")] - #[must_use] - #[allow(clippy::too_many_lines)] - pub fn json_schema(&self, gen: schemars::gen::SchemaGenerator) -> schemars::schema::RootSchema { - match self { - Self::Value => gen.into_root_schema_for::(), - Self::ScpBallot => gen.into_root_schema_for::(), - Self::ScpStatementType => gen.into_root_schema_for::(), - Self::ScpNomination => gen.into_root_schema_for::(), - Self::ScpStatement => gen.into_root_schema_for::(), - Self::ScpStatementPledges => gen.into_root_schema_for::(), - Self::ScpStatementPrepare => gen.into_root_schema_for::(), - Self::ScpStatementConfirm => gen.into_root_schema_for::(), - Self::ScpStatementExternalize => gen.into_root_schema_for::(), - Self::ScpEnvelope => gen.into_root_schema_for::(), - Self::ScpQuorumSet => gen.into_root_schema_for::(), - Self::EncodedLedgerKey => gen.into_root_schema_for::(), - Self::ConfigSettingContractExecutionLanesV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractComputeV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractParallelComputeV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractLedgerCostV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractLedgerCostExtV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractHistoricalDataV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractEventsV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractBandwidthV0 => { - gen.into_root_schema_for::() - } - Self::ContractCostType => gen.into_root_schema_for::(), - Self::ContractCostParamEntry => gen.into_root_schema_for::(), - Self::StateArchivalSettings => gen.into_root_schema_for::(), - Self::EvictionIterator => gen.into_root_schema_for::(), - Self::ConfigSettingScpTiming => gen.into_root_schema_for::(), - Self::FrozenLedgerKeys => gen.into_root_schema_for::(), - Self::FrozenLedgerKeysDelta => gen.into_root_schema_for::(), - Self::FreezeBypassTxs => gen.into_root_schema_for::(), - Self::FreezeBypassTxsDelta => gen.into_root_schema_for::(), - Self::ContractCostParams => gen.into_root_schema_for::(), - Self::ConfigSettingId => gen.into_root_schema_for::(), - Self::ConfigSettingEntry => gen.into_root_schema_for::(), - Self::ScEnvMetaKind => gen.into_root_schema_for::(), - Self::ScEnvMetaEntry => gen.into_root_schema_for::(), - Self::ScEnvMetaEntryInterfaceVersion => { - gen.into_root_schema_for::() - } - Self::ScMetaV0 => gen.into_root_schema_for::(), - Self::ScMetaKind => gen.into_root_schema_for::(), - Self::ScMetaEntry => gen.into_root_schema_for::(), - Self::ScSpecType => gen.into_root_schema_for::(), - Self::ScSpecTypeOption => gen.into_root_schema_for::(), - Self::ScSpecTypeResult => gen.into_root_schema_for::(), - Self::ScSpecTypeVec => gen.into_root_schema_for::(), - Self::ScSpecTypeMap => gen.into_root_schema_for::(), - Self::ScSpecTypeTuple => gen.into_root_schema_for::(), - Self::ScSpecTypeBytesN => gen.into_root_schema_for::(), - Self::ScSpecTypeUdt => gen.into_root_schema_for::(), - Self::ScSpecTypeDef => gen.into_root_schema_for::(), - Self::ScSpecUdtStructFieldV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtStructV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtUnionCaseVoidV0 => { - gen.into_root_schema_for::() - } - Self::ScSpecUdtUnionCaseTupleV0 => { - gen.into_root_schema_for::() - } - Self::ScSpecUdtUnionCaseV0Kind => { - gen.into_root_schema_for::() - } - Self::ScSpecUdtUnionCaseV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtUnionV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtEnumCaseV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtEnumV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtErrorEnumCaseV0 => { - gen.into_root_schema_for::() - } - Self::ScSpecUdtErrorEnumV0 => gen.into_root_schema_for::(), - Self::ScSpecFunctionInputV0 => gen.into_root_schema_for::(), - Self::ScSpecFunctionV0 => gen.into_root_schema_for::(), - Self::ScSpecEventParamLocationV0 => { - gen.into_root_schema_for::() - } - Self::ScSpecEventParamV0 => gen.into_root_schema_for::(), - Self::ScSpecEventDataFormat => gen.into_root_schema_for::(), - Self::ScSpecEventV0 => gen.into_root_schema_for::(), - Self::ScSpecEntryKind => gen.into_root_schema_for::(), - Self::ScSpecEntry => gen.into_root_schema_for::(), - Self::ScValType => gen.into_root_schema_for::(), - Self::ScErrorType => gen.into_root_schema_for::(), - Self::ScErrorCode => gen.into_root_schema_for::(), - Self::ScError => gen.into_root_schema_for::(), - Self::UInt128Parts => gen.into_root_schema_for::(), - Self::Int128Parts => gen.into_root_schema_for::(), - Self::UInt256Parts => gen.into_root_schema_for::(), - Self::Int256Parts => gen.into_root_schema_for::(), - Self::ContractExecutableType => gen.into_root_schema_for::(), - Self::ContractExecutable => gen.into_root_schema_for::(), - Self::ScAddressType => gen.into_root_schema_for::(), - Self::MuxedEd25519Account => gen.into_root_schema_for::(), - Self::ScAddress => gen.into_root_schema_for::(), - Self::ScVec => gen.into_root_schema_for::(), - Self::ScMap => gen.into_root_schema_for::(), - Self::ScBytes => gen.into_root_schema_for::(), - Self::ScString => gen.into_root_schema_for::(), - Self::ScSymbol => gen.into_root_schema_for::(), - Self::ScNonceKey => gen.into_root_schema_for::(), - Self::ScContractInstance => gen.into_root_schema_for::(), - Self::ScVal => gen.into_root_schema_for::(), - Self::ScMapEntry => gen.into_root_schema_for::(), - Self::LedgerCloseMetaBatch => gen.into_root_schema_for::(), - Self::StoredTransactionSet => gen.into_root_schema_for::(), - Self::StoredDebugTransactionSet => { - gen.into_root_schema_for::() - } - Self::PersistedScpStateV0 => gen.into_root_schema_for::(), - Self::PersistedScpStateV1 => gen.into_root_schema_for::(), - Self::PersistedScpState => gen.into_root_schema_for::(), - Self::Thresholds => gen.into_root_schema_for::(), - Self::String32 => gen.into_root_schema_for::(), - Self::String64 => gen.into_root_schema_for::(), - Self::SequenceNumber => gen.into_root_schema_for::(), - Self::DataValue => gen.into_root_schema_for::(), - Self::AssetCode4 => gen.into_root_schema_for::(), - Self::AssetCode12 => gen.into_root_schema_for::(), - Self::AssetType => gen.into_root_schema_for::(), - Self::AssetCode => gen.into_root_schema_for::(), - Self::AlphaNum4 => gen.into_root_schema_for::(), - Self::AlphaNum12 => gen.into_root_schema_for::(), - Self::Asset => gen.into_root_schema_for::(), - Self::Price => gen.into_root_schema_for::(), - Self::Liabilities => gen.into_root_schema_for::(), - Self::ThresholdIndexes => gen.into_root_schema_for::(), - Self::LedgerEntryType => gen.into_root_schema_for::(), - Self::Signer => gen.into_root_schema_for::(), - Self::AccountFlags => gen.into_root_schema_for::(), - Self::SponsorshipDescriptor => gen.into_root_schema_for::(), - Self::AccountEntryExtensionV3 => gen.into_root_schema_for::(), - Self::AccountEntryExtensionV2 => gen.into_root_schema_for::(), - Self::AccountEntryExtensionV2Ext => { - gen.into_root_schema_for::() - } - Self::AccountEntryExtensionV1 => gen.into_root_schema_for::(), - Self::AccountEntryExtensionV1Ext => { - gen.into_root_schema_for::() - } - Self::AccountEntry => gen.into_root_schema_for::(), - Self::AccountEntryExt => gen.into_root_schema_for::(), - Self::TrustLineFlags => gen.into_root_schema_for::(), - Self::LiquidityPoolType => gen.into_root_schema_for::(), - Self::TrustLineAsset => gen.into_root_schema_for::(), - Self::TrustLineEntryExtensionV2 => { - gen.into_root_schema_for::() - } - Self::TrustLineEntryExtensionV2Ext => { - gen.into_root_schema_for::() - } - Self::TrustLineEntry => gen.into_root_schema_for::(), - Self::TrustLineEntryExt => gen.into_root_schema_for::(), - Self::TrustLineEntryV1 => gen.into_root_schema_for::(), - Self::TrustLineEntryV1Ext => gen.into_root_schema_for::(), - Self::OfferEntryFlags => gen.into_root_schema_for::(), - Self::OfferEntry => gen.into_root_schema_for::(), - Self::OfferEntryExt => gen.into_root_schema_for::(), - Self::DataEntry => gen.into_root_schema_for::(), - Self::DataEntryExt => gen.into_root_schema_for::(), - Self::ClaimPredicateType => gen.into_root_schema_for::(), - Self::ClaimPredicate => gen.into_root_schema_for::(), - Self::ClaimantType => gen.into_root_schema_for::(), - Self::Claimant => gen.into_root_schema_for::(), - Self::ClaimantV0 => gen.into_root_schema_for::(), - Self::ClaimableBalanceFlags => gen.into_root_schema_for::(), - Self::ClaimableBalanceEntryExtensionV1 => { - gen.into_root_schema_for::() - } - Self::ClaimableBalanceEntryExtensionV1Ext => { - gen.into_root_schema_for::() - } - Self::ClaimableBalanceEntry => gen.into_root_schema_for::(), - Self::ClaimableBalanceEntryExt => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolConstantProductParameters => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolEntry => gen.into_root_schema_for::(), - Self::LiquidityPoolEntryBody => gen.into_root_schema_for::(), - Self::LiquidityPoolEntryConstantProduct => { - gen.into_root_schema_for::() - } - Self::ContractDataDurability => gen.into_root_schema_for::(), - Self::ContractDataEntry => gen.into_root_schema_for::(), - Self::ContractCodeCostInputs => gen.into_root_schema_for::(), - Self::ContractCodeEntry => gen.into_root_schema_for::(), - Self::ContractCodeEntryExt => gen.into_root_schema_for::(), - Self::ContractCodeEntryV1 => gen.into_root_schema_for::(), - Self::TtlEntry => gen.into_root_schema_for::(), - Self::LedgerEntryExtensionV1 => gen.into_root_schema_for::(), - Self::LedgerEntryExtensionV1Ext => { - gen.into_root_schema_for::() - } - Self::LedgerEntry => gen.into_root_schema_for::(), - Self::LedgerEntryData => gen.into_root_schema_for::(), - Self::LedgerEntryExt => gen.into_root_schema_for::(), - Self::LedgerKey => gen.into_root_schema_for::(), - Self::LedgerKeyAccount => gen.into_root_schema_for::(), - Self::LedgerKeyTrustLine => gen.into_root_schema_for::(), - Self::LedgerKeyOffer => gen.into_root_schema_for::(), - Self::LedgerKeyData => gen.into_root_schema_for::(), - Self::LedgerKeyClaimableBalance => { - gen.into_root_schema_for::() - } - Self::LedgerKeyLiquidityPool => gen.into_root_schema_for::(), - Self::LedgerKeyContractData => gen.into_root_schema_for::(), - Self::LedgerKeyContractCode => gen.into_root_schema_for::(), - Self::LedgerKeyConfigSetting => gen.into_root_schema_for::(), - Self::LedgerKeyTtl => gen.into_root_schema_for::(), - Self::EnvelopeType => gen.into_root_schema_for::(), - Self::BucketListType => gen.into_root_schema_for::(), - Self::BucketEntryType => gen.into_root_schema_for::(), - Self::HotArchiveBucketEntryType => { - gen.into_root_schema_for::() - } - Self::BucketMetadata => gen.into_root_schema_for::(), - Self::BucketMetadataExt => gen.into_root_schema_for::(), - Self::BucketEntry => gen.into_root_schema_for::(), - Self::HotArchiveBucketEntry => gen.into_root_schema_for::(), - Self::UpgradeType => gen.into_root_schema_for::(), - Self::StellarValueType => gen.into_root_schema_for::(), - Self::LedgerCloseValueSignature => { - gen.into_root_schema_for::() - } - Self::StellarValue => gen.into_root_schema_for::(), - Self::StellarValueExt => gen.into_root_schema_for::(), - Self::LedgerHeaderFlags => gen.into_root_schema_for::(), - Self::LedgerHeaderExtensionV1 => gen.into_root_schema_for::(), - Self::LedgerHeaderExtensionV1Ext => { - gen.into_root_schema_for::() - } - Self::LedgerHeader => gen.into_root_schema_for::(), - Self::LedgerHeaderExt => gen.into_root_schema_for::(), - Self::LedgerUpgradeType => gen.into_root_schema_for::(), - Self::ConfigUpgradeSetKey => gen.into_root_schema_for::(), - Self::LedgerUpgrade => gen.into_root_schema_for::(), - Self::ConfigUpgradeSet => gen.into_root_schema_for::(), - Self::TxSetComponentType => gen.into_root_schema_for::(), - Self::DependentTxCluster => gen.into_root_schema_for::(), - Self::ParallelTxExecutionStage => { - gen.into_root_schema_for::() - } - Self::ParallelTxsComponent => gen.into_root_schema_for::(), - Self::TxSetComponent => gen.into_root_schema_for::(), - Self::TxSetComponentTxsMaybeDiscountedFee => { - gen.into_root_schema_for::() - } - Self::TransactionPhase => gen.into_root_schema_for::(), - Self::TransactionSet => gen.into_root_schema_for::(), - Self::TransactionSetV1 => gen.into_root_schema_for::(), - Self::GeneralizedTransactionSet => { - gen.into_root_schema_for::() - } - Self::TransactionResultPair => gen.into_root_schema_for::(), - Self::TransactionResultSet => gen.into_root_schema_for::(), - Self::TransactionHistoryEntry => gen.into_root_schema_for::(), - Self::TransactionHistoryEntryExt => { - gen.into_root_schema_for::() - } - Self::TransactionHistoryResultEntry => { - gen.into_root_schema_for::() - } - Self::TransactionHistoryResultEntryExt => { - gen.into_root_schema_for::() - } - Self::LedgerHeaderHistoryEntry => { - gen.into_root_schema_for::() - } - Self::LedgerHeaderHistoryEntryExt => { - gen.into_root_schema_for::() - } - Self::LedgerScpMessages => gen.into_root_schema_for::(), - Self::ScpHistoryEntryV0 => gen.into_root_schema_for::(), - Self::ScpHistoryEntry => gen.into_root_schema_for::(), - Self::LedgerEntryChangeType => gen.into_root_schema_for::(), - Self::LedgerEntryChange => gen.into_root_schema_for::(), - Self::LedgerEntryChanges => gen.into_root_schema_for::(), - Self::OperationMeta => gen.into_root_schema_for::(), - Self::TransactionMetaV1 => gen.into_root_schema_for::(), - Self::TransactionMetaV2 => gen.into_root_schema_for::(), - Self::ContractEventType => gen.into_root_schema_for::(), - Self::ContractEvent => gen.into_root_schema_for::(), - Self::ContractEventBody => gen.into_root_schema_for::(), - Self::ContractEventV0 => gen.into_root_schema_for::(), - Self::DiagnosticEvent => gen.into_root_schema_for::(), - Self::SorobanTransactionMetaExtV1 => { - gen.into_root_schema_for::() - } - Self::SorobanTransactionMetaExt => { - gen.into_root_schema_for::() - } - Self::SorobanTransactionMeta => gen.into_root_schema_for::(), - Self::TransactionMetaV3 => gen.into_root_schema_for::(), - Self::OperationMetaV2 => gen.into_root_schema_for::(), - Self::SorobanTransactionMetaV2 => { - gen.into_root_schema_for::() - } - Self::TransactionEventStage => gen.into_root_schema_for::(), - Self::TransactionEvent => gen.into_root_schema_for::(), - Self::TransactionMetaV4 => gen.into_root_schema_for::(), - Self::InvokeHostFunctionSuccessPreImage => { - gen.into_root_schema_for::() - } - Self::TransactionMeta => gen.into_root_schema_for::(), - Self::TransactionResultMeta => gen.into_root_schema_for::(), - Self::TransactionResultMetaV1 => gen.into_root_schema_for::(), - Self::UpgradeEntryMeta => gen.into_root_schema_for::(), - Self::LedgerCloseMetaV0 => gen.into_root_schema_for::(), - Self::LedgerCloseMetaExtV1 => gen.into_root_schema_for::(), - Self::LedgerCloseMetaExt => gen.into_root_schema_for::(), - Self::LedgerCloseMetaV1 => gen.into_root_schema_for::(), - Self::LedgerCloseMetaV2 => gen.into_root_schema_for::(), - Self::LedgerCloseMeta => gen.into_root_schema_for::(), - Self::ErrorCode => gen.into_root_schema_for::(), - Self::SError => gen.into_root_schema_for::(), - Self::SendMore => gen.into_root_schema_for::(), - Self::SendMoreExtended => gen.into_root_schema_for::(), - Self::AuthCert => gen.into_root_schema_for::(), - Self::Hello => gen.into_root_schema_for::(), - Self::Auth => gen.into_root_schema_for::(), - Self::IpAddrType => gen.into_root_schema_for::(), - Self::PeerAddress => gen.into_root_schema_for::(), - Self::PeerAddressIp => gen.into_root_schema_for::(), - Self::MessageType => gen.into_root_schema_for::(), - Self::DontHave => gen.into_root_schema_for::(), - Self::SurveyMessageCommandType => { - gen.into_root_schema_for::() - } - Self::SurveyMessageResponseType => { - gen.into_root_schema_for::() - } - Self::TimeSlicedSurveyStartCollectingMessage => { - gen.into_root_schema_for::() - } - Self::SignedTimeSlicedSurveyStartCollectingMessage => { - gen.into_root_schema_for::() - } - Self::TimeSlicedSurveyStopCollectingMessage => { - gen.into_root_schema_for::() - } - Self::SignedTimeSlicedSurveyStopCollectingMessage => { - gen.into_root_schema_for::() - } - Self::SurveyRequestMessage => gen.into_root_schema_for::(), - Self::TimeSlicedSurveyRequestMessage => { - gen.into_root_schema_for::() - } - Self::SignedTimeSlicedSurveyRequestMessage => { - gen.into_root_schema_for::() - } - Self::EncryptedBody => gen.into_root_schema_for::(), - Self::SurveyResponseMessage => gen.into_root_schema_for::(), - Self::TimeSlicedSurveyResponseMessage => { - gen.into_root_schema_for::() - } - Self::SignedTimeSlicedSurveyResponseMessage => { - gen.into_root_schema_for::() - } - Self::PeerStats => gen.into_root_schema_for::(), - Self::TimeSlicedNodeData => gen.into_root_schema_for::(), - Self::TimeSlicedPeerData => gen.into_root_schema_for::(), - Self::TimeSlicedPeerDataList => gen.into_root_schema_for::(), - Self::TopologyResponseBodyV2 => gen.into_root_schema_for::(), - Self::SurveyResponseBody => gen.into_root_schema_for::(), - Self::TxAdvertVector => gen.into_root_schema_for::(), - Self::FloodAdvert => gen.into_root_schema_for::(), - Self::TxDemandVector => gen.into_root_schema_for::(), - Self::FloodDemand => gen.into_root_schema_for::(), - Self::StellarMessage => gen.into_root_schema_for::(), - Self::AuthenticatedMessage => gen.into_root_schema_for::(), - Self::AuthenticatedMessageV0 => gen.into_root_schema_for::(), - Self::LiquidityPoolParameters => gen.into_root_schema_for::(), - Self::MuxedAccount => gen.into_root_schema_for::(), - Self::MuxedAccountMed25519 => gen.into_root_schema_for::(), - Self::DecoratedSignature => gen.into_root_schema_for::(), - Self::OperationType => gen.into_root_schema_for::(), - Self::CreateAccountOp => gen.into_root_schema_for::(), - Self::PaymentOp => gen.into_root_schema_for::(), - Self::PathPaymentStrictReceiveOp => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictSendOp => gen.into_root_schema_for::(), - Self::ManageSellOfferOp => gen.into_root_schema_for::(), - Self::ManageBuyOfferOp => gen.into_root_schema_for::(), - Self::CreatePassiveSellOfferOp => { - gen.into_root_schema_for::() - } - Self::SetOptionsOp => gen.into_root_schema_for::(), - Self::ChangeTrustAsset => gen.into_root_schema_for::(), - Self::ChangeTrustOp => gen.into_root_schema_for::(), - Self::AllowTrustOp => gen.into_root_schema_for::(), - Self::ManageDataOp => gen.into_root_schema_for::(), - Self::BumpSequenceOp => gen.into_root_schema_for::(), - Self::CreateClaimableBalanceOp => { - gen.into_root_schema_for::() - } - Self::ClaimClaimableBalanceOp => gen.into_root_schema_for::(), - Self::BeginSponsoringFutureReservesOp => { - gen.into_root_schema_for::() - } - Self::RevokeSponsorshipType => gen.into_root_schema_for::(), - Self::RevokeSponsorshipOp => gen.into_root_schema_for::(), - Self::RevokeSponsorshipOpSigner => { - gen.into_root_schema_for::() - } - Self::ClawbackOp => gen.into_root_schema_for::(), - Self::ClawbackClaimableBalanceOp => { - gen.into_root_schema_for::() - } - Self::SetTrustLineFlagsOp => gen.into_root_schema_for::(), - Self::LiquidityPoolDepositOp => gen.into_root_schema_for::(), - Self::LiquidityPoolWithdrawOp => gen.into_root_schema_for::(), - Self::HostFunctionType => gen.into_root_schema_for::(), - Self::ContractIdPreimageType => gen.into_root_schema_for::(), - Self::ContractIdPreimage => gen.into_root_schema_for::(), - Self::ContractIdPreimageFromAddress => { - gen.into_root_schema_for::() - } - Self::CreateContractArgs => gen.into_root_schema_for::(), - Self::CreateContractArgsV2 => gen.into_root_schema_for::(), - Self::InvokeContractArgs => gen.into_root_schema_for::(), - Self::HostFunction => gen.into_root_schema_for::(), - Self::SorobanAuthorizedFunctionType => { - gen.into_root_schema_for::() - } - Self::SorobanAuthorizedFunction => { - gen.into_root_schema_for::() - } - Self::SorobanAuthorizedInvocation => { - gen.into_root_schema_for::() - } - Self::SorobanAddressCredentials => { - gen.into_root_schema_for::() - } - Self::SorobanCredentialsType => gen.into_root_schema_for::(), - Self::SorobanCredentials => gen.into_root_schema_for::(), - Self::SorobanAuthorizationEntry => { - gen.into_root_schema_for::() - } - Self::SorobanAuthorizationEntries => { - gen.into_root_schema_for::() - } - Self::InvokeHostFunctionOp => gen.into_root_schema_for::(), - Self::ExtendFootprintTtlOp => gen.into_root_schema_for::(), - Self::RestoreFootprintOp => gen.into_root_schema_for::(), - Self::Operation => gen.into_root_schema_for::(), - Self::OperationBody => gen.into_root_schema_for::(), - Self::HashIdPreimage => gen.into_root_schema_for::(), - Self::HashIdPreimageOperationId => { - gen.into_root_schema_for::() - } - Self::HashIdPreimageRevokeId => gen.into_root_schema_for::(), - Self::HashIdPreimageContractId => { - gen.into_root_schema_for::() - } - Self::HashIdPreimageSorobanAuthorization => { - gen.into_root_schema_for::() - } - Self::MemoType => gen.into_root_schema_for::(), - Self::Memo => gen.into_root_schema_for::(), - Self::TimeBounds => gen.into_root_schema_for::(), - Self::LedgerBounds => gen.into_root_schema_for::(), - Self::PreconditionsV2 => gen.into_root_schema_for::(), - Self::PreconditionType => gen.into_root_schema_for::(), - Self::Preconditions => gen.into_root_schema_for::(), - Self::LedgerFootprint => gen.into_root_schema_for::(), - Self::SorobanResources => gen.into_root_schema_for::(), - Self::SorobanResourcesExtV0 => gen.into_root_schema_for::(), - Self::SorobanTransactionData => gen.into_root_schema_for::(), - Self::SorobanTransactionDataExt => { - gen.into_root_schema_for::() - } - Self::TransactionV0 => gen.into_root_schema_for::(), - Self::TransactionV0Ext => gen.into_root_schema_for::(), - Self::TransactionV0Envelope => gen.into_root_schema_for::(), - Self::Transaction => gen.into_root_schema_for::(), - Self::TransactionExt => gen.into_root_schema_for::(), - Self::TransactionV1Envelope => gen.into_root_schema_for::(), - Self::FeeBumpTransaction => gen.into_root_schema_for::(), - Self::FeeBumpTransactionInnerTx => { - gen.into_root_schema_for::() - } - Self::FeeBumpTransactionExt => gen.into_root_schema_for::(), - Self::FeeBumpTransactionEnvelope => { - gen.into_root_schema_for::() - } - Self::TransactionEnvelope => gen.into_root_schema_for::(), - Self::TransactionSignaturePayload => { - gen.into_root_schema_for::() - } - Self::TransactionSignaturePayloadTaggedTransaction => { - gen.into_root_schema_for::() - } - Self::ClaimAtomType => gen.into_root_schema_for::(), - Self::ClaimOfferAtomV0 => gen.into_root_schema_for::(), - Self::ClaimOfferAtom => gen.into_root_schema_for::(), - Self::ClaimLiquidityAtom => gen.into_root_schema_for::(), - Self::ClaimAtom => gen.into_root_schema_for::(), - Self::CreateAccountResultCode => gen.into_root_schema_for::(), - Self::CreateAccountResult => gen.into_root_schema_for::(), - Self::PaymentResultCode => gen.into_root_schema_for::(), - Self::PaymentResult => gen.into_root_schema_for::(), - Self::PathPaymentStrictReceiveResultCode => { - gen.into_root_schema_for::() - } - Self::SimplePaymentResult => gen.into_root_schema_for::(), - Self::PathPaymentStrictReceiveResult => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictReceiveResultSuccess => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictSendResultCode => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictSendResult => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictSendResultSuccess => { - gen.into_root_schema_for::() - } - Self::ManageSellOfferResultCode => { - gen.into_root_schema_for::() - } - Self::ManageOfferEffect => gen.into_root_schema_for::(), - Self::ManageOfferSuccessResult => { - gen.into_root_schema_for::() - } - Self::ManageOfferSuccessResultOffer => { - gen.into_root_schema_for::() - } - Self::ManageSellOfferResult => gen.into_root_schema_for::(), - Self::ManageBuyOfferResultCode => { - gen.into_root_schema_for::() - } - Self::ManageBuyOfferResult => gen.into_root_schema_for::(), - Self::SetOptionsResultCode => gen.into_root_schema_for::(), - Self::SetOptionsResult => gen.into_root_schema_for::(), - Self::ChangeTrustResultCode => gen.into_root_schema_for::(), - Self::ChangeTrustResult => gen.into_root_schema_for::(), - Self::AllowTrustResultCode => gen.into_root_schema_for::(), - Self::AllowTrustResult => gen.into_root_schema_for::(), - Self::AccountMergeResultCode => gen.into_root_schema_for::(), - Self::AccountMergeResult => gen.into_root_schema_for::(), - Self::InflationResultCode => gen.into_root_schema_for::(), - Self::InflationPayout => gen.into_root_schema_for::(), - Self::InflationResult => gen.into_root_schema_for::(), - Self::ManageDataResultCode => gen.into_root_schema_for::(), - Self::ManageDataResult => gen.into_root_schema_for::(), - Self::BumpSequenceResultCode => gen.into_root_schema_for::(), - Self::BumpSequenceResult => gen.into_root_schema_for::(), - Self::CreateClaimableBalanceResultCode => { - gen.into_root_schema_for::() - } - Self::CreateClaimableBalanceResult => { - gen.into_root_schema_for::() - } - Self::ClaimClaimableBalanceResultCode => { - gen.into_root_schema_for::() - } - Self::ClaimClaimableBalanceResult => { - gen.into_root_schema_for::() - } - Self::BeginSponsoringFutureReservesResultCode => { - gen.into_root_schema_for::() - } - Self::BeginSponsoringFutureReservesResult => { - gen.into_root_schema_for::() - } - Self::EndSponsoringFutureReservesResultCode => { - gen.into_root_schema_for::() - } - Self::EndSponsoringFutureReservesResult => { - gen.into_root_schema_for::() - } - Self::RevokeSponsorshipResultCode => { - gen.into_root_schema_for::() - } - Self::RevokeSponsorshipResult => gen.into_root_schema_for::(), - Self::ClawbackResultCode => gen.into_root_schema_for::(), - Self::ClawbackResult => gen.into_root_schema_for::(), - Self::ClawbackClaimableBalanceResultCode => { - gen.into_root_schema_for::() - } - Self::ClawbackClaimableBalanceResult => { - gen.into_root_schema_for::() - } - Self::SetTrustLineFlagsResultCode => { - gen.into_root_schema_for::() - } - Self::SetTrustLineFlagsResult => gen.into_root_schema_for::(), - Self::LiquidityPoolDepositResultCode => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolDepositResult => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolWithdrawResultCode => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolWithdrawResult => { - gen.into_root_schema_for::() - } - Self::InvokeHostFunctionResultCode => { - gen.into_root_schema_for::() - } - Self::InvokeHostFunctionResult => { - gen.into_root_schema_for::() - } - Self::ExtendFootprintTtlResultCode => { - gen.into_root_schema_for::() - } - Self::ExtendFootprintTtlResult => { - gen.into_root_schema_for::() - } - Self::RestoreFootprintResultCode => { - gen.into_root_schema_for::() - } - Self::RestoreFootprintResult => gen.into_root_schema_for::(), - Self::OperationResultCode => gen.into_root_schema_for::(), - Self::OperationResult => gen.into_root_schema_for::(), - Self::OperationResultTr => gen.into_root_schema_for::(), - Self::TransactionResultCode => gen.into_root_schema_for::(), - Self::InnerTransactionResult => gen.into_root_schema_for::(), - Self::InnerTransactionResultResult => { - gen.into_root_schema_for::() - } - Self::InnerTransactionResultExt => { - gen.into_root_schema_for::() - } - Self::InnerTransactionResultPair => { - gen.into_root_schema_for::() - } - Self::TransactionResult => gen.into_root_schema_for::(), - Self::TransactionResultResult => gen.into_root_schema_for::(), - Self::TransactionResultExt => gen.into_root_schema_for::(), - Self::Hash => gen.into_root_schema_for::(), - Self::Uint256 => gen.into_root_schema_for::(), - Self::Uint32 => gen.into_root_schema_for::(), - Self::Int32 => gen.into_root_schema_for::(), - Self::Uint64 => gen.into_root_schema_for::(), - Self::Int64 => gen.into_root_schema_for::(), - Self::TimePoint => gen.into_root_schema_for::(), - Self::Duration => gen.into_root_schema_for::(), - Self::ExtensionPoint => gen.into_root_schema_for::(), - Self::CryptoKeyType => gen.into_root_schema_for::(), - Self::PublicKeyType => gen.into_root_schema_for::(), - Self::SignerKeyType => gen.into_root_schema_for::(), - Self::PublicKey => gen.into_root_schema_for::(), - Self::SignerKey => gen.into_root_schema_for::(), - Self::SignerKeyEd25519SignedPayload => { - gen.into_root_schema_for::() - } - Self::Signature => gen.into_root_schema_for::(), - Self::SignatureHint => gen.into_root_schema_for::(), - Self::NodeId => gen.into_root_schema_for::(), - Self::AccountId => gen.into_root_schema_for::(), - Self::ContractId => gen.into_root_schema_for::(), - Self::Curve25519Secret => gen.into_root_schema_for::(), - Self::Curve25519Public => gen.into_root_schema_for::(), - Self::HmacSha256Key => gen.into_root_schema_for::(), - Self::HmacSha256Mac => gen.into_root_schema_for::(), - Self::ShortHashSeed => gen.into_root_schema_for::(), - Self::BinaryFuseFilterType => gen.into_root_schema_for::(), - Self::SerializedBinaryFuseFilter => { - gen.into_root_schema_for::() - } - Self::PoolId => gen.into_root_schema_for::(), - Self::ClaimableBalanceIdType => gen.into_root_schema_for::(), - Self::ClaimableBalanceId => gen.into_root_schema_for::(), - } - } -} - -impl Name for TypeVariant { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for TypeVariant { - fn variants() -> slice::Iter<'static, TypeVariant> { - Self::VARIANTS.iter() - } -} - -impl core::str::FromStr for TypeVariant { - type Err = Error; - #[allow(clippy::too_many_lines)] - fn from_str(s: &str) -> Result { - match s { - "Value" => Ok(Self::Value), - "ScpBallot" => Ok(Self::ScpBallot), - "ScpStatementType" => Ok(Self::ScpStatementType), - "ScpNomination" => Ok(Self::ScpNomination), - "ScpStatement" => Ok(Self::ScpStatement), - "ScpStatementPledges" => Ok(Self::ScpStatementPledges), - "ScpStatementPrepare" => Ok(Self::ScpStatementPrepare), - "ScpStatementConfirm" => Ok(Self::ScpStatementConfirm), - "ScpStatementExternalize" => Ok(Self::ScpStatementExternalize), - "ScpEnvelope" => Ok(Self::ScpEnvelope), - "ScpQuorumSet" => Ok(Self::ScpQuorumSet), - "EncodedLedgerKey" => Ok(Self::EncodedLedgerKey), - "ConfigSettingContractExecutionLanesV0" => { - Ok(Self::ConfigSettingContractExecutionLanesV0) - } - "ConfigSettingContractComputeV0" => Ok(Self::ConfigSettingContractComputeV0), - "ConfigSettingContractParallelComputeV0" => { - Ok(Self::ConfigSettingContractParallelComputeV0) - } - "ConfigSettingContractLedgerCostV0" => Ok(Self::ConfigSettingContractLedgerCostV0), - "ConfigSettingContractLedgerCostExtV0" => { - Ok(Self::ConfigSettingContractLedgerCostExtV0) - } - "ConfigSettingContractHistoricalDataV0" => { - Ok(Self::ConfigSettingContractHistoricalDataV0) - } - "ConfigSettingContractEventsV0" => Ok(Self::ConfigSettingContractEventsV0), - "ConfigSettingContractBandwidthV0" => Ok(Self::ConfigSettingContractBandwidthV0), - "ContractCostType" => Ok(Self::ContractCostType), - "ContractCostParamEntry" => Ok(Self::ContractCostParamEntry), - "StateArchivalSettings" => Ok(Self::StateArchivalSettings), - "EvictionIterator" => Ok(Self::EvictionIterator), - "ConfigSettingScpTiming" => Ok(Self::ConfigSettingScpTiming), - "FrozenLedgerKeys" => Ok(Self::FrozenLedgerKeys), - "FrozenLedgerKeysDelta" => Ok(Self::FrozenLedgerKeysDelta), - "FreezeBypassTxs" => Ok(Self::FreezeBypassTxs), - "FreezeBypassTxsDelta" => Ok(Self::FreezeBypassTxsDelta), - "ContractCostParams" => Ok(Self::ContractCostParams), - "ConfigSettingId" => Ok(Self::ConfigSettingId), - "ConfigSettingEntry" => Ok(Self::ConfigSettingEntry), - "ScEnvMetaKind" => Ok(Self::ScEnvMetaKind), - "ScEnvMetaEntry" => Ok(Self::ScEnvMetaEntry), - "ScEnvMetaEntryInterfaceVersion" => Ok(Self::ScEnvMetaEntryInterfaceVersion), - "ScMetaV0" => Ok(Self::ScMetaV0), - "ScMetaKind" => Ok(Self::ScMetaKind), - "ScMetaEntry" => Ok(Self::ScMetaEntry), - "ScSpecType" => Ok(Self::ScSpecType), - "ScSpecTypeOption" => Ok(Self::ScSpecTypeOption), - "ScSpecTypeResult" => Ok(Self::ScSpecTypeResult), - "ScSpecTypeVec" => Ok(Self::ScSpecTypeVec), - "ScSpecTypeMap" => Ok(Self::ScSpecTypeMap), - "ScSpecTypeTuple" => Ok(Self::ScSpecTypeTuple), - "ScSpecTypeBytesN" => Ok(Self::ScSpecTypeBytesN), - "ScSpecTypeUdt" => Ok(Self::ScSpecTypeUdt), - "ScSpecTypeDef" => Ok(Self::ScSpecTypeDef), - "ScSpecUdtStructFieldV0" => Ok(Self::ScSpecUdtStructFieldV0), - "ScSpecUdtStructV0" => Ok(Self::ScSpecUdtStructV0), - "ScSpecUdtUnionCaseVoidV0" => Ok(Self::ScSpecUdtUnionCaseVoidV0), - "ScSpecUdtUnionCaseTupleV0" => Ok(Self::ScSpecUdtUnionCaseTupleV0), - "ScSpecUdtUnionCaseV0Kind" => Ok(Self::ScSpecUdtUnionCaseV0Kind), - "ScSpecUdtUnionCaseV0" => Ok(Self::ScSpecUdtUnionCaseV0), - "ScSpecUdtUnionV0" => Ok(Self::ScSpecUdtUnionV0), - "ScSpecUdtEnumCaseV0" => Ok(Self::ScSpecUdtEnumCaseV0), - "ScSpecUdtEnumV0" => Ok(Self::ScSpecUdtEnumV0), - "ScSpecUdtErrorEnumCaseV0" => Ok(Self::ScSpecUdtErrorEnumCaseV0), - "ScSpecUdtErrorEnumV0" => Ok(Self::ScSpecUdtErrorEnumV0), - "ScSpecFunctionInputV0" => Ok(Self::ScSpecFunctionInputV0), - "ScSpecFunctionV0" => Ok(Self::ScSpecFunctionV0), - "ScSpecEventParamLocationV0" => Ok(Self::ScSpecEventParamLocationV0), - "ScSpecEventParamV0" => Ok(Self::ScSpecEventParamV0), - "ScSpecEventDataFormat" => Ok(Self::ScSpecEventDataFormat), - "ScSpecEventV0" => Ok(Self::ScSpecEventV0), - "ScSpecEntryKind" => Ok(Self::ScSpecEntryKind), - "ScSpecEntry" => Ok(Self::ScSpecEntry), - "ScValType" => Ok(Self::ScValType), - "ScErrorType" => Ok(Self::ScErrorType), - "ScErrorCode" => Ok(Self::ScErrorCode), - "ScError" => Ok(Self::ScError), - "UInt128Parts" => Ok(Self::UInt128Parts), - "Int128Parts" => Ok(Self::Int128Parts), - "UInt256Parts" => Ok(Self::UInt256Parts), - "Int256Parts" => Ok(Self::Int256Parts), - "ContractExecutableType" => Ok(Self::ContractExecutableType), - "ContractExecutable" => Ok(Self::ContractExecutable), - "ScAddressType" => Ok(Self::ScAddressType), - "MuxedEd25519Account" => Ok(Self::MuxedEd25519Account), - "ScAddress" => Ok(Self::ScAddress), - "ScVec" => Ok(Self::ScVec), - "ScMap" => Ok(Self::ScMap), - "ScBytes" => Ok(Self::ScBytes), - "ScString" => Ok(Self::ScString), - "ScSymbol" => Ok(Self::ScSymbol), - "ScNonceKey" => Ok(Self::ScNonceKey), - "ScContractInstance" => Ok(Self::ScContractInstance), - "ScVal" => Ok(Self::ScVal), - "ScMapEntry" => Ok(Self::ScMapEntry), - "LedgerCloseMetaBatch" => Ok(Self::LedgerCloseMetaBatch), - "StoredTransactionSet" => Ok(Self::StoredTransactionSet), - "StoredDebugTransactionSet" => Ok(Self::StoredDebugTransactionSet), - "PersistedScpStateV0" => Ok(Self::PersistedScpStateV0), - "PersistedScpStateV1" => Ok(Self::PersistedScpStateV1), - "PersistedScpState" => Ok(Self::PersistedScpState), - "Thresholds" => Ok(Self::Thresholds), - "String32" => Ok(Self::String32), - "String64" => Ok(Self::String64), - "SequenceNumber" => Ok(Self::SequenceNumber), - "DataValue" => Ok(Self::DataValue), - "AssetCode4" => Ok(Self::AssetCode4), - "AssetCode12" => Ok(Self::AssetCode12), - "AssetType" => Ok(Self::AssetType), - "AssetCode" => Ok(Self::AssetCode), - "AlphaNum4" => Ok(Self::AlphaNum4), - "AlphaNum12" => Ok(Self::AlphaNum12), - "Asset" => Ok(Self::Asset), - "Price" => Ok(Self::Price), - "Liabilities" => Ok(Self::Liabilities), - "ThresholdIndexes" => Ok(Self::ThresholdIndexes), - "LedgerEntryType" => Ok(Self::LedgerEntryType), - "Signer" => Ok(Self::Signer), - "AccountFlags" => Ok(Self::AccountFlags), - "SponsorshipDescriptor" => Ok(Self::SponsorshipDescriptor), - "AccountEntryExtensionV3" => Ok(Self::AccountEntryExtensionV3), - "AccountEntryExtensionV2" => Ok(Self::AccountEntryExtensionV2), - "AccountEntryExtensionV2Ext" => Ok(Self::AccountEntryExtensionV2Ext), - "AccountEntryExtensionV1" => Ok(Self::AccountEntryExtensionV1), - "AccountEntryExtensionV1Ext" => Ok(Self::AccountEntryExtensionV1Ext), - "AccountEntry" => Ok(Self::AccountEntry), - "AccountEntryExt" => Ok(Self::AccountEntryExt), - "TrustLineFlags" => Ok(Self::TrustLineFlags), - "LiquidityPoolType" => Ok(Self::LiquidityPoolType), - "TrustLineAsset" => Ok(Self::TrustLineAsset), - "TrustLineEntryExtensionV2" => Ok(Self::TrustLineEntryExtensionV2), - "TrustLineEntryExtensionV2Ext" => Ok(Self::TrustLineEntryExtensionV2Ext), - "TrustLineEntry" => Ok(Self::TrustLineEntry), - "TrustLineEntryExt" => Ok(Self::TrustLineEntryExt), - "TrustLineEntryV1" => Ok(Self::TrustLineEntryV1), - "TrustLineEntryV1Ext" => Ok(Self::TrustLineEntryV1Ext), - "OfferEntryFlags" => Ok(Self::OfferEntryFlags), - "OfferEntry" => Ok(Self::OfferEntry), - "OfferEntryExt" => Ok(Self::OfferEntryExt), - "DataEntry" => Ok(Self::DataEntry), - "DataEntryExt" => Ok(Self::DataEntryExt), - "ClaimPredicateType" => Ok(Self::ClaimPredicateType), - "ClaimPredicate" => Ok(Self::ClaimPredicate), - "ClaimantType" => Ok(Self::ClaimantType), - "Claimant" => Ok(Self::Claimant), - "ClaimantV0" => Ok(Self::ClaimantV0), - "ClaimableBalanceFlags" => Ok(Self::ClaimableBalanceFlags), - "ClaimableBalanceEntryExtensionV1" => Ok(Self::ClaimableBalanceEntryExtensionV1), - "ClaimableBalanceEntryExtensionV1Ext" => Ok(Self::ClaimableBalanceEntryExtensionV1Ext), - "ClaimableBalanceEntry" => Ok(Self::ClaimableBalanceEntry), - "ClaimableBalanceEntryExt" => Ok(Self::ClaimableBalanceEntryExt), - "LiquidityPoolConstantProductParameters" => { - Ok(Self::LiquidityPoolConstantProductParameters) - } - "LiquidityPoolEntry" => Ok(Self::LiquidityPoolEntry), - "LiquidityPoolEntryBody" => Ok(Self::LiquidityPoolEntryBody), - "LiquidityPoolEntryConstantProduct" => Ok(Self::LiquidityPoolEntryConstantProduct), - "ContractDataDurability" => Ok(Self::ContractDataDurability), - "ContractDataEntry" => Ok(Self::ContractDataEntry), - "ContractCodeCostInputs" => Ok(Self::ContractCodeCostInputs), - "ContractCodeEntry" => Ok(Self::ContractCodeEntry), - "ContractCodeEntryExt" => Ok(Self::ContractCodeEntryExt), - "ContractCodeEntryV1" => Ok(Self::ContractCodeEntryV1), - "TtlEntry" => Ok(Self::TtlEntry), - "LedgerEntryExtensionV1" => Ok(Self::LedgerEntryExtensionV1), - "LedgerEntryExtensionV1Ext" => Ok(Self::LedgerEntryExtensionV1Ext), - "LedgerEntry" => Ok(Self::LedgerEntry), - "LedgerEntryData" => Ok(Self::LedgerEntryData), - "LedgerEntryExt" => Ok(Self::LedgerEntryExt), - "LedgerKey" => Ok(Self::LedgerKey), - "LedgerKeyAccount" => Ok(Self::LedgerKeyAccount), - "LedgerKeyTrustLine" => Ok(Self::LedgerKeyTrustLine), - "LedgerKeyOffer" => Ok(Self::LedgerKeyOffer), - "LedgerKeyData" => Ok(Self::LedgerKeyData), - "LedgerKeyClaimableBalance" => Ok(Self::LedgerKeyClaimableBalance), - "LedgerKeyLiquidityPool" => Ok(Self::LedgerKeyLiquidityPool), - "LedgerKeyContractData" => Ok(Self::LedgerKeyContractData), - "LedgerKeyContractCode" => Ok(Self::LedgerKeyContractCode), - "LedgerKeyConfigSetting" => Ok(Self::LedgerKeyConfigSetting), - "LedgerKeyTtl" => Ok(Self::LedgerKeyTtl), - "EnvelopeType" => Ok(Self::EnvelopeType), - "BucketListType" => Ok(Self::BucketListType), - "BucketEntryType" => Ok(Self::BucketEntryType), - "HotArchiveBucketEntryType" => Ok(Self::HotArchiveBucketEntryType), - "BucketMetadata" => Ok(Self::BucketMetadata), - "BucketMetadataExt" => Ok(Self::BucketMetadataExt), - "BucketEntry" => Ok(Self::BucketEntry), - "HotArchiveBucketEntry" => Ok(Self::HotArchiveBucketEntry), - "UpgradeType" => Ok(Self::UpgradeType), - "StellarValueType" => Ok(Self::StellarValueType), - "LedgerCloseValueSignature" => Ok(Self::LedgerCloseValueSignature), - "StellarValue" => Ok(Self::StellarValue), - "StellarValueExt" => Ok(Self::StellarValueExt), - "LedgerHeaderFlags" => Ok(Self::LedgerHeaderFlags), - "LedgerHeaderExtensionV1" => Ok(Self::LedgerHeaderExtensionV1), - "LedgerHeaderExtensionV1Ext" => Ok(Self::LedgerHeaderExtensionV1Ext), - "LedgerHeader" => Ok(Self::LedgerHeader), - "LedgerHeaderExt" => Ok(Self::LedgerHeaderExt), - "LedgerUpgradeType" => Ok(Self::LedgerUpgradeType), - "ConfigUpgradeSetKey" => Ok(Self::ConfigUpgradeSetKey), - "LedgerUpgrade" => Ok(Self::LedgerUpgrade), - "ConfigUpgradeSet" => Ok(Self::ConfigUpgradeSet), - "TxSetComponentType" => Ok(Self::TxSetComponentType), - "DependentTxCluster" => Ok(Self::DependentTxCluster), - "ParallelTxExecutionStage" => Ok(Self::ParallelTxExecutionStage), - "ParallelTxsComponent" => Ok(Self::ParallelTxsComponent), - "TxSetComponent" => Ok(Self::TxSetComponent), - "TxSetComponentTxsMaybeDiscountedFee" => Ok(Self::TxSetComponentTxsMaybeDiscountedFee), - "TransactionPhase" => Ok(Self::TransactionPhase), - "TransactionSet" => Ok(Self::TransactionSet), - "TransactionSetV1" => Ok(Self::TransactionSetV1), - "GeneralizedTransactionSet" => Ok(Self::GeneralizedTransactionSet), - "TransactionResultPair" => Ok(Self::TransactionResultPair), - "TransactionResultSet" => Ok(Self::TransactionResultSet), - "TransactionHistoryEntry" => Ok(Self::TransactionHistoryEntry), - "TransactionHistoryEntryExt" => Ok(Self::TransactionHistoryEntryExt), - "TransactionHistoryResultEntry" => Ok(Self::TransactionHistoryResultEntry), - "TransactionHistoryResultEntryExt" => Ok(Self::TransactionHistoryResultEntryExt), - "LedgerHeaderHistoryEntry" => Ok(Self::LedgerHeaderHistoryEntry), - "LedgerHeaderHistoryEntryExt" => Ok(Self::LedgerHeaderHistoryEntryExt), - "LedgerScpMessages" => Ok(Self::LedgerScpMessages), - "ScpHistoryEntryV0" => Ok(Self::ScpHistoryEntryV0), - "ScpHistoryEntry" => Ok(Self::ScpHistoryEntry), - "LedgerEntryChangeType" => Ok(Self::LedgerEntryChangeType), - "LedgerEntryChange" => Ok(Self::LedgerEntryChange), - "LedgerEntryChanges" => Ok(Self::LedgerEntryChanges), - "OperationMeta" => Ok(Self::OperationMeta), - "TransactionMetaV1" => Ok(Self::TransactionMetaV1), - "TransactionMetaV2" => Ok(Self::TransactionMetaV2), - "ContractEventType" => Ok(Self::ContractEventType), - "ContractEvent" => Ok(Self::ContractEvent), - "ContractEventBody" => Ok(Self::ContractEventBody), - "ContractEventV0" => Ok(Self::ContractEventV0), - "DiagnosticEvent" => Ok(Self::DiagnosticEvent), - "SorobanTransactionMetaExtV1" => Ok(Self::SorobanTransactionMetaExtV1), - "SorobanTransactionMetaExt" => Ok(Self::SorobanTransactionMetaExt), - "SorobanTransactionMeta" => Ok(Self::SorobanTransactionMeta), - "TransactionMetaV3" => Ok(Self::TransactionMetaV3), - "OperationMetaV2" => Ok(Self::OperationMetaV2), - "SorobanTransactionMetaV2" => Ok(Self::SorobanTransactionMetaV2), - "TransactionEventStage" => Ok(Self::TransactionEventStage), - "TransactionEvent" => Ok(Self::TransactionEvent), - "TransactionMetaV4" => Ok(Self::TransactionMetaV4), - "InvokeHostFunctionSuccessPreImage" => Ok(Self::InvokeHostFunctionSuccessPreImage), - "TransactionMeta" => Ok(Self::TransactionMeta), - "TransactionResultMeta" => Ok(Self::TransactionResultMeta), - "TransactionResultMetaV1" => Ok(Self::TransactionResultMetaV1), - "UpgradeEntryMeta" => Ok(Self::UpgradeEntryMeta), - "LedgerCloseMetaV0" => Ok(Self::LedgerCloseMetaV0), - "LedgerCloseMetaExtV1" => Ok(Self::LedgerCloseMetaExtV1), - "LedgerCloseMetaExt" => Ok(Self::LedgerCloseMetaExt), - "LedgerCloseMetaV1" => Ok(Self::LedgerCloseMetaV1), - "LedgerCloseMetaV2" => Ok(Self::LedgerCloseMetaV2), - "LedgerCloseMeta" => Ok(Self::LedgerCloseMeta), - "ErrorCode" => Ok(Self::ErrorCode), - "SError" => Ok(Self::SError), - "SendMore" => Ok(Self::SendMore), - "SendMoreExtended" => Ok(Self::SendMoreExtended), - "AuthCert" => Ok(Self::AuthCert), - "Hello" => Ok(Self::Hello), - "Auth" => Ok(Self::Auth), - "IpAddrType" => Ok(Self::IpAddrType), - "PeerAddress" => Ok(Self::PeerAddress), - "PeerAddressIp" => Ok(Self::PeerAddressIp), - "MessageType" => Ok(Self::MessageType), - "DontHave" => Ok(Self::DontHave), - "SurveyMessageCommandType" => Ok(Self::SurveyMessageCommandType), - "SurveyMessageResponseType" => Ok(Self::SurveyMessageResponseType), - "TimeSlicedSurveyStartCollectingMessage" => { - Ok(Self::TimeSlicedSurveyStartCollectingMessage) - } - "SignedTimeSlicedSurveyStartCollectingMessage" => { - Ok(Self::SignedTimeSlicedSurveyStartCollectingMessage) - } - "TimeSlicedSurveyStopCollectingMessage" => { - Ok(Self::TimeSlicedSurveyStopCollectingMessage) - } - "SignedTimeSlicedSurveyStopCollectingMessage" => { - Ok(Self::SignedTimeSlicedSurveyStopCollectingMessage) - } - "SurveyRequestMessage" => Ok(Self::SurveyRequestMessage), - "TimeSlicedSurveyRequestMessage" => Ok(Self::TimeSlicedSurveyRequestMessage), - "SignedTimeSlicedSurveyRequestMessage" => { - Ok(Self::SignedTimeSlicedSurveyRequestMessage) - } - "EncryptedBody" => Ok(Self::EncryptedBody), - "SurveyResponseMessage" => Ok(Self::SurveyResponseMessage), - "TimeSlicedSurveyResponseMessage" => Ok(Self::TimeSlicedSurveyResponseMessage), - "SignedTimeSlicedSurveyResponseMessage" => { - Ok(Self::SignedTimeSlicedSurveyResponseMessage) - } - "PeerStats" => Ok(Self::PeerStats), - "TimeSlicedNodeData" => Ok(Self::TimeSlicedNodeData), - "TimeSlicedPeerData" => Ok(Self::TimeSlicedPeerData), - "TimeSlicedPeerDataList" => Ok(Self::TimeSlicedPeerDataList), - "TopologyResponseBodyV2" => Ok(Self::TopologyResponseBodyV2), - "SurveyResponseBody" => Ok(Self::SurveyResponseBody), - "TxAdvertVector" => Ok(Self::TxAdvertVector), - "FloodAdvert" => Ok(Self::FloodAdvert), - "TxDemandVector" => Ok(Self::TxDemandVector), - "FloodDemand" => Ok(Self::FloodDemand), - "StellarMessage" => Ok(Self::StellarMessage), - "AuthenticatedMessage" => Ok(Self::AuthenticatedMessage), - "AuthenticatedMessageV0" => Ok(Self::AuthenticatedMessageV0), - "LiquidityPoolParameters" => Ok(Self::LiquidityPoolParameters), - "MuxedAccount" => Ok(Self::MuxedAccount), - "MuxedAccountMed25519" => Ok(Self::MuxedAccountMed25519), - "DecoratedSignature" => Ok(Self::DecoratedSignature), - "OperationType" => Ok(Self::OperationType), - "CreateAccountOp" => Ok(Self::CreateAccountOp), - "PaymentOp" => Ok(Self::PaymentOp), - "PathPaymentStrictReceiveOp" => Ok(Self::PathPaymentStrictReceiveOp), - "PathPaymentStrictSendOp" => Ok(Self::PathPaymentStrictSendOp), - "ManageSellOfferOp" => Ok(Self::ManageSellOfferOp), - "ManageBuyOfferOp" => Ok(Self::ManageBuyOfferOp), - "CreatePassiveSellOfferOp" => Ok(Self::CreatePassiveSellOfferOp), - "SetOptionsOp" => Ok(Self::SetOptionsOp), - "ChangeTrustAsset" => Ok(Self::ChangeTrustAsset), - "ChangeTrustOp" => Ok(Self::ChangeTrustOp), - "AllowTrustOp" => Ok(Self::AllowTrustOp), - "ManageDataOp" => Ok(Self::ManageDataOp), - "BumpSequenceOp" => Ok(Self::BumpSequenceOp), - "CreateClaimableBalanceOp" => Ok(Self::CreateClaimableBalanceOp), - "ClaimClaimableBalanceOp" => Ok(Self::ClaimClaimableBalanceOp), - "BeginSponsoringFutureReservesOp" => Ok(Self::BeginSponsoringFutureReservesOp), - "RevokeSponsorshipType" => Ok(Self::RevokeSponsorshipType), - "RevokeSponsorshipOp" => Ok(Self::RevokeSponsorshipOp), - "RevokeSponsorshipOpSigner" => Ok(Self::RevokeSponsorshipOpSigner), - "ClawbackOp" => Ok(Self::ClawbackOp), - "ClawbackClaimableBalanceOp" => Ok(Self::ClawbackClaimableBalanceOp), - "SetTrustLineFlagsOp" => Ok(Self::SetTrustLineFlagsOp), - "LiquidityPoolDepositOp" => Ok(Self::LiquidityPoolDepositOp), - "LiquidityPoolWithdrawOp" => Ok(Self::LiquidityPoolWithdrawOp), - "HostFunctionType" => Ok(Self::HostFunctionType), - "ContractIdPreimageType" => Ok(Self::ContractIdPreimageType), - "ContractIdPreimage" => Ok(Self::ContractIdPreimage), - "ContractIdPreimageFromAddress" => Ok(Self::ContractIdPreimageFromAddress), - "CreateContractArgs" => Ok(Self::CreateContractArgs), - "CreateContractArgsV2" => Ok(Self::CreateContractArgsV2), - "InvokeContractArgs" => Ok(Self::InvokeContractArgs), - "HostFunction" => Ok(Self::HostFunction), - "SorobanAuthorizedFunctionType" => Ok(Self::SorobanAuthorizedFunctionType), - "SorobanAuthorizedFunction" => Ok(Self::SorobanAuthorizedFunction), - "SorobanAuthorizedInvocation" => Ok(Self::SorobanAuthorizedInvocation), - "SorobanAddressCredentials" => Ok(Self::SorobanAddressCredentials), - "SorobanCredentialsType" => Ok(Self::SorobanCredentialsType), - "SorobanCredentials" => Ok(Self::SorobanCredentials), - "SorobanAuthorizationEntry" => Ok(Self::SorobanAuthorizationEntry), - "SorobanAuthorizationEntries" => Ok(Self::SorobanAuthorizationEntries), - "InvokeHostFunctionOp" => Ok(Self::InvokeHostFunctionOp), - "ExtendFootprintTtlOp" => Ok(Self::ExtendFootprintTtlOp), - "RestoreFootprintOp" => Ok(Self::RestoreFootprintOp), - "Operation" => Ok(Self::Operation), - "OperationBody" => Ok(Self::OperationBody), - "HashIdPreimage" => Ok(Self::HashIdPreimage), - "HashIdPreimageOperationId" => Ok(Self::HashIdPreimageOperationId), - "HashIdPreimageRevokeId" => Ok(Self::HashIdPreimageRevokeId), - "HashIdPreimageContractId" => Ok(Self::HashIdPreimageContractId), - "HashIdPreimageSorobanAuthorization" => Ok(Self::HashIdPreimageSorobanAuthorization), - "MemoType" => Ok(Self::MemoType), - "Memo" => Ok(Self::Memo), - "TimeBounds" => Ok(Self::TimeBounds), - "LedgerBounds" => Ok(Self::LedgerBounds), - "PreconditionsV2" => Ok(Self::PreconditionsV2), - "PreconditionType" => Ok(Self::PreconditionType), - "Preconditions" => Ok(Self::Preconditions), - "LedgerFootprint" => Ok(Self::LedgerFootprint), - "SorobanResources" => Ok(Self::SorobanResources), - "SorobanResourcesExtV0" => Ok(Self::SorobanResourcesExtV0), - "SorobanTransactionData" => Ok(Self::SorobanTransactionData), - "SorobanTransactionDataExt" => Ok(Self::SorobanTransactionDataExt), - "TransactionV0" => Ok(Self::TransactionV0), - "TransactionV0Ext" => Ok(Self::TransactionV0Ext), - "TransactionV0Envelope" => Ok(Self::TransactionV0Envelope), - "Transaction" => Ok(Self::Transaction), - "TransactionExt" => Ok(Self::TransactionExt), - "TransactionV1Envelope" => Ok(Self::TransactionV1Envelope), - "FeeBumpTransaction" => Ok(Self::FeeBumpTransaction), - "FeeBumpTransactionInnerTx" => Ok(Self::FeeBumpTransactionInnerTx), - "FeeBumpTransactionExt" => Ok(Self::FeeBumpTransactionExt), - "FeeBumpTransactionEnvelope" => Ok(Self::FeeBumpTransactionEnvelope), - "TransactionEnvelope" => Ok(Self::TransactionEnvelope), - "TransactionSignaturePayload" => Ok(Self::TransactionSignaturePayload), - "TransactionSignaturePayloadTaggedTransaction" => { - Ok(Self::TransactionSignaturePayloadTaggedTransaction) - } - "ClaimAtomType" => Ok(Self::ClaimAtomType), - "ClaimOfferAtomV0" => Ok(Self::ClaimOfferAtomV0), - "ClaimOfferAtom" => Ok(Self::ClaimOfferAtom), - "ClaimLiquidityAtom" => Ok(Self::ClaimLiquidityAtom), - "ClaimAtom" => Ok(Self::ClaimAtom), - "CreateAccountResultCode" => Ok(Self::CreateAccountResultCode), - "CreateAccountResult" => Ok(Self::CreateAccountResult), - "PaymentResultCode" => Ok(Self::PaymentResultCode), - "PaymentResult" => Ok(Self::PaymentResult), - "PathPaymentStrictReceiveResultCode" => Ok(Self::PathPaymentStrictReceiveResultCode), - "SimplePaymentResult" => Ok(Self::SimplePaymentResult), - "PathPaymentStrictReceiveResult" => Ok(Self::PathPaymentStrictReceiveResult), - "PathPaymentStrictReceiveResultSuccess" => { - Ok(Self::PathPaymentStrictReceiveResultSuccess) - } - "PathPaymentStrictSendResultCode" => Ok(Self::PathPaymentStrictSendResultCode), - "PathPaymentStrictSendResult" => Ok(Self::PathPaymentStrictSendResult), - "PathPaymentStrictSendResultSuccess" => Ok(Self::PathPaymentStrictSendResultSuccess), - "ManageSellOfferResultCode" => Ok(Self::ManageSellOfferResultCode), - "ManageOfferEffect" => Ok(Self::ManageOfferEffect), - "ManageOfferSuccessResult" => Ok(Self::ManageOfferSuccessResult), - "ManageOfferSuccessResultOffer" => Ok(Self::ManageOfferSuccessResultOffer), - "ManageSellOfferResult" => Ok(Self::ManageSellOfferResult), - "ManageBuyOfferResultCode" => Ok(Self::ManageBuyOfferResultCode), - "ManageBuyOfferResult" => Ok(Self::ManageBuyOfferResult), - "SetOptionsResultCode" => Ok(Self::SetOptionsResultCode), - "SetOptionsResult" => Ok(Self::SetOptionsResult), - "ChangeTrustResultCode" => Ok(Self::ChangeTrustResultCode), - "ChangeTrustResult" => Ok(Self::ChangeTrustResult), - "AllowTrustResultCode" => Ok(Self::AllowTrustResultCode), - "AllowTrustResult" => Ok(Self::AllowTrustResult), - "AccountMergeResultCode" => Ok(Self::AccountMergeResultCode), - "AccountMergeResult" => Ok(Self::AccountMergeResult), - "InflationResultCode" => Ok(Self::InflationResultCode), - "InflationPayout" => Ok(Self::InflationPayout), - "InflationResult" => Ok(Self::InflationResult), - "ManageDataResultCode" => Ok(Self::ManageDataResultCode), - "ManageDataResult" => Ok(Self::ManageDataResult), - "BumpSequenceResultCode" => Ok(Self::BumpSequenceResultCode), - "BumpSequenceResult" => Ok(Self::BumpSequenceResult), - "CreateClaimableBalanceResultCode" => Ok(Self::CreateClaimableBalanceResultCode), - "CreateClaimableBalanceResult" => Ok(Self::CreateClaimableBalanceResult), - "ClaimClaimableBalanceResultCode" => Ok(Self::ClaimClaimableBalanceResultCode), - "ClaimClaimableBalanceResult" => Ok(Self::ClaimClaimableBalanceResult), - "BeginSponsoringFutureReservesResultCode" => { - Ok(Self::BeginSponsoringFutureReservesResultCode) - } - "BeginSponsoringFutureReservesResult" => Ok(Self::BeginSponsoringFutureReservesResult), - "EndSponsoringFutureReservesResultCode" => { - Ok(Self::EndSponsoringFutureReservesResultCode) - } - "EndSponsoringFutureReservesResult" => Ok(Self::EndSponsoringFutureReservesResult), - "RevokeSponsorshipResultCode" => Ok(Self::RevokeSponsorshipResultCode), - "RevokeSponsorshipResult" => Ok(Self::RevokeSponsorshipResult), - "ClawbackResultCode" => Ok(Self::ClawbackResultCode), - "ClawbackResult" => Ok(Self::ClawbackResult), - "ClawbackClaimableBalanceResultCode" => Ok(Self::ClawbackClaimableBalanceResultCode), - "ClawbackClaimableBalanceResult" => Ok(Self::ClawbackClaimableBalanceResult), - "SetTrustLineFlagsResultCode" => Ok(Self::SetTrustLineFlagsResultCode), - "SetTrustLineFlagsResult" => Ok(Self::SetTrustLineFlagsResult), - "LiquidityPoolDepositResultCode" => Ok(Self::LiquidityPoolDepositResultCode), - "LiquidityPoolDepositResult" => Ok(Self::LiquidityPoolDepositResult), - "LiquidityPoolWithdrawResultCode" => Ok(Self::LiquidityPoolWithdrawResultCode), - "LiquidityPoolWithdrawResult" => Ok(Self::LiquidityPoolWithdrawResult), - "InvokeHostFunctionResultCode" => Ok(Self::InvokeHostFunctionResultCode), - "InvokeHostFunctionResult" => Ok(Self::InvokeHostFunctionResult), - "ExtendFootprintTtlResultCode" => Ok(Self::ExtendFootprintTtlResultCode), - "ExtendFootprintTtlResult" => Ok(Self::ExtendFootprintTtlResult), - "RestoreFootprintResultCode" => Ok(Self::RestoreFootprintResultCode), - "RestoreFootprintResult" => Ok(Self::RestoreFootprintResult), - "OperationResultCode" => Ok(Self::OperationResultCode), - "OperationResult" => Ok(Self::OperationResult), - "OperationResultTr" => Ok(Self::OperationResultTr), - "TransactionResultCode" => Ok(Self::TransactionResultCode), - "InnerTransactionResult" => Ok(Self::InnerTransactionResult), - "InnerTransactionResultResult" => Ok(Self::InnerTransactionResultResult), - "InnerTransactionResultExt" => Ok(Self::InnerTransactionResultExt), - "InnerTransactionResultPair" => Ok(Self::InnerTransactionResultPair), - "TransactionResult" => Ok(Self::TransactionResult), - "TransactionResultResult" => Ok(Self::TransactionResultResult), - "TransactionResultExt" => Ok(Self::TransactionResultExt), - "Hash" => Ok(Self::Hash), - "Uint256" => Ok(Self::Uint256), - "Uint32" => Ok(Self::Uint32), - "Int32" => Ok(Self::Int32), - "Uint64" => Ok(Self::Uint64), - "Int64" => Ok(Self::Int64), - "TimePoint" => Ok(Self::TimePoint), - "Duration" => Ok(Self::Duration), - "ExtensionPoint" => Ok(Self::ExtensionPoint), - "CryptoKeyType" => Ok(Self::CryptoKeyType), - "PublicKeyType" => Ok(Self::PublicKeyType), - "SignerKeyType" => Ok(Self::SignerKeyType), - "PublicKey" => Ok(Self::PublicKey), - "SignerKey" => Ok(Self::SignerKey), - "SignerKeyEd25519SignedPayload" => Ok(Self::SignerKeyEd25519SignedPayload), - "Signature" => Ok(Self::Signature), - "SignatureHint" => Ok(Self::SignatureHint), - "NodeId" => Ok(Self::NodeId), - "AccountId" => Ok(Self::AccountId), - "ContractId" => Ok(Self::ContractId), - "Curve25519Secret" => Ok(Self::Curve25519Secret), - "Curve25519Public" => Ok(Self::Curve25519Public), - "HmacSha256Key" => Ok(Self::HmacSha256Key), - "HmacSha256Mac" => Ok(Self::HmacSha256Mac), - "ShortHashSeed" => Ok(Self::ShortHashSeed), - "BinaryFuseFilterType" => Ok(Self::BinaryFuseFilterType), - "SerializedBinaryFuseFilter" => Ok(Self::SerializedBinaryFuseFilter), - "PoolId" => Ok(Self::PoolId), - "ClaimableBalanceIdType" => Ok(Self::ClaimableBalanceIdType), - "ClaimableBalanceId" => Ok(Self::ClaimableBalanceId), - _ => Err(Error::Invalid), - } - } -} - -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case"), - serde(untagged) -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub enum Type { - Value(Box), - ScpBallot(Box), - ScpStatementType(Box), - ScpNomination(Box), - ScpStatement(Box), - ScpStatementPledges(Box), - ScpStatementPrepare(Box), - ScpStatementConfirm(Box), - ScpStatementExternalize(Box), - ScpEnvelope(Box), - ScpQuorumSet(Box), - EncodedLedgerKey(Box), - ConfigSettingContractExecutionLanesV0(Box), - ConfigSettingContractComputeV0(Box), - ConfigSettingContractParallelComputeV0(Box), - ConfigSettingContractLedgerCostV0(Box), - ConfigSettingContractLedgerCostExtV0(Box), - ConfigSettingContractHistoricalDataV0(Box), - ConfigSettingContractEventsV0(Box), - ConfigSettingContractBandwidthV0(Box), - ContractCostType(Box), - ContractCostParamEntry(Box), - StateArchivalSettings(Box), - EvictionIterator(Box), - ConfigSettingScpTiming(Box), - FrozenLedgerKeys(Box), - FrozenLedgerKeysDelta(Box), - FreezeBypassTxs(Box), - FreezeBypassTxsDelta(Box), - ContractCostParams(Box), - ConfigSettingId(Box), - ConfigSettingEntry(Box), - ScEnvMetaKind(Box), - ScEnvMetaEntry(Box), - ScEnvMetaEntryInterfaceVersion(Box), - ScMetaV0(Box), - ScMetaKind(Box), - ScMetaEntry(Box), - ScSpecType(Box), - ScSpecTypeOption(Box), - ScSpecTypeResult(Box), - ScSpecTypeVec(Box), - ScSpecTypeMap(Box), - ScSpecTypeTuple(Box), - ScSpecTypeBytesN(Box), - ScSpecTypeUdt(Box), - ScSpecTypeDef(Box), - ScSpecUdtStructFieldV0(Box), - ScSpecUdtStructV0(Box), - ScSpecUdtUnionCaseVoidV0(Box), - ScSpecUdtUnionCaseTupleV0(Box), - ScSpecUdtUnionCaseV0Kind(Box), - ScSpecUdtUnionCaseV0(Box), - ScSpecUdtUnionV0(Box), - ScSpecUdtEnumCaseV0(Box), - ScSpecUdtEnumV0(Box), - ScSpecUdtErrorEnumCaseV0(Box), - ScSpecUdtErrorEnumV0(Box), - ScSpecFunctionInputV0(Box), - ScSpecFunctionV0(Box), - ScSpecEventParamLocationV0(Box), - ScSpecEventParamV0(Box), - ScSpecEventDataFormat(Box), - ScSpecEventV0(Box), - ScSpecEntryKind(Box), - ScSpecEntry(Box), - ScValType(Box), - ScErrorType(Box), - ScErrorCode(Box), - ScError(Box), - UInt128Parts(Box), - Int128Parts(Box), - UInt256Parts(Box), - Int256Parts(Box), - ContractExecutableType(Box), - ContractExecutable(Box), - ScAddressType(Box), - MuxedEd25519Account(Box), - ScAddress(Box), - ScVec(Box), - ScMap(Box), - ScBytes(Box), - ScString(Box), - ScSymbol(Box), - ScNonceKey(Box), - ScContractInstance(Box), - ScVal(Box), - ScMapEntry(Box), - LedgerCloseMetaBatch(Box), - StoredTransactionSet(Box), - StoredDebugTransactionSet(Box), - PersistedScpStateV0(Box), - PersistedScpStateV1(Box), - PersistedScpState(Box), - Thresholds(Box), - String32(Box), - String64(Box), - SequenceNumber(Box), - DataValue(Box), - AssetCode4(Box), - AssetCode12(Box), - AssetType(Box), - AssetCode(Box), - AlphaNum4(Box), - AlphaNum12(Box), - Asset(Box), - Price(Box), - Liabilities(Box), - ThresholdIndexes(Box), - LedgerEntryType(Box), - Signer(Box), - AccountFlags(Box), - SponsorshipDescriptor(Box), - AccountEntryExtensionV3(Box), - AccountEntryExtensionV2(Box), - AccountEntryExtensionV2Ext(Box), - AccountEntryExtensionV1(Box), - AccountEntryExtensionV1Ext(Box), - AccountEntry(Box), - AccountEntryExt(Box), - TrustLineFlags(Box), - LiquidityPoolType(Box), - TrustLineAsset(Box), - TrustLineEntryExtensionV2(Box), - TrustLineEntryExtensionV2Ext(Box), - TrustLineEntry(Box), - TrustLineEntryExt(Box), - TrustLineEntryV1(Box), - TrustLineEntryV1Ext(Box), - OfferEntryFlags(Box), - OfferEntry(Box), - OfferEntryExt(Box), - DataEntry(Box), - DataEntryExt(Box), - ClaimPredicateType(Box), - ClaimPredicate(Box), - ClaimantType(Box), - Claimant(Box), - ClaimantV0(Box), - ClaimableBalanceFlags(Box), - ClaimableBalanceEntryExtensionV1(Box), - ClaimableBalanceEntryExtensionV1Ext(Box), - ClaimableBalanceEntry(Box), - ClaimableBalanceEntryExt(Box), - LiquidityPoolConstantProductParameters(Box), - LiquidityPoolEntry(Box), - LiquidityPoolEntryBody(Box), - LiquidityPoolEntryConstantProduct(Box), - ContractDataDurability(Box), - ContractDataEntry(Box), - ContractCodeCostInputs(Box), - ContractCodeEntry(Box), - ContractCodeEntryExt(Box), - ContractCodeEntryV1(Box), - TtlEntry(Box), - LedgerEntryExtensionV1(Box), - LedgerEntryExtensionV1Ext(Box), - LedgerEntry(Box), - LedgerEntryData(Box), - LedgerEntryExt(Box), - LedgerKey(Box), - LedgerKeyAccount(Box), - LedgerKeyTrustLine(Box), - LedgerKeyOffer(Box), - LedgerKeyData(Box), - LedgerKeyClaimableBalance(Box), - LedgerKeyLiquidityPool(Box), - LedgerKeyContractData(Box), - LedgerKeyContractCode(Box), - LedgerKeyConfigSetting(Box), - LedgerKeyTtl(Box), - EnvelopeType(Box), - BucketListType(Box), - BucketEntryType(Box), - HotArchiveBucketEntryType(Box), - BucketMetadata(Box), - BucketMetadataExt(Box), - BucketEntry(Box), - HotArchiveBucketEntry(Box), - UpgradeType(Box), - StellarValueType(Box), - LedgerCloseValueSignature(Box), - StellarValue(Box), - StellarValueExt(Box), - LedgerHeaderFlags(Box), - LedgerHeaderExtensionV1(Box), - LedgerHeaderExtensionV1Ext(Box), - LedgerHeader(Box), - LedgerHeaderExt(Box), - LedgerUpgradeType(Box), - ConfigUpgradeSetKey(Box), - LedgerUpgrade(Box), - ConfigUpgradeSet(Box), - TxSetComponentType(Box), - DependentTxCluster(Box), - ParallelTxExecutionStage(Box), - ParallelTxsComponent(Box), - TxSetComponent(Box), - TxSetComponentTxsMaybeDiscountedFee(Box), - TransactionPhase(Box), - TransactionSet(Box), - TransactionSetV1(Box), - GeneralizedTransactionSet(Box), - TransactionResultPair(Box), - TransactionResultSet(Box), - TransactionHistoryEntry(Box), - TransactionHistoryEntryExt(Box), - TransactionHistoryResultEntry(Box), - TransactionHistoryResultEntryExt(Box), - LedgerHeaderHistoryEntry(Box), - LedgerHeaderHistoryEntryExt(Box), - LedgerScpMessages(Box), - ScpHistoryEntryV0(Box), - ScpHistoryEntry(Box), - LedgerEntryChangeType(Box), - LedgerEntryChange(Box), - LedgerEntryChanges(Box), - OperationMeta(Box), - TransactionMetaV1(Box), - TransactionMetaV2(Box), - ContractEventType(Box), - ContractEvent(Box), - ContractEventBody(Box), - ContractEventV0(Box), - DiagnosticEvent(Box), - SorobanTransactionMetaExtV1(Box), - SorobanTransactionMetaExt(Box), - SorobanTransactionMeta(Box), - TransactionMetaV3(Box), - OperationMetaV2(Box), - SorobanTransactionMetaV2(Box), - TransactionEventStage(Box), - TransactionEvent(Box), - TransactionMetaV4(Box), - InvokeHostFunctionSuccessPreImage(Box), - TransactionMeta(Box), - TransactionResultMeta(Box), - TransactionResultMetaV1(Box), - UpgradeEntryMeta(Box), - LedgerCloseMetaV0(Box), - LedgerCloseMetaExtV1(Box), - LedgerCloseMetaExt(Box), - LedgerCloseMetaV1(Box), - LedgerCloseMetaV2(Box), - LedgerCloseMeta(Box), - ErrorCode(Box), - SError(Box), - SendMore(Box), - SendMoreExtended(Box), - AuthCert(Box), - Hello(Box), - Auth(Box), - IpAddrType(Box), - PeerAddress(Box), - PeerAddressIp(Box), - MessageType(Box), - DontHave(Box), - SurveyMessageCommandType(Box), - SurveyMessageResponseType(Box), - TimeSlicedSurveyStartCollectingMessage(Box), - SignedTimeSlicedSurveyStartCollectingMessage(Box), - TimeSlicedSurveyStopCollectingMessage(Box), - SignedTimeSlicedSurveyStopCollectingMessage(Box), - SurveyRequestMessage(Box), - TimeSlicedSurveyRequestMessage(Box), - SignedTimeSlicedSurveyRequestMessage(Box), - EncryptedBody(Box), - SurveyResponseMessage(Box), - TimeSlicedSurveyResponseMessage(Box), - SignedTimeSlicedSurveyResponseMessage(Box), - PeerStats(Box), - TimeSlicedNodeData(Box), - TimeSlicedPeerData(Box), - TimeSlicedPeerDataList(Box), - TopologyResponseBodyV2(Box), - SurveyResponseBody(Box), - TxAdvertVector(Box), - FloodAdvert(Box), - TxDemandVector(Box), - FloodDemand(Box), - StellarMessage(Box), - AuthenticatedMessage(Box), - AuthenticatedMessageV0(Box), - LiquidityPoolParameters(Box), - MuxedAccount(Box), - MuxedAccountMed25519(Box), - DecoratedSignature(Box), - OperationType(Box), - CreateAccountOp(Box), - PaymentOp(Box), - PathPaymentStrictReceiveOp(Box), - PathPaymentStrictSendOp(Box), - ManageSellOfferOp(Box), - ManageBuyOfferOp(Box), - CreatePassiveSellOfferOp(Box), - SetOptionsOp(Box), - ChangeTrustAsset(Box), - ChangeTrustOp(Box), - AllowTrustOp(Box), - ManageDataOp(Box), - BumpSequenceOp(Box), - CreateClaimableBalanceOp(Box), - ClaimClaimableBalanceOp(Box), - BeginSponsoringFutureReservesOp(Box), - RevokeSponsorshipType(Box), - RevokeSponsorshipOp(Box), - RevokeSponsorshipOpSigner(Box), - ClawbackOp(Box), - ClawbackClaimableBalanceOp(Box), - SetTrustLineFlagsOp(Box), - LiquidityPoolDepositOp(Box), - LiquidityPoolWithdrawOp(Box), - HostFunctionType(Box), - ContractIdPreimageType(Box), - ContractIdPreimage(Box), - ContractIdPreimageFromAddress(Box), - CreateContractArgs(Box), - CreateContractArgsV2(Box), - InvokeContractArgs(Box), - HostFunction(Box), - SorobanAuthorizedFunctionType(Box), - SorobanAuthorizedFunction(Box), - SorobanAuthorizedInvocation(Box), - SorobanAddressCredentials(Box), - SorobanCredentialsType(Box), - SorobanCredentials(Box), - SorobanAuthorizationEntry(Box), - SorobanAuthorizationEntries(Box), - InvokeHostFunctionOp(Box), - ExtendFootprintTtlOp(Box), - RestoreFootprintOp(Box), - Operation(Box), - OperationBody(Box), - HashIdPreimage(Box), - HashIdPreimageOperationId(Box), - HashIdPreimageRevokeId(Box), - HashIdPreimageContractId(Box), - HashIdPreimageSorobanAuthorization(Box), - MemoType(Box), - Memo(Box), - TimeBounds(Box), - LedgerBounds(Box), - PreconditionsV2(Box), - PreconditionType(Box), - Preconditions(Box), - LedgerFootprint(Box), - SorobanResources(Box), - SorobanResourcesExtV0(Box), - SorobanTransactionData(Box), - SorobanTransactionDataExt(Box), - TransactionV0(Box), - TransactionV0Ext(Box), - TransactionV0Envelope(Box), - Transaction(Box), - TransactionExt(Box), - TransactionV1Envelope(Box), - FeeBumpTransaction(Box), - FeeBumpTransactionInnerTx(Box), - FeeBumpTransactionExt(Box), - FeeBumpTransactionEnvelope(Box), - TransactionEnvelope(Box), - TransactionSignaturePayload(Box), - TransactionSignaturePayloadTaggedTransaction(Box), - ClaimAtomType(Box), - ClaimOfferAtomV0(Box), - ClaimOfferAtom(Box), - ClaimLiquidityAtom(Box), - ClaimAtom(Box), - CreateAccountResultCode(Box), - CreateAccountResult(Box), - PaymentResultCode(Box), - PaymentResult(Box), - PathPaymentStrictReceiveResultCode(Box), - SimplePaymentResult(Box), - PathPaymentStrictReceiveResult(Box), - PathPaymentStrictReceiveResultSuccess(Box), - PathPaymentStrictSendResultCode(Box), - PathPaymentStrictSendResult(Box), - PathPaymentStrictSendResultSuccess(Box), - ManageSellOfferResultCode(Box), - ManageOfferEffect(Box), - ManageOfferSuccessResult(Box), - ManageOfferSuccessResultOffer(Box), - ManageSellOfferResult(Box), - ManageBuyOfferResultCode(Box), - ManageBuyOfferResult(Box), - SetOptionsResultCode(Box), - SetOptionsResult(Box), - ChangeTrustResultCode(Box), - ChangeTrustResult(Box), - AllowTrustResultCode(Box), - AllowTrustResult(Box), - AccountMergeResultCode(Box), - AccountMergeResult(Box), - InflationResultCode(Box), - InflationPayout(Box), - InflationResult(Box), - ManageDataResultCode(Box), - ManageDataResult(Box), - BumpSequenceResultCode(Box), - BumpSequenceResult(Box), - CreateClaimableBalanceResultCode(Box), - CreateClaimableBalanceResult(Box), - ClaimClaimableBalanceResultCode(Box), - ClaimClaimableBalanceResult(Box), - BeginSponsoringFutureReservesResultCode(Box), - BeginSponsoringFutureReservesResult(Box), - EndSponsoringFutureReservesResultCode(Box), - EndSponsoringFutureReservesResult(Box), - RevokeSponsorshipResultCode(Box), - RevokeSponsorshipResult(Box), - ClawbackResultCode(Box), - ClawbackResult(Box), - ClawbackClaimableBalanceResultCode(Box), - ClawbackClaimableBalanceResult(Box), - SetTrustLineFlagsResultCode(Box), - SetTrustLineFlagsResult(Box), - LiquidityPoolDepositResultCode(Box), - LiquidityPoolDepositResult(Box), - LiquidityPoolWithdrawResultCode(Box), - LiquidityPoolWithdrawResult(Box), - InvokeHostFunctionResultCode(Box), - InvokeHostFunctionResult(Box), - ExtendFootprintTtlResultCode(Box), - ExtendFootprintTtlResult(Box), - RestoreFootprintResultCode(Box), - RestoreFootprintResult(Box), - OperationResultCode(Box), - OperationResult(Box), - OperationResultTr(Box), - TransactionResultCode(Box), - InnerTransactionResult(Box), - InnerTransactionResultResult(Box), - InnerTransactionResultExt(Box), - InnerTransactionResultPair(Box), - TransactionResult(Box), - TransactionResultResult(Box), - TransactionResultExt(Box), - Hash(Box), - Uint256(Box), - Uint32(Box), - Int32(Box), - Uint64(Box), - Int64(Box), - TimePoint(Box), - Duration(Box), - ExtensionPoint(Box), - CryptoKeyType(Box), - PublicKeyType(Box), - SignerKeyType(Box), - PublicKey(Box), - SignerKey(Box), - SignerKeyEd25519SignedPayload(Box), - Signature(Box), - SignatureHint(Box), - NodeId(Box), - AccountId(Box), - ContractId(Box), - Curve25519Secret(Box), - Curve25519Public(Box), - HmacSha256Key(Box), - HmacSha256Mac(Box), - ShortHashSeed(Box), - BinaryFuseFilterType(Box), - SerializedBinaryFuseFilter(Box), - PoolId(Box), - ClaimableBalanceIdType(Box), - ClaimableBalanceId(Box), -} - -impl Type { - // Private const slices used to compute the variant count, supporting - // cfg-gated entries whose presence varies by enabled features. - const _VARIANTS: &[TypeVariant] = &[ - TypeVariant::Value, - TypeVariant::ScpBallot, - TypeVariant::ScpStatementType, - TypeVariant::ScpNomination, - TypeVariant::ScpStatement, - TypeVariant::ScpStatementPledges, - TypeVariant::ScpStatementPrepare, - TypeVariant::ScpStatementConfirm, - TypeVariant::ScpStatementExternalize, - TypeVariant::ScpEnvelope, - TypeVariant::ScpQuorumSet, - TypeVariant::EncodedLedgerKey, - TypeVariant::ConfigSettingContractExecutionLanesV0, - TypeVariant::ConfigSettingContractComputeV0, - TypeVariant::ConfigSettingContractParallelComputeV0, - TypeVariant::ConfigSettingContractLedgerCostV0, - TypeVariant::ConfigSettingContractLedgerCostExtV0, - TypeVariant::ConfigSettingContractHistoricalDataV0, - TypeVariant::ConfigSettingContractEventsV0, - TypeVariant::ConfigSettingContractBandwidthV0, - TypeVariant::ContractCostType, - TypeVariant::ContractCostParamEntry, - TypeVariant::StateArchivalSettings, - TypeVariant::EvictionIterator, - TypeVariant::ConfigSettingScpTiming, - TypeVariant::FrozenLedgerKeys, - TypeVariant::FrozenLedgerKeysDelta, - TypeVariant::FreezeBypassTxs, - TypeVariant::FreezeBypassTxsDelta, - TypeVariant::ContractCostParams, - TypeVariant::ConfigSettingId, - TypeVariant::ConfigSettingEntry, - TypeVariant::ScEnvMetaKind, - TypeVariant::ScEnvMetaEntry, - TypeVariant::ScEnvMetaEntryInterfaceVersion, - TypeVariant::ScMetaV0, - TypeVariant::ScMetaKind, - TypeVariant::ScMetaEntry, - TypeVariant::ScSpecType, - TypeVariant::ScSpecTypeOption, - TypeVariant::ScSpecTypeResult, - TypeVariant::ScSpecTypeVec, - TypeVariant::ScSpecTypeMap, - TypeVariant::ScSpecTypeTuple, - TypeVariant::ScSpecTypeBytesN, - TypeVariant::ScSpecTypeUdt, - TypeVariant::ScSpecTypeDef, - TypeVariant::ScSpecUdtStructFieldV0, - TypeVariant::ScSpecUdtStructV0, - TypeVariant::ScSpecUdtUnionCaseVoidV0, - TypeVariant::ScSpecUdtUnionCaseTupleV0, - TypeVariant::ScSpecUdtUnionCaseV0Kind, - TypeVariant::ScSpecUdtUnionCaseV0, - TypeVariant::ScSpecUdtUnionV0, - TypeVariant::ScSpecUdtEnumCaseV0, - TypeVariant::ScSpecUdtEnumV0, - TypeVariant::ScSpecUdtErrorEnumCaseV0, - TypeVariant::ScSpecUdtErrorEnumV0, - TypeVariant::ScSpecFunctionInputV0, - TypeVariant::ScSpecFunctionV0, - TypeVariant::ScSpecEventParamLocationV0, - TypeVariant::ScSpecEventParamV0, - TypeVariant::ScSpecEventDataFormat, - TypeVariant::ScSpecEventV0, - TypeVariant::ScSpecEntryKind, - TypeVariant::ScSpecEntry, - TypeVariant::ScValType, - TypeVariant::ScErrorType, - TypeVariant::ScErrorCode, - TypeVariant::ScError, - TypeVariant::UInt128Parts, - TypeVariant::Int128Parts, - TypeVariant::UInt256Parts, - TypeVariant::Int256Parts, - TypeVariant::ContractExecutableType, - TypeVariant::ContractExecutable, - TypeVariant::ScAddressType, - TypeVariant::MuxedEd25519Account, - TypeVariant::ScAddress, - TypeVariant::ScVec, - TypeVariant::ScMap, - TypeVariant::ScBytes, - TypeVariant::ScString, - TypeVariant::ScSymbol, - TypeVariant::ScNonceKey, - TypeVariant::ScContractInstance, - TypeVariant::ScVal, - TypeVariant::ScMapEntry, - TypeVariant::LedgerCloseMetaBatch, - TypeVariant::StoredTransactionSet, - TypeVariant::StoredDebugTransactionSet, - TypeVariant::PersistedScpStateV0, - TypeVariant::PersistedScpStateV1, - TypeVariant::PersistedScpState, - TypeVariant::Thresholds, - TypeVariant::String32, - TypeVariant::String64, - TypeVariant::SequenceNumber, - TypeVariant::DataValue, - TypeVariant::AssetCode4, - TypeVariant::AssetCode12, - TypeVariant::AssetType, - TypeVariant::AssetCode, - TypeVariant::AlphaNum4, - TypeVariant::AlphaNum12, - TypeVariant::Asset, - TypeVariant::Price, - TypeVariant::Liabilities, - TypeVariant::ThresholdIndexes, - TypeVariant::LedgerEntryType, - TypeVariant::Signer, - TypeVariant::AccountFlags, - TypeVariant::SponsorshipDescriptor, - TypeVariant::AccountEntryExtensionV3, - TypeVariant::AccountEntryExtensionV2, - TypeVariant::AccountEntryExtensionV2Ext, - TypeVariant::AccountEntryExtensionV1, - TypeVariant::AccountEntryExtensionV1Ext, - TypeVariant::AccountEntry, - TypeVariant::AccountEntryExt, - TypeVariant::TrustLineFlags, - TypeVariant::LiquidityPoolType, - TypeVariant::TrustLineAsset, - TypeVariant::TrustLineEntryExtensionV2, - TypeVariant::TrustLineEntryExtensionV2Ext, - TypeVariant::TrustLineEntry, - TypeVariant::TrustLineEntryExt, - TypeVariant::TrustLineEntryV1, - TypeVariant::TrustLineEntryV1Ext, - TypeVariant::OfferEntryFlags, - TypeVariant::OfferEntry, - TypeVariant::OfferEntryExt, - TypeVariant::DataEntry, - TypeVariant::DataEntryExt, - TypeVariant::ClaimPredicateType, - TypeVariant::ClaimPredicate, - TypeVariant::ClaimantType, - TypeVariant::Claimant, - TypeVariant::ClaimantV0, - TypeVariant::ClaimableBalanceFlags, - TypeVariant::ClaimableBalanceEntryExtensionV1, - TypeVariant::ClaimableBalanceEntryExtensionV1Ext, - TypeVariant::ClaimableBalanceEntry, - TypeVariant::ClaimableBalanceEntryExt, - TypeVariant::LiquidityPoolConstantProductParameters, - TypeVariant::LiquidityPoolEntry, - TypeVariant::LiquidityPoolEntryBody, - TypeVariant::LiquidityPoolEntryConstantProduct, - TypeVariant::ContractDataDurability, - TypeVariant::ContractDataEntry, - TypeVariant::ContractCodeCostInputs, - TypeVariant::ContractCodeEntry, - TypeVariant::ContractCodeEntryExt, - TypeVariant::ContractCodeEntryV1, - TypeVariant::TtlEntry, - TypeVariant::LedgerEntryExtensionV1, - TypeVariant::LedgerEntryExtensionV1Ext, - TypeVariant::LedgerEntry, - TypeVariant::LedgerEntryData, - TypeVariant::LedgerEntryExt, - TypeVariant::LedgerKey, - TypeVariant::LedgerKeyAccount, - TypeVariant::LedgerKeyTrustLine, - TypeVariant::LedgerKeyOffer, - TypeVariant::LedgerKeyData, - TypeVariant::LedgerKeyClaimableBalance, - TypeVariant::LedgerKeyLiquidityPool, - TypeVariant::LedgerKeyContractData, - TypeVariant::LedgerKeyContractCode, - TypeVariant::LedgerKeyConfigSetting, - TypeVariant::LedgerKeyTtl, - TypeVariant::EnvelopeType, - TypeVariant::BucketListType, - TypeVariant::BucketEntryType, - TypeVariant::HotArchiveBucketEntryType, - TypeVariant::BucketMetadata, - TypeVariant::BucketMetadataExt, - TypeVariant::BucketEntry, - TypeVariant::HotArchiveBucketEntry, - TypeVariant::UpgradeType, - TypeVariant::StellarValueType, - TypeVariant::LedgerCloseValueSignature, - TypeVariant::StellarValue, - TypeVariant::StellarValueExt, - TypeVariant::LedgerHeaderFlags, - TypeVariant::LedgerHeaderExtensionV1, - TypeVariant::LedgerHeaderExtensionV1Ext, - TypeVariant::LedgerHeader, - TypeVariant::LedgerHeaderExt, - TypeVariant::LedgerUpgradeType, - TypeVariant::ConfigUpgradeSetKey, - TypeVariant::LedgerUpgrade, - TypeVariant::ConfigUpgradeSet, - TypeVariant::TxSetComponentType, - TypeVariant::DependentTxCluster, - TypeVariant::ParallelTxExecutionStage, - TypeVariant::ParallelTxsComponent, - TypeVariant::TxSetComponent, - TypeVariant::TxSetComponentTxsMaybeDiscountedFee, - TypeVariant::TransactionPhase, - TypeVariant::TransactionSet, - TypeVariant::TransactionSetV1, - TypeVariant::GeneralizedTransactionSet, - TypeVariant::TransactionResultPair, - TypeVariant::TransactionResultSet, - TypeVariant::TransactionHistoryEntry, - TypeVariant::TransactionHistoryEntryExt, - TypeVariant::TransactionHistoryResultEntry, - TypeVariant::TransactionHistoryResultEntryExt, - TypeVariant::LedgerHeaderHistoryEntry, - TypeVariant::LedgerHeaderHistoryEntryExt, - TypeVariant::LedgerScpMessages, - TypeVariant::ScpHistoryEntryV0, - TypeVariant::ScpHistoryEntry, - TypeVariant::LedgerEntryChangeType, - TypeVariant::LedgerEntryChange, - TypeVariant::LedgerEntryChanges, - TypeVariant::OperationMeta, - TypeVariant::TransactionMetaV1, - TypeVariant::TransactionMetaV2, - TypeVariant::ContractEventType, - TypeVariant::ContractEvent, - TypeVariant::ContractEventBody, - TypeVariant::ContractEventV0, - TypeVariant::DiagnosticEvent, - TypeVariant::SorobanTransactionMetaExtV1, - TypeVariant::SorobanTransactionMetaExt, - TypeVariant::SorobanTransactionMeta, - TypeVariant::TransactionMetaV3, - TypeVariant::OperationMetaV2, - TypeVariant::SorobanTransactionMetaV2, - TypeVariant::TransactionEventStage, - TypeVariant::TransactionEvent, - TypeVariant::TransactionMetaV4, - TypeVariant::InvokeHostFunctionSuccessPreImage, - TypeVariant::TransactionMeta, - TypeVariant::TransactionResultMeta, - TypeVariant::TransactionResultMetaV1, - TypeVariant::UpgradeEntryMeta, - TypeVariant::LedgerCloseMetaV0, - TypeVariant::LedgerCloseMetaExtV1, - TypeVariant::LedgerCloseMetaExt, - TypeVariant::LedgerCloseMetaV1, - TypeVariant::LedgerCloseMetaV2, - TypeVariant::LedgerCloseMeta, - TypeVariant::ErrorCode, - TypeVariant::SError, - TypeVariant::SendMore, - TypeVariant::SendMoreExtended, - TypeVariant::AuthCert, - TypeVariant::Hello, - TypeVariant::Auth, - TypeVariant::IpAddrType, - TypeVariant::PeerAddress, - TypeVariant::PeerAddressIp, - TypeVariant::MessageType, - TypeVariant::DontHave, - TypeVariant::SurveyMessageCommandType, - TypeVariant::SurveyMessageResponseType, - TypeVariant::TimeSlicedSurveyStartCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage, - TypeVariant::TimeSlicedSurveyStopCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage, - TypeVariant::SurveyRequestMessage, - TypeVariant::TimeSlicedSurveyRequestMessage, - TypeVariant::SignedTimeSlicedSurveyRequestMessage, - TypeVariant::EncryptedBody, - TypeVariant::SurveyResponseMessage, - TypeVariant::TimeSlicedSurveyResponseMessage, - TypeVariant::SignedTimeSlicedSurveyResponseMessage, - TypeVariant::PeerStats, - TypeVariant::TimeSlicedNodeData, - TypeVariant::TimeSlicedPeerData, - TypeVariant::TimeSlicedPeerDataList, - TypeVariant::TopologyResponseBodyV2, - TypeVariant::SurveyResponseBody, - TypeVariant::TxAdvertVector, - TypeVariant::FloodAdvert, - TypeVariant::TxDemandVector, - TypeVariant::FloodDemand, - TypeVariant::StellarMessage, - TypeVariant::AuthenticatedMessage, - TypeVariant::AuthenticatedMessageV0, - TypeVariant::LiquidityPoolParameters, - TypeVariant::MuxedAccount, - TypeVariant::MuxedAccountMed25519, - TypeVariant::DecoratedSignature, - TypeVariant::OperationType, - TypeVariant::CreateAccountOp, - TypeVariant::PaymentOp, - TypeVariant::PathPaymentStrictReceiveOp, - TypeVariant::PathPaymentStrictSendOp, - TypeVariant::ManageSellOfferOp, - TypeVariant::ManageBuyOfferOp, - TypeVariant::CreatePassiveSellOfferOp, - TypeVariant::SetOptionsOp, - TypeVariant::ChangeTrustAsset, - TypeVariant::ChangeTrustOp, - TypeVariant::AllowTrustOp, - TypeVariant::ManageDataOp, - TypeVariant::BumpSequenceOp, - TypeVariant::CreateClaimableBalanceOp, - TypeVariant::ClaimClaimableBalanceOp, - TypeVariant::BeginSponsoringFutureReservesOp, - TypeVariant::RevokeSponsorshipType, - TypeVariant::RevokeSponsorshipOp, - TypeVariant::RevokeSponsorshipOpSigner, - TypeVariant::ClawbackOp, - TypeVariant::ClawbackClaimableBalanceOp, - TypeVariant::SetTrustLineFlagsOp, - TypeVariant::LiquidityPoolDepositOp, - TypeVariant::LiquidityPoolWithdrawOp, - TypeVariant::HostFunctionType, - TypeVariant::ContractIdPreimageType, - TypeVariant::ContractIdPreimage, - TypeVariant::ContractIdPreimageFromAddress, - TypeVariant::CreateContractArgs, - TypeVariant::CreateContractArgsV2, - TypeVariant::InvokeContractArgs, - TypeVariant::HostFunction, - TypeVariant::SorobanAuthorizedFunctionType, - TypeVariant::SorobanAuthorizedFunction, - TypeVariant::SorobanAuthorizedInvocation, - TypeVariant::SorobanAddressCredentials, - TypeVariant::SorobanCredentialsType, - TypeVariant::SorobanCredentials, - TypeVariant::SorobanAuthorizationEntry, - TypeVariant::SorobanAuthorizationEntries, - TypeVariant::InvokeHostFunctionOp, - TypeVariant::ExtendFootprintTtlOp, - TypeVariant::RestoreFootprintOp, - TypeVariant::Operation, - TypeVariant::OperationBody, - TypeVariant::HashIdPreimage, - TypeVariant::HashIdPreimageOperationId, - TypeVariant::HashIdPreimageRevokeId, - TypeVariant::HashIdPreimageContractId, - TypeVariant::HashIdPreimageSorobanAuthorization, - TypeVariant::MemoType, - TypeVariant::Memo, - TypeVariant::TimeBounds, - TypeVariant::LedgerBounds, - TypeVariant::PreconditionsV2, - TypeVariant::PreconditionType, - TypeVariant::Preconditions, - TypeVariant::LedgerFootprint, - TypeVariant::SorobanResources, - TypeVariant::SorobanResourcesExtV0, - TypeVariant::SorobanTransactionData, - TypeVariant::SorobanTransactionDataExt, - TypeVariant::TransactionV0, - TypeVariant::TransactionV0Ext, - TypeVariant::TransactionV0Envelope, - TypeVariant::Transaction, - TypeVariant::TransactionExt, - TypeVariant::TransactionV1Envelope, - TypeVariant::FeeBumpTransaction, - TypeVariant::FeeBumpTransactionInnerTx, - TypeVariant::FeeBumpTransactionExt, - TypeVariant::FeeBumpTransactionEnvelope, - TypeVariant::TransactionEnvelope, - TypeVariant::TransactionSignaturePayload, - TypeVariant::TransactionSignaturePayloadTaggedTransaction, - TypeVariant::ClaimAtomType, - TypeVariant::ClaimOfferAtomV0, - TypeVariant::ClaimOfferAtom, - TypeVariant::ClaimLiquidityAtom, - TypeVariant::ClaimAtom, - TypeVariant::CreateAccountResultCode, - TypeVariant::CreateAccountResult, - TypeVariant::PaymentResultCode, - TypeVariant::PaymentResult, - TypeVariant::PathPaymentStrictReceiveResultCode, - TypeVariant::SimplePaymentResult, - TypeVariant::PathPaymentStrictReceiveResult, - TypeVariant::PathPaymentStrictReceiveResultSuccess, - TypeVariant::PathPaymentStrictSendResultCode, - TypeVariant::PathPaymentStrictSendResult, - TypeVariant::PathPaymentStrictSendResultSuccess, - TypeVariant::ManageSellOfferResultCode, - TypeVariant::ManageOfferEffect, - TypeVariant::ManageOfferSuccessResult, - TypeVariant::ManageOfferSuccessResultOffer, - TypeVariant::ManageSellOfferResult, - TypeVariant::ManageBuyOfferResultCode, - TypeVariant::ManageBuyOfferResult, - TypeVariant::SetOptionsResultCode, - TypeVariant::SetOptionsResult, - TypeVariant::ChangeTrustResultCode, - TypeVariant::ChangeTrustResult, - TypeVariant::AllowTrustResultCode, - TypeVariant::AllowTrustResult, - TypeVariant::AccountMergeResultCode, - TypeVariant::AccountMergeResult, - TypeVariant::InflationResultCode, - TypeVariant::InflationPayout, - TypeVariant::InflationResult, - TypeVariant::ManageDataResultCode, - TypeVariant::ManageDataResult, - TypeVariant::BumpSequenceResultCode, - TypeVariant::BumpSequenceResult, - TypeVariant::CreateClaimableBalanceResultCode, - TypeVariant::CreateClaimableBalanceResult, - TypeVariant::ClaimClaimableBalanceResultCode, - TypeVariant::ClaimClaimableBalanceResult, - TypeVariant::BeginSponsoringFutureReservesResultCode, - TypeVariant::BeginSponsoringFutureReservesResult, - TypeVariant::EndSponsoringFutureReservesResultCode, - TypeVariant::EndSponsoringFutureReservesResult, - TypeVariant::RevokeSponsorshipResultCode, - TypeVariant::RevokeSponsorshipResult, - TypeVariant::ClawbackResultCode, - TypeVariant::ClawbackResult, - TypeVariant::ClawbackClaimableBalanceResultCode, - TypeVariant::ClawbackClaimableBalanceResult, - TypeVariant::SetTrustLineFlagsResultCode, - TypeVariant::SetTrustLineFlagsResult, - TypeVariant::LiquidityPoolDepositResultCode, - TypeVariant::LiquidityPoolDepositResult, - TypeVariant::LiquidityPoolWithdrawResultCode, - TypeVariant::LiquidityPoolWithdrawResult, - TypeVariant::InvokeHostFunctionResultCode, - TypeVariant::InvokeHostFunctionResult, - TypeVariant::ExtendFootprintTtlResultCode, - TypeVariant::ExtendFootprintTtlResult, - TypeVariant::RestoreFootprintResultCode, - TypeVariant::RestoreFootprintResult, - TypeVariant::OperationResultCode, - TypeVariant::OperationResult, - TypeVariant::OperationResultTr, - TypeVariant::TransactionResultCode, - TypeVariant::InnerTransactionResult, - TypeVariant::InnerTransactionResultResult, - TypeVariant::InnerTransactionResultExt, - TypeVariant::InnerTransactionResultPair, - TypeVariant::TransactionResult, - TypeVariant::TransactionResultResult, - TypeVariant::TransactionResultExt, - TypeVariant::Hash, - TypeVariant::Uint256, - TypeVariant::Uint32, - TypeVariant::Int32, - TypeVariant::Uint64, - TypeVariant::Int64, - TypeVariant::TimePoint, - TypeVariant::Duration, - TypeVariant::ExtensionPoint, - TypeVariant::CryptoKeyType, - TypeVariant::PublicKeyType, - TypeVariant::SignerKeyType, - TypeVariant::PublicKey, - TypeVariant::SignerKey, - TypeVariant::SignerKeyEd25519SignedPayload, - TypeVariant::Signature, - TypeVariant::SignatureHint, - TypeVariant::NodeId, - TypeVariant::AccountId, - TypeVariant::ContractId, - TypeVariant::Curve25519Secret, - TypeVariant::Curve25519Public, - TypeVariant::HmacSha256Key, - TypeVariant::HmacSha256Mac, - TypeVariant::ShortHashSeed, - TypeVariant::BinaryFuseFilterType, - TypeVariant::SerializedBinaryFuseFilter, - TypeVariant::PoolId, - TypeVariant::ClaimableBalanceIdType, - TypeVariant::ClaimableBalanceId, - ]; - pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = [ - TypeVariant::Value, - TypeVariant::ScpBallot, - TypeVariant::ScpStatementType, - TypeVariant::ScpNomination, - TypeVariant::ScpStatement, - TypeVariant::ScpStatementPledges, - TypeVariant::ScpStatementPrepare, - TypeVariant::ScpStatementConfirm, - TypeVariant::ScpStatementExternalize, - TypeVariant::ScpEnvelope, - TypeVariant::ScpQuorumSet, - TypeVariant::EncodedLedgerKey, - TypeVariant::ConfigSettingContractExecutionLanesV0, - TypeVariant::ConfigSettingContractComputeV0, - TypeVariant::ConfigSettingContractParallelComputeV0, - TypeVariant::ConfigSettingContractLedgerCostV0, - TypeVariant::ConfigSettingContractLedgerCostExtV0, - TypeVariant::ConfigSettingContractHistoricalDataV0, - TypeVariant::ConfigSettingContractEventsV0, - TypeVariant::ConfigSettingContractBandwidthV0, - TypeVariant::ContractCostType, - TypeVariant::ContractCostParamEntry, - TypeVariant::StateArchivalSettings, - TypeVariant::EvictionIterator, - TypeVariant::ConfigSettingScpTiming, - TypeVariant::FrozenLedgerKeys, - TypeVariant::FrozenLedgerKeysDelta, - TypeVariant::FreezeBypassTxs, - TypeVariant::FreezeBypassTxsDelta, - TypeVariant::ContractCostParams, - TypeVariant::ConfigSettingId, - TypeVariant::ConfigSettingEntry, - TypeVariant::ScEnvMetaKind, - TypeVariant::ScEnvMetaEntry, - TypeVariant::ScEnvMetaEntryInterfaceVersion, - TypeVariant::ScMetaV0, - TypeVariant::ScMetaKind, - TypeVariant::ScMetaEntry, - TypeVariant::ScSpecType, - TypeVariant::ScSpecTypeOption, - TypeVariant::ScSpecTypeResult, - TypeVariant::ScSpecTypeVec, - TypeVariant::ScSpecTypeMap, - TypeVariant::ScSpecTypeTuple, - TypeVariant::ScSpecTypeBytesN, - TypeVariant::ScSpecTypeUdt, - TypeVariant::ScSpecTypeDef, - TypeVariant::ScSpecUdtStructFieldV0, - TypeVariant::ScSpecUdtStructV0, - TypeVariant::ScSpecUdtUnionCaseVoidV0, - TypeVariant::ScSpecUdtUnionCaseTupleV0, - TypeVariant::ScSpecUdtUnionCaseV0Kind, - TypeVariant::ScSpecUdtUnionCaseV0, - TypeVariant::ScSpecUdtUnionV0, - TypeVariant::ScSpecUdtEnumCaseV0, - TypeVariant::ScSpecUdtEnumV0, - TypeVariant::ScSpecUdtErrorEnumCaseV0, - TypeVariant::ScSpecUdtErrorEnumV0, - TypeVariant::ScSpecFunctionInputV0, - TypeVariant::ScSpecFunctionV0, - TypeVariant::ScSpecEventParamLocationV0, - TypeVariant::ScSpecEventParamV0, - TypeVariant::ScSpecEventDataFormat, - TypeVariant::ScSpecEventV0, - TypeVariant::ScSpecEntryKind, - TypeVariant::ScSpecEntry, - TypeVariant::ScValType, - TypeVariant::ScErrorType, - TypeVariant::ScErrorCode, - TypeVariant::ScError, - TypeVariant::UInt128Parts, - TypeVariant::Int128Parts, - TypeVariant::UInt256Parts, - TypeVariant::Int256Parts, - TypeVariant::ContractExecutableType, - TypeVariant::ContractExecutable, - TypeVariant::ScAddressType, - TypeVariant::MuxedEd25519Account, - TypeVariant::ScAddress, - TypeVariant::ScVec, - TypeVariant::ScMap, - TypeVariant::ScBytes, - TypeVariant::ScString, - TypeVariant::ScSymbol, - TypeVariant::ScNonceKey, - TypeVariant::ScContractInstance, - TypeVariant::ScVal, - TypeVariant::ScMapEntry, - TypeVariant::LedgerCloseMetaBatch, - TypeVariant::StoredTransactionSet, - TypeVariant::StoredDebugTransactionSet, - TypeVariant::PersistedScpStateV0, - TypeVariant::PersistedScpStateV1, - TypeVariant::PersistedScpState, - TypeVariant::Thresholds, - TypeVariant::String32, - TypeVariant::String64, - TypeVariant::SequenceNumber, - TypeVariant::DataValue, - TypeVariant::AssetCode4, - TypeVariant::AssetCode12, - TypeVariant::AssetType, - TypeVariant::AssetCode, - TypeVariant::AlphaNum4, - TypeVariant::AlphaNum12, - TypeVariant::Asset, - TypeVariant::Price, - TypeVariant::Liabilities, - TypeVariant::ThresholdIndexes, - TypeVariant::LedgerEntryType, - TypeVariant::Signer, - TypeVariant::AccountFlags, - TypeVariant::SponsorshipDescriptor, - TypeVariant::AccountEntryExtensionV3, - TypeVariant::AccountEntryExtensionV2, - TypeVariant::AccountEntryExtensionV2Ext, - TypeVariant::AccountEntryExtensionV1, - TypeVariant::AccountEntryExtensionV1Ext, - TypeVariant::AccountEntry, - TypeVariant::AccountEntryExt, - TypeVariant::TrustLineFlags, - TypeVariant::LiquidityPoolType, - TypeVariant::TrustLineAsset, - TypeVariant::TrustLineEntryExtensionV2, - TypeVariant::TrustLineEntryExtensionV2Ext, - TypeVariant::TrustLineEntry, - TypeVariant::TrustLineEntryExt, - TypeVariant::TrustLineEntryV1, - TypeVariant::TrustLineEntryV1Ext, - TypeVariant::OfferEntryFlags, - TypeVariant::OfferEntry, - TypeVariant::OfferEntryExt, - TypeVariant::DataEntry, - TypeVariant::DataEntryExt, - TypeVariant::ClaimPredicateType, - TypeVariant::ClaimPredicate, - TypeVariant::ClaimantType, - TypeVariant::Claimant, - TypeVariant::ClaimantV0, - TypeVariant::ClaimableBalanceFlags, - TypeVariant::ClaimableBalanceEntryExtensionV1, - TypeVariant::ClaimableBalanceEntryExtensionV1Ext, - TypeVariant::ClaimableBalanceEntry, - TypeVariant::ClaimableBalanceEntryExt, - TypeVariant::LiquidityPoolConstantProductParameters, - TypeVariant::LiquidityPoolEntry, - TypeVariant::LiquidityPoolEntryBody, - TypeVariant::LiquidityPoolEntryConstantProduct, - TypeVariant::ContractDataDurability, - TypeVariant::ContractDataEntry, - TypeVariant::ContractCodeCostInputs, - TypeVariant::ContractCodeEntry, - TypeVariant::ContractCodeEntryExt, - TypeVariant::ContractCodeEntryV1, - TypeVariant::TtlEntry, - TypeVariant::LedgerEntryExtensionV1, - TypeVariant::LedgerEntryExtensionV1Ext, - TypeVariant::LedgerEntry, - TypeVariant::LedgerEntryData, - TypeVariant::LedgerEntryExt, - TypeVariant::LedgerKey, - TypeVariant::LedgerKeyAccount, - TypeVariant::LedgerKeyTrustLine, - TypeVariant::LedgerKeyOffer, - TypeVariant::LedgerKeyData, - TypeVariant::LedgerKeyClaimableBalance, - TypeVariant::LedgerKeyLiquidityPool, - TypeVariant::LedgerKeyContractData, - TypeVariant::LedgerKeyContractCode, - TypeVariant::LedgerKeyConfigSetting, - TypeVariant::LedgerKeyTtl, - TypeVariant::EnvelopeType, - TypeVariant::BucketListType, - TypeVariant::BucketEntryType, - TypeVariant::HotArchiveBucketEntryType, - TypeVariant::BucketMetadata, - TypeVariant::BucketMetadataExt, - TypeVariant::BucketEntry, - TypeVariant::HotArchiveBucketEntry, - TypeVariant::UpgradeType, - TypeVariant::StellarValueType, - TypeVariant::LedgerCloseValueSignature, - TypeVariant::StellarValue, - TypeVariant::StellarValueExt, - TypeVariant::LedgerHeaderFlags, - TypeVariant::LedgerHeaderExtensionV1, - TypeVariant::LedgerHeaderExtensionV1Ext, - TypeVariant::LedgerHeader, - TypeVariant::LedgerHeaderExt, - TypeVariant::LedgerUpgradeType, - TypeVariant::ConfigUpgradeSetKey, - TypeVariant::LedgerUpgrade, - TypeVariant::ConfigUpgradeSet, - TypeVariant::TxSetComponentType, - TypeVariant::DependentTxCluster, - TypeVariant::ParallelTxExecutionStage, - TypeVariant::ParallelTxsComponent, - TypeVariant::TxSetComponent, - TypeVariant::TxSetComponentTxsMaybeDiscountedFee, - TypeVariant::TransactionPhase, - TypeVariant::TransactionSet, - TypeVariant::TransactionSetV1, - TypeVariant::GeneralizedTransactionSet, - TypeVariant::TransactionResultPair, - TypeVariant::TransactionResultSet, - TypeVariant::TransactionHistoryEntry, - TypeVariant::TransactionHistoryEntryExt, - TypeVariant::TransactionHistoryResultEntry, - TypeVariant::TransactionHistoryResultEntryExt, - TypeVariant::LedgerHeaderHistoryEntry, - TypeVariant::LedgerHeaderHistoryEntryExt, - TypeVariant::LedgerScpMessages, - TypeVariant::ScpHistoryEntryV0, - TypeVariant::ScpHistoryEntry, - TypeVariant::LedgerEntryChangeType, - TypeVariant::LedgerEntryChange, - TypeVariant::LedgerEntryChanges, - TypeVariant::OperationMeta, - TypeVariant::TransactionMetaV1, - TypeVariant::TransactionMetaV2, - TypeVariant::ContractEventType, - TypeVariant::ContractEvent, - TypeVariant::ContractEventBody, - TypeVariant::ContractEventV0, - TypeVariant::DiagnosticEvent, - TypeVariant::SorobanTransactionMetaExtV1, - TypeVariant::SorobanTransactionMetaExt, - TypeVariant::SorobanTransactionMeta, - TypeVariant::TransactionMetaV3, - TypeVariant::OperationMetaV2, - TypeVariant::SorobanTransactionMetaV2, - TypeVariant::TransactionEventStage, - TypeVariant::TransactionEvent, - TypeVariant::TransactionMetaV4, - TypeVariant::InvokeHostFunctionSuccessPreImage, - TypeVariant::TransactionMeta, - TypeVariant::TransactionResultMeta, - TypeVariant::TransactionResultMetaV1, - TypeVariant::UpgradeEntryMeta, - TypeVariant::LedgerCloseMetaV0, - TypeVariant::LedgerCloseMetaExtV1, - TypeVariant::LedgerCloseMetaExt, - TypeVariant::LedgerCloseMetaV1, - TypeVariant::LedgerCloseMetaV2, - TypeVariant::LedgerCloseMeta, - TypeVariant::ErrorCode, - TypeVariant::SError, - TypeVariant::SendMore, - TypeVariant::SendMoreExtended, - TypeVariant::AuthCert, - TypeVariant::Hello, - TypeVariant::Auth, - TypeVariant::IpAddrType, - TypeVariant::PeerAddress, - TypeVariant::PeerAddressIp, - TypeVariant::MessageType, - TypeVariant::DontHave, - TypeVariant::SurveyMessageCommandType, - TypeVariant::SurveyMessageResponseType, - TypeVariant::TimeSlicedSurveyStartCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage, - TypeVariant::TimeSlicedSurveyStopCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage, - TypeVariant::SurveyRequestMessage, - TypeVariant::TimeSlicedSurveyRequestMessage, - TypeVariant::SignedTimeSlicedSurveyRequestMessage, - TypeVariant::EncryptedBody, - TypeVariant::SurveyResponseMessage, - TypeVariant::TimeSlicedSurveyResponseMessage, - TypeVariant::SignedTimeSlicedSurveyResponseMessage, - TypeVariant::PeerStats, - TypeVariant::TimeSlicedNodeData, - TypeVariant::TimeSlicedPeerData, - TypeVariant::TimeSlicedPeerDataList, - TypeVariant::TopologyResponseBodyV2, - TypeVariant::SurveyResponseBody, - TypeVariant::TxAdvertVector, - TypeVariant::FloodAdvert, - TypeVariant::TxDemandVector, - TypeVariant::FloodDemand, - TypeVariant::StellarMessage, - TypeVariant::AuthenticatedMessage, - TypeVariant::AuthenticatedMessageV0, - TypeVariant::LiquidityPoolParameters, - TypeVariant::MuxedAccount, - TypeVariant::MuxedAccountMed25519, - TypeVariant::DecoratedSignature, - TypeVariant::OperationType, - TypeVariant::CreateAccountOp, - TypeVariant::PaymentOp, - TypeVariant::PathPaymentStrictReceiveOp, - TypeVariant::PathPaymentStrictSendOp, - TypeVariant::ManageSellOfferOp, - TypeVariant::ManageBuyOfferOp, - TypeVariant::CreatePassiveSellOfferOp, - TypeVariant::SetOptionsOp, - TypeVariant::ChangeTrustAsset, - TypeVariant::ChangeTrustOp, - TypeVariant::AllowTrustOp, - TypeVariant::ManageDataOp, - TypeVariant::BumpSequenceOp, - TypeVariant::CreateClaimableBalanceOp, - TypeVariant::ClaimClaimableBalanceOp, - TypeVariant::BeginSponsoringFutureReservesOp, - TypeVariant::RevokeSponsorshipType, - TypeVariant::RevokeSponsorshipOp, - TypeVariant::RevokeSponsorshipOpSigner, - TypeVariant::ClawbackOp, - TypeVariant::ClawbackClaimableBalanceOp, - TypeVariant::SetTrustLineFlagsOp, - TypeVariant::LiquidityPoolDepositOp, - TypeVariant::LiquidityPoolWithdrawOp, - TypeVariant::HostFunctionType, - TypeVariant::ContractIdPreimageType, - TypeVariant::ContractIdPreimage, - TypeVariant::ContractIdPreimageFromAddress, - TypeVariant::CreateContractArgs, - TypeVariant::CreateContractArgsV2, - TypeVariant::InvokeContractArgs, - TypeVariant::HostFunction, - TypeVariant::SorobanAuthorizedFunctionType, - TypeVariant::SorobanAuthorizedFunction, - TypeVariant::SorobanAuthorizedInvocation, - TypeVariant::SorobanAddressCredentials, - TypeVariant::SorobanCredentialsType, - TypeVariant::SorobanCredentials, - TypeVariant::SorobanAuthorizationEntry, - TypeVariant::SorobanAuthorizationEntries, - TypeVariant::InvokeHostFunctionOp, - TypeVariant::ExtendFootprintTtlOp, - TypeVariant::RestoreFootprintOp, - TypeVariant::Operation, - TypeVariant::OperationBody, - TypeVariant::HashIdPreimage, - TypeVariant::HashIdPreimageOperationId, - TypeVariant::HashIdPreimageRevokeId, - TypeVariant::HashIdPreimageContractId, - TypeVariant::HashIdPreimageSorobanAuthorization, - TypeVariant::MemoType, - TypeVariant::Memo, - TypeVariant::TimeBounds, - TypeVariant::LedgerBounds, - TypeVariant::PreconditionsV2, - TypeVariant::PreconditionType, - TypeVariant::Preconditions, - TypeVariant::LedgerFootprint, - TypeVariant::SorobanResources, - TypeVariant::SorobanResourcesExtV0, - TypeVariant::SorobanTransactionData, - TypeVariant::SorobanTransactionDataExt, - TypeVariant::TransactionV0, - TypeVariant::TransactionV0Ext, - TypeVariant::TransactionV0Envelope, - TypeVariant::Transaction, - TypeVariant::TransactionExt, - TypeVariant::TransactionV1Envelope, - TypeVariant::FeeBumpTransaction, - TypeVariant::FeeBumpTransactionInnerTx, - TypeVariant::FeeBumpTransactionExt, - TypeVariant::FeeBumpTransactionEnvelope, - TypeVariant::TransactionEnvelope, - TypeVariant::TransactionSignaturePayload, - TypeVariant::TransactionSignaturePayloadTaggedTransaction, - TypeVariant::ClaimAtomType, - TypeVariant::ClaimOfferAtomV0, - TypeVariant::ClaimOfferAtom, - TypeVariant::ClaimLiquidityAtom, - TypeVariant::ClaimAtom, - TypeVariant::CreateAccountResultCode, - TypeVariant::CreateAccountResult, - TypeVariant::PaymentResultCode, - TypeVariant::PaymentResult, - TypeVariant::PathPaymentStrictReceiveResultCode, - TypeVariant::SimplePaymentResult, - TypeVariant::PathPaymentStrictReceiveResult, - TypeVariant::PathPaymentStrictReceiveResultSuccess, - TypeVariant::PathPaymentStrictSendResultCode, - TypeVariant::PathPaymentStrictSendResult, - TypeVariant::PathPaymentStrictSendResultSuccess, - TypeVariant::ManageSellOfferResultCode, - TypeVariant::ManageOfferEffect, - TypeVariant::ManageOfferSuccessResult, - TypeVariant::ManageOfferSuccessResultOffer, - TypeVariant::ManageSellOfferResult, - TypeVariant::ManageBuyOfferResultCode, - TypeVariant::ManageBuyOfferResult, - TypeVariant::SetOptionsResultCode, - TypeVariant::SetOptionsResult, - TypeVariant::ChangeTrustResultCode, - TypeVariant::ChangeTrustResult, - TypeVariant::AllowTrustResultCode, - TypeVariant::AllowTrustResult, - TypeVariant::AccountMergeResultCode, - TypeVariant::AccountMergeResult, - TypeVariant::InflationResultCode, - TypeVariant::InflationPayout, - TypeVariant::InflationResult, - TypeVariant::ManageDataResultCode, - TypeVariant::ManageDataResult, - TypeVariant::BumpSequenceResultCode, - TypeVariant::BumpSequenceResult, - TypeVariant::CreateClaimableBalanceResultCode, - TypeVariant::CreateClaimableBalanceResult, - TypeVariant::ClaimClaimableBalanceResultCode, - TypeVariant::ClaimClaimableBalanceResult, - TypeVariant::BeginSponsoringFutureReservesResultCode, - TypeVariant::BeginSponsoringFutureReservesResult, - TypeVariant::EndSponsoringFutureReservesResultCode, - TypeVariant::EndSponsoringFutureReservesResult, - TypeVariant::RevokeSponsorshipResultCode, - TypeVariant::RevokeSponsorshipResult, - TypeVariant::ClawbackResultCode, - TypeVariant::ClawbackResult, - TypeVariant::ClawbackClaimableBalanceResultCode, - TypeVariant::ClawbackClaimableBalanceResult, - TypeVariant::SetTrustLineFlagsResultCode, - TypeVariant::SetTrustLineFlagsResult, - TypeVariant::LiquidityPoolDepositResultCode, - TypeVariant::LiquidityPoolDepositResult, - TypeVariant::LiquidityPoolWithdrawResultCode, - TypeVariant::LiquidityPoolWithdrawResult, - TypeVariant::InvokeHostFunctionResultCode, - TypeVariant::InvokeHostFunctionResult, - TypeVariant::ExtendFootprintTtlResultCode, - TypeVariant::ExtendFootprintTtlResult, - TypeVariant::RestoreFootprintResultCode, - TypeVariant::RestoreFootprintResult, - TypeVariant::OperationResultCode, - TypeVariant::OperationResult, - TypeVariant::OperationResultTr, - TypeVariant::TransactionResultCode, - TypeVariant::InnerTransactionResult, - TypeVariant::InnerTransactionResultResult, - TypeVariant::InnerTransactionResultExt, - TypeVariant::InnerTransactionResultPair, - TypeVariant::TransactionResult, - TypeVariant::TransactionResultResult, - TypeVariant::TransactionResultExt, - TypeVariant::Hash, - TypeVariant::Uint256, - TypeVariant::Uint32, - TypeVariant::Int32, - TypeVariant::Uint64, - TypeVariant::Int64, - TypeVariant::TimePoint, - TypeVariant::Duration, - TypeVariant::ExtensionPoint, - TypeVariant::CryptoKeyType, - TypeVariant::PublicKeyType, - TypeVariant::SignerKeyType, - TypeVariant::PublicKey, - TypeVariant::SignerKey, - TypeVariant::SignerKeyEd25519SignedPayload, - TypeVariant::Signature, - TypeVariant::SignatureHint, - TypeVariant::NodeId, - TypeVariant::AccountId, - TypeVariant::ContractId, - TypeVariant::Curve25519Secret, - TypeVariant::Curve25519Public, - TypeVariant::HmacSha256Key, - TypeVariant::HmacSha256Mac, - TypeVariant::ShortHashSeed, - TypeVariant::BinaryFuseFilterType, - TypeVariant::SerializedBinaryFuseFilter, - TypeVariant::PoolId, - TypeVariant::ClaimableBalanceIdType, - TypeVariant::ClaimableBalanceId, - ]; + pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; const _VARIANTS_STR: &[&str] = &[ "Value", "ScpBallot", @@ -56924,7 +52391,2687 @@ impl Type { "ClaimableBalanceIdType", "ClaimableBalanceId", ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = [ + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; + + #[must_use] + #[allow(clippy::too_many_lines)] + pub const fn name(&self) -> &'static str { + match self { + Self::Value => "Value", + Self::ScpBallot => "ScpBallot", + Self::ScpStatementType => "ScpStatementType", + Self::ScpNomination => "ScpNomination", + Self::ScpStatement => "ScpStatement", + Self::ScpStatementPledges => "ScpStatementPledges", + Self::ScpStatementPrepare => "ScpStatementPrepare", + Self::ScpStatementConfirm => "ScpStatementConfirm", + Self::ScpStatementExternalize => "ScpStatementExternalize", + Self::ScpEnvelope => "ScpEnvelope", + Self::ScpQuorumSet => "ScpQuorumSet", + Self::EncodedLedgerKey => "EncodedLedgerKey", + Self::ConfigSettingContractExecutionLanesV0 => "ConfigSettingContractExecutionLanesV0", + Self::ConfigSettingContractComputeV0 => "ConfigSettingContractComputeV0", + Self::ConfigSettingContractParallelComputeV0 => { + "ConfigSettingContractParallelComputeV0" + } + Self::ConfigSettingContractLedgerCostV0 => "ConfigSettingContractLedgerCostV0", + Self::ConfigSettingContractLedgerCostExtV0 => "ConfigSettingContractLedgerCostExtV0", + Self::ConfigSettingContractHistoricalDataV0 => "ConfigSettingContractHistoricalDataV0", + Self::ConfigSettingContractEventsV0 => "ConfigSettingContractEventsV0", + Self::ConfigSettingContractBandwidthV0 => "ConfigSettingContractBandwidthV0", + Self::ContractCostType => "ContractCostType", + Self::ContractCostParamEntry => "ContractCostParamEntry", + Self::StateArchivalSettings => "StateArchivalSettings", + Self::EvictionIterator => "EvictionIterator", + Self::ConfigSettingScpTiming => "ConfigSettingScpTiming", + Self::FrozenLedgerKeys => "FrozenLedgerKeys", + Self::FrozenLedgerKeysDelta => "FrozenLedgerKeysDelta", + Self::FreezeBypassTxs => "FreezeBypassTxs", + Self::FreezeBypassTxsDelta => "FreezeBypassTxsDelta", + Self::ContractCostParams => "ContractCostParams", + Self::ConfigSettingId => "ConfigSettingId", + Self::ConfigSettingEntry => "ConfigSettingEntry", + Self::ScEnvMetaKind => "ScEnvMetaKind", + Self::ScEnvMetaEntry => "ScEnvMetaEntry", + Self::ScEnvMetaEntryInterfaceVersion => "ScEnvMetaEntryInterfaceVersion", + Self::ScMetaV0 => "ScMetaV0", + Self::ScMetaKind => "ScMetaKind", + Self::ScMetaEntry => "ScMetaEntry", + Self::ScSpecType => "ScSpecType", + Self::ScSpecTypeOption => "ScSpecTypeOption", + Self::ScSpecTypeResult => "ScSpecTypeResult", + Self::ScSpecTypeVec => "ScSpecTypeVec", + Self::ScSpecTypeMap => "ScSpecTypeMap", + Self::ScSpecTypeTuple => "ScSpecTypeTuple", + Self::ScSpecTypeBytesN => "ScSpecTypeBytesN", + Self::ScSpecTypeUdt => "ScSpecTypeUdt", + Self::ScSpecTypeDef => "ScSpecTypeDef", + Self::ScSpecUdtStructFieldV0 => "ScSpecUdtStructFieldV0", + Self::ScSpecUdtStructV0 => "ScSpecUdtStructV0", + Self::ScSpecUdtUnionCaseVoidV0 => "ScSpecUdtUnionCaseVoidV0", + Self::ScSpecUdtUnionCaseTupleV0 => "ScSpecUdtUnionCaseTupleV0", + Self::ScSpecUdtUnionCaseV0Kind => "ScSpecUdtUnionCaseV0Kind", + Self::ScSpecUdtUnionCaseV0 => "ScSpecUdtUnionCaseV0", + Self::ScSpecUdtUnionV0 => "ScSpecUdtUnionV0", + Self::ScSpecUdtEnumCaseV0 => "ScSpecUdtEnumCaseV0", + Self::ScSpecUdtEnumV0 => "ScSpecUdtEnumV0", + Self::ScSpecUdtErrorEnumCaseV0 => "ScSpecUdtErrorEnumCaseV0", + Self::ScSpecUdtErrorEnumV0 => "ScSpecUdtErrorEnumV0", + Self::ScSpecFunctionInputV0 => "ScSpecFunctionInputV0", + Self::ScSpecFunctionV0 => "ScSpecFunctionV0", + Self::ScSpecEventParamLocationV0 => "ScSpecEventParamLocationV0", + Self::ScSpecEventParamV0 => "ScSpecEventParamV0", + Self::ScSpecEventDataFormat => "ScSpecEventDataFormat", + Self::ScSpecEventV0 => "ScSpecEventV0", + Self::ScSpecEntryKind => "ScSpecEntryKind", + Self::ScSpecEntry => "ScSpecEntry", + Self::ScValType => "ScValType", + Self::ScErrorType => "ScErrorType", + Self::ScErrorCode => "ScErrorCode", + Self::ScError => "ScError", + Self::UInt128Parts => "UInt128Parts", + Self::Int128Parts => "Int128Parts", + Self::UInt256Parts => "UInt256Parts", + Self::Int256Parts => "Int256Parts", + Self::ContractExecutableType => "ContractExecutableType", + Self::ContractExecutable => "ContractExecutable", + Self::ScAddressType => "ScAddressType", + Self::MuxedEd25519Account => "MuxedEd25519Account", + Self::ScAddress => "ScAddress", + Self::ScVec => "ScVec", + Self::ScMap => "ScMap", + Self::ScBytes => "ScBytes", + Self::ScString => "ScString", + Self::ScSymbol => "ScSymbol", + Self::ScNonceKey => "ScNonceKey", + Self::ScContractInstance => "ScContractInstance", + Self::ScVal => "ScVal", + Self::ScMapEntry => "ScMapEntry", + Self::LedgerCloseMetaBatch => "LedgerCloseMetaBatch", + Self::StoredTransactionSet => "StoredTransactionSet", + Self::StoredDebugTransactionSet => "StoredDebugTransactionSet", + Self::PersistedScpStateV0 => "PersistedScpStateV0", + Self::PersistedScpStateV1 => "PersistedScpStateV1", + Self::PersistedScpState => "PersistedScpState", + Self::Thresholds => "Thresholds", + Self::String32 => "String32", + Self::String64 => "String64", + Self::SequenceNumber => "SequenceNumber", + Self::DataValue => "DataValue", + Self::AssetCode4 => "AssetCode4", + Self::AssetCode12 => "AssetCode12", + Self::AssetType => "AssetType", + Self::AssetCode => "AssetCode", + Self::AlphaNum4 => "AlphaNum4", + Self::AlphaNum12 => "AlphaNum12", + Self::Asset => "Asset", + Self::Price => "Price", + Self::Liabilities => "Liabilities", + Self::ThresholdIndexes => "ThresholdIndexes", + Self::LedgerEntryType => "LedgerEntryType", + Self::Signer => "Signer", + Self::AccountFlags => "AccountFlags", + Self::SponsorshipDescriptor => "SponsorshipDescriptor", + Self::AccountEntryExtensionV3 => "AccountEntryExtensionV3", + Self::AccountEntryExtensionV2 => "AccountEntryExtensionV2", + Self::AccountEntryExtensionV2Ext => "AccountEntryExtensionV2Ext", + Self::AccountEntryExtensionV1 => "AccountEntryExtensionV1", + Self::AccountEntryExtensionV1Ext => "AccountEntryExtensionV1Ext", + Self::AccountEntry => "AccountEntry", + Self::AccountEntryExt => "AccountEntryExt", + Self::TrustLineFlags => "TrustLineFlags", + Self::LiquidityPoolType => "LiquidityPoolType", + Self::TrustLineAsset => "TrustLineAsset", + Self::TrustLineEntryExtensionV2 => "TrustLineEntryExtensionV2", + Self::TrustLineEntryExtensionV2Ext => "TrustLineEntryExtensionV2Ext", + Self::TrustLineEntry => "TrustLineEntry", + Self::TrustLineEntryExt => "TrustLineEntryExt", + Self::TrustLineEntryV1 => "TrustLineEntryV1", + Self::TrustLineEntryV1Ext => "TrustLineEntryV1Ext", + Self::OfferEntryFlags => "OfferEntryFlags", + Self::OfferEntry => "OfferEntry", + Self::OfferEntryExt => "OfferEntryExt", + Self::DataEntry => "DataEntry", + Self::DataEntryExt => "DataEntryExt", + Self::ClaimPredicateType => "ClaimPredicateType", + Self::ClaimPredicate => "ClaimPredicate", + Self::ClaimantType => "ClaimantType", + Self::Claimant => "Claimant", + Self::ClaimantV0 => "ClaimantV0", + Self::ClaimableBalanceFlags => "ClaimableBalanceFlags", + Self::ClaimableBalanceEntryExtensionV1 => "ClaimableBalanceEntryExtensionV1", + Self::ClaimableBalanceEntryExtensionV1Ext => "ClaimableBalanceEntryExtensionV1Ext", + Self::ClaimableBalanceEntry => "ClaimableBalanceEntry", + Self::ClaimableBalanceEntryExt => "ClaimableBalanceEntryExt", + Self::LiquidityPoolConstantProductParameters => { + "LiquidityPoolConstantProductParameters" + } + Self::LiquidityPoolEntry => "LiquidityPoolEntry", + Self::LiquidityPoolEntryBody => "LiquidityPoolEntryBody", + Self::LiquidityPoolEntryConstantProduct => "LiquidityPoolEntryConstantProduct", + Self::ContractDataDurability => "ContractDataDurability", + Self::ContractDataEntry => "ContractDataEntry", + Self::ContractCodeCostInputs => "ContractCodeCostInputs", + Self::ContractCodeEntry => "ContractCodeEntry", + Self::ContractCodeEntryExt => "ContractCodeEntryExt", + Self::ContractCodeEntryV1 => "ContractCodeEntryV1", + Self::TtlEntry => "TtlEntry", + Self::LedgerEntryExtensionV1 => "LedgerEntryExtensionV1", + Self::LedgerEntryExtensionV1Ext => "LedgerEntryExtensionV1Ext", + Self::LedgerEntry => "LedgerEntry", + Self::LedgerEntryData => "LedgerEntryData", + Self::LedgerEntryExt => "LedgerEntryExt", + Self::LedgerKey => "LedgerKey", + Self::LedgerKeyAccount => "LedgerKeyAccount", + Self::LedgerKeyTrustLine => "LedgerKeyTrustLine", + Self::LedgerKeyOffer => "LedgerKeyOffer", + Self::LedgerKeyData => "LedgerKeyData", + Self::LedgerKeyClaimableBalance => "LedgerKeyClaimableBalance", + Self::LedgerKeyLiquidityPool => "LedgerKeyLiquidityPool", + Self::LedgerKeyContractData => "LedgerKeyContractData", + Self::LedgerKeyContractCode => "LedgerKeyContractCode", + Self::LedgerKeyConfigSetting => "LedgerKeyConfigSetting", + Self::LedgerKeyTtl => "LedgerKeyTtl", + Self::EnvelopeType => "EnvelopeType", + Self::BucketListType => "BucketListType", + Self::BucketEntryType => "BucketEntryType", + Self::HotArchiveBucketEntryType => "HotArchiveBucketEntryType", + Self::BucketMetadata => "BucketMetadata", + Self::BucketMetadataExt => "BucketMetadataExt", + Self::BucketEntry => "BucketEntry", + Self::HotArchiveBucketEntry => "HotArchiveBucketEntry", + Self::UpgradeType => "UpgradeType", + Self::StellarValueType => "StellarValueType", + Self::LedgerCloseValueSignature => "LedgerCloseValueSignature", + Self::StellarValue => "StellarValue", + Self::StellarValueExt => "StellarValueExt", + Self::LedgerHeaderFlags => "LedgerHeaderFlags", + Self::LedgerHeaderExtensionV1 => "LedgerHeaderExtensionV1", + Self::LedgerHeaderExtensionV1Ext => "LedgerHeaderExtensionV1Ext", + Self::LedgerHeader => "LedgerHeader", + Self::LedgerHeaderExt => "LedgerHeaderExt", + Self::LedgerUpgradeType => "LedgerUpgradeType", + Self::ConfigUpgradeSetKey => "ConfigUpgradeSetKey", + Self::LedgerUpgrade => "LedgerUpgrade", + Self::ConfigUpgradeSet => "ConfigUpgradeSet", + Self::TxSetComponentType => "TxSetComponentType", + Self::DependentTxCluster => "DependentTxCluster", + Self::ParallelTxExecutionStage => "ParallelTxExecutionStage", + Self::ParallelTxsComponent => "ParallelTxsComponent", + Self::TxSetComponent => "TxSetComponent", + Self::TxSetComponentTxsMaybeDiscountedFee => "TxSetComponentTxsMaybeDiscountedFee", + Self::TransactionPhase => "TransactionPhase", + Self::TransactionSet => "TransactionSet", + Self::TransactionSetV1 => "TransactionSetV1", + Self::GeneralizedTransactionSet => "GeneralizedTransactionSet", + Self::TransactionResultPair => "TransactionResultPair", + Self::TransactionResultSet => "TransactionResultSet", + Self::TransactionHistoryEntry => "TransactionHistoryEntry", + Self::TransactionHistoryEntryExt => "TransactionHistoryEntryExt", + Self::TransactionHistoryResultEntry => "TransactionHistoryResultEntry", + Self::TransactionHistoryResultEntryExt => "TransactionHistoryResultEntryExt", + Self::LedgerHeaderHistoryEntry => "LedgerHeaderHistoryEntry", + Self::LedgerHeaderHistoryEntryExt => "LedgerHeaderHistoryEntryExt", + Self::LedgerScpMessages => "LedgerScpMessages", + Self::ScpHistoryEntryV0 => "ScpHistoryEntryV0", + Self::ScpHistoryEntry => "ScpHistoryEntry", + Self::LedgerEntryChangeType => "LedgerEntryChangeType", + Self::LedgerEntryChange => "LedgerEntryChange", + Self::LedgerEntryChanges => "LedgerEntryChanges", + Self::OperationMeta => "OperationMeta", + Self::TransactionMetaV1 => "TransactionMetaV1", + Self::TransactionMetaV2 => "TransactionMetaV2", + Self::ContractEventType => "ContractEventType", + Self::ContractEvent => "ContractEvent", + Self::ContractEventBody => "ContractEventBody", + Self::ContractEventV0 => "ContractEventV0", + Self::DiagnosticEvent => "DiagnosticEvent", + Self::SorobanTransactionMetaExtV1 => "SorobanTransactionMetaExtV1", + Self::SorobanTransactionMetaExt => "SorobanTransactionMetaExt", + Self::SorobanTransactionMeta => "SorobanTransactionMeta", + Self::TransactionMetaV3 => "TransactionMetaV3", + Self::OperationMetaV2 => "OperationMetaV2", + Self::SorobanTransactionMetaV2 => "SorobanTransactionMetaV2", + Self::TransactionEventStage => "TransactionEventStage", + Self::TransactionEvent => "TransactionEvent", + Self::TransactionMetaV4 => "TransactionMetaV4", + Self::InvokeHostFunctionSuccessPreImage => "InvokeHostFunctionSuccessPreImage", + Self::TransactionMeta => "TransactionMeta", + Self::TransactionResultMeta => "TransactionResultMeta", + Self::TransactionResultMetaV1 => "TransactionResultMetaV1", + Self::UpgradeEntryMeta => "UpgradeEntryMeta", + Self::LedgerCloseMetaV0 => "LedgerCloseMetaV0", + Self::LedgerCloseMetaExtV1 => "LedgerCloseMetaExtV1", + Self::LedgerCloseMetaExt => "LedgerCloseMetaExt", + Self::LedgerCloseMetaV1 => "LedgerCloseMetaV1", + Self::LedgerCloseMetaV2 => "LedgerCloseMetaV2", + Self::LedgerCloseMeta => "LedgerCloseMeta", + Self::ErrorCode => "ErrorCode", + Self::SError => "SError", + Self::SendMore => "SendMore", + Self::SendMoreExtended => "SendMoreExtended", + Self::AuthCert => "AuthCert", + Self::Hello => "Hello", + Self::Auth => "Auth", + Self::IpAddrType => "IpAddrType", + Self::PeerAddress => "PeerAddress", + Self::PeerAddressIp => "PeerAddressIp", + Self::MessageType => "MessageType", + Self::DontHave => "DontHave", + Self::SurveyMessageCommandType => "SurveyMessageCommandType", + Self::SurveyMessageResponseType => "SurveyMessageResponseType", + Self::TimeSlicedSurveyStartCollectingMessage => { + "TimeSlicedSurveyStartCollectingMessage" + } + Self::SignedTimeSlicedSurveyStartCollectingMessage => { + "SignedTimeSlicedSurveyStartCollectingMessage" + } + Self::TimeSlicedSurveyStopCollectingMessage => "TimeSlicedSurveyStopCollectingMessage", + Self::SignedTimeSlicedSurveyStopCollectingMessage => { + "SignedTimeSlicedSurveyStopCollectingMessage" + } + Self::SurveyRequestMessage => "SurveyRequestMessage", + Self::TimeSlicedSurveyRequestMessage => "TimeSlicedSurveyRequestMessage", + Self::SignedTimeSlicedSurveyRequestMessage => "SignedTimeSlicedSurveyRequestMessage", + Self::EncryptedBody => "EncryptedBody", + Self::SurveyResponseMessage => "SurveyResponseMessage", + Self::TimeSlicedSurveyResponseMessage => "TimeSlicedSurveyResponseMessage", + Self::SignedTimeSlicedSurveyResponseMessage => "SignedTimeSlicedSurveyResponseMessage", + Self::PeerStats => "PeerStats", + Self::TimeSlicedNodeData => "TimeSlicedNodeData", + Self::TimeSlicedPeerData => "TimeSlicedPeerData", + Self::TimeSlicedPeerDataList => "TimeSlicedPeerDataList", + Self::TopologyResponseBodyV2 => "TopologyResponseBodyV2", + Self::SurveyResponseBody => "SurveyResponseBody", + Self::TxAdvertVector => "TxAdvertVector", + Self::FloodAdvert => "FloodAdvert", + Self::TxDemandVector => "TxDemandVector", + Self::FloodDemand => "FloodDemand", + Self::StellarMessage => "StellarMessage", + Self::AuthenticatedMessage => "AuthenticatedMessage", + Self::AuthenticatedMessageV0 => "AuthenticatedMessageV0", + Self::LiquidityPoolParameters => "LiquidityPoolParameters", + Self::MuxedAccount => "MuxedAccount", + Self::MuxedAccountMed25519 => "MuxedAccountMed25519", + Self::DecoratedSignature => "DecoratedSignature", + Self::OperationType => "OperationType", + Self::CreateAccountOp => "CreateAccountOp", + Self::PaymentOp => "PaymentOp", + Self::PathPaymentStrictReceiveOp => "PathPaymentStrictReceiveOp", + Self::PathPaymentStrictSendOp => "PathPaymentStrictSendOp", + Self::ManageSellOfferOp => "ManageSellOfferOp", + Self::ManageBuyOfferOp => "ManageBuyOfferOp", + Self::CreatePassiveSellOfferOp => "CreatePassiveSellOfferOp", + Self::SetOptionsOp => "SetOptionsOp", + Self::ChangeTrustAsset => "ChangeTrustAsset", + Self::ChangeTrustOp => "ChangeTrustOp", + Self::AllowTrustOp => "AllowTrustOp", + Self::ManageDataOp => "ManageDataOp", + Self::BumpSequenceOp => "BumpSequenceOp", + Self::CreateClaimableBalanceOp => "CreateClaimableBalanceOp", + Self::ClaimClaimableBalanceOp => "ClaimClaimableBalanceOp", + Self::BeginSponsoringFutureReservesOp => "BeginSponsoringFutureReservesOp", + Self::RevokeSponsorshipType => "RevokeSponsorshipType", + Self::RevokeSponsorshipOp => "RevokeSponsorshipOp", + Self::RevokeSponsorshipOpSigner => "RevokeSponsorshipOpSigner", + Self::ClawbackOp => "ClawbackOp", + Self::ClawbackClaimableBalanceOp => "ClawbackClaimableBalanceOp", + Self::SetTrustLineFlagsOp => "SetTrustLineFlagsOp", + Self::LiquidityPoolDepositOp => "LiquidityPoolDepositOp", + Self::LiquidityPoolWithdrawOp => "LiquidityPoolWithdrawOp", + Self::HostFunctionType => "HostFunctionType", + Self::ContractIdPreimageType => "ContractIdPreimageType", + Self::ContractIdPreimage => "ContractIdPreimage", + Self::ContractIdPreimageFromAddress => "ContractIdPreimageFromAddress", + Self::CreateContractArgs => "CreateContractArgs", + Self::CreateContractArgsV2 => "CreateContractArgsV2", + Self::InvokeContractArgs => "InvokeContractArgs", + Self::HostFunction => "HostFunction", + Self::SorobanAuthorizedFunctionType => "SorobanAuthorizedFunctionType", + Self::SorobanAuthorizedFunction => "SorobanAuthorizedFunction", + Self::SorobanAuthorizedInvocation => "SorobanAuthorizedInvocation", + Self::SorobanAddressCredentials => "SorobanAddressCredentials", + Self::SorobanCredentialsType => "SorobanCredentialsType", + Self::SorobanCredentials => "SorobanCredentials", + Self::SorobanAuthorizationEntry => "SorobanAuthorizationEntry", + Self::SorobanAuthorizationEntries => "SorobanAuthorizationEntries", + Self::InvokeHostFunctionOp => "InvokeHostFunctionOp", + Self::ExtendFootprintTtlOp => "ExtendFootprintTtlOp", + Self::RestoreFootprintOp => "RestoreFootprintOp", + Self::Operation => "Operation", + Self::OperationBody => "OperationBody", + Self::HashIdPreimage => "HashIdPreimage", + Self::HashIdPreimageOperationId => "HashIdPreimageOperationId", + Self::HashIdPreimageRevokeId => "HashIdPreimageRevokeId", + Self::HashIdPreimageContractId => "HashIdPreimageContractId", + Self::HashIdPreimageSorobanAuthorization => "HashIdPreimageSorobanAuthorization", + Self::MemoType => "MemoType", + Self::Memo => "Memo", + Self::TimeBounds => "TimeBounds", + Self::LedgerBounds => "LedgerBounds", + Self::PreconditionsV2 => "PreconditionsV2", + Self::PreconditionType => "PreconditionType", + Self::Preconditions => "Preconditions", + Self::LedgerFootprint => "LedgerFootprint", + Self::SorobanResources => "SorobanResources", + Self::SorobanResourcesExtV0 => "SorobanResourcesExtV0", + Self::SorobanTransactionData => "SorobanTransactionData", + Self::SorobanTransactionDataExt => "SorobanTransactionDataExt", + Self::TransactionV0 => "TransactionV0", + Self::TransactionV0Ext => "TransactionV0Ext", + Self::TransactionV0Envelope => "TransactionV0Envelope", + Self::Transaction => "Transaction", + Self::TransactionExt => "TransactionExt", + Self::TransactionV1Envelope => "TransactionV1Envelope", + Self::FeeBumpTransaction => "FeeBumpTransaction", + Self::FeeBumpTransactionInnerTx => "FeeBumpTransactionInnerTx", + Self::FeeBumpTransactionExt => "FeeBumpTransactionExt", + Self::FeeBumpTransactionEnvelope => "FeeBumpTransactionEnvelope", + Self::TransactionEnvelope => "TransactionEnvelope", + Self::TransactionSignaturePayload => "TransactionSignaturePayload", + Self::TransactionSignaturePayloadTaggedTransaction => { + "TransactionSignaturePayloadTaggedTransaction" + } + Self::ClaimAtomType => "ClaimAtomType", + Self::ClaimOfferAtomV0 => "ClaimOfferAtomV0", + Self::ClaimOfferAtom => "ClaimOfferAtom", + Self::ClaimLiquidityAtom => "ClaimLiquidityAtom", + Self::ClaimAtom => "ClaimAtom", + Self::CreateAccountResultCode => "CreateAccountResultCode", + Self::CreateAccountResult => "CreateAccountResult", + Self::PaymentResultCode => "PaymentResultCode", + Self::PaymentResult => "PaymentResult", + Self::PathPaymentStrictReceiveResultCode => "PathPaymentStrictReceiveResultCode", + Self::SimplePaymentResult => "SimplePaymentResult", + Self::PathPaymentStrictReceiveResult => "PathPaymentStrictReceiveResult", + Self::PathPaymentStrictReceiveResultSuccess => "PathPaymentStrictReceiveResultSuccess", + Self::PathPaymentStrictSendResultCode => "PathPaymentStrictSendResultCode", + Self::PathPaymentStrictSendResult => "PathPaymentStrictSendResult", + Self::PathPaymentStrictSendResultSuccess => "PathPaymentStrictSendResultSuccess", + Self::ManageSellOfferResultCode => "ManageSellOfferResultCode", + Self::ManageOfferEffect => "ManageOfferEffect", + Self::ManageOfferSuccessResult => "ManageOfferSuccessResult", + Self::ManageOfferSuccessResultOffer => "ManageOfferSuccessResultOffer", + Self::ManageSellOfferResult => "ManageSellOfferResult", + Self::ManageBuyOfferResultCode => "ManageBuyOfferResultCode", + Self::ManageBuyOfferResult => "ManageBuyOfferResult", + Self::SetOptionsResultCode => "SetOptionsResultCode", + Self::SetOptionsResult => "SetOptionsResult", + Self::ChangeTrustResultCode => "ChangeTrustResultCode", + Self::ChangeTrustResult => "ChangeTrustResult", + Self::AllowTrustResultCode => "AllowTrustResultCode", + Self::AllowTrustResult => "AllowTrustResult", + Self::AccountMergeResultCode => "AccountMergeResultCode", + Self::AccountMergeResult => "AccountMergeResult", + Self::InflationResultCode => "InflationResultCode", + Self::InflationPayout => "InflationPayout", + Self::InflationResult => "InflationResult", + Self::ManageDataResultCode => "ManageDataResultCode", + Self::ManageDataResult => "ManageDataResult", + Self::BumpSequenceResultCode => "BumpSequenceResultCode", + Self::BumpSequenceResult => "BumpSequenceResult", + Self::CreateClaimableBalanceResultCode => "CreateClaimableBalanceResultCode", + Self::CreateClaimableBalanceResult => "CreateClaimableBalanceResult", + Self::ClaimClaimableBalanceResultCode => "ClaimClaimableBalanceResultCode", + Self::ClaimClaimableBalanceResult => "ClaimClaimableBalanceResult", + Self::BeginSponsoringFutureReservesResultCode => { + "BeginSponsoringFutureReservesResultCode" + } + Self::BeginSponsoringFutureReservesResult => "BeginSponsoringFutureReservesResult", + Self::EndSponsoringFutureReservesResultCode => "EndSponsoringFutureReservesResultCode", + Self::EndSponsoringFutureReservesResult => "EndSponsoringFutureReservesResult", + Self::RevokeSponsorshipResultCode => "RevokeSponsorshipResultCode", + Self::RevokeSponsorshipResult => "RevokeSponsorshipResult", + Self::ClawbackResultCode => "ClawbackResultCode", + Self::ClawbackResult => "ClawbackResult", + Self::ClawbackClaimableBalanceResultCode => "ClawbackClaimableBalanceResultCode", + Self::ClawbackClaimableBalanceResult => "ClawbackClaimableBalanceResult", + Self::SetTrustLineFlagsResultCode => "SetTrustLineFlagsResultCode", + Self::SetTrustLineFlagsResult => "SetTrustLineFlagsResult", + Self::LiquidityPoolDepositResultCode => "LiquidityPoolDepositResultCode", + Self::LiquidityPoolDepositResult => "LiquidityPoolDepositResult", + Self::LiquidityPoolWithdrawResultCode => "LiquidityPoolWithdrawResultCode", + Self::LiquidityPoolWithdrawResult => "LiquidityPoolWithdrawResult", + Self::InvokeHostFunctionResultCode => "InvokeHostFunctionResultCode", + Self::InvokeHostFunctionResult => "InvokeHostFunctionResult", + Self::ExtendFootprintTtlResultCode => "ExtendFootprintTtlResultCode", + Self::ExtendFootprintTtlResult => "ExtendFootprintTtlResult", + Self::RestoreFootprintResultCode => "RestoreFootprintResultCode", + Self::RestoreFootprintResult => "RestoreFootprintResult", + Self::OperationResultCode => "OperationResultCode", + Self::OperationResult => "OperationResult", + Self::OperationResultTr => "OperationResultTr", + Self::TransactionResultCode => "TransactionResultCode", + Self::InnerTransactionResult => "InnerTransactionResult", + Self::InnerTransactionResultResult => "InnerTransactionResultResult", + Self::InnerTransactionResultExt => "InnerTransactionResultExt", + Self::InnerTransactionResultPair => "InnerTransactionResultPair", + Self::TransactionResult => "TransactionResult", + Self::TransactionResultResult => "TransactionResultResult", + Self::TransactionResultExt => "TransactionResultExt", + Self::Hash => "Hash", + Self::Uint256 => "Uint256", + Self::Uint32 => "Uint32", + Self::Int32 => "Int32", + Self::Uint64 => "Uint64", + Self::Int64 => "Int64", + Self::TimePoint => "TimePoint", + Self::Duration => "Duration", + Self::ExtensionPoint => "ExtensionPoint", + Self::CryptoKeyType => "CryptoKeyType", + Self::PublicKeyType => "PublicKeyType", + Self::SignerKeyType => "SignerKeyType", + Self::PublicKey => "PublicKey", + Self::SignerKey => "SignerKey", + Self::SignerKeyEd25519SignedPayload => "SignerKeyEd25519SignedPayload", + Self::Signature => "Signature", + Self::SignatureHint => "SignatureHint", + Self::NodeId => "NodeId", + Self::AccountId => "AccountId", + Self::ContractId => "ContractId", + Self::Curve25519Secret => "Curve25519Secret", + Self::Curve25519Public => "Curve25519Public", + Self::HmacSha256Key => "HmacSha256Key", + Self::HmacSha256Mac => "HmacSha256Mac", + Self::ShortHashSeed => "ShortHashSeed", + Self::BinaryFuseFilterType => "BinaryFuseFilterType", + Self::SerializedBinaryFuseFilter => "SerializedBinaryFuseFilter", + Self::PoolId => "PoolId", + Self::ClaimableBalanceIdType => "ClaimableBalanceIdType", + Self::ClaimableBalanceId => "ClaimableBalanceId", + } + } + + #[must_use] + #[allow(clippy::too_many_lines)] + pub const fn variants() -> [TypeVariant; Self::_VARIANTS.len()] { + Self::VARIANTS + } + + #[cfg(feature = "schemars")] + #[must_use] + #[allow(clippy::too_many_lines)] + pub fn json_schema(&self, gen: schemars::gen::SchemaGenerator) -> schemars::schema::RootSchema { + match self { + Self::Value => gen.into_root_schema_for::(), + Self::ScpBallot => gen.into_root_schema_for::(), + Self::ScpStatementType => gen.into_root_schema_for::(), + Self::ScpNomination => gen.into_root_schema_for::(), + Self::ScpStatement => gen.into_root_schema_for::(), + Self::ScpStatementPledges => gen.into_root_schema_for::(), + Self::ScpStatementPrepare => gen.into_root_schema_for::(), + Self::ScpStatementConfirm => gen.into_root_schema_for::(), + Self::ScpStatementExternalize => gen.into_root_schema_for::(), + Self::ScpEnvelope => gen.into_root_schema_for::(), + Self::ScpQuorumSet => gen.into_root_schema_for::(), + Self::EncodedLedgerKey => gen.into_root_schema_for::(), + Self::ConfigSettingContractExecutionLanesV0 => { + gen.into_root_schema_for::() + } + Self::ConfigSettingContractComputeV0 => { + gen.into_root_schema_for::() + } + Self::ConfigSettingContractParallelComputeV0 => { + gen.into_root_schema_for::() + } + Self::ConfigSettingContractLedgerCostV0 => { + gen.into_root_schema_for::() + } + Self::ConfigSettingContractLedgerCostExtV0 => { + gen.into_root_schema_for::() + } + Self::ConfigSettingContractHistoricalDataV0 => { + gen.into_root_schema_for::() + } + Self::ConfigSettingContractEventsV0 => { + gen.into_root_schema_for::() + } + Self::ConfigSettingContractBandwidthV0 => { + gen.into_root_schema_for::() + } + Self::ContractCostType => gen.into_root_schema_for::(), + Self::ContractCostParamEntry => gen.into_root_schema_for::(), + Self::StateArchivalSettings => gen.into_root_schema_for::(), + Self::EvictionIterator => gen.into_root_schema_for::(), + Self::ConfigSettingScpTiming => gen.into_root_schema_for::(), + Self::FrozenLedgerKeys => gen.into_root_schema_for::(), + Self::FrozenLedgerKeysDelta => gen.into_root_schema_for::(), + Self::FreezeBypassTxs => gen.into_root_schema_for::(), + Self::FreezeBypassTxsDelta => gen.into_root_schema_for::(), + Self::ContractCostParams => gen.into_root_schema_for::(), + Self::ConfigSettingId => gen.into_root_schema_for::(), + Self::ConfigSettingEntry => gen.into_root_schema_for::(), + Self::ScEnvMetaKind => gen.into_root_schema_for::(), + Self::ScEnvMetaEntry => gen.into_root_schema_for::(), + Self::ScEnvMetaEntryInterfaceVersion => { + gen.into_root_schema_for::() + } + Self::ScMetaV0 => gen.into_root_schema_for::(), + Self::ScMetaKind => gen.into_root_schema_for::(), + Self::ScMetaEntry => gen.into_root_schema_for::(), + Self::ScSpecType => gen.into_root_schema_for::(), + Self::ScSpecTypeOption => gen.into_root_schema_for::(), + Self::ScSpecTypeResult => gen.into_root_schema_for::(), + Self::ScSpecTypeVec => gen.into_root_schema_for::(), + Self::ScSpecTypeMap => gen.into_root_schema_for::(), + Self::ScSpecTypeTuple => gen.into_root_schema_for::(), + Self::ScSpecTypeBytesN => gen.into_root_schema_for::(), + Self::ScSpecTypeUdt => gen.into_root_schema_for::(), + Self::ScSpecTypeDef => gen.into_root_schema_for::(), + Self::ScSpecUdtStructFieldV0 => gen.into_root_schema_for::(), + Self::ScSpecUdtStructV0 => gen.into_root_schema_for::(), + Self::ScSpecUdtUnionCaseVoidV0 => { + gen.into_root_schema_for::() + } + Self::ScSpecUdtUnionCaseTupleV0 => { + gen.into_root_schema_for::() + } + Self::ScSpecUdtUnionCaseV0Kind => { + gen.into_root_schema_for::() + } + Self::ScSpecUdtUnionCaseV0 => gen.into_root_schema_for::(), + Self::ScSpecUdtUnionV0 => gen.into_root_schema_for::(), + Self::ScSpecUdtEnumCaseV0 => gen.into_root_schema_for::(), + Self::ScSpecUdtEnumV0 => gen.into_root_schema_for::(), + Self::ScSpecUdtErrorEnumCaseV0 => { + gen.into_root_schema_for::() + } + Self::ScSpecUdtErrorEnumV0 => gen.into_root_schema_for::(), + Self::ScSpecFunctionInputV0 => gen.into_root_schema_for::(), + Self::ScSpecFunctionV0 => gen.into_root_schema_for::(), + Self::ScSpecEventParamLocationV0 => { + gen.into_root_schema_for::() + } + Self::ScSpecEventParamV0 => gen.into_root_schema_for::(), + Self::ScSpecEventDataFormat => gen.into_root_schema_for::(), + Self::ScSpecEventV0 => gen.into_root_schema_for::(), + Self::ScSpecEntryKind => gen.into_root_schema_for::(), + Self::ScSpecEntry => gen.into_root_schema_for::(), + Self::ScValType => gen.into_root_schema_for::(), + Self::ScErrorType => gen.into_root_schema_for::(), + Self::ScErrorCode => gen.into_root_schema_for::(), + Self::ScError => gen.into_root_schema_for::(), + Self::UInt128Parts => gen.into_root_schema_for::(), + Self::Int128Parts => gen.into_root_schema_for::(), + Self::UInt256Parts => gen.into_root_schema_for::(), + Self::Int256Parts => gen.into_root_schema_for::(), + Self::ContractExecutableType => gen.into_root_schema_for::(), + Self::ContractExecutable => gen.into_root_schema_for::(), + Self::ScAddressType => gen.into_root_schema_for::(), + Self::MuxedEd25519Account => gen.into_root_schema_for::(), + Self::ScAddress => gen.into_root_schema_for::(), + Self::ScVec => gen.into_root_schema_for::(), + Self::ScMap => gen.into_root_schema_for::(), + Self::ScBytes => gen.into_root_schema_for::(), + Self::ScString => gen.into_root_schema_for::(), + Self::ScSymbol => gen.into_root_schema_for::(), + Self::ScNonceKey => gen.into_root_schema_for::(), + Self::ScContractInstance => gen.into_root_schema_for::(), + Self::ScVal => gen.into_root_schema_for::(), + Self::ScMapEntry => gen.into_root_schema_for::(), + Self::LedgerCloseMetaBatch => gen.into_root_schema_for::(), + Self::StoredTransactionSet => gen.into_root_schema_for::(), + Self::StoredDebugTransactionSet => { + gen.into_root_schema_for::() + } + Self::PersistedScpStateV0 => gen.into_root_schema_for::(), + Self::PersistedScpStateV1 => gen.into_root_schema_for::(), + Self::PersistedScpState => gen.into_root_schema_for::(), + Self::Thresholds => gen.into_root_schema_for::(), + Self::String32 => gen.into_root_schema_for::(), + Self::String64 => gen.into_root_schema_for::(), + Self::SequenceNumber => gen.into_root_schema_for::(), + Self::DataValue => gen.into_root_schema_for::(), + Self::AssetCode4 => gen.into_root_schema_for::(), + Self::AssetCode12 => gen.into_root_schema_for::(), + Self::AssetType => gen.into_root_schema_for::(), + Self::AssetCode => gen.into_root_schema_for::(), + Self::AlphaNum4 => gen.into_root_schema_for::(), + Self::AlphaNum12 => gen.into_root_schema_for::(), + Self::Asset => gen.into_root_schema_for::(), + Self::Price => gen.into_root_schema_for::(), + Self::Liabilities => gen.into_root_schema_for::(), + Self::ThresholdIndexes => gen.into_root_schema_for::(), + Self::LedgerEntryType => gen.into_root_schema_for::(), + Self::Signer => gen.into_root_schema_for::(), + Self::AccountFlags => gen.into_root_schema_for::(), + Self::SponsorshipDescriptor => gen.into_root_schema_for::(), + Self::AccountEntryExtensionV3 => gen.into_root_schema_for::(), + Self::AccountEntryExtensionV2 => gen.into_root_schema_for::(), + Self::AccountEntryExtensionV2Ext => { + gen.into_root_schema_for::() + } + Self::AccountEntryExtensionV1 => gen.into_root_schema_for::(), + Self::AccountEntryExtensionV1Ext => { + gen.into_root_schema_for::() + } + Self::AccountEntry => gen.into_root_schema_for::(), + Self::AccountEntryExt => gen.into_root_schema_for::(), + Self::TrustLineFlags => gen.into_root_schema_for::(), + Self::LiquidityPoolType => gen.into_root_schema_for::(), + Self::TrustLineAsset => gen.into_root_schema_for::(), + Self::TrustLineEntryExtensionV2 => { + gen.into_root_schema_for::() + } + Self::TrustLineEntryExtensionV2Ext => { + gen.into_root_schema_for::() + } + Self::TrustLineEntry => gen.into_root_schema_for::(), + Self::TrustLineEntryExt => gen.into_root_schema_for::(), + Self::TrustLineEntryV1 => gen.into_root_schema_for::(), + Self::TrustLineEntryV1Ext => gen.into_root_schema_for::(), + Self::OfferEntryFlags => gen.into_root_schema_for::(), + Self::OfferEntry => gen.into_root_schema_for::(), + Self::OfferEntryExt => gen.into_root_schema_for::(), + Self::DataEntry => gen.into_root_schema_for::(), + Self::DataEntryExt => gen.into_root_schema_for::(), + Self::ClaimPredicateType => gen.into_root_schema_for::(), + Self::ClaimPredicate => gen.into_root_schema_for::(), + Self::ClaimantType => gen.into_root_schema_for::(), + Self::Claimant => gen.into_root_schema_for::(), + Self::ClaimantV0 => gen.into_root_schema_for::(), + Self::ClaimableBalanceFlags => gen.into_root_schema_for::(), + Self::ClaimableBalanceEntryExtensionV1 => { + gen.into_root_schema_for::() + } + Self::ClaimableBalanceEntryExtensionV1Ext => { + gen.into_root_schema_for::() + } + Self::ClaimableBalanceEntry => gen.into_root_schema_for::(), + Self::ClaimableBalanceEntryExt => { + gen.into_root_schema_for::() + } + Self::LiquidityPoolConstantProductParameters => { + gen.into_root_schema_for::() + } + Self::LiquidityPoolEntry => gen.into_root_schema_for::(), + Self::LiquidityPoolEntryBody => gen.into_root_schema_for::(), + Self::LiquidityPoolEntryConstantProduct => { + gen.into_root_schema_for::() + } + Self::ContractDataDurability => gen.into_root_schema_for::(), + Self::ContractDataEntry => gen.into_root_schema_for::(), + Self::ContractCodeCostInputs => gen.into_root_schema_for::(), + Self::ContractCodeEntry => gen.into_root_schema_for::(), + Self::ContractCodeEntryExt => gen.into_root_schema_for::(), + Self::ContractCodeEntryV1 => gen.into_root_schema_for::(), + Self::TtlEntry => gen.into_root_schema_for::(), + Self::LedgerEntryExtensionV1 => gen.into_root_schema_for::(), + Self::LedgerEntryExtensionV1Ext => { + gen.into_root_schema_for::() + } + Self::LedgerEntry => gen.into_root_schema_for::(), + Self::LedgerEntryData => gen.into_root_schema_for::(), + Self::LedgerEntryExt => gen.into_root_schema_for::(), + Self::LedgerKey => gen.into_root_schema_for::(), + Self::LedgerKeyAccount => gen.into_root_schema_for::(), + Self::LedgerKeyTrustLine => gen.into_root_schema_for::(), + Self::LedgerKeyOffer => gen.into_root_schema_for::(), + Self::LedgerKeyData => gen.into_root_schema_for::(), + Self::LedgerKeyClaimableBalance => { + gen.into_root_schema_for::() + } + Self::LedgerKeyLiquidityPool => gen.into_root_schema_for::(), + Self::LedgerKeyContractData => gen.into_root_schema_for::(), + Self::LedgerKeyContractCode => gen.into_root_schema_for::(), + Self::LedgerKeyConfigSetting => gen.into_root_schema_for::(), + Self::LedgerKeyTtl => gen.into_root_schema_for::(), + Self::EnvelopeType => gen.into_root_schema_for::(), + Self::BucketListType => gen.into_root_schema_for::(), + Self::BucketEntryType => gen.into_root_schema_for::(), + Self::HotArchiveBucketEntryType => { + gen.into_root_schema_for::() + } + Self::BucketMetadata => gen.into_root_schema_for::(), + Self::BucketMetadataExt => gen.into_root_schema_for::(), + Self::BucketEntry => gen.into_root_schema_for::(), + Self::HotArchiveBucketEntry => gen.into_root_schema_for::(), + Self::UpgradeType => gen.into_root_schema_for::(), + Self::StellarValueType => gen.into_root_schema_for::(), + Self::LedgerCloseValueSignature => { + gen.into_root_schema_for::() + } + Self::StellarValue => gen.into_root_schema_for::(), + Self::StellarValueExt => gen.into_root_schema_for::(), + Self::LedgerHeaderFlags => gen.into_root_schema_for::(), + Self::LedgerHeaderExtensionV1 => gen.into_root_schema_for::(), + Self::LedgerHeaderExtensionV1Ext => { + gen.into_root_schema_for::() + } + Self::LedgerHeader => gen.into_root_schema_for::(), + Self::LedgerHeaderExt => gen.into_root_schema_for::(), + Self::LedgerUpgradeType => gen.into_root_schema_for::(), + Self::ConfigUpgradeSetKey => gen.into_root_schema_for::(), + Self::LedgerUpgrade => gen.into_root_schema_for::(), + Self::ConfigUpgradeSet => gen.into_root_schema_for::(), + Self::TxSetComponentType => gen.into_root_schema_for::(), + Self::DependentTxCluster => gen.into_root_schema_for::(), + Self::ParallelTxExecutionStage => { + gen.into_root_schema_for::() + } + Self::ParallelTxsComponent => gen.into_root_schema_for::(), + Self::TxSetComponent => gen.into_root_schema_for::(), + Self::TxSetComponentTxsMaybeDiscountedFee => { + gen.into_root_schema_for::() + } + Self::TransactionPhase => gen.into_root_schema_for::(), + Self::TransactionSet => gen.into_root_schema_for::(), + Self::TransactionSetV1 => gen.into_root_schema_for::(), + Self::GeneralizedTransactionSet => { + gen.into_root_schema_for::() + } + Self::TransactionResultPair => gen.into_root_schema_for::(), + Self::TransactionResultSet => gen.into_root_schema_for::(), + Self::TransactionHistoryEntry => gen.into_root_schema_for::(), + Self::TransactionHistoryEntryExt => { + gen.into_root_schema_for::() + } + Self::TransactionHistoryResultEntry => { + gen.into_root_schema_for::() + } + Self::TransactionHistoryResultEntryExt => { + gen.into_root_schema_for::() + } + Self::LedgerHeaderHistoryEntry => { + gen.into_root_schema_for::() + } + Self::LedgerHeaderHistoryEntryExt => { + gen.into_root_schema_for::() + } + Self::LedgerScpMessages => gen.into_root_schema_for::(), + Self::ScpHistoryEntryV0 => gen.into_root_schema_for::(), + Self::ScpHistoryEntry => gen.into_root_schema_for::(), + Self::LedgerEntryChangeType => gen.into_root_schema_for::(), + Self::LedgerEntryChange => gen.into_root_schema_for::(), + Self::LedgerEntryChanges => gen.into_root_schema_for::(), + Self::OperationMeta => gen.into_root_schema_for::(), + Self::TransactionMetaV1 => gen.into_root_schema_for::(), + Self::TransactionMetaV2 => gen.into_root_schema_for::(), + Self::ContractEventType => gen.into_root_schema_for::(), + Self::ContractEvent => gen.into_root_schema_for::(), + Self::ContractEventBody => gen.into_root_schema_for::(), + Self::ContractEventV0 => gen.into_root_schema_for::(), + Self::DiagnosticEvent => gen.into_root_schema_for::(), + Self::SorobanTransactionMetaExtV1 => { + gen.into_root_schema_for::() + } + Self::SorobanTransactionMetaExt => { + gen.into_root_schema_for::() + } + Self::SorobanTransactionMeta => gen.into_root_schema_for::(), + Self::TransactionMetaV3 => gen.into_root_schema_for::(), + Self::OperationMetaV2 => gen.into_root_schema_for::(), + Self::SorobanTransactionMetaV2 => { + gen.into_root_schema_for::() + } + Self::TransactionEventStage => gen.into_root_schema_for::(), + Self::TransactionEvent => gen.into_root_schema_for::(), + Self::TransactionMetaV4 => gen.into_root_schema_for::(), + Self::InvokeHostFunctionSuccessPreImage => { + gen.into_root_schema_for::() + } + Self::TransactionMeta => gen.into_root_schema_for::(), + Self::TransactionResultMeta => gen.into_root_schema_for::(), + Self::TransactionResultMetaV1 => gen.into_root_schema_for::(), + Self::UpgradeEntryMeta => gen.into_root_schema_for::(), + Self::LedgerCloseMetaV0 => gen.into_root_schema_for::(), + Self::LedgerCloseMetaExtV1 => gen.into_root_schema_for::(), + Self::LedgerCloseMetaExt => gen.into_root_schema_for::(), + Self::LedgerCloseMetaV1 => gen.into_root_schema_for::(), + Self::LedgerCloseMetaV2 => gen.into_root_schema_for::(), + Self::LedgerCloseMeta => gen.into_root_schema_for::(), + Self::ErrorCode => gen.into_root_schema_for::(), + Self::SError => gen.into_root_schema_for::(), + Self::SendMore => gen.into_root_schema_for::(), + Self::SendMoreExtended => gen.into_root_schema_for::(), + Self::AuthCert => gen.into_root_schema_for::(), + Self::Hello => gen.into_root_schema_for::(), + Self::Auth => gen.into_root_schema_for::(), + Self::IpAddrType => gen.into_root_schema_for::(), + Self::PeerAddress => gen.into_root_schema_for::(), + Self::PeerAddressIp => gen.into_root_schema_for::(), + Self::MessageType => gen.into_root_schema_for::(), + Self::DontHave => gen.into_root_schema_for::(), + Self::SurveyMessageCommandType => { + gen.into_root_schema_for::() + } + Self::SurveyMessageResponseType => { + gen.into_root_schema_for::() + } + Self::TimeSlicedSurveyStartCollectingMessage => { + gen.into_root_schema_for::() + } + Self::SignedTimeSlicedSurveyStartCollectingMessage => { + gen.into_root_schema_for::() + } + Self::TimeSlicedSurveyStopCollectingMessage => { + gen.into_root_schema_for::() + } + Self::SignedTimeSlicedSurveyStopCollectingMessage => { + gen.into_root_schema_for::() + } + Self::SurveyRequestMessage => gen.into_root_schema_for::(), + Self::TimeSlicedSurveyRequestMessage => { + gen.into_root_schema_for::() + } + Self::SignedTimeSlicedSurveyRequestMessage => { + gen.into_root_schema_for::() + } + Self::EncryptedBody => gen.into_root_schema_for::(), + Self::SurveyResponseMessage => gen.into_root_schema_for::(), + Self::TimeSlicedSurveyResponseMessage => { + gen.into_root_schema_for::() + } + Self::SignedTimeSlicedSurveyResponseMessage => { + gen.into_root_schema_for::() + } + Self::PeerStats => gen.into_root_schema_for::(), + Self::TimeSlicedNodeData => gen.into_root_schema_for::(), + Self::TimeSlicedPeerData => gen.into_root_schema_for::(), + Self::TimeSlicedPeerDataList => gen.into_root_schema_for::(), + Self::TopologyResponseBodyV2 => gen.into_root_schema_for::(), + Self::SurveyResponseBody => gen.into_root_schema_for::(), + Self::TxAdvertVector => gen.into_root_schema_for::(), + Self::FloodAdvert => gen.into_root_schema_for::(), + Self::TxDemandVector => gen.into_root_schema_for::(), + Self::FloodDemand => gen.into_root_schema_for::(), + Self::StellarMessage => gen.into_root_schema_for::(), + Self::AuthenticatedMessage => gen.into_root_schema_for::(), + Self::AuthenticatedMessageV0 => gen.into_root_schema_for::(), + Self::LiquidityPoolParameters => gen.into_root_schema_for::(), + Self::MuxedAccount => gen.into_root_schema_for::(), + Self::MuxedAccountMed25519 => gen.into_root_schema_for::(), + Self::DecoratedSignature => gen.into_root_schema_for::(), + Self::OperationType => gen.into_root_schema_for::(), + Self::CreateAccountOp => gen.into_root_schema_for::(), + Self::PaymentOp => gen.into_root_schema_for::(), + Self::PathPaymentStrictReceiveOp => { + gen.into_root_schema_for::() + } + Self::PathPaymentStrictSendOp => gen.into_root_schema_for::(), + Self::ManageSellOfferOp => gen.into_root_schema_for::(), + Self::ManageBuyOfferOp => gen.into_root_schema_for::(), + Self::CreatePassiveSellOfferOp => { + gen.into_root_schema_for::() + } + Self::SetOptionsOp => gen.into_root_schema_for::(), + Self::ChangeTrustAsset => gen.into_root_schema_for::(), + Self::ChangeTrustOp => gen.into_root_schema_for::(), + Self::AllowTrustOp => gen.into_root_schema_for::(), + Self::ManageDataOp => gen.into_root_schema_for::(), + Self::BumpSequenceOp => gen.into_root_schema_for::(), + Self::CreateClaimableBalanceOp => { + gen.into_root_schema_for::() + } + Self::ClaimClaimableBalanceOp => gen.into_root_schema_for::(), + Self::BeginSponsoringFutureReservesOp => { + gen.into_root_schema_for::() + } + Self::RevokeSponsorshipType => gen.into_root_schema_for::(), + Self::RevokeSponsorshipOp => gen.into_root_schema_for::(), + Self::RevokeSponsorshipOpSigner => { + gen.into_root_schema_for::() + } + Self::ClawbackOp => gen.into_root_schema_for::(), + Self::ClawbackClaimableBalanceOp => { + gen.into_root_schema_for::() + } + Self::SetTrustLineFlagsOp => gen.into_root_schema_for::(), + Self::LiquidityPoolDepositOp => gen.into_root_schema_for::(), + Self::LiquidityPoolWithdrawOp => gen.into_root_schema_for::(), + Self::HostFunctionType => gen.into_root_schema_for::(), + Self::ContractIdPreimageType => gen.into_root_schema_for::(), + Self::ContractIdPreimage => gen.into_root_schema_for::(), + Self::ContractIdPreimageFromAddress => { + gen.into_root_schema_for::() + } + Self::CreateContractArgs => gen.into_root_schema_for::(), + Self::CreateContractArgsV2 => gen.into_root_schema_for::(), + Self::InvokeContractArgs => gen.into_root_schema_for::(), + Self::HostFunction => gen.into_root_schema_for::(), + Self::SorobanAuthorizedFunctionType => { + gen.into_root_schema_for::() + } + Self::SorobanAuthorizedFunction => { + gen.into_root_schema_for::() + } + Self::SorobanAuthorizedInvocation => { + gen.into_root_schema_for::() + } + Self::SorobanAddressCredentials => { + gen.into_root_schema_for::() + } + Self::SorobanCredentialsType => gen.into_root_schema_for::(), + Self::SorobanCredentials => gen.into_root_schema_for::(), + Self::SorobanAuthorizationEntry => { + gen.into_root_schema_for::() + } + Self::SorobanAuthorizationEntries => { + gen.into_root_schema_for::() + } + Self::InvokeHostFunctionOp => gen.into_root_schema_for::(), + Self::ExtendFootprintTtlOp => gen.into_root_schema_for::(), + Self::RestoreFootprintOp => gen.into_root_schema_for::(), + Self::Operation => gen.into_root_schema_for::(), + Self::OperationBody => gen.into_root_schema_for::(), + Self::HashIdPreimage => gen.into_root_schema_for::(), + Self::HashIdPreimageOperationId => { + gen.into_root_schema_for::() + } + Self::HashIdPreimageRevokeId => gen.into_root_schema_for::(), + Self::HashIdPreimageContractId => { + gen.into_root_schema_for::() + } + Self::HashIdPreimageSorobanAuthorization => { + gen.into_root_schema_for::() + } + Self::MemoType => gen.into_root_schema_for::(), + Self::Memo => gen.into_root_schema_for::(), + Self::TimeBounds => gen.into_root_schema_for::(), + Self::LedgerBounds => gen.into_root_schema_for::(), + Self::PreconditionsV2 => gen.into_root_schema_for::(), + Self::PreconditionType => gen.into_root_schema_for::(), + Self::Preconditions => gen.into_root_schema_for::(), + Self::LedgerFootprint => gen.into_root_schema_for::(), + Self::SorobanResources => gen.into_root_schema_for::(), + Self::SorobanResourcesExtV0 => gen.into_root_schema_for::(), + Self::SorobanTransactionData => gen.into_root_schema_for::(), + Self::SorobanTransactionDataExt => { + gen.into_root_schema_for::() + } + Self::TransactionV0 => gen.into_root_schema_for::(), + Self::TransactionV0Ext => gen.into_root_schema_for::(), + Self::TransactionV0Envelope => gen.into_root_schema_for::(), + Self::Transaction => gen.into_root_schema_for::(), + Self::TransactionExt => gen.into_root_schema_for::(), + Self::TransactionV1Envelope => gen.into_root_schema_for::(), + Self::FeeBumpTransaction => gen.into_root_schema_for::(), + Self::FeeBumpTransactionInnerTx => { + gen.into_root_schema_for::() + } + Self::FeeBumpTransactionExt => gen.into_root_schema_for::(), + Self::FeeBumpTransactionEnvelope => { + gen.into_root_schema_for::() + } + Self::TransactionEnvelope => gen.into_root_schema_for::(), + Self::TransactionSignaturePayload => { + gen.into_root_schema_for::() + } + Self::TransactionSignaturePayloadTaggedTransaction => { + gen.into_root_schema_for::() + } + Self::ClaimAtomType => gen.into_root_schema_for::(), + Self::ClaimOfferAtomV0 => gen.into_root_schema_for::(), + Self::ClaimOfferAtom => gen.into_root_schema_for::(), + Self::ClaimLiquidityAtom => gen.into_root_schema_for::(), + Self::ClaimAtom => gen.into_root_schema_for::(), + Self::CreateAccountResultCode => gen.into_root_schema_for::(), + Self::CreateAccountResult => gen.into_root_schema_for::(), + Self::PaymentResultCode => gen.into_root_schema_for::(), + Self::PaymentResult => gen.into_root_schema_for::(), + Self::PathPaymentStrictReceiveResultCode => { + gen.into_root_schema_for::() + } + Self::SimplePaymentResult => gen.into_root_schema_for::(), + Self::PathPaymentStrictReceiveResult => { + gen.into_root_schema_for::() + } + Self::PathPaymentStrictReceiveResultSuccess => { + gen.into_root_schema_for::() + } + Self::PathPaymentStrictSendResultCode => { + gen.into_root_schema_for::() + } + Self::PathPaymentStrictSendResult => { + gen.into_root_schema_for::() + } + Self::PathPaymentStrictSendResultSuccess => { + gen.into_root_schema_for::() + } + Self::ManageSellOfferResultCode => { + gen.into_root_schema_for::() + } + Self::ManageOfferEffect => gen.into_root_schema_for::(), + Self::ManageOfferSuccessResult => { + gen.into_root_schema_for::() + } + Self::ManageOfferSuccessResultOffer => { + gen.into_root_schema_for::() + } + Self::ManageSellOfferResult => gen.into_root_schema_for::(), + Self::ManageBuyOfferResultCode => { + gen.into_root_schema_for::() + } + Self::ManageBuyOfferResult => gen.into_root_schema_for::(), + Self::SetOptionsResultCode => gen.into_root_schema_for::(), + Self::SetOptionsResult => gen.into_root_schema_for::(), + Self::ChangeTrustResultCode => gen.into_root_schema_for::(), + Self::ChangeTrustResult => gen.into_root_schema_for::(), + Self::AllowTrustResultCode => gen.into_root_schema_for::(), + Self::AllowTrustResult => gen.into_root_schema_for::(), + Self::AccountMergeResultCode => gen.into_root_schema_for::(), + Self::AccountMergeResult => gen.into_root_schema_for::(), + Self::InflationResultCode => gen.into_root_schema_for::(), + Self::InflationPayout => gen.into_root_schema_for::(), + Self::InflationResult => gen.into_root_schema_for::(), + Self::ManageDataResultCode => gen.into_root_schema_for::(), + Self::ManageDataResult => gen.into_root_schema_for::(), + Self::BumpSequenceResultCode => gen.into_root_schema_for::(), + Self::BumpSequenceResult => gen.into_root_schema_for::(), + Self::CreateClaimableBalanceResultCode => { + gen.into_root_schema_for::() + } + Self::CreateClaimableBalanceResult => { + gen.into_root_schema_for::() + } + Self::ClaimClaimableBalanceResultCode => { + gen.into_root_schema_for::() + } + Self::ClaimClaimableBalanceResult => { + gen.into_root_schema_for::() + } + Self::BeginSponsoringFutureReservesResultCode => { + gen.into_root_schema_for::() + } + Self::BeginSponsoringFutureReservesResult => { + gen.into_root_schema_for::() + } + Self::EndSponsoringFutureReservesResultCode => { + gen.into_root_schema_for::() + } + Self::EndSponsoringFutureReservesResult => { + gen.into_root_schema_for::() + } + Self::RevokeSponsorshipResultCode => { + gen.into_root_schema_for::() + } + Self::RevokeSponsorshipResult => gen.into_root_schema_for::(), + Self::ClawbackResultCode => gen.into_root_schema_for::(), + Self::ClawbackResult => gen.into_root_schema_for::(), + Self::ClawbackClaimableBalanceResultCode => { + gen.into_root_schema_for::() + } + Self::ClawbackClaimableBalanceResult => { + gen.into_root_schema_for::() + } + Self::SetTrustLineFlagsResultCode => { + gen.into_root_schema_for::() + } + Self::SetTrustLineFlagsResult => gen.into_root_schema_for::(), + Self::LiquidityPoolDepositResultCode => { + gen.into_root_schema_for::() + } + Self::LiquidityPoolDepositResult => { + gen.into_root_schema_for::() + } + Self::LiquidityPoolWithdrawResultCode => { + gen.into_root_schema_for::() + } + Self::LiquidityPoolWithdrawResult => { + gen.into_root_schema_for::() + } + Self::InvokeHostFunctionResultCode => { + gen.into_root_schema_for::() + } + Self::InvokeHostFunctionResult => { + gen.into_root_schema_for::() + } + Self::ExtendFootprintTtlResultCode => { + gen.into_root_schema_for::() + } + Self::ExtendFootprintTtlResult => { + gen.into_root_schema_for::() + } + Self::RestoreFootprintResultCode => { + gen.into_root_schema_for::() + } + Self::RestoreFootprintResult => gen.into_root_schema_for::(), + Self::OperationResultCode => gen.into_root_schema_for::(), + Self::OperationResult => gen.into_root_schema_for::(), + Self::OperationResultTr => gen.into_root_schema_for::(), + Self::TransactionResultCode => gen.into_root_schema_for::(), + Self::InnerTransactionResult => gen.into_root_schema_for::(), + Self::InnerTransactionResultResult => { + gen.into_root_schema_for::() + } + Self::InnerTransactionResultExt => { + gen.into_root_schema_for::() + } + Self::InnerTransactionResultPair => { + gen.into_root_schema_for::() + } + Self::TransactionResult => gen.into_root_schema_for::(), + Self::TransactionResultResult => gen.into_root_schema_for::(), + Self::TransactionResultExt => gen.into_root_schema_for::(), + Self::Hash => gen.into_root_schema_for::(), + Self::Uint256 => gen.into_root_schema_for::(), + Self::Uint32 => gen.into_root_schema_for::(), + Self::Int32 => gen.into_root_schema_for::(), + Self::Uint64 => gen.into_root_schema_for::(), + Self::Int64 => gen.into_root_schema_for::(), + Self::TimePoint => gen.into_root_schema_for::(), + Self::Duration => gen.into_root_schema_for::(), + Self::ExtensionPoint => gen.into_root_schema_for::(), + Self::CryptoKeyType => gen.into_root_schema_for::(), + Self::PublicKeyType => gen.into_root_schema_for::(), + Self::SignerKeyType => gen.into_root_schema_for::(), + Self::PublicKey => gen.into_root_schema_for::(), + Self::SignerKey => gen.into_root_schema_for::(), + Self::SignerKeyEd25519SignedPayload => { + gen.into_root_schema_for::() + } + Self::Signature => gen.into_root_schema_for::(), + Self::SignatureHint => gen.into_root_schema_for::(), + Self::NodeId => gen.into_root_schema_for::(), + Self::AccountId => gen.into_root_schema_for::(), + Self::ContractId => gen.into_root_schema_for::(), + Self::Curve25519Secret => gen.into_root_schema_for::(), + Self::Curve25519Public => gen.into_root_schema_for::(), + Self::HmacSha256Key => gen.into_root_schema_for::(), + Self::HmacSha256Mac => gen.into_root_schema_for::(), + Self::ShortHashSeed => gen.into_root_schema_for::(), + Self::BinaryFuseFilterType => gen.into_root_schema_for::(), + Self::SerializedBinaryFuseFilter => { + gen.into_root_schema_for::() + } + Self::PoolId => gen.into_root_schema_for::(), + Self::ClaimableBalanceIdType => gen.into_root_schema_for::(), + Self::ClaimableBalanceId => gen.into_root_schema_for::(), + } + } +} + +impl Name for TypeVariant { + #[must_use] + fn name(&self) -> &'static str { + Self::name(self) + } +} + +impl Variants for TypeVariant { + fn variants() -> slice::Iter<'static, TypeVariant> { + Self::VARIANTS.iter() + } +} + +impl core::str::FromStr for TypeVariant { + type Err = Error; + #[allow(clippy::too_many_lines)] + fn from_str(s: &str) -> Result { + match s { + "Value" => Ok(Self::Value), + "ScpBallot" => Ok(Self::ScpBallot), + "ScpStatementType" => Ok(Self::ScpStatementType), + "ScpNomination" => Ok(Self::ScpNomination), + "ScpStatement" => Ok(Self::ScpStatement), + "ScpStatementPledges" => Ok(Self::ScpStatementPledges), + "ScpStatementPrepare" => Ok(Self::ScpStatementPrepare), + "ScpStatementConfirm" => Ok(Self::ScpStatementConfirm), + "ScpStatementExternalize" => Ok(Self::ScpStatementExternalize), + "ScpEnvelope" => Ok(Self::ScpEnvelope), + "ScpQuorumSet" => Ok(Self::ScpQuorumSet), + "EncodedLedgerKey" => Ok(Self::EncodedLedgerKey), + "ConfigSettingContractExecutionLanesV0" => { + Ok(Self::ConfigSettingContractExecutionLanesV0) + } + "ConfigSettingContractComputeV0" => Ok(Self::ConfigSettingContractComputeV0), + "ConfigSettingContractParallelComputeV0" => { + Ok(Self::ConfigSettingContractParallelComputeV0) + } + "ConfigSettingContractLedgerCostV0" => Ok(Self::ConfigSettingContractLedgerCostV0), + "ConfigSettingContractLedgerCostExtV0" => { + Ok(Self::ConfigSettingContractLedgerCostExtV0) + } + "ConfigSettingContractHistoricalDataV0" => { + Ok(Self::ConfigSettingContractHistoricalDataV0) + } + "ConfigSettingContractEventsV0" => Ok(Self::ConfigSettingContractEventsV0), + "ConfigSettingContractBandwidthV0" => Ok(Self::ConfigSettingContractBandwidthV0), + "ContractCostType" => Ok(Self::ContractCostType), + "ContractCostParamEntry" => Ok(Self::ContractCostParamEntry), + "StateArchivalSettings" => Ok(Self::StateArchivalSettings), + "EvictionIterator" => Ok(Self::EvictionIterator), + "ConfigSettingScpTiming" => Ok(Self::ConfigSettingScpTiming), + "FrozenLedgerKeys" => Ok(Self::FrozenLedgerKeys), + "FrozenLedgerKeysDelta" => Ok(Self::FrozenLedgerKeysDelta), + "FreezeBypassTxs" => Ok(Self::FreezeBypassTxs), + "FreezeBypassTxsDelta" => Ok(Self::FreezeBypassTxsDelta), + "ContractCostParams" => Ok(Self::ContractCostParams), + "ConfigSettingId" => Ok(Self::ConfigSettingId), + "ConfigSettingEntry" => Ok(Self::ConfigSettingEntry), + "ScEnvMetaKind" => Ok(Self::ScEnvMetaKind), + "ScEnvMetaEntry" => Ok(Self::ScEnvMetaEntry), + "ScEnvMetaEntryInterfaceVersion" => Ok(Self::ScEnvMetaEntryInterfaceVersion), + "ScMetaV0" => Ok(Self::ScMetaV0), + "ScMetaKind" => Ok(Self::ScMetaKind), + "ScMetaEntry" => Ok(Self::ScMetaEntry), + "ScSpecType" => Ok(Self::ScSpecType), + "ScSpecTypeOption" => Ok(Self::ScSpecTypeOption), + "ScSpecTypeResult" => Ok(Self::ScSpecTypeResult), + "ScSpecTypeVec" => Ok(Self::ScSpecTypeVec), + "ScSpecTypeMap" => Ok(Self::ScSpecTypeMap), + "ScSpecTypeTuple" => Ok(Self::ScSpecTypeTuple), + "ScSpecTypeBytesN" => Ok(Self::ScSpecTypeBytesN), + "ScSpecTypeUdt" => Ok(Self::ScSpecTypeUdt), + "ScSpecTypeDef" => Ok(Self::ScSpecTypeDef), + "ScSpecUdtStructFieldV0" => Ok(Self::ScSpecUdtStructFieldV0), + "ScSpecUdtStructV0" => Ok(Self::ScSpecUdtStructV0), + "ScSpecUdtUnionCaseVoidV0" => Ok(Self::ScSpecUdtUnionCaseVoidV0), + "ScSpecUdtUnionCaseTupleV0" => Ok(Self::ScSpecUdtUnionCaseTupleV0), + "ScSpecUdtUnionCaseV0Kind" => Ok(Self::ScSpecUdtUnionCaseV0Kind), + "ScSpecUdtUnionCaseV0" => Ok(Self::ScSpecUdtUnionCaseV0), + "ScSpecUdtUnionV0" => Ok(Self::ScSpecUdtUnionV0), + "ScSpecUdtEnumCaseV0" => Ok(Self::ScSpecUdtEnumCaseV0), + "ScSpecUdtEnumV0" => Ok(Self::ScSpecUdtEnumV0), + "ScSpecUdtErrorEnumCaseV0" => Ok(Self::ScSpecUdtErrorEnumCaseV0), + "ScSpecUdtErrorEnumV0" => Ok(Self::ScSpecUdtErrorEnumV0), + "ScSpecFunctionInputV0" => Ok(Self::ScSpecFunctionInputV0), + "ScSpecFunctionV0" => Ok(Self::ScSpecFunctionV0), + "ScSpecEventParamLocationV0" => Ok(Self::ScSpecEventParamLocationV0), + "ScSpecEventParamV0" => Ok(Self::ScSpecEventParamV0), + "ScSpecEventDataFormat" => Ok(Self::ScSpecEventDataFormat), + "ScSpecEventV0" => Ok(Self::ScSpecEventV0), + "ScSpecEntryKind" => Ok(Self::ScSpecEntryKind), + "ScSpecEntry" => Ok(Self::ScSpecEntry), + "ScValType" => Ok(Self::ScValType), + "ScErrorType" => Ok(Self::ScErrorType), + "ScErrorCode" => Ok(Self::ScErrorCode), + "ScError" => Ok(Self::ScError), + "UInt128Parts" => Ok(Self::UInt128Parts), + "Int128Parts" => Ok(Self::Int128Parts), + "UInt256Parts" => Ok(Self::UInt256Parts), + "Int256Parts" => Ok(Self::Int256Parts), + "ContractExecutableType" => Ok(Self::ContractExecutableType), + "ContractExecutable" => Ok(Self::ContractExecutable), + "ScAddressType" => Ok(Self::ScAddressType), + "MuxedEd25519Account" => Ok(Self::MuxedEd25519Account), + "ScAddress" => Ok(Self::ScAddress), + "ScVec" => Ok(Self::ScVec), + "ScMap" => Ok(Self::ScMap), + "ScBytes" => Ok(Self::ScBytes), + "ScString" => Ok(Self::ScString), + "ScSymbol" => Ok(Self::ScSymbol), + "ScNonceKey" => Ok(Self::ScNonceKey), + "ScContractInstance" => Ok(Self::ScContractInstance), + "ScVal" => Ok(Self::ScVal), + "ScMapEntry" => Ok(Self::ScMapEntry), + "LedgerCloseMetaBatch" => Ok(Self::LedgerCloseMetaBatch), + "StoredTransactionSet" => Ok(Self::StoredTransactionSet), + "StoredDebugTransactionSet" => Ok(Self::StoredDebugTransactionSet), + "PersistedScpStateV0" => Ok(Self::PersistedScpStateV0), + "PersistedScpStateV1" => Ok(Self::PersistedScpStateV1), + "PersistedScpState" => Ok(Self::PersistedScpState), + "Thresholds" => Ok(Self::Thresholds), + "String32" => Ok(Self::String32), + "String64" => Ok(Self::String64), + "SequenceNumber" => Ok(Self::SequenceNumber), + "DataValue" => Ok(Self::DataValue), + "AssetCode4" => Ok(Self::AssetCode4), + "AssetCode12" => Ok(Self::AssetCode12), + "AssetType" => Ok(Self::AssetType), + "AssetCode" => Ok(Self::AssetCode), + "AlphaNum4" => Ok(Self::AlphaNum4), + "AlphaNum12" => Ok(Self::AlphaNum12), + "Asset" => Ok(Self::Asset), + "Price" => Ok(Self::Price), + "Liabilities" => Ok(Self::Liabilities), + "ThresholdIndexes" => Ok(Self::ThresholdIndexes), + "LedgerEntryType" => Ok(Self::LedgerEntryType), + "Signer" => Ok(Self::Signer), + "AccountFlags" => Ok(Self::AccountFlags), + "SponsorshipDescriptor" => Ok(Self::SponsorshipDescriptor), + "AccountEntryExtensionV3" => Ok(Self::AccountEntryExtensionV3), + "AccountEntryExtensionV2" => Ok(Self::AccountEntryExtensionV2), + "AccountEntryExtensionV2Ext" => Ok(Self::AccountEntryExtensionV2Ext), + "AccountEntryExtensionV1" => Ok(Self::AccountEntryExtensionV1), + "AccountEntryExtensionV1Ext" => Ok(Self::AccountEntryExtensionV1Ext), + "AccountEntry" => Ok(Self::AccountEntry), + "AccountEntryExt" => Ok(Self::AccountEntryExt), + "TrustLineFlags" => Ok(Self::TrustLineFlags), + "LiquidityPoolType" => Ok(Self::LiquidityPoolType), + "TrustLineAsset" => Ok(Self::TrustLineAsset), + "TrustLineEntryExtensionV2" => Ok(Self::TrustLineEntryExtensionV2), + "TrustLineEntryExtensionV2Ext" => Ok(Self::TrustLineEntryExtensionV2Ext), + "TrustLineEntry" => Ok(Self::TrustLineEntry), + "TrustLineEntryExt" => Ok(Self::TrustLineEntryExt), + "TrustLineEntryV1" => Ok(Self::TrustLineEntryV1), + "TrustLineEntryV1Ext" => Ok(Self::TrustLineEntryV1Ext), + "OfferEntryFlags" => Ok(Self::OfferEntryFlags), + "OfferEntry" => Ok(Self::OfferEntry), + "OfferEntryExt" => Ok(Self::OfferEntryExt), + "DataEntry" => Ok(Self::DataEntry), + "DataEntryExt" => Ok(Self::DataEntryExt), + "ClaimPredicateType" => Ok(Self::ClaimPredicateType), + "ClaimPredicate" => Ok(Self::ClaimPredicate), + "ClaimantType" => Ok(Self::ClaimantType), + "Claimant" => Ok(Self::Claimant), + "ClaimantV0" => Ok(Self::ClaimantV0), + "ClaimableBalanceFlags" => Ok(Self::ClaimableBalanceFlags), + "ClaimableBalanceEntryExtensionV1" => Ok(Self::ClaimableBalanceEntryExtensionV1), + "ClaimableBalanceEntryExtensionV1Ext" => Ok(Self::ClaimableBalanceEntryExtensionV1Ext), + "ClaimableBalanceEntry" => Ok(Self::ClaimableBalanceEntry), + "ClaimableBalanceEntryExt" => Ok(Self::ClaimableBalanceEntryExt), + "LiquidityPoolConstantProductParameters" => { + Ok(Self::LiquidityPoolConstantProductParameters) + } + "LiquidityPoolEntry" => Ok(Self::LiquidityPoolEntry), + "LiquidityPoolEntryBody" => Ok(Self::LiquidityPoolEntryBody), + "LiquidityPoolEntryConstantProduct" => Ok(Self::LiquidityPoolEntryConstantProduct), + "ContractDataDurability" => Ok(Self::ContractDataDurability), + "ContractDataEntry" => Ok(Self::ContractDataEntry), + "ContractCodeCostInputs" => Ok(Self::ContractCodeCostInputs), + "ContractCodeEntry" => Ok(Self::ContractCodeEntry), + "ContractCodeEntryExt" => Ok(Self::ContractCodeEntryExt), + "ContractCodeEntryV1" => Ok(Self::ContractCodeEntryV1), + "TtlEntry" => Ok(Self::TtlEntry), + "LedgerEntryExtensionV1" => Ok(Self::LedgerEntryExtensionV1), + "LedgerEntryExtensionV1Ext" => Ok(Self::LedgerEntryExtensionV1Ext), + "LedgerEntry" => Ok(Self::LedgerEntry), + "LedgerEntryData" => Ok(Self::LedgerEntryData), + "LedgerEntryExt" => Ok(Self::LedgerEntryExt), + "LedgerKey" => Ok(Self::LedgerKey), + "LedgerKeyAccount" => Ok(Self::LedgerKeyAccount), + "LedgerKeyTrustLine" => Ok(Self::LedgerKeyTrustLine), + "LedgerKeyOffer" => Ok(Self::LedgerKeyOffer), + "LedgerKeyData" => Ok(Self::LedgerKeyData), + "LedgerKeyClaimableBalance" => Ok(Self::LedgerKeyClaimableBalance), + "LedgerKeyLiquidityPool" => Ok(Self::LedgerKeyLiquidityPool), + "LedgerKeyContractData" => Ok(Self::LedgerKeyContractData), + "LedgerKeyContractCode" => Ok(Self::LedgerKeyContractCode), + "LedgerKeyConfigSetting" => Ok(Self::LedgerKeyConfigSetting), + "LedgerKeyTtl" => Ok(Self::LedgerKeyTtl), + "EnvelopeType" => Ok(Self::EnvelopeType), + "BucketListType" => Ok(Self::BucketListType), + "BucketEntryType" => Ok(Self::BucketEntryType), + "HotArchiveBucketEntryType" => Ok(Self::HotArchiveBucketEntryType), + "BucketMetadata" => Ok(Self::BucketMetadata), + "BucketMetadataExt" => Ok(Self::BucketMetadataExt), + "BucketEntry" => Ok(Self::BucketEntry), + "HotArchiveBucketEntry" => Ok(Self::HotArchiveBucketEntry), + "UpgradeType" => Ok(Self::UpgradeType), + "StellarValueType" => Ok(Self::StellarValueType), + "LedgerCloseValueSignature" => Ok(Self::LedgerCloseValueSignature), + "StellarValue" => Ok(Self::StellarValue), + "StellarValueExt" => Ok(Self::StellarValueExt), + "LedgerHeaderFlags" => Ok(Self::LedgerHeaderFlags), + "LedgerHeaderExtensionV1" => Ok(Self::LedgerHeaderExtensionV1), + "LedgerHeaderExtensionV1Ext" => Ok(Self::LedgerHeaderExtensionV1Ext), + "LedgerHeader" => Ok(Self::LedgerHeader), + "LedgerHeaderExt" => Ok(Self::LedgerHeaderExt), + "LedgerUpgradeType" => Ok(Self::LedgerUpgradeType), + "ConfigUpgradeSetKey" => Ok(Self::ConfigUpgradeSetKey), + "LedgerUpgrade" => Ok(Self::LedgerUpgrade), + "ConfigUpgradeSet" => Ok(Self::ConfigUpgradeSet), + "TxSetComponentType" => Ok(Self::TxSetComponentType), + "DependentTxCluster" => Ok(Self::DependentTxCluster), + "ParallelTxExecutionStage" => Ok(Self::ParallelTxExecutionStage), + "ParallelTxsComponent" => Ok(Self::ParallelTxsComponent), + "TxSetComponent" => Ok(Self::TxSetComponent), + "TxSetComponentTxsMaybeDiscountedFee" => Ok(Self::TxSetComponentTxsMaybeDiscountedFee), + "TransactionPhase" => Ok(Self::TransactionPhase), + "TransactionSet" => Ok(Self::TransactionSet), + "TransactionSetV1" => Ok(Self::TransactionSetV1), + "GeneralizedTransactionSet" => Ok(Self::GeneralizedTransactionSet), + "TransactionResultPair" => Ok(Self::TransactionResultPair), + "TransactionResultSet" => Ok(Self::TransactionResultSet), + "TransactionHistoryEntry" => Ok(Self::TransactionHistoryEntry), + "TransactionHistoryEntryExt" => Ok(Self::TransactionHistoryEntryExt), + "TransactionHistoryResultEntry" => Ok(Self::TransactionHistoryResultEntry), + "TransactionHistoryResultEntryExt" => Ok(Self::TransactionHistoryResultEntryExt), + "LedgerHeaderHistoryEntry" => Ok(Self::LedgerHeaderHistoryEntry), + "LedgerHeaderHistoryEntryExt" => Ok(Self::LedgerHeaderHistoryEntryExt), + "LedgerScpMessages" => Ok(Self::LedgerScpMessages), + "ScpHistoryEntryV0" => Ok(Self::ScpHistoryEntryV0), + "ScpHistoryEntry" => Ok(Self::ScpHistoryEntry), + "LedgerEntryChangeType" => Ok(Self::LedgerEntryChangeType), + "LedgerEntryChange" => Ok(Self::LedgerEntryChange), + "LedgerEntryChanges" => Ok(Self::LedgerEntryChanges), + "OperationMeta" => Ok(Self::OperationMeta), + "TransactionMetaV1" => Ok(Self::TransactionMetaV1), + "TransactionMetaV2" => Ok(Self::TransactionMetaV2), + "ContractEventType" => Ok(Self::ContractEventType), + "ContractEvent" => Ok(Self::ContractEvent), + "ContractEventBody" => Ok(Self::ContractEventBody), + "ContractEventV0" => Ok(Self::ContractEventV0), + "DiagnosticEvent" => Ok(Self::DiagnosticEvent), + "SorobanTransactionMetaExtV1" => Ok(Self::SorobanTransactionMetaExtV1), + "SorobanTransactionMetaExt" => Ok(Self::SorobanTransactionMetaExt), + "SorobanTransactionMeta" => Ok(Self::SorobanTransactionMeta), + "TransactionMetaV3" => Ok(Self::TransactionMetaV3), + "OperationMetaV2" => Ok(Self::OperationMetaV2), + "SorobanTransactionMetaV2" => Ok(Self::SorobanTransactionMetaV2), + "TransactionEventStage" => Ok(Self::TransactionEventStage), + "TransactionEvent" => Ok(Self::TransactionEvent), + "TransactionMetaV4" => Ok(Self::TransactionMetaV4), + "InvokeHostFunctionSuccessPreImage" => Ok(Self::InvokeHostFunctionSuccessPreImage), + "TransactionMeta" => Ok(Self::TransactionMeta), + "TransactionResultMeta" => Ok(Self::TransactionResultMeta), + "TransactionResultMetaV1" => Ok(Self::TransactionResultMetaV1), + "UpgradeEntryMeta" => Ok(Self::UpgradeEntryMeta), + "LedgerCloseMetaV0" => Ok(Self::LedgerCloseMetaV0), + "LedgerCloseMetaExtV1" => Ok(Self::LedgerCloseMetaExtV1), + "LedgerCloseMetaExt" => Ok(Self::LedgerCloseMetaExt), + "LedgerCloseMetaV1" => Ok(Self::LedgerCloseMetaV1), + "LedgerCloseMetaV2" => Ok(Self::LedgerCloseMetaV2), + "LedgerCloseMeta" => Ok(Self::LedgerCloseMeta), + "ErrorCode" => Ok(Self::ErrorCode), + "SError" => Ok(Self::SError), + "SendMore" => Ok(Self::SendMore), + "SendMoreExtended" => Ok(Self::SendMoreExtended), + "AuthCert" => Ok(Self::AuthCert), + "Hello" => Ok(Self::Hello), + "Auth" => Ok(Self::Auth), + "IpAddrType" => Ok(Self::IpAddrType), + "PeerAddress" => Ok(Self::PeerAddress), + "PeerAddressIp" => Ok(Self::PeerAddressIp), + "MessageType" => Ok(Self::MessageType), + "DontHave" => Ok(Self::DontHave), + "SurveyMessageCommandType" => Ok(Self::SurveyMessageCommandType), + "SurveyMessageResponseType" => Ok(Self::SurveyMessageResponseType), + "TimeSlicedSurveyStartCollectingMessage" => { + Ok(Self::TimeSlicedSurveyStartCollectingMessage) + } + "SignedTimeSlicedSurveyStartCollectingMessage" => { + Ok(Self::SignedTimeSlicedSurveyStartCollectingMessage) + } + "TimeSlicedSurveyStopCollectingMessage" => { + Ok(Self::TimeSlicedSurveyStopCollectingMessage) + } + "SignedTimeSlicedSurveyStopCollectingMessage" => { + Ok(Self::SignedTimeSlicedSurveyStopCollectingMessage) + } + "SurveyRequestMessage" => Ok(Self::SurveyRequestMessage), + "TimeSlicedSurveyRequestMessage" => Ok(Self::TimeSlicedSurveyRequestMessage), + "SignedTimeSlicedSurveyRequestMessage" => { + Ok(Self::SignedTimeSlicedSurveyRequestMessage) + } + "EncryptedBody" => Ok(Self::EncryptedBody), + "SurveyResponseMessage" => Ok(Self::SurveyResponseMessage), + "TimeSlicedSurveyResponseMessage" => Ok(Self::TimeSlicedSurveyResponseMessage), + "SignedTimeSlicedSurveyResponseMessage" => { + Ok(Self::SignedTimeSlicedSurveyResponseMessage) + } + "PeerStats" => Ok(Self::PeerStats), + "TimeSlicedNodeData" => Ok(Self::TimeSlicedNodeData), + "TimeSlicedPeerData" => Ok(Self::TimeSlicedPeerData), + "TimeSlicedPeerDataList" => Ok(Self::TimeSlicedPeerDataList), + "TopologyResponseBodyV2" => Ok(Self::TopologyResponseBodyV2), + "SurveyResponseBody" => Ok(Self::SurveyResponseBody), + "TxAdvertVector" => Ok(Self::TxAdvertVector), + "FloodAdvert" => Ok(Self::FloodAdvert), + "TxDemandVector" => Ok(Self::TxDemandVector), + "FloodDemand" => Ok(Self::FloodDemand), + "StellarMessage" => Ok(Self::StellarMessage), + "AuthenticatedMessage" => Ok(Self::AuthenticatedMessage), + "AuthenticatedMessageV0" => Ok(Self::AuthenticatedMessageV0), + "LiquidityPoolParameters" => Ok(Self::LiquidityPoolParameters), + "MuxedAccount" => Ok(Self::MuxedAccount), + "MuxedAccountMed25519" => Ok(Self::MuxedAccountMed25519), + "DecoratedSignature" => Ok(Self::DecoratedSignature), + "OperationType" => Ok(Self::OperationType), + "CreateAccountOp" => Ok(Self::CreateAccountOp), + "PaymentOp" => Ok(Self::PaymentOp), + "PathPaymentStrictReceiveOp" => Ok(Self::PathPaymentStrictReceiveOp), + "PathPaymentStrictSendOp" => Ok(Self::PathPaymentStrictSendOp), + "ManageSellOfferOp" => Ok(Self::ManageSellOfferOp), + "ManageBuyOfferOp" => Ok(Self::ManageBuyOfferOp), + "CreatePassiveSellOfferOp" => Ok(Self::CreatePassiveSellOfferOp), + "SetOptionsOp" => Ok(Self::SetOptionsOp), + "ChangeTrustAsset" => Ok(Self::ChangeTrustAsset), + "ChangeTrustOp" => Ok(Self::ChangeTrustOp), + "AllowTrustOp" => Ok(Self::AllowTrustOp), + "ManageDataOp" => Ok(Self::ManageDataOp), + "BumpSequenceOp" => Ok(Self::BumpSequenceOp), + "CreateClaimableBalanceOp" => Ok(Self::CreateClaimableBalanceOp), + "ClaimClaimableBalanceOp" => Ok(Self::ClaimClaimableBalanceOp), + "BeginSponsoringFutureReservesOp" => Ok(Self::BeginSponsoringFutureReservesOp), + "RevokeSponsorshipType" => Ok(Self::RevokeSponsorshipType), + "RevokeSponsorshipOp" => Ok(Self::RevokeSponsorshipOp), + "RevokeSponsorshipOpSigner" => Ok(Self::RevokeSponsorshipOpSigner), + "ClawbackOp" => Ok(Self::ClawbackOp), + "ClawbackClaimableBalanceOp" => Ok(Self::ClawbackClaimableBalanceOp), + "SetTrustLineFlagsOp" => Ok(Self::SetTrustLineFlagsOp), + "LiquidityPoolDepositOp" => Ok(Self::LiquidityPoolDepositOp), + "LiquidityPoolWithdrawOp" => Ok(Self::LiquidityPoolWithdrawOp), + "HostFunctionType" => Ok(Self::HostFunctionType), + "ContractIdPreimageType" => Ok(Self::ContractIdPreimageType), + "ContractIdPreimage" => Ok(Self::ContractIdPreimage), + "ContractIdPreimageFromAddress" => Ok(Self::ContractIdPreimageFromAddress), + "CreateContractArgs" => Ok(Self::CreateContractArgs), + "CreateContractArgsV2" => Ok(Self::CreateContractArgsV2), + "InvokeContractArgs" => Ok(Self::InvokeContractArgs), + "HostFunction" => Ok(Self::HostFunction), + "SorobanAuthorizedFunctionType" => Ok(Self::SorobanAuthorizedFunctionType), + "SorobanAuthorizedFunction" => Ok(Self::SorobanAuthorizedFunction), + "SorobanAuthorizedInvocation" => Ok(Self::SorobanAuthorizedInvocation), + "SorobanAddressCredentials" => Ok(Self::SorobanAddressCredentials), + "SorobanCredentialsType" => Ok(Self::SorobanCredentialsType), + "SorobanCredentials" => Ok(Self::SorobanCredentials), + "SorobanAuthorizationEntry" => Ok(Self::SorobanAuthorizationEntry), + "SorobanAuthorizationEntries" => Ok(Self::SorobanAuthorizationEntries), + "InvokeHostFunctionOp" => Ok(Self::InvokeHostFunctionOp), + "ExtendFootprintTtlOp" => Ok(Self::ExtendFootprintTtlOp), + "RestoreFootprintOp" => Ok(Self::RestoreFootprintOp), + "Operation" => Ok(Self::Operation), + "OperationBody" => Ok(Self::OperationBody), + "HashIdPreimage" => Ok(Self::HashIdPreimage), + "HashIdPreimageOperationId" => Ok(Self::HashIdPreimageOperationId), + "HashIdPreimageRevokeId" => Ok(Self::HashIdPreimageRevokeId), + "HashIdPreimageContractId" => Ok(Self::HashIdPreimageContractId), + "HashIdPreimageSorobanAuthorization" => Ok(Self::HashIdPreimageSorobanAuthorization), + "MemoType" => Ok(Self::MemoType), + "Memo" => Ok(Self::Memo), + "TimeBounds" => Ok(Self::TimeBounds), + "LedgerBounds" => Ok(Self::LedgerBounds), + "PreconditionsV2" => Ok(Self::PreconditionsV2), + "PreconditionType" => Ok(Self::PreconditionType), + "Preconditions" => Ok(Self::Preconditions), + "LedgerFootprint" => Ok(Self::LedgerFootprint), + "SorobanResources" => Ok(Self::SorobanResources), + "SorobanResourcesExtV0" => Ok(Self::SorobanResourcesExtV0), + "SorobanTransactionData" => Ok(Self::SorobanTransactionData), + "SorobanTransactionDataExt" => Ok(Self::SorobanTransactionDataExt), + "TransactionV0" => Ok(Self::TransactionV0), + "TransactionV0Ext" => Ok(Self::TransactionV0Ext), + "TransactionV0Envelope" => Ok(Self::TransactionV0Envelope), + "Transaction" => Ok(Self::Transaction), + "TransactionExt" => Ok(Self::TransactionExt), + "TransactionV1Envelope" => Ok(Self::TransactionV1Envelope), + "FeeBumpTransaction" => Ok(Self::FeeBumpTransaction), + "FeeBumpTransactionInnerTx" => Ok(Self::FeeBumpTransactionInnerTx), + "FeeBumpTransactionExt" => Ok(Self::FeeBumpTransactionExt), + "FeeBumpTransactionEnvelope" => Ok(Self::FeeBumpTransactionEnvelope), + "TransactionEnvelope" => Ok(Self::TransactionEnvelope), + "TransactionSignaturePayload" => Ok(Self::TransactionSignaturePayload), + "TransactionSignaturePayloadTaggedTransaction" => { + Ok(Self::TransactionSignaturePayloadTaggedTransaction) + } + "ClaimAtomType" => Ok(Self::ClaimAtomType), + "ClaimOfferAtomV0" => Ok(Self::ClaimOfferAtomV0), + "ClaimOfferAtom" => Ok(Self::ClaimOfferAtom), + "ClaimLiquidityAtom" => Ok(Self::ClaimLiquidityAtom), + "ClaimAtom" => Ok(Self::ClaimAtom), + "CreateAccountResultCode" => Ok(Self::CreateAccountResultCode), + "CreateAccountResult" => Ok(Self::CreateAccountResult), + "PaymentResultCode" => Ok(Self::PaymentResultCode), + "PaymentResult" => Ok(Self::PaymentResult), + "PathPaymentStrictReceiveResultCode" => Ok(Self::PathPaymentStrictReceiveResultCode), + "SimplePaymentResult" => Ok(Self::SimplePaymentResult), + "PathPaymentStrictReceiveResult" => Ok(Self::PathPaymentStrictReceiveResult), + "PathPaymentStrictReceiveResultSuccess" => { + Ok(Self::PathPaymentStrictReceiveResultSuccess) + } + "PathPaymentStrictSendResultCode" => Ok(Self::PathPaymentStrictSendResultCode), + "PathPaymentStrictSendResult" => Ok(Self::PathPaymentStrictSendResult), + "PathPaymentStrictSendResultSuccess" => Ok(Self::PathPaymentStrictSendResultSuccess), + "ManageSellOfferResultCode" => Ok(Self::ManageSellOfferResultCode), + "ManageOfferEffect" => Ok(Self::ManageOfferEffect), + "ManageOfferSuccessResult" => Ok(Self::ManageOfferSuccessResult), + "ManageOfferSuccessResultOffer" => Ok(Self::ManageOfferSuccessResultOffer), + "ManageSellOfferResult" => Ok(Self::ManageSellOfferResult), + "ManageBuyOfferResultCode" => Ok(Self::ManageBuyOfferResultCode), + "ManageBuyOfferResult" => Ok(Self::ManageBuyOfferResult), + "SetOptionsResultCode" => Ok(Self::SetOptionsResultCode), + "SetOptionsResult" => Ok(Self::SetOptionsResult), + "ChangeTrustResultCode" => Ok(Self::ChangeTrustResultCode), + "ChangeTrustResult" => Ok(Self::ChangeTrustResult), + "AllowTrustResultCode" => Ok(Self::AllowTrustResultCode), + "AllowTrustResult" => Ok(Self::AllowTrustResult), + "AccountMergeResultCode" => Ok(Self::AccountMergeResultCode), + "AccountMergeResult" => Ok(Self::AccountMergeResult), + "InflationResultCode" => Ok(Self::InflationResultCode), + "InflationPayout" => Ok(Self::InflationPayout), + "InflationResult" => Ok(Self::InflationResult), + "ManageDataResultCode" => Ok(Self::ManageDataResultCode), + "ManageDataResult" => Ok(Self::ManageDataResult), + "BumpSequenceResultCode" => Ok(Self::BumpSequenceResultCode), + "BumpSequenceResult" => Ok(Self::BumpSequenceResult), + "CreateClaimableBalanceResultCode" => Ok(Self::CreateClaimableBalanceResultCode), + "CreateClaimableBalanceResult" => Ok(Self::CreateClaimableBalanceResult), + "ClaimClaimableBalanceResultCode" => Ok(Self::ClaimClaimableBalanceResultCode), + "ClaimClaimableBalanceResult" => Ok(Self::ClaimClaimableBalanceResult), + "BeginSponsoringFutureReservesResultCode" => { + Ok(Self::BeginSponsoringFutureReservesResultCode) + } + "BeginSponsoringFutureReservesResult" => Ok(Self::BeginSponsoringFutureReservesResult), + "EndSponsoringFutureReservesResultCode" => { + Ok(Self::EndSponsoringFutureReservesResultCode) + } + "EndSponsoringFutureReservesResult" => Ok(Self::EndSponsoringFutureReservesResult), + "RevokeSponsorshipResultCode" => Ok(Self::RevokeSponsorshipResultCode), + "RevokeSponsorshipResult" => Ok(Self::RevokeSponsorshipResult), + "ClawbackResultCode" => Ok(Self::ClawbackResultCode), + "ClawbackResult" => Ok(Self::ClawbackResult), + "ClawbackClaimableBalanceResultCode" => Ok(Self::ClawbackClaimableBalanceResultCode), + "ClawbackClaimableBalanceResult" => Ok(Self::ClawbackClaimableBalanceResult), + "SetTrustLineFlagsResultCode" => Ok(Self::SetTrustLineFlagsResultCode), + "SetTrustLineFlagsResult" => Ok(Self::SetTrustLineFlagsResult), + "LiquidityPoolDepositResultCode" => Ok(Self::LiquidityPoolDepositResultCode), + "LiquidityPoolDepositResult" => Ok(Self::LiquidityPoolDepositResult), + "LiquidityPoolWithdrawResultCode" => Ok(Self::LiquidityPoolWithdrawResultCode), + "LiquidityPoolWithdrawResult" => Ok(Self::LiquidityPoolWithdrawResult), + "InvokeHostFunctionResultCode" => Ok(Self::InvokeHostFunctionResultCode), + "InvokeHostFunctionResult" => Ok(Self::InvokeHostFunctionResult), + "ExtendFootprintTtlResultCode" => Ok(Self::ExtendFootprintTtlResultCode), + "ExtendFootprintTtlResult" => Ok(Self::ExtendFootprintTtlResult), + "RestoreFootprintResultCode" => Ok(Self::RestoreFootprintResultCode), + "RestoreFootprintResult" => Ok(Self::RestoreFootprintResult), + "OperationResultCode" => Ok(Self::OperationResultCode), + "OperationResult" => Ok(Self::OperationResult), + "OperationResultTr" => Ok(Self::OperationResultTr), + "TransactionResultCode" => Ok(Self::TransactionResultCode), + "InnerTransactionResult" => Ok(Self::InnerTransactionResult), + "InnerTransactionResultResult" => Ok(Self::InnerTransactionResultResult), + "InnerTransactionResultExt" => Ok(Self::InnerTransactionResultExt), + "InnerTransactionResultPair" => Ok(Self::InnerTransactionResultPair), + "TransactionResult" => Ok(Self::TransactionResult), + "TransactionResultResult" => Ok(Self::TransactionResultResult), + "TransactionResultExt" => Ok(Self::TransactionResultExt), + "Hash" => Ok(Self::Hash), + "Uint256" => Ok(Self::Uint256), + "Uint32" => Ok(Self::Uint32), + "Int32" => Ok(Self::Int32), + "Uint64" => Ok(Self::Uint64), + "Int64" => Ok(Self::Int64), + "TimePoint" => Ok(Self::TimePoint), + "Duration" => Ok(Self::Duration), + "ExtensionPoint" => Ok(Self::ExtensionPoint), + "CryptoKeyType" => Ok(Self::CryptoKeyType), + "PublicKeyType" => Ok(Self::PublicKeyType), + "SignerKeyType" => Ok(Self::SignerKeyType), + "PublicKey" => Ok(Self::PublicKey), + "SignerKey" => Ok(Self::SignerKey), + "SignerKeyEd25519SignedPayload" => Ok(Self::SignerKeyEd25519SignedPayload), + "Signature" => Ok(Self::Signature), + "SignatureHint" => Ok(Self::SignatureHint), + "NodeId" => Ok(Self::NodeId), + "AccountId" => Ok(Self::AccountId), + "ContractId" => Ok(Self::ContractId), + "Curve25519Secret" => Ok(Self::Curve25519Secret), + "Curve25519Public" => Ok(Self::Curve25519Public), + "HmacSha256Key" => Ok(Self::HmacSha256Key), + "HmacSha256Mac" => Ok(Self::HmacSha256Mac), + "ShortHashSeed" => Ok(Self::ShortHashSeed), + "BinaryFuseFilterType" => Ok(Self::BinaryFuseFilterType), + "SerializedBinaryFuseFilter" => Ok(Self::SerializedBinaryFuseFilter), + "PoolId" => Ok(Self::PoolId), + "ClaimableBalanceIdType" => Ok(Self::ClaimableBalanceIdType), + "ClaimableBalanceId" => Ok(Self::ClaimableBalanceId), + _ => Err(Error::Invalid), + } + } +} + +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case"), + serde(untagged) +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub enum Type { + Value(Box), + ScpBallot(Box), + ScpStatementType(Box), + ScpNomination(Box), + ScpStatement(Box), + ScpStatementPledges(Box), + ScpStatementPrepare(Box), + ScpStatementConfirm(Box), + ScpStatementExternalize(Box), + ScpEnvelope(Box), + ScpQuorumSet(Box), + EncodedLedgerKey(Box), + ConfigSettingContractExecutionLanesV0(Box), + ConfigSettingContractComputeV0(Box), + ConfigSettingContractParallelComputeV0(Box), + ConfigSettingContractLedgerCostV0(Box), + ConfigSettingContractLedgerCostExtV0(Box), + ConfigSettingContractHistoricalDataV0(Box), + ConfigSettingContractEventsV0(Box), + ConfigSettingContractBandwidthV0(Box), + ContractCostType(Box), + ContractCostParamEntry(Box), + StateArchivalSettings(Box), + EvictionIterator(Box), + ConfigSettingScpTiming(Box), + FrozenLedgerKeys(Box), + FrozenLedgerKeysDelta(Box), + FreezeBypassTxs(Box), + FreezeBypassTxsDelta(Box), + ContractCostParams(Box), + ConfigSettingId(Box), + ConfigSettingEntry(Box), + ScEnvMetaKind(Box), + ScEnvMetaEntry(Box), + ScEnvMetaEntryInterfaceVersion(Box), + ScMetaV0(Box), + ScMetaKind(Box), + ScMetaEntry(Box), + ScSpecType(Box), + ScSpecTypeOption(Box), + ScSpecTypeResult(Box), + ScSpecTypeVec(Box), + ScSpecTypeMap(Box), + ScSpecTypeTuple(Box), + ScSpecTypeBytesN(Box), + ScSpecTypeUdt(Box), + ScSpecTypeDef(Box), + ScSpecUdtStructFieldV0(Box), + ScSpecUdtStructV0(Box), + ScSpecUdtUnionCaseVoidV0(Box), + ScSpecUdtUnionCaseTupleV0(Box), + ScSpecUdtUnionCaseV0Kind(Box), + ScSpecUdtUnionCaseV0(Box), + ScSpecUdtUnionV0(Box), + ScSpecUdtEnumCaseV0(Box), + ScSpecUdtEnumV0(Box), + ScSpecUdtErrorEnumCaseV0(Box), + ScSpecUdtErrorEnumV0(Box), + ScSpecFunctionInputV0(Box), + ScSpecFunctionV0(Box), + ScSpecEventParamLocationV0(Box), + ScSpecEventParamV0(Box), + ScSpecEventDataFormat(Box), + ScSpecEventV0(Box), + ScSpecEntryKind(Box), + ScSpecEntry(Box), + ScValType(Box), + ScErrorType(Box), + ScErrorCode(Box), + ScError(Box), + UInt128Parts(Box), + Int128Parts(Box), + UInt256Parts(Box), + Int256Parts(Box), + ContractExecutableType(Box), + ContractExecutable(Box), + ScAddressType(Box), + MuxedEd25519Account(Box), + ScAddress(Box), + ScVec(Box), + ScMap(Box), + ScBytes(Box), + ScString(Box), + ScSymbol(Box), + ScNonceKey(Box), + ScContractInstance(Box), + ScVal(Box), + ScMapEntry(Box), + LedgerCloseMetaBatch(Box), + StoredTransactionSet(Box), + StoredDebugTransactionSet(Box), + PersistedScpStateV0(Box), + PersistedScpStateV1(Box), + PersistedScpState(Box), + Thresholds(Box), + String32(Box), + String64(Box), + SequenceNumber(Box), + DataValue(Box), + AssetCode4(Box), + AssetCode12(Box), + AssetType(Box), + AssetCode(Box), + AlphaNum4(Box), + AlphaNum12(Box), + Asset(Box), + Price(Box), + Liabilities(Box), + ThresholdIndexes(Box), + LedgerEntryType(Box), + Signer(Box), + AccountFlags(Box), + SponsorshipDescriptor(Box), + AccountEntryExtensionV3(Box), + AccountEntryExtensionV2(Box), + AccountEntryExtensionV2Ext(Box), + AccountEntryExtensionV1(Box), + AccountEntryExtensionV1Ext(Box), + AccountEntry(Box), + AccountEntryExt(Box), + TrustLineFlags(Box), + LiquidityPoolType(Box), + TrustLineAsset(Box), + TrustLineEntryExtensionV2(Box), + TrustLineEntryExtensionV2Ext(Box), + TrustLineEntry(Box), + TrustLineEntryExt(Box), + TrustLineEntryV1(Box), + TrustLineEntryV1Ext(Box), + OfferEntryFlags(Box), + OfferEntry(Box), + OfferEntryExt(Box), + DataEntry(Box), + DataEntryExt(Box), + ClaimPredicateType(Box), + ClaimPredicate(Box), + ClaimantType(Box), + Claimant(Box), + ClaimantV0(Box), + ClaimableBalanceFlags(Box), + ClaimableBalanceEntryExtensionV1(Box), + ClaimableBalanceEntryExtensionV1Ext(Box), + ClaimableBalanceEntry(Box), + ClaimableBalanceEntryExt(Box), + LiquidityPoolConstantProductParameters(Box), + LiquidityPoolEntry(Box), + LiquidityPoolEntryBody(Box), + LiquidityPoolEntryConstantProduct(Box), + ContractDataDurability(Box), + ContractDataEntry(Box), + ContractCodeCostInputs(Box), + ContractCodeEntry(Box), + ContractCodeEntryExt(Box), + ContractCodeEntryV1(Box), + TtlEntry(Box), + LedgerEntryExtensionV1(Box), + LedgerEntryExtensionV1Ext(Box), + LedgerEntry(Box), + LedgerEntryData(Box), + LedgerEntryExt(Box), + LedgerKey(Box), + LedgerKeyAccount(Box), + LedgerKeyTrustLine(Box), + LedgerKeyOffer(Box), + LedgerKeyData(Box), + LedgerKeyClaimableBalance(Box), + LedgerKeyLiquidityPool(Box), + LedgerKeyContractData(Box), + LedgerKeyContractCode(Box), + LedgerKeyConfigSetting(Box), + LedgerKeyTtl(Box), + EnvelopeType(Box), + BucketListType(Box), + BucketEntryType(Box), + HotArchiveBucketEntryType(Box), + BucketMetadata(Box), + BucketMetadataExt(Box), + BucketEntry(Box), + HotArchiveBucketEntry(Box), + UpgradeType(Box), + StellarValueType(Box), + LedgerCloseValueSignature(Box), + StellarValue(Box), + StellarValueExt(Box), + LedgerHeaderFlags(Box), + LedgerHeaderExtensionV1(Box), + LedgerHeaderExtensionV1Ext(Box), + LedgerHeader(Box), + LedgerHeaderExt(Box), + LedgerUpgradeType(Box), + ConfigUpgradeSetKey(Box), + LedgerUpgrade(Box), + ConfigUpgradeSet(Box), + TxSetComponentType(Box), + DependentTxCluster(Box), + ParallelTxExecutionStage(Box), + ParallelTxsComponent(Box), + TxSetComponent(Box), + TxSetComponentTxsMaybeDiscountedFee(Box), + TransactionPhase(Box), + TransactionSet(Box), + TransactionSetV1(Box), + GeneralizedTransactionSet(Box), + TransactionResultPair(Box), + TransactionResultSet(Box), + TransactionHistoryEntry(Box), + TransactionHistoryEntryExt(Box), + TransactionHistoryResultEntry(Box), + TransactionHistoryResultEntryExt(Box), + LedgerHeaderHistoryEntry(Box), + LedgerHeaderHistoryEntryExt(Box), + LedgerScpMessages(Box), + ScpHistoryEntryV0(Box), + ScpHistoryEntry(Box), + LedgerEntryChangeType(Box), + LedgerEntryChange(Box), + LedgerEntryChanges(Box), + OperationMeta(Box), + TransactionMetaV1(Box), + TransactionMetaV2(Box), + ContractEventType(Box), + ContractEvent(Box), + ContractEventBody(Box), + ContractEventV0(Box), + DiagnosticEvent(Box), + SorobanTransactionMetaExtV1(Box), + SorobanTransactionMetaExt(Box), + SorobanTransactionMeta(Box), + TransactionMetaV3(Box), + OperationMetaV2(Box), + SorobanTransactionMetaV2(Box), + TransactionEventStage(Box), + TransactionEvent(Box), + TransactionMetaV4(Box), + InvokeHostFunctionSuccessPreImage(Box), + TransactionMeta(Box), + TransactionResultMeta(Box), + TransactionResultMetaV1(Box), + UpgradeEntryMeta(Box), + LedgerCloseMetaV0(Box), + LedgerCloseMetaExtV1(Box), + LedgerCloseMetaExt(Box), + LedgerCloseMetaV1(Box), + LedgerCloseMetaV2(Box), + LedgerCloseMeta(Box), + ErrorCode(Box), + SError(Box), + SendMore(Box), + SendMoreExtended(Box), + AuthCert(Box), + Hello(Box), + Auth(Box), + IpAddrType(Box), + PeerAddress(Box), + PeerAddressIp(Box), + MessageType(Box), + DontHave(Box), + SurveyMessageCommandType(Box), + SurveyMessageResponseType(Box), + TimeSlicedSurveyStartCollectingMessage(Box), + SignedTimeSlicedSurveyStartCollectingMessage(Box), + TimeSlicedSurveyStopCollectingMessage(Box), + SignedTimeSlicedSurveyStopCollectingMessage(Box), + SurveyRequestMessage(Box), + TimeSlicedSurveyRequestMessage(Box), + SignedTimeSlicedSurveyRequestMessage(Box), + EncryptedBody(Box), + SurveyResponseMessage(Box), + TimeSlicedSurveyResponseMessage(Box), + SignedTimeSlicedSurveyResponseMessage(Box), + PeerStats(Box), + TimeSlicedNodeData(Box), + TimeSlicedPeerData(Box), + TimeSlicedPeerDataList(Box), + TopologyResponseBodyV2(Box), + SurveyResponseBody(Box), + TxAdvertVector(Box), + FloodAdvert(Box), + TxDemandVector(Box), + FloodDemand(Box), + StellarMessage(Box), + AuthenticatedMessage(Box), + AuthenticatedMessageV0(Box), + LiquidityPoolParameters(Box), + MuxedAccount(Box), + MuxedAccountMed25519(Box), + DecoratedSignature(Box), + OperationType(Box), + CreateAccountOp(Box), + PaymentOp(Box), + PathPaymentStrictReceiveOp(Box), + PathPaymentStrictSendOp(Box), + ManageSellOfferOp(Box), + ManageBuyOfferOp(Box), + CreatePassiveSellOfferOp(Box), + SetOptionsOp(Box), + ChangeTrustAsset(Box), + ChangeTrustOp(Box), + AllowTrustOp(Box), + ManageDataOp(Box), + BumpSequenceOp(Box), + CreateClaimableBalanceOp(Box), + ClaimClaimableBalanceOp(Box), + BeginSponsoringFutureReservesOp(Box), + RevokeSponsorshipType(Box), + RevokeSponsorshipOp(Box), + RevokeSponsorshipOpSigner(Box), + ClawbackOp(Box), + ClawbackClaimableBalanceOp(Box), + SetTrustLineFlagsOp(Box), + LiquidityPoolDepositOp(Box), + LiquidityPoolWithdrawOp(Box), + HostFunctionType(Box), + ContractIdPreimageType(Box), + ContractIdPreimage(Box), + ContractIdPreimageFromAddress(Box), + CreateContractArgs(Box), + CreateContractArgsV2(Box), + InvokeContractArgs(Box), + HostFunction(Box), + SorobanAuthorizedFunctionType(Box), + SorobanAuthorizedFunction(Box), + SorobanAuthorizedInvocation(Box), + SorobanAddressCredentials(Box), + SorobanCredentialsType(Box), + SorobanCredentials(Box), + SorobanAuthorizationEntry(Box), + SorobanAuthorizationEntries(Box), + InvokeHostFunctionOp(Box), + ExtendFootprintTtlOp(Box), + RestoreFootprintOp(Box), + Operation(Box), + OperationBody(Box), + HashIdPreimage(Box), + HashIdPreimageOperationId(Box), + HashIdPreimageRevokeId(Box), + HashIdPreimageContractId(Box), + HashIdPreimageSorobanAuthorization(Box), + MemoType(Box), + Memo(Box), + TimeBounds(Box), + LedgerBounds(Box), + PreconditionsV2(Box), + PreconditionType(Box), + Preconditions(Box), + LedgerFootprint(Box), + SorobanResources(Box), + SorobanResourcesExtV0(Box), + SorobanTransactionData(Box), + SorobanTransactionDataExt(Box), + TransactionV0(Box), + TransactionV0Ext(Box), + TransactionV0Envelope(Box), + Transaction(Box), + TransactionExt(Box), + TransactionV1Envelope(Box), + FeeBumpTransaction(Box), + FeeBumpTransactionInnerTx(Box), + FeeBumpTransactionExt(Box), + FeeBumpTransactionEnvelope(Box), + TransactionEnvelope(Box), + TransactionSignaturePayload(Box), + TransactionSignaturePayloadTaggedTransaction(Box), + ClaimAtomType(Box), + ClaimOfferAtomV0(Box), + ClaimOfferAtom(Box), + ClaimLiquidityAtom(Box), + ClaimAtom(Box), + CreateAccountResultCode(Box), + CreateAccountResult(Box), + PaymentResultCode(Box), + PaymentResult(Box), + PathPaymentStrictReceiveResultCode(Box), + SimplePaymentResult(Box), + PathPaymentStrictReceiveResult(Box), + PathPaymentStrictReceiveResultSuccess(Box), + PathPaymentStrictSendResultCode(Box), + PathPaymentStrictSendResult(Box), + PathPaymentStrictSendResultSuccess(Box), + ManageSellOfferResultCode(Box), + ManageOfferEffect(Box), + ManageOfferSuccessResult(Box), + ManageOfferSuccessResultOffer(Box), + ManageSellOfferResult(Box), + ManageBuyOfferResultCode(Box), + ManageBuyOfferResult(Box), + SetOptionsResultCode(Box), + SetOptionsResult(Box), + ChangeTrustResultCode(Box), + ChangeTrustResult(Box), + AllowTrustResultCode(Box), + AllowTrustResult(Box), + AccountMergeResultCode(Box), + AccountMergeResult(Box), + InflationResultCode(Box), + InflationPayout(Box), + InflationResult(Box), + ManageDataResultCode(Box), + ManageDataResult(Box), + BumpSequenceResultCode(Box), + BumpSequenceResult(Box), + CreateClaimableBalanceResultCode(Box), + CreateClaimableBalanceResult(Box), + ClaimClaimableBalanceResultCode(Box), + ClaimClaimableBalanceResult(Box), + BeginSponsoringFutureReservesResultCode(Box), + BeginSponsoringFutureReservesResult(Box), + EndSponsoringFutureReservesResultCode(Box), + EndSponsoringFutureReservesResult(Box), + RevokeSponsorshipResultCode(Box), + RevokeSponsorshipResult(Box), + ClawbackResultCode(Box), + ClawbackResult(Box), + ClawbackClaimableBalanceResultCode(Box), + ClawbackClaimableBalanceResult(Box), + SetTrustLineFlagsResultCode(Box), + SetTrustLineFlagsResult(Box), + LiquidityPoolDepositResultCode(Box), + LiquidityPoolDepositResult(Box), + LiquidityPoolWithdrawResultCode(Box), + LiquidityPoolWithdrawResult(Box), + InvokeHostFunctionResultCode(Box), + InvokeHostFunctionResult(Box), + ExtendFootprintTtlResultCode(Box), + ExtendFootprintTtlResult(Box), + RestoreFootprintResultCode(Box), + RestoreFootprintResult(Box), + OperationResultCode(Box), + OperationResult(Box), + OperationResultTr(Box), + TransactionResultCode(Box), + InnerTransactionResult(Box), + InnerTransactionResultResult(Box), + InnerTransactionResultExt(Box), + InnerTransactionResultPair(Box), + TransactionResult(Box), + TransactionResultResult(Box), + TransactionResultExt(Box), + Hash(Box), + Uint256(Box), + Uint32(Box), + Int32(Box), + Uint64(Box), + Int64(Box), + TimePoint(Box), + Duration(Box), + ExtensionPoint(Box), + CryptoKeyType(Box), + PublicKeyType(Box), + SignerKeyType(Box), + PublicKey(Box), + SignerKey(Box), + SignerKeyEd25519SignedPayload(Box), + Signature(Box), + SignatureHint(Box), + NodeId(Box), + AccountId(Box), + ContractId(Box), + Curve25519Secret(Box), + Curve25519Public(Box), + HmacSha256Key(Box), + HmacSha256Mac(Box), + ShortHashSeed(Box), + BinaryFuseFilterType(Box), + SerializedBinaryFuseFilter(Box), + PoolId(Box), + ClaimableBalanceIdType(Box), + ClaimableBalanceId(Box), +} + +impl Type { + // Private const slices used to compute the variant count, supporting + // cfg-gated entries whose presence varies by enabled features. + const _VARIANTS: &[TypeVariant] = &[ + TypeVariant::Value, + TypeVariant::ScpBallot, + TypeVariant::ScpStatementType, + TypeVariant::ScpNomination, + TypeVariant::ScpStatement, + TypeVariant::ScpStatementPledges, + TypeVariant::ScpStatementPrepare, + TypeVariant::ScpStatementConfirm, + TypeVariant::ScpStatementExternalize, + TypeVariant::ScpEnvelope, + TypeVariant::ScpQuorumSet, + TypeVariant::EncodedLedgerKey, + TypeVariant::ConfigSettingContractExecutionLanesV0, + TypeVariant::ConfigSettingContractComputeV0, + TypeVariant::ConfigSettingContractParallelComputeV0, + TypeVariant::ConfigSettingContractLedgerCostV0, + TypeVariant::ConfigSettingContractLedgerCostExtV0, + TypeVariant::ConfigSettingContractHistoricalDataV0, + TypeVariant::ConfigSettingContractEventsV0, + TypeVariant::ConfigSettingContractBandwidthV0, + TypeVariant::ContractCostType, + TypeVariant::ContractCostParamEntry, + TypeVariant::StateArchivalSettings, + TypeVariant::EvictionIterator, + TypeVariant::ConfigSettingScpTiming, + TypeVariant::FrozenLedgerKeys, + TypeVariant::FrozenLedgerKeysDelta, + TypeVariant::FreezeBypassTxs, + TypeVariant::FreezeBypassTxsDelta, + TypeVariant::ContractCostParams, + TypeVariant::ConfigSettingId, + TypeVariant::ConfigSettingEntry, + TypeVariant::ScEnvMetaKind, + TypeVariant::ScEnvMetaEntry, + TypeVariant::ScEnvMetaEntryInterfaceVersion, + TypeVariant::ScMetaV0, + TypeVariant::ScMetaKind, + TypeVariant::ScMetaEntry, + TypeVariant::ScSpecType, + TypeVariant::ScSpecTypeOption, + TypeVariant::ScSpecTypeResult, + TypeVariant::ScSpecTypeVec, + TypeVariant::ScSpecTypeMap, + TypeVariant::ScSpecTypeTuple, + TypeVariant::ScSpecTypeBytesN, + TypeVariant::ScSpecTypeUdt, + TypeVariant::ScSpecTypeDef, + TypeVariant::ScSpecUdtStructFieldV0, + TypeVariant::ScSpecUdtStructV0, + TypeVariant::ScSpecUdtUnionCaseVoidV0, + TypeVariant::ScSpecUdtUnionCaseTupleV0, + TypeVariant::ScSpecUdtUnionCaseV0Kind, + TypeVariant::ScSpecUdtUnionCaseV0, + TypeVariant::ScSpecUdtUnionV0, + TypeVariant::ScSpecUdtEnumCaseV0, + TypeVariant::ScSpecUdtEnumV0, + TypeVariant::ScSpecUdtErrorEnumCaseV0, + TypeVariant::ScSpecUdtErrorEnumV0, + TypeVariant::ScSpecFunctionInputV0, + TypeVariant::ScSpecFunctionV0, + TypeVariant::ScSpecEventParamLocationV0, + TypeVariant::ScSpecEventParamV0, + TypeVariant::ScSpecEventDataFormat, + TypeVariant::ScSpecEventV0, + TypeVariant::ScSpecEntryKind, + TypeVariant::ScSpecEntry, + TypeVariant::ScValType, + TypeVariant::ScErrorType, + TypeVariant::ScErrorCode, + TypeVariant::ScError, + TypeVariant::UInt128Parts, + TypeVariant::Int128Parts, + TypeVariant::UInt256Parts, + TypeVariant::Int256Parts, + TypeVariant::ContractExecutableType, + TypeVariant::ContractExecutable, + TypeVariant::ScAddressType, + TypeVariant::MuxedEd25519Account, + TypeVariant::ScAddress, + TypeVariant::ScVec, + TypeVariant::ScMap, + TypeVariant::ScBytes, + TypeVariant::ScString, + TypeVariant::ScSymbol, + TypeVariant::ScNonceKey, + TypeVariant::ScContractInstance, + TypeVariant::ScVal, + TypeVariant::ScMapEntry, + TypeVariant::LedgerCloseMetaBatch, + TypeVariant::StoredTransactionSet, + TypeVariant::StoredDebugTransactionSet, + TypeVariant::PersistedScpStateV0, + TypeVariant::PersistedScpStateV1, + TypeVariant::PersistedScpState, + TypeVariant::Thresholds, + TypeVariant::String32, + TypeVariant::String64, + TypeVariant::SequenceNumber, + TypeVariant::DataValue, + TypeVariant::AssetCode4, + TypeVariant::AssetCode12, + TypeVariant::AssetType, + TypeVariant::AssetCode, + TypeVariant::AlphaNum4, + TypeVariant::AlphaNum12, + TypeVariant::Asset, + TypeVariant::Price, + TypeVariant::Liabilities, + TypeVariant::ThresholdIndexes, + TypeVariant::LedgerEntryType, + TypeVariant::Signer, + TypeVariant::AccountFlags, + TypeVariant::SponsorshipDescriptor, + TypeVariant::AccountEntryExtensionV3, + TypeVariant::AccountEntryExtensionV2, + TypeVariant::AccountEntryExtensionV2Ext, + TypeVariant::AccountEntryExtensionV1, + TypeVariant::AccountEntryExtensionV1Ext, + TypeVariant::AccountEntry, + TypeVariant::AccountEntryExt, + TypeVariant::TrustLineFlags, + TypeVariant::LiquidityPoolType, + TypeVariant::TrustLineAsset, + TypeVariant::TrustLineEntryExtensionV2, + TypeVariant::TrustLineEntryExtensionV2Ext, + TypeVariant::TrustLineEntry, + TypeVariant::TrustLineEntryExt, + TypeVariant::TrustLineEntryV1, + TypeVariant::TrustLineEntryV1Ext, + TypeVariant::OfferEntryFlags, + TypeVariant::OfferEntry, + TypeVariant::OfferEntryExt, + TypeVariant::DataEntry, + TypeVariant::DataEntryExt, + TypeVariant::ClaimPredicateType, + TypeVariant::ClaimPredicate, + TypeVariant::ClaimantType, + TypeVariant::Claimant, + TypeVariant::ClaimantV0, + TypeVariant::ClaimableBalanceFlags, + TypeVariant::ClaimableBalanceEntryExtensionV1, + TypeVariant::ClaimableBalanceEntryExtensionV1Ext, + TypeVariant::ClaimableBalanceEntry, + TypeVariant::ClaimableBalanceEntryExt, + TypeVariant::LiquidityPoolConstantProductParameters, + TypeVariant::LiquidityPoolEntry, + TypeVariant::LiquidityPoolEntryBody, + TypeVariant::LiquidityPoolEntryConstantProduct, + TypeVariant::ContractDataDurability, + TypeVariant::ContractDataEntry, + TypeVariant::ContractCodeCostInputs, + TypeVariant::ContractCodeEntry, + TypeVariant::ContractCodeEntryExt, + TypeVariant::ContractCodeEntryV1, + TypeVariant::TtlEntry, + TypeVariant::LedgerEntryExtensionV1, + TypeVariant::LedgerEntryExtensionV1Ext, + TypeVariant::LedgerEntry, + TypeVariant::LedgerEntryData, + TypeVariant::LedgerEntryExt, + TypeVariant::LedgerKey, + TypeVariant::LedgerKeyAccount, + TypeVariant::LedgerKeyTrustLine, + TypeVariant::LedgerKeyOffer, + TypeVariant::LedgerKeyData, + TypeVariant::LedgerKeyClaimableBalance, + TypeVariant::LedgerKeyLiquidityPool, + TypeVariant::LedgerKeyContractData, + TypeVariant::LedgerKeyContractCode, + TypeVariant::LedgerKeyConfigSetting, + TypeVariant::LedgerKeyTtl, + TypeVariant::EnvelopeType, + TypeVariant::BucketListType, + TypeVariant::BucketEntryType, + TypeVariant::HotArchiveBucketEntryType, + TypeVariant::BucketMetadata, + TypeVariant::BucketMetadataExt, + TypeVariant::BucketEntry, + TypeVariant::HotArchiveBucketEntry, + TypeVariant::UpgradeType, + TypeVariant::StellarValueType, + TypeVariant::LedgerCloseValueSignature, + TypeVariant::StellarValue, + TypeVariant::StellarValueExt, + TypeVariant::LedgerHeaderFlags, + TypeVariant::LedgerHeaderExtensionV1, + TypeVariant::LedgerHeaderExtensionV1Ext, + TypeVariant::LedgerHeader, + TypeVariant::LedgerHeaderExt, + TypeVariant::LedgerUpgradeType, + TypeVariant::ConfigUpgradeSetKey, + TypeVariant::LedgerUpgrade, + TypeVariant::ConfigUpgradeSet, + TypeVariant::TxSetComponentType, + TypeVariant::DependentTxCluster, + TypeVariant::ParallelTxExecutionStage, + TypeVariant::ParallelTxsComponent, + TypeVariant::TxSetComponent, + TypeVariant::TxSetComponentTxsMaybeDiscountedFee, + TypeVariant::TransactionPhase, + TypeVariant::TransactionSet, + TypeVariant::TransactionSetV1, + TypeVariant::GeneralizedTransactionSet, + TypeVariant::TransactionResultPair, + TypeVariant::TransactionResultSet, + TypeVariant::TransactionHistoryEntry, + TypeVariant::TransactionHistoryEntryExt, + TypeVariant::TransactionHistoryResultEntry, + TypeVariant::TransactionHistoryResultEntryExt, + TypeVariant::LedgerHeaderHistoryEntry, + TypeVariant::LedgerHeaderHistoryEntryExt, + TypeVariant::LedgerScpMessages, + TypeVariant::ScpHistoryEntryV0, + TypeVariant::ScpHistoryEntry, + TypeVariant::LedgerEntryChangeType, + TypeVariant::LedgerEntryChange, + TypeVariant::LedgerEntryChanges, + TypeVariant::OperationMeta, + TypeVariant::TransactionMetaV1, + TypeVariant::TransactionMetaV2, + TypeVariant::ContractEventType, + TypeVariant::ContractEvent, + TypeVariant::ContractEventBody, + TypeVariant::ContractEventV0, + TypeVariant::DiagnosticEvent, + TypeVariant::SorobanTransactionMetaExtV1, + TypeVariant::SorobanTransactionMetaExt, + TypeVariant::SorobanTransactionMeta, + TypeVariant::TransactionMetaV3, + TypeVariant::OperationMetaV2, + TypeVariant::SorobanTransactionMetaV2, + TypeVariant::TransactionEventStage, + TypeVariant::TransactionEvent, + TypeVariant::TransactionMetaV4, + TypeVariant::InvokeHostFunctionSuccessPreImage, + TypeVariant::TransactionMeta, + TypeVariant::TransactionResultMeta, + TypeVariant::TransactionResultMetaV1, + TypeVariant::UpgradeEntryMeta, + TypeVariant::LedgerCloseMetaV0, + TypeVariant::LedgerCloseMetaExtV1, + TypeVariant::LedgerCloseMetaExt, + TypeVariant::LedgerCloseMetaV1, + TypeVariant::LedgerCloseMetaV2, + TypeVariant::LedgerCloseMeta, + TypeVariant::ErrorCode, + TypeVariant::SError, + TypeVariant::SendMore, + TypeVariant::SendMoreExtended, + TypeVariant::AuthCert, + TypeVariant::Hello, + TypeVariant::Auth, + TypeVariant::IpAddrType, + TypeVariant::PeerAddress, + TypeVariant::PeerAddressIp, + TypeVariant::MessageType, + TypeVariant::DontHave, + TypeVariant::SurveyMessageCommandType, + TypeVariant::SurveyMessageResponseType, + TypeVariant::TimeSlicedSurveyStartCollectingMessage, + TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage, + TypeVariant::TimeSlicedSurveyStopCollectingMessage, + TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage, + TypeVariant::SurveyRequestMessage, + TypeVariant::TimeSlicedSurveyRequestMessage, + TypeVariant::SignedTimeSlicedSurveyRequestMessage, + TypeVariant::EncryptedBody, + TypeVariant::SurveyResponseMessage, + TypeVariant::TimeSlicedSurveyResponseMessage, + TypeVariant::SignedTimeSlicedSurveyResponseMessage, + TypeVariant::PeerStats, + TypeVariant::TimeSlicedNodeData, + TypeVariant::TimeSlicedPeerData, + TypeVariant::TimeSlicedPeerDataList, + TypeVariant::TopologyResponseBodyV2, + TypeVariant::SurveyResponseBody, + TypeVariant::TxAdvertVector, + TypeVariant::FloodAdvert, + TypeVariant::TxDemandVector, + TypeVariant::FloodDemand, + TypeVariant::StellarMessage, + TypeVariant::AuthenticatedMessage, + TypeVariant::AuthenticatedMessageV0, + TypeVariant::LiquidityPoolParameters, + TypeVariant::MuxedAccount, + TypeVariant::MuxedAccountMed25519, + TypeVariant::DecoratedSignature, + TypeVariant::OperationType, + TypeVariant::CreateAccountOp, + TypeVariant::PaymentOp, + TypeVariant::PathPaymentStrictReceiveOp, + TypeVariant::PathPaymentStrictSendOp, + TypeVariant::ManageSellOfferOp, + TypeVariant::ManageBuyOfferOp, + TypeVariant::CreatePassiveSellOfferOp, + TypeVariant::SetOptionsOp, + TypeVariant::ChangeTrustAsset, + TypeVariant::ChangeTrustOp, + TypeVariant::AllowTrustOp, + TypeVariant::ManageDataOp, + TypeVariant::BumpSequenceOp, + TypeVariant::CreateClaimableBalanceOp, + TypeVariant::ClaimClaimableBalanceOp, + TypeVariant::BeginSponsoringFutureReservesOp, + TypeVariant::RevokeSponsorshipType, + TypeVariant::RevokeSponsorshipOp, + TypeVariant::RevokeSponsorshipOpSigner, + TypeVariant::ClawbackOp, + TypeVariant::ClawbackClaimableBalanceOp, + TypeVariant::SetTrustLineFlagsOp, + TypeVariant::LiquidityPoolDepositOp, + TypeVariant::LiquidityPoolWithdrawOp, + TypeVariant::HostFunctionType, + TypeVariant::ContractIdPreimageType, + TypeVariant::ContractIdPreimage, + TypeVariant::ContractIdPreimageFromAddress, + TypeVariant::CreateContractArgs, + TypeVariant::CreateContractArgsV2, + TypeVariant::InvokeContractArgs, + TypeVariant::HostFunction, + TypeVariant::SorobanAuthorizedFunctionType, + TypeVariant::SorobanAuthorizedFunction, + TypeVariant::SorobanAuthorizedInvocation, + TypeVariant::SorobanAddressCredentials, + TypeVariant::SorobanCredentialsType, + TypeVariant::SorobanCredentials, + TypeVariant::SorobanAuthorizationEntry, + TypeVariant::SorobanAuthorizationEntries, + TypeVariant::InvokeHostFunctionOp, + TypeVariant::ExtendFootprintTtlOp, + TypeVariant::RestoreFootprintOp, + TypeVariant::Operation, + TypeVariant::OperationBody, + TypeVariant::HashIdPreimage, + TypeVariant::HashIdPreimageOperationId, + TypeVariant::HashIdPreimageRevokeId, + TypeVariant::HashIdPreimageContractId, + TypeVariant::HashIdPreimageSorobanAuthorization, + TypeVariant::MemoType, + TypeVariant::Memo, + TypeVariant::TimeBounds, + TypeVariant::LedgerBounds, + TypeVariant::PreconditionsV2, + TypeVariant::PreconditionType, + TypeVariant::Preconditions, + TypeVariant::LedgerFootprint, + TypeVariant::SorobanResources, + TypeVariant::SorobanResourcesExtV0, + TypeVariant::SorobanTransactionData, + TypeVariant::SorobanTransactionDataExt, + TypeVariant::TransactionV0, + TypeVariant::TransactionV0Ext, + TypeVariant::TransactionV0Envelope, + TypeVariant::Transaction, + TypeVariant::TransactionExt, + TypeVariant::TransactionV1Envelope, + TypeVariant::FeeBumpTransaction, + TypeVariant::FeeBumpTransactionInnerTx, + TypeVariant::FeeBumpTransactionExt, + TypeVariant::FeeBumpTransactionEnvelope, + TypeVariant::TransactionEnvelope, + TypeVariant::TransactionSignaturePayload, + TypeVariant::TransactionSignaturePayloadTaggedTransaction, + TypeVariant::ClaimAtomType, + TypeVariant::ClaimOfferAtomV0, + TypeVariant::ClaimOfferAtom, + TypeVariant::ClaimLiquidityAtom, + TypeVariant::ClaimAtom, + TypeVariant::CreateAccountResultCode, + TypeVariant::CreateAccountResult, + TypeVariant::PaymentResultCode, + TypeVariant::PaymentResult, + TypeVariant::PathPaymentStrictReceiveResultCode, + TypeVariant::SimplePaymentResult, + TypeVariant::PathPaymentStrictReceiveResult, + TypeVariant::PathPaymentStrictReceiveResultSuccess, + TypeVariant::PathPaymentStrictSendResultCode, + TypeVariant::PathPaymentStrictSendResult, + TypeVariant::PathPaymentStrictSendResultSuccess, + TypeVariant::ManageSellOfferResultCode, + TypeVariant::ManageOfferEffect, + TypeVariant::ManageOfferSuccessResult, + TypeVariant::ManageOfferSuccessResultOffer, + TypeVariant::ManageSellOfferResult, + TypeVariant::ManageBuyOfferResultCode, + TypeVariant::ManageBuyOfferResult, + TypeVariant::SetOptionsResultCode, + TypeVariant::SetOptionsResult, + TypeVariant::ChangeTrustResultCode, + TypeVariant::ChangeTrustResult, + TypeVariant::AllowTrustResultCode, + TypeVariant::AllowTrustResult, + TypeVariant::AccountMergeResultCode, + TypeVariant::AccountMergeResult, + TypeVariant::InflationResultCode, + TypeVariant::InflationPayout, + TypeVariant::InflationResult, + TypeVariant::ManageDataResultCode, + TypeVariant::ManageDataResult, + TypeVariant::BumpSequenceResultCode, + TypeVariant::BumpSequenceResult, + TypeVariant::CreateClaimableBalanceResultCode, + TypeVariant::CreateClaimableBalanceResult, + TypeVariant::ClaimClaimableBalanceResultCode, + TypeVariant::ClaimClaimableBalanceResult, + TypeVariant::BeginSponsoringFutureReservesResultCode, + TypeVariant::BeginSponsoringFutureReservesResult, + TypeVariant::EndSponsoringFutureReservesResultCode, + TypeVariant::EndSponsoringFutureReservesResult, + TypeVariant::RevokeSponsorshipResultCode, + TypeVariant::RevokeSponsorshipResult, + TypeVariant::ClawbackResultCode, + TypeVariant::ClawbackResult, + TypeVariant::ClawbackClaimableBalanceResultCode, + TypeVariant::ClawbackClaimableBalanceResult, + TypeVariant::SetTrustLineFlagsResultCode, + TypeVariant::SetTrustLineFlagsResult, + TypeVariant::LiquidityPoolDepositResultCode, + TypeVariant::LiquidityPoolDepositResult, + TypeVariant::LiquidityPoolWithdrawResultCode, + TypeVariant::LiquidityPoolWithdrawResult, + TypeVariant::InvokeHostFunctionResultCode, + TypeVariant::InvokeHostFunctionResult, + TypeVariant::ExtendFootprintTtlResultCode, + TypeVariant::ExtendFootprintTtlResult, + TypeVariant::RestoreFootprintResultCode, + TypeVariant::RestoreFootprintResult, + TypeVariant::OperationResultCode, + TypeVariant::OperationResult, + TypeVariant::OperationResultTr, + TypeVariant::TransactionResultCode, + TypeVariant::InnerTransactionResult, + TypeVariant::InnerTransactionResultResult, + TypeVariant::InnerTransactionResultExt, + TypeVariant::InnerTransactionResultPair, + TypeVariant::TransactionResult, + TypeVariant::TransactionResultResult, + TypeVariant::TransactionResultExt, + TypeVariant::Hash, + TypeVariant::Uint256, + TypeVariant::Uint32, + TypeVariant::Int32, + TypeVariant::Uint64, + TypeVariant::Int64, + TypeVariant::TimePoint, + TypeVariant::Duration, + TypeVariant::ExtensionPoint, + TypeVariant::CryptoKeyType, + TypeVariant::PublicKeyType, + TypeVariant::SignerKeyType, + TypeVariant::PublicKey, + TypeVariant::SignerKey, + TypeVariant::SignerKeyEd25519SignedPayload, + TypeVariant::Signature, + TypeVariant::SignatureHint, + TypeVariant::NodeId, + TypeVariant::AccountId, + TypeVariant::ContractId, + TypeVariant::Curve25519Secret, + TypeVariant::Curve25519Public, + TypeVariant::HmacSha256Key, + TypeVariant::HmacSha256Mac, + TypeVariant::ShortHashSeed, + TypeVariant::BinaryFuseFilterType, + TypeVariant::SerializedBinaryFuseFilter, + TypeVariant::PoolId, + TypeVariant::ClaimableBalanceIdType, + TypeVariant::ClaimableBalanceId, + ]; + pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Value", "ScpBallot", "ScpStatementType", @@ -57394,6 +55541,15 @@ impl Type { "ClaimableBalanceIdType", "ClaimableBalanceId", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[cfg(feature = "std")] #[allow(clippy::too_many_lines)] diff --git a/src/next/generated.rs b/src/next/generated.rs index 95e7c226..962a6521 100644 --- a/src/next/generated.rs +++ b/src/next/generated.rs @@ -51912,4548 +51912,15 @@ impl TypeVariant { TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, ]; - pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = [ - TypeVariant::Value, - TypeVariant::ScpBallot, - TypeVariant::ScpStatementType, - TypeVariant::ScpNomination, - TypeVariant::ScpStatement, - TypeVariant::ScpStatementPledges, - TypeVariant::ScpStatementPrepare, - TypeVariant::ScpStatementConfirm, - TypeVariant::ScpStatementExternalize, - TypeVariant::ScpEnvelope, - TypeVariant::ScpQuorumSet, - TypeVariant::EncodedLedgerKey, - TypeVariant::ConfigSettingContractExecutionLanesV0, - TypeVariant::ConfigSettingContractComputeV0, - TypeVariant::ConfigSettingContractParallelComputeV0, - TypeVariant::ConfigSettingContractLedgerCostV0, - TypeVariant::ConfigSettingContractLedgerCostExtV0, - TypeVariant::ConfigSettingContractHistoricalDataV0, - TypeVariant::ConfigSettingContractEventsV0, - TypeVariant::ConfigSettingContractBandwidthV0, - TypeVariant::ContractCostType, - TypeVariant::ContractCostParamEntry, - TypeVariant::StateArchivalSettings, - TypeVariant::EvictionIterator, - TypeVariant::ConfigSettingScpTiming, - TypeVariant::FrozenLedgerKeys, - TypeVariant::FrozenLedgerKeysDelta, - TypeVariant::FreezeBypassTxs, - TypeVariant::FreezeBypassTxsDelta, - TypeVariant::ContractCostParams, - TypeVariant::ConfigSettingId, - TypeVariant::ConfigSettingEntry, - TypeVariant::ScEnvMetaKind, - TypeVariant::ScEnvMetaEntry, - TypeVariant::ScEnvMetaEntryInterfaceVersion, - TypeVariant::ScMetaV0, - TypeVariant::ScMetaKind, - TypeVariant::ScMetaEntry, - TypeVariant::ScSpecType, - TypeVariant::ScSpecTypeOption, - TypeVariant::ScSpecTypeResult, - TypeVariant::ScSpecTypeVec, - TypeVariant::ScSpecTypeMap, - TypeVariant::ScSpecTypeTuple, - TypeVariant::ScSpecTypeBytesN, - TypeVariant::ScSpecTypeUdt, - TypeVariant::ScSpecTypeDef, - TypeVariant::ScSpecUdtStructFieldV0, - TypeVariant::ScSpecUdtStructV0, - TypeVariant::ScSpecUdtUnionCaseVoidV0, - TypeVariant::ScSpecUdtUnionCaseTupleV0, - TypeVariant::ScSpecUdtUnionCaseV0Kind, - TypeVariant::ScSpecUdtUnionCaseV0, - TypeVariant::ScSpecUdtUnionV0, - TypeVariant::ScSpecUdtEnumCaseV0, - TypeVariant::ScSpecUdtEnumV0, - TypeVariant::ScSpecUdtErrorEnumCaseV0, - TypeVariant::ScSpecUdtErrorEnumV0, - TypeVariant::ScSpecFunctionInputV0, - TypeVariant::ScSpecFunctionV0, - TypeVariant::ScSpecEventParamLocationV0, - TypeVariant::ScSpecEventParamV0, - TypeVariant::ScSpecEventDataFormat, - TypeVariant::ScSpecEventV0, - TypeVariant::ScSpecEntryKind, - TypeVariant::ScSpecEntry, - TypeVariant::ScValType, - TypeVariant::ScErrorType, - TypeVariant::ScErrorCode, - TypeVariant::ScError, - TypeVariant::UInt128Parts, - TypeVariant::Int128Parts, - TypeVariant::UInt256Parts, - TypeVariant::Int256Parts, - TypeVariant::ContractExecutableType, - TypeVariant::ContractExecutable, - TypeVariant::ScAddressType, - TypeVariant::MuxedEd25519Account, - TypeVariant::ScAddress, - TypeVariant::ScVec, - TypeVariant::ScMap, - TypeVariant::ScBytes, - TypeVariant::ScString, - TypeVariant::ScSymbol, - TypeVariant::ScNonceKey, - TypeVariant::ScContractInstance, - TypeVariant::ScVal, - TypeVariant::ScMapEntry, - TypeVariant::LedgerCloseMetaBatch, - TypeVariant::StoredTransactionSet, - TypeVariant::StoredDebugTransactionSet, - TypeVariant::PersistedScpStateV0, - TypeVariant::PersistedScpStateV1, - TypeVariant::PersistedScpState, - TypeVariant::Thresholds, - TypeVariant::String32, - TypeVariant::String64, - TypeVariant::SequenceNumber, - TypeVariant::DataValue, - TypeVariant::AssetCode4, - TypeVariant::AssetCode12, - TypeVariant::AssetType, - TypeVariant::AssetCode, - TypeVariant::AlphaNum4, - TypeVariant::AlphaNum12, - TypeVariant::Asset, - TypeVariant::Price, - TypeVariant::Liabilities, - TypeVariant::ThresholdIndexes, - TypeVariant::LedgerEntryType, - TypeVariant::Signer, - TypeVariant::AccountFlags, - TypeVariant::SponsorshipDescriptor, - TypeVariant::AccountEntryExtensionV3, - TypeVariant::AccountEntryExtensionV2, - TypeVariant::AccountEntryExtensionV2Ext, - TypeVariant::AccountEntryExtensionV1, - TypeVariant::AccountEntryExtensionV1Ext, - TypeVariant::AccountEntry, - TypeVariant::AccountEntryExt, - TypeVariant::TrustLineFlags, - TypeVariant::LiquidityPoolType, - TypeVariant::TrustLineAsset, - TypeVariant::TrustLineEntryExtensionV2, - TypeVariant::TrustLineEntryExtensionV2Ext, - TypeVariant::TrustLineEntry, - TypeVariant::TrustLineEntryExt, - TypeVariant::TrustLineEntryV1, - TypeVariant::TrustLineEntryV1Ext, - TypeVariant::OfferEntryFlags, - TypeVariant::OfferEntry, - TypeVariant::OfferEntryExt, - TypeVariant::DataEntry, - TypeVariant::DataEntryExt, - TypeVariant::ClaimPredicateType, - TypeVariant::ClaimPredicate, - TypeVariant::ClaimantType, - TypeVariant::Claimant, - TypeVariant::ClaimantV0, - TypeVariant::ClaimableBalanceFlags, - TypeVariant::ClaimableBalanceEntryExtensionV1, - TypeVariant::ClaimableBalanceEntryExtensionV1Ext, - TypeVariant::ClaimableBalanceEntry, - TypeVariant::ClaimableBalanceEntryExt, - TypeVariant::LiquidityPoolConstantProductParameters, - TypeVariant::LiquidityPoolEntry, - TypeVariant::LiquidityPoolEntryBody, - TypeVariant::LiquidityPoolEntryConstantProduct, - TypeVariant::ContractDataDurability, - TypeVariant::ContractDataEntry, - TypeVariant::ContractCodeCostInputs, - TypeVariant::ContractCodeEntry, - TypeVariant::ContractCodeEntryExt, - TypeVariant::ContractCodeEntryV1, - TypeVariant::TtlEntry, - TypeVariant::LedgerEntryExtensionV1, - TypeVariant::LedgerEntryExtensionV1Ext, - TypeVariant::LedgerEntry, - TypeVariant::LedgerEntryData, - TypeVariant::LedgerEntryExt, - TypeVariant::LedgerKey, - TypeVariant::LedgerKeyAccount, - TypeVariant::LedgerKeyTrustLine, - TypeVariant::LedgerKeyOffer, - TypeVariant::LedgerKeyData, - TypeVariant::LedgerKeyClaimableBalance, - TypeVariant::LedgerKeyLiquidityPool, - TypeVariant::LedgerKeyContractData, - TypeVariant::LedgerKeyContractCode, - TypeVariant::LedgerKeyConfigSetting, - TypeVariant::LedgerKeyTtl, - TypeVariant::EnvelopeType, - TypeVariant::BucketListType, - TypeVariant::BucketEntryType, - TypeVariant::HotArchiveBucketEntryType, - TypeVariant::BucketMetadata, - TypeVariant::BucketMetadataExt, - TypeVariant::BucketEntry, - TypeVariant::HotArchiveBucketEntry, - TypeVariant::UpgradeType, - TypeVariant::StellarValueType, - TypeVariant::LedgerCloseValueSignature, - TypeVariant::StellarValue, - TypeVariant::StellarValueExt, - TypeVariant::LedgerHeaderFlags, - TypeVariant::LedgerHeaderExtensionV1, - TypeVariant::LedgerHeaderExtensionV1Ext, - TypeVariant::LedgerHeader, - TypeVariant::LedgerHeaderExt, - TypeVariant::LedgerUpgradeType, - TypeVariant::ConfigUpgradeSetKey, - TypeVariant::LedgerUpgrade, - TypeVariant::ConfigUpgradeSet, - TypeVariant::TxSetComponentType, - TypeVariant::DependentTxCluster, - TypeVariant::ParallelTxExecutionStage, - TypeVariant::ParallelTxsComponent, - TypeVariant::TxSetComponent, - TypeVariant::TxSetComponentTxsMaybeDiscountedFee, - TypeVariant::TransactionPhase, - TypeVariant::TransactionSet, - TypeVariant::TransactionSetV1, - TypeVariant::GeneralizedTransactionSet, - TypeVariant::TransactionResultPair, - TypeVariant::TransactionResultSet, - TypeVariant::TransactionHistoryEntry, - TypeVariant::TransactionHistoryEntryExt, - TypeVariant::TransactionHistoryResultEntry, - TypeVariant::TransactionHistoryResultEntryExt, - TypeVariant::LedgerHeaderHistoryEntry, - TypeVariant::LedgerHeaderHistoryEntryExt, - TypeVariant::LedgerScpMessages, - TypeVariant::ScpHistoryEntryV0, - TypeVariant::ScpHistoryEntry, - TypeVariant::LedgerEntryChangeType, - TypeVariant::LedgerEntryChange, - TypeVariant::LedgerEntryChanges, - TypeVariant::OperationMeta, - TypeVariant::TransactionMetaV1, - TypeVariant::TransactionMetaV2, - TypeVariant::ContractEventType, - TypeVariant::ContractEvent, - TypeVariant::ContractEventBody, - TypeVariant::ContractEventV0, - TypeVariant::DiagnosticEvent, - TypeVariant::SorobanTransactionMetaExtV1, - TypeVariant::SorobanTransactionMetaExt, - TypeVariant::SorobanTransactionMeta, - TypeVariant::TransactionMetaV3, - TypeVariant::OperationMetaV2, - TypeVariant::SorobanTransactionMetaV2, - TypeVariant::TransactionEventStage, - TypeVariant::TransactionEvent, - TypeVariant::TransactionMetaV4, - TypeVariant::InvokeHostFunctionSuccessPreImage, - TypeVariant::TransactionMeta, - TypeVariant::TransactionResultMeta, - TypeVariant::TransactionResultMetaV1, - TypeVariant::UpgradeEntryMeta, - TypeVariant::LedgerCloseMetaV0, - TypeVariant::LedgerCloseMetaExtV1, - TypeVariant::LedgerCloseMetaExt, - TypeVariant::LedgerCloseMetaV1, - TypeVariant::LedgerCloseMetaV2, - TypeVariant::LedgerCloseMeta, - TypeVariant::ErrorCode, - TypeVariant::SError, - TypeVariant::SendMore, - TypeVariant::SendMoreExtended, - TypeVariant::AuthCert, - TypeVariant::Hello, - TypeVariant::Auth, - TypeVariant::IpAddrType, - TypeVariant::PeerAddress, - TypeVariant::PeerAddressIp, - TypeVariant::MessageType, - TypeVariant::DontHave, - TypeVariant::SurveyMessageCommandType, - TypeVariant::SurveyMessageResponseType, - TypeVariant::TimeSlicedSurveyStartCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage, - TypeVariant::TimeSlicedSurveyStopCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage, - TypeVariant::SurveyRequestMessage, - TypeVariant::TimeSlicedSurveyRequestMessage, - TypeVariant::SignedTimeSlicedSurveyRequestMessage, - TypeVariant::EncryptedBody, - TypeVariant::SurveyResponseMessage, - TypeVariant::TimeSlicedSurveyResponseMessage, - TypeVariant::SignedTimeSlicedSurveyResponseMessage, - TypeVariant::PeerStats, - TypeVariant::TimeSlicedNodeData, - TypeVariant::TimeSlicedPeerData, - TypeVariant::TimeSlicedPeerDataList, - TypeVariant::TopologyResponseBodyV2, - TypeVariant::SurveyResponseBody, - TypeVariant::TxAdvertVector, - TypeVariant::FloodAdvert, - TypeVariant::TxDemandVector, - TypeVariant::FloodDemand, - TypeVariant::StellarMessage, - TypeVariant::AuthenticatedMessage, - TypeVariant::AuthenticatedMessageV0, - TypeVariant::LiquidityPoolParameters, - TypeVariant::MuxedAccount, - TypeVariant::MuxedAccountMed25519, - TypeVariant::DecoratedSignature, - TypeVariant::OperationType, - TypeVariant::CreateAccountOp, - TypeVariant::PaymentOp, - TypeVariant::PathPaymentStrictReceiveOp, - TypeVariant::PathPaymentStrictSendOp, - TypeVariant::ManageSellOfferOp, - TypeVariant::ManageBuyOfferOp, - TypeVariant::CreatePassiveSellOfferOp, - TypeVariant::SetOptionsOp, - TypeVariant::ChangeTrustAsset, - TypeVariant::ChangeTrustOp, - TypeVariant::AllowTrustOp, - TypeVariant::ManageDataOp, - TypeVariant::BumpSequenceOp, - TypeVariant::CreateClaimableBalanceOp, - TypeVariant::ClaimClaimableBalanceOp, - TypeVariant::BeginSponsoringFutureReservesOp, - TypeVariant::RevokeSponsorshipType, - TypeVariant::RevokeSponsorshipOp, - TypeVariant::RevokeSponsorshipOpSigner, - TypeVariant::ClawbackOp, - TypeVariant::ClawbackClaimableBalanceOp, - TypeVariant::SetTrustLineFlagsOp, - TypeVariant::LiquidityPoolDepositOp, - TypeVariant::LiquidityPoolWithdrawOp, - TypeVariant::HostFunctionType, - TypeVariant::ContractIdPreimageType, - TypeVariant::ContractIdPreimage, - TypeVariant::ContractIdPreimageFromAddress, - TypeVariant::CreateContractArgs, - TypeVariant::CreateContractArgsV2, - TypeVariant::InvokeContractArgs, - TypeVariant::HostFunction, - TypeVariant::SorobanAuthorizedFunctionType, - TypeVariant::SorobanAuthorizedFunction, - TypeVariant::SorobanAuthorizedInvocation, - TypeVariant::SorobanAddressCredentials, - TypeVariant::SorobanCredentialsType, - TypeVariant::SorobanCredentials, - TypeVariant::SorobanAuthorizationEntry, - TypeVariant::SorobanAuthorizationEntries, - TypeVariant::InvokeHostFunctionOp, - TypeVariant::ExtendFootprintTtlOp, - TypeVariant::RestoreFootprintOp, - TypeVariant::Operation, - TypeVariant::OperationBody, - TypeVariant::HashIdPreimage, - TypeVariant::HashIdPreimageOperationId, - TypeVariant::HashIdPreimageRevokeId, - TypeVariant::HashIdPreimageContractId, - TypeVariant::HashIdPreimageSorobanAuthorization, - TypeVariant::MemoType, - TypeVariant::Memo, - TypeVariant::TimeBounds, - TypeVariant::LedgerBounds, - TypeVariant::PreconditionsV2, - TypeVariant::PreconditionType, - TypeVariant::Preconditions, - TypeVariant::LedgerFootprint, - TypeVariant::SorobanResources, - TypeVariant::SorobanResourcesExtV0, - TypeVariant::SorobanTransactionData, - TypeVariant::SorobanTransactionDataExt, - TypeVariant::TransactionV0, - TypeVariant::TransactionV0Ext, - TypeVariant::TransactionV0Envelope, - TypeVariant::Transaction, - TypeVariant::TransactionExt, - TypeVariant::TransactionV1Envelope, - TypeVariant::FeeBumpTransaction, - TypeVariant::FeeBumpTransactionInnerTx, - TypeVariant::FeeBumpTransactionExt, - TypeVariant::FeeBumpTransactionEnvelope, - TypeVariant::TransactionEnvelope, - TypeVariant::TransactionSignaturePayload, - TypeVariant::TransactionSignaturePayloadTaggedTransaction, - TypeVariant::ClaimAtomType, - TypeVariant::ClaimOfferAtomV0, - TypeVariant::ClaimOfferAtom, - TypeVariant::ClaimLiquidityAtom, - TypeVariant::ClaimAtom, - TypeVariant::CreateAccountResultCode, - TypeVariant::CreateAccountResult, - TypeVariant::PaymentResultCode, - TypeVariant::PaymentResult, - TypeVariant::PathPaymentStrictReceiveResultCode, - TypeVariant::SimplePaymentResult, - TypeVariant::PathPaymentStrictReceiveResult, - TypeVariant::PathPaymentStrictReceiveResultSuccess, - TypeVariant::PathPaymentStrictSendResultCode, - TypeVariant::PathPaymentStrictSendResult, - TypeVariant::PathPaymentStrictSendResultSuccess, - TypeVariant::ManageSellOfferResultCode, - TypeVariant::ManageOfferEffect, - TypeVariant::ManageOfferSuccessResult, - TypeVariant::ManageOfferSuccessResultOffer, - TypeVariant::ManageSellOfferResult, - TypeVariant::ManageBuyOfferResultCode, - TypeVariant::ManageBuyOfferResult, - TypeVariant::SetOptionsResultCode, - TypeVariant::SetOptionsResult, - TypeVariant::ChangeTrustResultCode, - TypeVariant::ChangeTrustResult, - TypeVariant::AllowTrustResultCode, - TypeVariant::AllowTrustResult, - TypeVariant::AccountMergeResultCode, - TypeVariant::AccountMergeResult, - TypeVariant::InflationResultCode, - TypeVariant::InflationPayout, - TypeVariant::InflationResult, - TypeVariant::ManageDataResultCode, - TypeVariant::ManageDataResult, - TypeVariant::BumpSequenceResultCode, - TypeVariant::BumpSequenceResult, - TypeVariant::CreateClaimableBalanceResultCode, - TypeVariant::CreateClaimableBalanceResult, - TypeVariant::ClaimClaimableBalanceResultCode, - TypeVariant::ClaimClaimableBalanceResult, - TypeVariant::BeginSponsoringFutureReservesResultCode, - TypeVariant::BeginSponsoringFutureReservesResult, - TypeVariant::EndSponsoringFutureReservesResultCode, - TypeVariant::EndSponsoringFutureReservesResult, - TypeVariant::RevokeSponsorshipResultCode, - TypeVariant::RevokeSponsorshipResult, - TypeVariant::ClawbackResultCode, - TypeVariant::ClawbackResult, - TypeVariant::ClawbackClaimableBalanceResultCode, - TypeVariant::ClawbackClaimableBalanceResult, - TypeVariant::SetTrustLineFlagsResultCode, - TypeVariant::SetTrustLineFlagsResult, - TypeVariant::LiquidityPoolDepositResultCode, - TypeVariant::LiquidityPoolDepositResult, - TypeVariant::LiquidityPoolWithdrawResultCode, - TypeVariant::LiquidityPoolWithdrawResult, - TypeVariant::InvokeHostFunctionResultCode, - TypeVariant::InvokeHostFunctionResult, - TypeVariant::ExtendFootprintTtlResultCode, - TypeVariant::ExtendFootprintTtlResult, - TypeVariant::RestoreFootprintResultCode, - TypeVariant::RestoreFootprintResult, - TypeVariant::OperationResultCode, - TypeVariant::OperationResult, - TypeVariant::OperationResultTr, - TypeVariant::TransactionResultCode, - TypeVariant::InnerTransactionResult, - TypeVariant::InnerTransactionResultResult, - TypeVariant::InnerTransactionResultExt, - TypeVariant::InnerTransactionResultPair, - TypeVariant::TransactionResult, - TypeVariant::TransactionResultResult, - TypeVariant::TransactionResultExt, - TypeVariant::Hash, - TypeVariant::Uint256, - TypeVariant::Uint32, - TypeVariant::Int32, - TypeVariant::Uint64, - TypeVariant::Int64, - TypeVariant::TimePoint, - TypeVariant::Duration, - TypeVariant::ExtensionPoint, - TypeVariant::CryptoKeyType, - TypeVariant::PublicKeyType, - TypeVariant::SignerKeyType, - TypeVariant::PublicKey, - TypeVariant::SignerKey, - TypeVariant::SignerKeyEd25519SignedPayload, - TypeVariant::Signature, - TypeVariant::SignatureHint, - TypeVariant::NodeId, - TypeVariant::AccountId, - TypeVariant::ContractId, - TypeVariant::Curve25519Secret, - TypeVariant::Curve25519Public, - TypeVariant::HmacSha256Key, - TypeVariant::HmacSha256Mac, - TypeVariant::ShortHashSeed, - TypeVariant::BinaryFuseFilterType, - TypeVariant::SerializedBinaryFuseFilter, - TypeVariant::PoolId, - TypeVariant::ClaimableBalanceIdType, - TypeVariant::ClaimableBalanceId, - ]; - const _VARIANTS_STR: &[&str] = &[ - "Value", - "ScpBallot", - "ScpStatementType", - "ScpNomination", - "ScpStatement", - "ScpStatementPledges", - "ScpStatementPrepare", - "ScpStatementConfirm", - "ScpStatementExternalize", - "ScpEnvelope", - "ScpQuorumSet", - "EncodedLedgerKey", - "ConfigSettingContractExecutionLanesV0", - "ConfigSettingContractComputeV0", - "ConfigSettingContractParallelComputeV0", - "ConfigSettingContractLedgerCostV0", - "ConfigSettingContractLedgerCostExtV0", - "ConfigSettingContractHistoricalDataV0", - "ConfigSettingContractEventsV0", - "ConfigSettingContractBandwidthV0", - "ContractCostType", - "ContractCostParamEntry", - "StateArchivalSettings", - "EvictionIterator", - "ConfigSettingScpTiming", - "FrozenLedgerKeys", - "FrozenLedgerKeysDelta", - "FreezeBypassTxs", - "FreezeBypassTxsDelta", - "ContractCostParams", - "ConfigSettingId", - "ConfigSettingEntry", - "ScEnvMetaKind", - "ScEnvMetaEntry", - "ScEnvMetaEntryInterfaceVersion", - "ScMetaV0", - "ScMetaKind", - "ScMetaEntry", - "ScSpecType", - "ScSpecTypeOption", - "ScSpecTypeResult", - "ScSpecTypeVec", - "ScSpecTypeMap", - "ScSpecTypeTuple", - "ScSpecTypeBytesN", - "ScSpecTypeUdt", - "ScSpecTypeDef", - "ScSpecUdtStructFieldV0", - "ScSpecUdtStructV0", - "ScSpecUdtUnionCaseVoidV0", - "ScSpecUdtUnionCaseTupleV0", - "ScSpecUdtUnionCaseV0Kind", - "ScSpecUdtUnionCaseV0", - "ScSpecUdtUnionV0", - "ScSpecUdtEnumCaseV0", - "ScSpecUdtEnumV0", - "ScSpecUdtErrorEnumCaseV0", - "ScSpecUdtErrorEnumV0", - "ScSpecFunctionInputV0", - "ScSpecFunctionV0", - "ScSpecEventParamLocationV0", - "ScSpecEventParamV0", - "ScSpecEventDataFormat", - "ScSpecEventV0", - "ScSpecEntryKind", - "ScSpecEntry", - "ScValType", - "ScErrorType", - "ScErrorCode", - "ScError", - "UInt128Parts", - "Int128Parts", - "UInt256Parts", - "Int256Parts", - "ContractExecutableType", - "ContractExecutable", - "ScAddressType", - "MuxedEd25519Account", - "ScAddress", - "ScVec", - "ScMap", - "ScBytes", - "ScString", - "ScSymbol", - "ScNonceKey", - "ScContractInstance", - "ScVal", - "ScMapEntry", - "LedgerCloseMetaBatch", - "StoredTransactionSet", - "StoredDebugTransactionSet", - "PersistedScpStateV0", - "PersistedScpStateV1", - "PersistedScpState", - "Thresholds", - "String32", - "String64", - "SequenceNumber", - "DataValue", - "AssetCode4", - "AssetCode12", - "AssetType", - "AssetCode", - "AlphaNum4", - "AlphaNum12", - "Asset", - "Price", - "Liabilities", - "ThresholdIndexes", - "LedgerEntryType", - "Signer", - "AccountFlags", - "SponsorshipDescriptor", - "AccountEntryExtensionV3", - "AccountEntryExtensionV2", - "AccountEntryExtensionV2Ext", - "AccountEntryExtensionV1", - "AccountEntryExtensionV1Ext", - "AccountEntry", - "AccountEntryExt", - "TrustLineFlags", - "LiquidityPoolType", - "TrustLineAsset", - "TrustLineEntryExtensionV2", - "TrustLineEntryExtensionV2Ext", - "TrustLineEntry", - "TrustLineEntryExt", - "TrustLineEntryV1", - "TrustLineEntryV1Ext", - "OfferEntryFlags", - "OfferEntry", - "OfferEntryExt", - "DataEntry", - "DataEntryExt", - "ClaimPredicateType", - "ClaimPredicate", - "ClaimantType", - "Claimant", - "ClaimantV0", - "ClaimableBalanceFlags", - "ClaimableBalanceEntryExtensionV1", - "ClaimableBalanceEntryExtensionV1Ext", - "ClaimableBalanceEntry", - "ClaimableBalanceEntryExt", - "LiquidityPoolConstantProductParameters", - "LiquidityPoolEntry", - "LiquidityPoolEntryBody", - "LiquidityPoolEntryConstantProduct", - "ContractDataDurability", - "ContractDataEntry", - "ContractCodeCostInputs", - "ContractCodeEntry", - "ContractCodeEntryExt", - "ContractCodeEntryV1", - "TtlEntry", - "LedgerEntryExtensionV1", - "LedgerEntryExtensionV1Ext", - "LedgerEntry", - "LedgerEntryData", - "LedgerEntryExt", - "LedgerKey", - "LedgerKeyAccount", - "LedgerKeyTrustLine", - "LedgerKeyOffer", - "LedgerKeyData", - "LedgerKeyClaimableBalance", - "LedgerKeyLiquidityPool", - "LedgerKeyContractData", - "LedgerKeyContractCode", - "LedgerKeyConfigSetting", - "LedgerKeyTtl", - "EnvelopeType", - "BucketListType", - "BucketEntryType", - "HotArchiveBucketEntryType", - "BucketMetadata", - "BucketMetadataExt", - "BucketEntry", - "HotArchiveBucketEntry", - "UpgradeType", - "StellarValueType", - "LedgerCloseValueSignature", - "StellarValue", - "StellarValueExt", - "LedgerHeaderFlags", - "LedgerHeaderExtensionV1", - "LedgerHeaderExtensionV1Ext", - "LedgerHeader", - "LedgerHeaderExt", - "LedgerUpgradeType", - "ConfigUpgradeSetKey", - "LedgerUpgrade", - "ConfigUpgradeSet", - "TxSetComponentType", - "DependentTxCluster", - "ParallelTxExecutionStage", - "ParallelTxsComponent", - "TxSetComponent", - "TxSetComponentTxsMaybeDiscountedFee", - "TransactionPhase", - "TransactionSet", - "TransactionSetV1", - "GeneralizedTransactionSet", - "TransactionResultPair", - "TransactionResultSet", - "TransactionHistoryEntry", - "TransactionHistoryEntryExt", - "TransactionHistoryResultEntry", - "TransactionHistoryResultEntryExt", - "LedgerHeaderHistoryEntry", - "LedgerHeaderHistoryEntryExt", - "LedgerScpMessages", - "ScpHistoryEntryV0", - "ScpHistoryEntry", - "LedgerEntryChangeType", - "LedgerEntryChange", - "LedgerEntryChanges", - "OperationMeta", - "TransactionMetaV1", - "TransactionMetaV2", - "ContractEventType", - "ContractEvent", - "ContractEventBody", - "ContractEventV0", - "DiagnosticEvent", - "SorobanTransactionMetaExtV1", - "SorobanTransactionMetaExt", - "SorobanTransactionMeta", - "TransactionMetaV3", - "OperationMetaV2", - "SorobanTransactionMetaV2", - "TransactionEventStage", - "TransactionEvent", - "TransactionMetaV4", - "InvokeHostFunctionSuccessPreImage", - "TransactionMeta", - "TransactionResultMeta", - "TransactionResultMetaV1", - "UpgradeEntryMeta", - "LedgerCloseMetaV0", - "LedgerCloseMetaExtV1", - "LedgerCloseMetaExt", - "LedgerCloseMetaV1", - "LedgerCloseMetaV2", - "LedgerCloseMeta", - "ErrorCode", - "SError", - "SendMore", - "SendMoreExtended", - "AuthCert", - "Hello", - "Auth", - "IpAddrType", - "PeerAddress", - "PeerAddressIp", - "MessageType", - "DontHave", - "SurveyMessageCommandType", - "SurveyMessageResponseType", - "TimeSlicedSurveyStartCollectingMessage", - "SignedTimeSlicedSurveyStartCollectingMessage", - "TimeSlicedSurveyStopCollectingMessage", - "SignedTimeSlicedSurveyStopCollectingMessage", - "SurveyRequestMessage", - "TimeSlicedSurveyRequestMessage", - "SignedTimeSlicedSurveyRequestMessage", - "EncryptedBody", - "SurveyResponseMessage", - "TimeSlicedSurveyResponseMessage", - "SignedTimeSlicedSurveyResponseMessage", - "PeerStats", - "TimeSlicedNodeData", - "TimeSlicedPeerData", - "TimeSlicedPeerDataList", - "TopologyResponseBodyV2", - "SurveyResponseBody", - "TxAdvertVector", - "FloodAdvert", - "TxDemandVector", - "FloodDemand", - "StellarMessage", - "AuthenticatedMessage", - "AuthenticatedMessageV0", - "LiquidityPoolParameters", - "MuxedAccount", - "MuxedAccountMed25519", - "DecoratedSignature", - "OperationType", - "CreateAccountOp", - "PaymentOp", - "PathPaymentStrictReceiveOp", - "PathPaymentStrictSendOp", - "ManageSellOfferOp", - "ManageBuyOfferOp", - "CreatePassiveSellOfferOp", - "SetOptionsOp", - "ChangeTrustAsset", - "ChangeTrustOp", - "AllowTrustOp", - "ManageDataOp", - "BumpSequenceOp", - "CreateClaimableBalanceOp", - "ClaimClaimableBalanceOp", - "BeginSponsoringFutureReservesOp", - "RevokeSponsorshipType", - "RevokeSponsorshipOp", - "RevokeSponsorshipOpSigner", - "ClawbackOp", - "ClawbackClaimableBalanceOp", - "SetTrustLineFlagsOp", - "LiquidityPoolDepositOp", - "LiquidityPoolWithdrawOp", - "HostFunctionType", - "ContractIdPreimageType", - "ContractIdPreimage", - "ContractIdPreimageFromAddress", - "CreateContractArgs", - "CreateContractArgsV2", - "InvokeContractArgs", - "HostFunction", - "SorobanAuthorizedFunctionType", - "SorobanAuthorizedFunction", - "SorobanAuthorizedInvocation", - "SorobanAddressCredentials", - "SorobanCredentialsType", - "SorobanCredentials", - "SorobanAuthorizationEntry", - "SorobanAuthorizationEntries", - "InvokeHostFunctionOp", - "ExtendFootprintTtlOp", - "RestoreFootprintOp", - "Operation", - "OperationBody", - "HashIdPreimage", - "HashIdPreimageOperationId", - "HashIdPreimageRevokeId", - "HashIdPreimageContractId", - "HashIdPreimageSorobanAuthorization", - "MemoType", - "Memo", - "TimeBounds", - "LedgerBounds", - "PreconditionsV2", - "PreconditionType", - "Preconditions", - "LedgerFootprint", - "SorobanResources", - "SorobanResourcesExtV0", - "SorobanTransactionData", - "SorobanTransactionDataExt", - "TransactionV0", - "TransactionV0Ext", - "TransactionV0Envelope", - "Transaction", - "TransactionExt", - "TransactionV1Envelope", - "FeeBumpTransaction", - "FeeBumpTransactionInnerTx", - "FeeBumpTransactionExt", - "FeeBumpTransactionEnvelope", - "TransactionEnvelope", - "TransactionSignaturePayload", - "TransactionSignaturePayloadTaggedTransaction", - "ClaimAtomType", - "ClaimOfferAtomV0", - "ClaimOfferAtom", - "ClaimLiquidityAtom", - "ClaimAtom", - "CreateAccountResultCode", - "CreateAccountResult", - "PaymentResultCode", - "PaymentResult", - "PathPaymentStrictReceiveResultCode", - "SimplePaymentResult", - "PathPaymentStrictReceiveResult", - "PathPaymentStrictReceiveResultSuccess", - "PathPaymentStrictSendResultCode", - "PathPaymentStrictSendResult", - "PathPaymentStrictSendResultSuccess", - "ManageSellOfferResultCode", - "ManageOfferEffect", - "ManageOfferSuccessResult", - "ManageOfferSuccessResultOffer", - "ManageSellOfferResult", - "ManageBuyOfferResultCode", - "ManageBuyOfferResult", - "SetOptionsResultCode", - "SetOptionsResult", - "ChangeTrustResultCode", - "ChangeTrustResult", - "AllowTrustResultCode", - "AllowTrustResult", - "AccountMergeResultCode", - "AccountMergeResult", - "InflationResultCode", - "InflationPayout", - "InflationResult", - "ManageDataResultCode", - "ManageDataResult", - "BumpSequenceResultCode", - "BumpSequenceResult", - "CreateClaimableBalanceResultCode", - "CreateClaimableBalanceResult", - "ClaimClaimableBalanceResultCode", - "ClaimClaimableBalanceResult", - "BeginSponsoringFutureReservesResultCode", - "BeginSponsoringFutureReservesResult", - "EndSponsoringFutureReservesResultCode", - "EndSponsoringFutureReservesResult", - "RevokeSponsorshipResultCode", - "RevokeSponsorshipResult", - "ClawbackResultCode", - "ClawbackResult", - "ClawbackClaimableBalanceResultCode", - "ClawbackClaimableBalanceResult", - "SetTrustLineFlagsResultCode", - "SetTrustLineFlagsResult", - "LiquidityPoolDepositResultCode", - "LiquidityPoolDepositResult", - "LiquidityPoolWithdrawResultCode", - "LiquidityPoolWithdrawResult", - "InvokeHostFunctionResultCode", - "InvokeHostFunctionResult", - "ExtendFootprintTtlResultCode", - "ExtendFootprintTtlResult", - "RestoreFootprintResultCode", - "RestoreFootprintResult", - "OperationResultCode", - "OperationResult", - "OperationResultTr", - "TransactionResultCode", - "InnerTransactionResult", - "InnerTransactionResultResult", - "InnerTransactionResultExt", - "InnerTransactionResultPair", - "TransactionResult", - "TransactionResultResult", - "TransactionResultExt", - "Hash", - "Uint256", - "Uint32", - "Int32", - "Uint64", - "Int64", - "TimePoint", - "Duration", - "ExtensionPoint", - "CryptoKeyType", - "PublicKeyType", - "SignerKeyType", - "PublicKey", - "SignerKey", - "SignerKeyEd25519SignedPayload", - "Signature", - "SignatureHint", - "NodeId", - "AccountId", - "ContractId", - "Curve25519Secret", - "Curve25519Public", - "HmacSha256Key", - "HmacSha256Mac", - "ShortHashSeed", - "BinaryFuseFilterType", - "SerializedBinaryFuseFilter", - "PoolId", - "ClaimableBalanceIdType", - "ClaimableBalanceId", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = [ - "Value", - "ScpBallot", - "ScpStatementType", - "ScpNomination", - "ScpStatement", - "ScpStatementPledges", - "ScpStatementPrepare", - "ScpStatementConfirm", - "ScpStatementExternalize", - "ScpEnvelope", - "ScpQuorumSet", - "EncodedLedgerKey", - "ConfigSettingContractExecutionLanesV0", - "ConfigSettingContractComputeV0", - "ConfigSettingContractParallelComputeV0", - "ConfigSettingContractLedgerCostV0", - "ConfigSettingContractLedgerCostExtV0", - "ConfigSettingContractHistoricalDataV0", - "ConfigSettingContractEventsV0", - "ConfigSettingContractBandwidthV0", - "ContractCostType", - "ContractCostParamEntry", - "StateArchivalSettings", - "EvictionIterator", - "ConfigSettingScpTiming", - "FrozenLedgerKeys", - "FrozenLedgerKeysDelta", - "FreezeBypassTxs", - "FreezeBypassTxsDelta", - "ContractCostParams", - "ConfigSettingId", - "ConfigSettingEntry", - "ScEnvMetaKind", - "ScEnvMetaEntry", - "ScEnvMetaEntryInterfaceVersion", - "ScMetaV0", - "ScMetaKind", - "ScMetaEntry", - "ScSpecType", - "ScSpecTypeOption", - "ScSpecTypeResult", - "ScSpecTypeVec", - "ScSpecTypeMap", - "ScSpecTypeTuple", - "ScSpecTypeBytesN", - "ScSpecTypeUdt", - "ScSpecTypeDef", - "ScSpecUdtStructFieldV0", - "ScSpecUdtStructV0", - "ScSpecUdtUnionCaseVoidV0", - "ScSpecUdtUnionCaseTupleV0", - "ScSpecUdtUnionCaseV0Kind", - "ScSpecUdtUnionCaseV0", - "ScSpecUdtUnionV0", - "ScSpecUdtEnumCaseV0", - "ScSpecUdtEnumV0", - "ScSpecUdtErrorEnumCaseV0", - "ScSpecUdtErrorEnumV0", - "ScSpecFunctionInputV0", - "ScSpecFunctionV0", - "ScSpecEventParamLocationV0", - "ScSpecEventParamV0", - "ScSpecEventDataFormat", - "ScSpecEventV0", - "ScSpecEntryKind", - "ScSpecEntry", - "ScValType", - "ScErrorType", - "ScErrorCode", - "ScError", - "UInt128Parts", - "Int128Parts", - "UInt256Parts", - "Int256Parts", - "ContractExecutableType", - "ContractExecutable", - "ScAddressType", - "MuxedEd25519Account", - "ScAddress", - "ScVec", - "ScMap", - "ScBytes", - "ScString", - "ScSymbol", - "ScNonceKey", - "ScContractInstance", - "ScVal", - "ScMapEntry", - "LedgerCloseMetaBatch", - "StoredTransactionSet", - "StoredDebugTransactionSet", - "PersistedScpStateV0", - "PersistedScpStateV1", - "PersistedScpState", - "Thresholds", - "String32", - "String64", - "SequenceNumber", - "DataValue", - "AssetCode4", - "AssetCode12", - "AssetType", - "AssetCode", - "AlphaNum4", - "AlphaNum12", - "Asset", - "Price", - "Liabilities", - "ThresholdIndexes", - "LedgerEntryType", - "Signer", - "AccountFlags", - "SponsorshipDescriptor", - "AccountEntryExtensionV3", - "AccountEntryExtensionV2", - "AccountEntryExtensionV2Ext", - "AccountEntryExtensionV1", - "AccountEntryExtensionV1Ext", - "AccountEntry", - "AccountEntryExt", - "TrustLineFlags", - "LiquidityPoolType", - "TrustLineAsset", - "TrustLineEntryExtensionV2", - "TrustLineEntryExtensionV2Ext", - "TrustLineEntry", - "TrustLineEntryExt", - "TrustLineEntryV1", - "TrustLineEntryV1Ext", - "OfferEntryFlags", - "OfferEntry", - "OfferEntryExt", - "DataEntry", - "DataEntryExt", - "ClaimPredicateType", - "ClaimPredicate", - "ClaimantType", - "Claimant", - "ClaimantV0", - "ClaimableBalanceFlags", - "ClaimableBalanceEntryExtensionV1", - "ClaimableBalanceEntryExtensionV1Ext", - "ClaimableBalanceEntry", - "ClaimableBalanceEntryExt", - "LiquidityPoolConstantProductParameters", - "LiquidityPoolEntry", - "LiquidityPoolEntryBody", - "LiquidityPoolEntryConstantProduct", - "ContractDataDurability", - "ContractDataEntry", - "ContractCodeCostInputs", - "ContractCodeEntry", - "ContractCodeEntryExt", - "ContractCodeEntryV1", - "TtlEntry", - "LedgerEntryExtensionV1", - "LedgerEntryExtensionV1Ext", - "LedgerEntry", - "LedgerEntryData", - "LedgerEntryExt", - "LedgerKey", - "LedgerKeyAccount", - "LedgerKeyTrustLine", - "LedgerKeyOffer", - "LedgerKeyData", - "LedgerKeyClaimableBalance", - "LedgerKeyLiquidityPool", - "LedgerKeyContractData", - "LedgerKeyContractCode", - "LedgerKeyConfigSetting", - "LedgerKeyTtl", - "EnvelopeType", - "BucketListType", - "BucketEntryType", - "HotArchiveBucketEntryType", - "BucketMetadata", - "BucketMetadataExt", - "BucketEntry", - "HotArchiveBucketEntry", - "UpgradeType", - "StellarValueType", - "LedgerCloseValueSignature", - "StellarValue", - "StellarValueExt", - "LedgerHeaderFlags", - "LedgerHeaderExtensionV1", - "LedgerHeaderExtensionV1Ext", - "LedgerHeader", - "LedgerHeaderExt", - "LedgerUpgradeType", - "ConfigUpgradeSetKey", - "LedgerUpgrade", - "ConfigUpgradeSet", - "TxSetComponentType", - "DependentTxCluster", - "ParallelTxExecutionStage", - "ParallelTxsComponent", - "TxSetComponent", - "TxSetComponentTxsMaybeDiscountedFee", - "TransactionPhase", - "TransactionSet", - "TransactionSetV1", - "GeneralizedTransactionSet", - "TransactionResultPair", - "TransactionResultSet", - "TransactionHistoryEntry", - "TransactionHistoryEntryExt", - "TransactionHistoryResultEntry", - "TransactionHistoryResultEntryExt", - "LedgerHeaderHistoryEntry", - "LedgerHeaderHistoryEntryExt", - "LedgerScpMessages", - "ScpHistoryEntryV0", - "ScpHistoryEntry", - "LedgerEntryChangeType", - "LedgerEntryChange", - "LedgerEntryChanges", - "OperationMeta", - "TransactionMetaV1", - "TransactionMetaV2", - "ContractEventType", - "ContractEvent", - "ContractEventBody", - "ContractEventV0", - "DiagnosticEvent", - "SorobanTransactionMetaExtV1", - "SorobanTransactionMetaExt", - "SorobanTransactionMeta", - "TransactionMetaV3", - "OperationMetaV2", - "SorobanTransactionMetaV2", - "TransactionEventStage", - "TransactionEvent", - "TransactionMetaV4", - "InvokeHostFunctionSuccessPreImage", - "TransactionMeta", - "TransactionResultMeta", - "TransactionResultMetaV1", - "UpgradeEntryMeta", - "LedgerCloseMetaV0", - "LedgerCloseMetaExtV1", - "LedgerCloseMetaExt", - "LedgerCloseMetaV1", - "LedgerCloseMetaV2", - "LedgerCloseMeta", - "ErrorCode", - "SError", - "SendMore", - "SendMoreExtended", - "AuthCert", - "Hello", - "Auth", - "IpAddrType", - "PeerAddress", - "PeerAddressIp", - "MessageType", - "DontHave", - "SurveyMessageCommandType", - "SurveyMessageResponseType", - "TimeSlicedSurveyStartCollectingMessage", - "SignedTimeSlicedSurveyStartCollectingMessage", - "TimeSlicedSurveyStopCollectingMessage", - "SignedTimeSlicedSurveyStopCollectingMessage", - "SurveyRequestMessage", - "TimeSlicedSurveyRequestMessage", - "SignedTimeSlicedSurveyRequestMessage", - "EncryptedBody", - "SurveyResponseMessage", - "TimeSlicedSurveyResponseMessage", - "SignedTimeSlicedSurveyResponseMessage", - "PeerStats", - "TimeSlicedNodeData", - "TimeSlicedPeerData", - "TimeSlicedPeerDataList", - "TopologyResponseBodyV2", - "SurveyResponseBody", - "TxAdvertVector", - "FloodAdvert", - "TxDemandVector", - "FloodDemand", - "StellarMessage", - "AuthenticatedMessage", - "AuthenticatedMessageV0", - "LiquidityPoolParameters", - "MuxedAccount", - "MuxedAccountMed25519", - "DecoratedSignature", - "OperationType", - "CreateAccountOp", - "PaymentOp", - "PathPaymentStrictReceiveOp", - "PathPaymentStrictSendOp", - "ManageSellOfferOp", - "ManageBuyOfferOp", - "CreatePassiveSellOfferOp", - "SetOptionsOp", - "ChangeTrustAsset", - "ChangeTrustOp", - "AllowTrustOp", - "ManageDataOp", - "BumpSequenceOp", - "CreateClaimableBalanceOp", - "ClaimClaimableBalanceOp", - "BeginSponsoringFutureReservesOp", - "RevokeSponsorshipType", - "RevokeSponsorshipOp", - "RevokeSponsorshipOpSigner", - "ClawbackOp", - "ClawbackClaimableBalanceOp", - "SetTrustLineFlagsOp", - "LiquidityPoolDepositOp", - "LiquidityPoolWithdrawOp", - "HostFunctionType", - "ContractIdPreimageType", - "ContractIdPreimage", - "ContractIdPreimageFromAddress", - "CreateContractArgs", - "CreateContractArgsV2", - "InvokeContractArgs", - "HostFunction", - "SorobanAuthorizedFunctionType", - "SorobanAuthorizedFunction", - "SorobanAuthorizedInvocation", - "SorobanAddressCredentials", - "SorobanCredentialsType", - "SorobanCredentials", - "SorobanAuthorizationEntry", - "SorobanAuthorizationEntries", - "InvokeHostFunctionOp", - "ExtendFootprintTtlOp", - "RestoreFootprintOp", - "Operation", - "OperationBody", - "HashIdPreimage", - "HashIdPreimageOperationId", - "HashIdPreimageRevokeId", - "HashIdPreimageContractId", - "HashIdPreimageSorobanAuthorization", - "MemoType", - "Memo", - "TimeBounds", - "LedgerBounds", - "PreconditionsV2", - "PreconditionType", - "Preconditions", - "LedgerFootprint", - "SorobanResources", - "SorobanResourcesExtV0", - "SorobanTransactionData", - "SorobanTransactionDataExt", - "TransactionV0", - "TransactionV0Ext", - "TransactionV0Envelope", - "Transaction", - "TransactionExt", - "TransactionV1Envelope", - "FeeBumpTransaction", - "FeeBumpTransactionInnerTx", - "FeeBumpTransactionExt", - "FeeBumpTransactionEnvelope", - "TransactionEnvelope", - "TransactionSignaturePayload", - "TransactionSignaturePayloadTaggedTransaction", - "ClaimAtomType", - "ClaimOfferAtomV0", - "ClaimOfferAtom", - "ClaimLiquidityAtom", - "ClaimAtom", - "CreateAccountResultCode", - "CreateAccountResult", - "PaymentResultCode", - "PaymentResult", - "PathPaymentStrictReceiveResultCode", - "SimplePaymentResult", - "PathPaymentStrictReceiveResult", - "PathPaymentStrictReceiveResultSuccess", - "PathPaymentStrictSendResultCode", - "PathPaymentStrictSendResult", - "PathPaymentStrictSendResultSuccess", - "ManageSellOfferResultCode", - "ManageOfferEffect", - "ManageOfferSuccessResult", - "ManageOfferSuccessResultOffer", - "ManageSellOfferResult", - "ManageBuyOfferResultCode", - "ManageBuyOfferResult", - "SetOptionsResultCode", - "SetOptionsResult", - "ChangeTrustResultCode", - "ChangeTrustResult", - "AllowTrustResultCode", - "AllowTrustResult", - "AccountMergeResultCode", - "AccountMergeResult", - "InflationResultCode", - "InflationPayout", - "InflationResult", - "ManageDataResultCode", - "ManageDataResult", - "BumpSequenceResultCode", - "BumpSequenceResult", - "CreateClaimableBalanceResultCode", - "CreateClaimableBalanceResult", - "ClaimClaimableBalanceResultCode", - "ClaimClaimableBalanceResult", - "BeginSponsoringFutureReservesResultCode", - "BeginSponsoringFutureReservesResult", - "EndSponsoringFutureReservesResultCode", - "EndSponsoringFutureReservesResult", - "RevokeSponsorshipResultCode", - "RevokeSponsorshipResult", - "ClawbackResultCode", - "ClawbackResult", - "ClawbackClaimableBalanceResultCode", - "ClawbackClaimableBalanceResult", - "SetTrustLineFlagsResultCode", - "SetTrustLineFlagsResult", - "LiquidityPoolDepositResultCode", - "LiquidityPoolDepositResult", - "LiquidityPoolWithdrawResultCode", - "LiquidityPoolWithdrawResult", - "InvokeHostFunctionResultCode", - "InvokeHostFunctionResult", - "ExtendFootprintTtlResultCode", - "ExtendFootprintTtlResult", - "RestoreFootprintResultCode", - "RestoreFootprintResult", - "OperationResultCode", - "OperationResult", - "OperationResultTr", - "TransactionResultCode", - "InnerTransactionResult", - "InnerTransactionResultResult", - "InnerTransactionResultExt", - "InnerTransactionResultPair", - "TransactionResult", - "TransactionResultResult", - "TransactionResultExt", - "Hash", - "Uint256", - "Uint32", - "Int32", - "Uint64", - "Int64", - "TimePoint", - "Duration", - "ExtensionPoint", - "CryptoKeyType", - "PublicKeyType", - "SignerKeyType", - "PublicKey", - "SignerKey", - "SignerKeyEd25519SignedPayload", - "Signature", - "SignatureHint", - "NodeId", - "AccountId", - "ContractId", - "Curve25519Secret", - "Curve25519Public", - "HmacSha256Key", - "HmacSha256Mac", - "ShortHashSeed", - "BinaryFuseFilterType", - "SerializedBinaryFuseFilter", - "PoolId", - "ClaimableBalanceIdType", - "ClaimableBalanceId", - ]; - - #[must_use] - #[allow(clippy::too_many_lines)] - pub const fn name(&self) -> &'static str { - match self { - Self::Value => "Value", - Self::ScpBallot => "ScpBallot", - Self::ScpStatementType => "ScpStatementType", - Self::ScpNomination => "ScpNomination", - Self::ScpStatement => "ScpStatement", - Self::ScpStatementPledges => "ScpStatementPledges", - Self::ScpStatementPrepare => "ScpStatementPrepare", - Self::ScpStatementConfirm => "ScpStatementConfirm", - Self::ScpStatementExternalize => "ScpStatementExternalize", - Self::ScpEnvelope => "ScpEnvelope", - Self::ScpQuorumSet => "ScpQuorumSet", - Self::EncodedLedgerKey => "EncodedLedgerKey", - Self::ConfigSettingContractExecutionLanesV0 => "ConfigSettingContractExecutionLanesV0", - Self::ConfigSettingContractComputeV0 => "ConfigSettingContractComputeV0", - Self::ConfigSettingContractParallelComputeV0 => { - "ConfigSettingContractParallelComputeV0" - } - Self::ConfigSettingContractLedgerCostV0 => "ConfigSettingContractLedgerCostV0", - Self::ConfigSettingContractLedgerCostExtV0 => "ConfigSettingContractLedgerCostExtV0", - Self::ConfigSettingContractHistoricalDataV0 => "ConfigSettingContractHistoricalDataV0", - Self::ConfigSettingContractEventsV0 => "ConfigSettingContractEventsV0", - Self::ConfigSettingContractBandwidthV0 => "ConfigSettingContractBandwidthV0", - Self::ContractCostType => "ContractCostType", - Self::ContractCostParamEntry => "ContractCostParamEntry", - Self::StateArchivalSettings => "StateArchivalSettings", - Self::EvictionIterator => "EvictionIterator", - Self::ConfigSettingScpTiming => "ConfigSettingScpTiming", - Self::FrozenLedgerKeys => "FrozenLedgerKeys", - Self::FrozenLedgerKeysDelta => "FrozenLedgerKeysDelta", - Self::FreezeBypassTxs => "FreezeBypassTxs", - Self::FreezeBypassTxsDelta => "FreezeBypassTxsDelta", - Self::ContractCostParams => "ContractCostParams", - Self::ConfigSettingId => "ConfigSettingId", - Self::ConfigSettingEntry => "ConfigSettingEntry", - Self::ScEnvMetaKind => "ScEnvMetaKind", - Self::ScEnvMetaEntry => "ScEnvMetaEntry", - Self::ScEnvMetaEntryInterfaceVersion => "ScEnvMetaEntryInterfaceVersion", - Self::ScMetaV0 => "ScMetaV0", - Self::ScMetaKind => "ScMetaKind", - Self::ScMetaEntry => "ScMetaEntry", - Self::ScSpecType => "ScSpecType", - Self::ScSpecTypeOption => "ScSpecTypeOption", - Self::ScSpecTypeResult => "ScSpecTypeResult", - Self::ScSpecTypeVec => "ScSpecTypeVec", - Self::ScSpecTypeMap => "ScSpecTypeMap", - Self::ScSpecTypeTuple => "ScSpecTypeTuple", - Self::ScSpecTypeBytesN => "ScSpecTypeBytesN", - Self::ScSpecTypeUdt => "ScSpecTypeUdt", - Self::ScSpecTypeDef => "ScSpecTypeDef", - Self::ScSpecUdtStructFieldV0 => "ScSpecUdtStructFieldV0", - Self::ScSpecUdtStructV0 => "ScSpecUdtStructV0", - Self::ScSpecUdtUnionCaseVoidV0 => "ScSpecUdtUnionCaseVoidV0", - Self::ScSpecUdtUnionCaseTupleV0 => "ScSpecUdtUnionCaseTupleV0", - Self::ScSpecUdtUnionCaseV0Kind => "ScSpecUdtUnionCaseV0Kind", - Self::ScSpecUdtUnionCaseV0 => "ScSpecUdtUnionCaseV0", - Self::ScSpecUdtUnionV0 => "ScSpecUdtUnionV0", - Self::ScSpecUdtEnumCaseV0 => "ScSpecUdtEnumCaseV0", - Self::ScSpecUdtEnumV0 => "ScSpecUdtEnumV0", - Self::ScSpecUdtErrorEnumCaseV0 => "ScSpecUdtErrorEnumCaseV0", - Self::ScSpecUdtErrorEnumV0 => "ScSpecUdtErrorEnumV0", - Self::ScSpecFunctionInputV0 => "ScSpecFunctionInputV0", - Self::ScSpecFunctionV0 => "ScSpecFunctionV0", - Self::ScSpecEventParamLocationV0 => "ScSpecEventParamLocationV0", - Self::ScSpecEventParamV0 => "ScSpecEventParamV0", - Self::ScSpecEventDataFormat => "ScSpecEventDataFormat", - Self::ScSpecEventV0 => "ScSpecEventV0", - Self::ScSpecEntryKind => "ScSpecEntryKind", - Self::ScSpecEntry => "ScSpecEntry", - Self::ScValType => "ScValType", - Self::ScErrorType => "ScErrorType", - Self::ScErrorCode => "ScErrorCode", - Self::ScError => "ScError", - Self::UInt128Parts => "UInt128Parts", - Self::Int128Parts => "Int128Parts", - Self::UInt256Parts => "UInt256Parts", - Self::Int256Parts => "Int256Parts", - Self::ContractExecutableType => "ContractExecutableType", - Self::ContractExecutable => "ContractExecutable", - Self::ScAddressType => "ScAddressType", - Self::MuxedEd25519Account => "MuxedEd25519Account", - Self::ScAddress => "ScAddress", - Self::ScVec => "ScVec", - Self::ScMap => "ScMap", - Self::ScBytes => "ScBytes", - Self::ScString => "ScString", - Self::ScSymbol => "ScSymbol", - Self::ScNonceKey => "ScNonceKey", - Self::ScContractInstance => "ScContractInstance", - Self::ScVal => "ScVal", - Self::ScMapEntry => "ScMapEntry", - Self::LedgerCloseMetaBatch => "LedgerCloseMetaBatch", - Self::StoredTransactionSet => "StoredTransactionSet", - Self::StoredDebugTransactionSet => "StoredDebugTransactionSet", - Self::PersistedScpStateV0 => "PersistedScpStateV0", - Self::PersistedScpStateV1 => "PersistedScpStateV1", - Self::PersistedScpState => "PersistedScpState", - Self::Thresholds => "Thresholds", - Self::String32 => "String32", - Self::String64 => "String64", - Self::SequenceNumber => "SequenceNumber", - Self::DataValue => "DataValue", - Self::AssetCode4 => "AssetCode4", - Self::AssetCode12 => "AssetCode12", - Self::AssetType => "AssetType", - Self::AssetCode => "AssetCode", - Self::AlphaNum4 => "AlphaNum4", - Self::AlphaNum12 => "AlphaNum12", - Self::Asset => "Asset", - Self::Price => "Price", - Self::Liabilities => "Liabilities", - Self::ThresholdIndexes => "ThresholdIndexes", - Self::LedgerEntryType => "LedgerEntryType", - Self::Signer => "Signer", - Self::AccountFlags => "AccountFlags", - Self::SponsorshipDescriptor => "SponsorshipDescriptor", - Self::AccountEntryExtensionV3 => "AccountEntryExtensionV3", - Self::AccountEntryExtensionV2 => "AccountEntryExtensionV2", - Self::AccountEntryExtensionV2Ext => "AccountEntryExtensionV2Ext", - Self::AccountEntryExtensionV1 => "AccountEntryExtensionV1", - Self::AccountEntryExtensionV1Ext => "AccountEntryExtensionV1Ext", - Self::AccountEntry => "AccountEntry", - Self::AccountEntryExt => "AccountEntryExt", - Self::TrustLineFlags => "TrustLineFlags", - Self::LiquidityPoolType => "LiquidityPoolType", - Self::TrustLineAsset => "TrustLineAsset", - Self::TrustLineEntryExtensionV2 => "TrustLineEntryExtensionV2", - Self::TrustLineEntryExtensionV2Ext => "TrustLineEntryExtensionV2Ext", - Self::TrustLineEntry => "TrustLineEntry", - Self::TrustLineEntryExt => "TrustLineEntryExt", - Self::TrustLineEntryV1 => "TrustLineEntryV1", - Self::TrustLineEntryV1Ext => "TrustLineEntryV1Ext", - Self::OfferEntryFlags => "OfferEntryFlags", - Self::OfferEntry => "OfferEntry", - Self::OfferEntryExt => "OfferEntryExt", - Self::DataEntry => "DataEntry", - Self::DataEntryExt => "DataEntryExt", - Self::ClaimPredicateType => "ClaimPredicateType", - Self::ClaimPredicate => "ClaimPredicate", - Self::ClaimantType => "ClaimantType", - Self::Claimant => "Claimant", - Self::ClaimantV0 => "ClaimantV0", - Self::ClaimableBalanceFlags => "ClaimableBalanceFlags", - Self::ClaimableBalanceEntryExtensionV1 => "ClaimableBalanceEntryExtensionV1", - Self::ClaimableBalanceEntryExtensionV1Ext => "ClaimableBalanceEntryExtensionV1Ext", - Self::ClaimableBalanceEntry => "ClaimableBalanceEntry", - Self::ClaimableBalanceEntryExt => "ClaimableBalanceEntryExt", - Self::LiquidityPoolConstantProductParameters => { - "LiquidityPoolConstantProductParameters" - } - Self::LiquidityPoolEntry => "LiquidityPoolEntry", - Self::LiquidityPoolEntryBody => "LiquidityPoolEntryBody", - Self::LiquidityPoolEntryConstantProduct => "LiquidityPoolEntryConstantProduct", - Self::ContractDataDurability => "ContractDataDurability", - Self::ContractDataEntry => "ContractDataEntry", - Self::ContractCodeCostInputs => "ContractCodeCostInputs", - Self::ContractCodeEntry => "ContractCodeEntry", - Self::ContractCodeEntryExt => "ContractCodeEntryExt", - Self::ContractCodeEntryV1 => "ContractCodeEntryV1", - Self::TtlEntry => "TtlEntry", - Self::LedgerEntryExtensionV1 => "LedgerEntryExtensionV1", - Self::LedgerEntryExtensionV1Ext => "LedgerEntryExtensionV1Ext", - Self::LedgerEntry => "LedgerEntry", - Self::LedgerEntryData => "LedgerEntryData", - Self::LedgerEntryExt => "LedgerEntryExt", - Self::LedgerKey => "LedgerKey", - Self::LedgerKeyAccount => "LedgerKeyAccount", - Self::LedgerKeyTrustLine => "LedgerKeyTrustLine", - Self::LedgerKeyOffer => "LedgerKeyOffer", - Self::LedgerKeyData => "LedgerKeyData", - Self::LedgerKeyClaimableBalance => "LedgerKeyClaimableBalance", - Self::LedgerKeyLiquidityPool => "LedgerKeyLiquidityPool", - Self::LedgerKeyContractData => "LedgerKeyContractData", - Self::LedgerKeyContractCode => "LedgerKeyContractCode", - Self::LedgerKeyConfigSetting => "LedgerKeyConfigSetting", - Self::LedgerKeyTtl => "LedgerKeyTtl", - Self::EnvelopeType => "EnvelopeType", - Self::BucketListType => "BucketListType", - Self::BucketEntryType => "BucketEntryType", - Self::HotArchiveBucketEntryType => "HotArchiveBucketEntryType", - Self::BucketMetadata => "BucketMetadata", - Self::BucketMetadataExt => "BucketMetadataExt", - Self::BucketEntry => "BucketEntry", - Self::HotArchiveBucketEntry => "HotArchiveBucketEntry", - Self::UpgradeType => "UpgradeType", - Self::StellarValueType => "StellarValueType", - Self::LedgerCloseValueSignature => "LedgerCloseValueSignature", - Self::StellarValue => "StellarValue", - Self::StellarValueExt => "StellarValueExt", - Self::LedgerHeaderFlags => "LedgerHeaderFlags", - Self::LedgerHeaderExtensionV1 => "LedgerHeaderExtensionV1", - Self::LedgerHeaderExtensionV1Ext => "LedgerHeaderExtensionV1Ext", - Self::LedgerHeader => "LedgerHeader", - Self::LedgerHeaderExt => "LedgerHeaderExt", - Self::LedgerUpgradeType => "LedgerUpgradeType", - Self::ConfigUpgradeSetKey => "ConfigUpgradeSetKey", - Self::LedgerUpgrade => "LedgerUpgrade", - Self::ConfigUpgradeSet => "ConfigUpgradeSet", - Self::TxSetComponentType => "TxSetComponentType", - Self::DependentTxCluster => "DependentTxCluster", - Self::ParallelTxExecutionStage => "ParallelTxExecutionStage", - Self::ParallelTxsComponent => "ParallelTxsComponent", - Self::TxSetComponent => "TxSetComponent", - Self::TxSetComponentTxsMaybeDiscountedFee => "TxSetComponentTxsMaybeDiscountedFee", - Self::TransactionPhase => "TransactionPhase", - Self::TransactionSet => "TransactionSet", - Self::TransactionSetV1 => "TransactionSetV1", - Self::GeneralizedTransactionSet => "GeneralizedTransactionSet", - Self::TransactionResultPair => "TransactionResultPair", - Self::TransactionResultSet => "TransactionResultSet", - Self::TransactionHistoryEntry => "TransactionHistoryEntry", - Self::TransactionHistoryEntryExt => "TransactionHistoryEntryExt", - Self::TransactionHistoryResultEntry => "TransactionHistoryResultEntry", - Self::TransactionHistoryResultEntryExt => "TransactionHistoryResultEntryExt", - Self::LedgerHeaderHistoryEntry => "LedgerHeaderHistoryEntry", - Self::LedgerHeaderHistoryEntryExt => "LedgerHeaderHistoryEntryExt", - Self::LedgerScpMessages => "LedgerScpMessages", - Self::ScpHistoryEntryV0 => "ScpHistoryEntryV0", - Self::ScpHistoryEntry => "ScpHistoryEntry", - Self::LedgerEntryChangeType => "LedgerEntryChangeType", - Self::LedgerEntryChange => "LedgerEntryChange", - Self::LedgerEntryChanges => "LedgerEntryChanges", - Self::OperationMeta => "OperationMeta", - Self::TransactionMetaV1 => "TransactionMetaV1", - Self::TransactionMetaV2 => "TransactionMetaV2", - Self::ContractEventType => "ContractEventType", - Self::ContractEvent => "ContractEvent", - Self::ContractEventBody => "ContractEventBody", - Self::ContractEventV0 => "ContractEventV0", - Self::DiagnosticEvent => "DiagnosticEvent", - Self::SorobanTransactionMetaExtV1 => "SorobanTransactionMetaExtV1", - Self::SorobanTransactionMetaExt => "SorobanTransactionMetaExt", - Self::SorobanTransactionMeta => "SorobanTransactionMeta", - Self::TransactionMetaV3 => "TransactionMetaV3", - Self::OperationMetaV2 => "OperationMetaV2", - Self::SorobanTransactionMetaV2 => "SorobanTransactionMetaV2", - Self::TransactionEventStage => "TransactionEventStage", - Self::TransactionEvent => "TransactionEvent", - Self::TransactionMetaV4 => "TransactionMetaV4", - Self::InvokeHostFunctionSuccessPreImage => "InvokeHostFunctionSuccessPreImage", - Self::TransactionMeta => "TransactionMeta", - Self::TransactionResultMeta => "TransactionResultMeta", - Self::TransactionResultMetaV1 => "TransactionResultMetaV1", - Self::UpgradeEntryMeta => "UpgradeEntryMeta", - Self::LedgerCloseMetaV0 => "LedgerCloseMetaV0", - Self::LedgerCloseMetaExtV1 => "LedgerCloseMetaExtV1", - Self::LedgerCloseMetaExt => "LedgerCloseMetaExt", - Self::LedgerCloseMetaV1 => "LedgerCloseMetaV1", - Self::LedgerCloseMetaV2 => "LedgerCloseMetaV2", - Self::LedgerCloseMeta => "LedgerCloseMeta", - Self::ErrorCode => "ErrorCode", - Self::SError => "SError", - Self::SendMore => "SendMore", - Self::SendMoreExtended => "SendMoreExtended", - Self::AuthCert => "AuthCert", - Self::Hello => "Hello", - Self::Auth => "Auth", - Self::IpAddrType => "IpAddrType", - Self::PeerAddress => "PeerAddress", - Self::PeerAddressIp => "PeerAddressIp", - Self::MessageType => "MessageType", - Self::DontHave => "DontHave", - Self::SurveyMessageCommandType => "SurveyMessageCommandType", - Self::SurveyMessageResponseType => "SurveyMessageResponseType", - Self::TimeSlicedSurveyStartCollectingMessage => { - "TimeSlicedSurveyStartCollectingMessage" - } - Self::SignedTimeSlicedSurveyStartCollectingMessage => { - "SignedTimeSlicedSurveyStartCollectingMessage" - } - Self::TimeSlicedSurveyStopCollectingMessage => "TimeSlicedSurveyStopCollectingMessage", - Self::SignedTimeSlicedSurveyStopCollectingMessage => { - "SignedTimeSlicedSurveyStopCollectingMessage" - } - Self::SurveyRequestMessage => "SurveyRequestMessage", - Self::TimeSlicedSurveyRequestMessage => "TimeSlicedSurveyRequestMessage", - Self::SignedTimeSlicedSurveyRequestMessage => "SignedTimeSlicedSurveyRequestMessage", - Self::EncryptedBody => "EncryptedBody", - Self::SurveyResponseMessage => "SurveyResponseMessage", - Self::TimeSlicedSurveyResponseMessage => "TimeSlicedSurveyResponseMessage", - Self::SignedTimeSlicedSurveyResponseMessage => "SignedTimeSlicedSurveyResponseMessage", - Self::PeerStats => "PeerStats", - Self::TimeSlicedNodeData => "TimeSlicedNodeData", - Self::TimeSlicedPeerData => "TimeSlicedPeerData", - Self::TimeSlicedPeerDataList => "TimeSlicedPeerDataList", - Self::TopologyResponseBodyV2 => "TopologyResponseBodyV2", - Self::SurveyResponseBody => "SurveyResponseBody", - Self::TxAdvertVector => "TxAdvertVector", - Self::FloodAdvert => "FloodAdvert", - Self::TxDemandVector => "TxDemandVector", - Self::FloodDemand => "FloodDemand", - Self::StellarMessage => "StellarMessage", - Self::AuthenticatedMessage => "AuthenticatedMessage", - Self::AuthenticatedMessageV0 => "AuthenticatedMessageV0", - Self::LiquidityPoolParameters => "LiquidityPoolParameters", - Self::MuxedAccount => "MuxedAccount", - Self::MuxedAccountMed25519 => "MuxedAccountMed25519", - Self::DecoratedSignature => "DecoratedSignature", - Self::OperationType => "OperationType", - Self::CreateAccountOp => "CreateAccountOp", - Self::PaymentOp => "PaymentOp", - Self::PathPaymentStrictReceiveOp => "PathPaymentStrictReceiveOp", - Self::PathPaymentStrictSendOp => "PathPaymentStrictSendOp", - Self::ManageSellOfferOp => "ManageSellOfferOp", - Self::ManageBuyOfferOp => "ManageBuyOfferOp", - Self::CreatePassiveSellOfferOp => "CreatePassiveSellOfferOp", - Self::SetOptionsOp => "SetOptionsOp", - Self::ChangeTrustAsset => "ChangeTrustAsset", - Self::ChangeTrustOp => "ChangeTrustOp", - Self::AllowTrustOp => "AllowTrustOp", - Self::ManageDataOp => "ManageDataOp", - Self::BumpSequenceOp => "BumpSequenceOp", - Self::CreateClaimableBalanceOp => "CreateClaimableBalanceOp", - Self::ClaimClaimableBalanceOp => "ClaimClaimableBalanceOp", - Self::BeginSponsoringFutureReservesOp => "BeginSponsoringFutureReservesOp", - Self::RevokeSponsorshipType => "RevokeSponsorshipType", - Self::RevokeSponsorshipOp => "RevokeSponsorshipOp", - Self::RevokeSponsorshipOpSigner => "RevokeSponsorshipOpSigner", - Self::ClawbackOp => "ClawbackOp", - Self::ClawbackClaimableBalanceOp => "ClawbackClaimableBalanceOp", - Self::SetTrustLineFlagsOp => "SetTrustLineFlagsOp", - Self::LiquidityPoolDepositOp => "LiquidityPoolDepositOp", - Self::LiquidityPoolWithdrawOp => "LiquidityPoolWithdrawOp", - Self::HostFunctionType => "HostFunctionType", - Self::ContractIdPreimageType => "ContractIdPreimageType", - Self::ContractIdPreimage => "ContractIdPreimage", - Self::ContractIdPreimageFromAddress => "ContractIdPreimageFromAddress", - Self::CreateContractArgs => "CreateContractArgs", - Self::CreateContractArgsV2 => "CreateContractArgsV2", - Self::InvokeContractArgs => "InvokeContractArgs", - Self::HostFunction => "HostFunction", - Self::SorobanAuthorizedFunctionType => "SorobanAuthorizedFunctionType", - Self::SorobanAuthorizedFunction => "SorobanAuthorizedFunction", - Self::SorobanAuthorizedInvocation => "SorobanAuthorizedInvocation", - Self::SorobanAddressCredentials => "SorobanAddressCredentials", - Self::SorobanCredentialsType => "SorobanCredentialsType", - Self::SorobanCredentials => "SorobanCredentials", - Self::SorobanAuthorizationEntry => "SorobanAuthorizationEntry", - Self::SorobanAuthorizationEntries => "SorobanAuthorizationEntries", - Self::InvokeHostFunctionOp => "InvokeHostFunctionOp", - Self::ExtendFootprintTtlOp => "ExtendFootprintTtlOp", - Self::RestoreFootprintOp => "RestoreFootprintOp", - Self::Operation => "Operation", - Self::OperationBody => "OperationBody", - Self::HashIdPreimage => "HashIdPreimage", - Self::HashIdPreimageOperationId => "HashIdPreimageOperationId", - Self::HashIdPreimageRevokeId => "HashIdPreimageRevokeId", - Self::HashIdPreimageContractId => "HashIdPreimageContractId", - Self::HashIdPreimageSorobanAuthorization => "HashIdPreimageSorobanAuthorization", - Self::MemoType => "MemoType", - Self::Memo => "Memo", - Self::TimeBounds => "TimeBounds", - Self::LedgerBounds => "LedgerBounds", - Self::PreconditionsV2 => "PreconditionsV2", - Self::PreconditionType => "PreconditionType", - Self::Preconditions => "Preconditions", - Self::LedgerFootprint => "LedgerFootprint", - Self::SorobanResources => "SorobanResources", - Self::SorobanResourcesExtV0 => "SorobanResourcesExtV0", - Self::SorobanTransactionData => "SorobanTransactionData", - Self::SorobanTransactionDataExt => "SorobanTransactionDataExt", - Self::TransactionV0 => "TransactionV0", - Self::TransactionV0Ext => "TransactionV0Ext", - Self::TransactionV0Envelope => "TransactionV0Envelope", - Self::Transaction => "Transaction", - Self::TransactionExt => "TransactionExt", - Self::TransactionV1Envelope => "TransactionV1Envelope", - Self::FeeBumpTransaction => "FeeBumpTransaction", - Self::FeeBumpTransactionInnerTx => "FeeBumpTransactionInnerTx", - Self::FeeBumpTransactionExt => "FeeBumpTransactionExt", - Self::FeeBumpTransactionEnvelope => "FeeBumpTransactionEnvelope", - Self::TransactionEnvelope => "TransactionEnvelope", - Self::TransactionSignaturePayload => "TransactionSignaturePayload", - Self::TransactionSignaturePayloadTaggedTransaction => { - "TransactionSignaturePayloadTaggedTransaction" - } - Self::ClaimAtomType => "ClaimAtomType", - Self::ClaimOfferAtomV0 => "ClaimOfferAtomV0", - Self::ClaimOfferAtom => "ClaimOfferAtom", - Self::ClaimLiquidityAtom => "ClaimLiquidityAtom", - Self::ClaimAtom => "ClaimAtom", - Self::CreateAccountResultCode => "CreateAccountResultCode", - Self::CreateAccountResult => "CreateAccountResult", - Self::PaymentResultCode => "PaymentResultCode", - Self::PaymentResult => "PaymentResult", - Self::PathPaymentStrictReceiveResultCode => "PathPaymentStrictReceiveResultCode", - Self::SimplePaymentResult => "SimplePaymentResult", - Self::PathPaymentStrictReceiveResult => "PathPaymentStrictReceiveResult", - Self::PathPaymentStrictReceiveResultSuccess => "PathPaymentStrictReceiveResultSuccess", - Self::PathPaymentStrictSendResultCode => "PathPaymentStrictSendResultCode", - Self::PathPaymentStrictSendResult => "PathPaymentStrictSendResult", - Self::PathPaymentStrictSendResultSuccess => "PathPaymentStrictSendResultSuccess", - Self::ManageSellOfferResultCode => "ManageSellOfferResultCode", - Self::ManageOfferEffect => "ManageOfferEffect", - Self::ManageOfferSuccessResult => "ManageOfferSuccessResult", - Self::ManageOfferSuccessResultOffer => "ManageOfferSuccessResultOffer", - Self::ManageSellOfferResult => "ManageSellOfferResult", - Self::ManageBuyOfferResultCode => "ManageBuyOfferResultCode", - Self::ManageBuyOfferResult => "ManageBuyOfferResult", - Self::SetOptionsResultCode => "SetOptionsResultCode", - Self::SetOptionsResult => "SetOptionsResult", - Self::ChangeTrustResultCode => "ChangeTrustResultCode", - Self::ChangeTrustResult => "ChangeTrustResult", - Self::AllowTrustResultCode => "AllowTrustResultCode", - Self::AllowTrustResult => "AllowTrustResult", - Self::AccountMergeResultCode => "AccountMergeResultCode", - Self::AccountMergeResult => "AccountMergeResult", - Self::InflationResultCode => "InflationResultCode", - Self::InflationPayout => "InflationPayout", - Self::InflationResult => "InflationResult", - Self::ManageDataResultCode => "ManageDataResultCode", - Self::ManageDataResult => "ManageDataResult", - Self::BumpSequenceResultCode => "BumpSequenceResultCode", - Self::BumpSequenceResult => "BumpSequenceResult", - Self::CreateClaimableBalanceResultCode => "CreateClaimableBalanceResultCode", - Self::CreateClaimableBalanceResult => "CreateClaimableBalanceResult", - Self::ClaimClaimableBalanceResultCode => "ClaimClaimableBalanceResultCode", - Self::ClaimClaimableBalanceResult => "ClaimClaimableBalanceResult", - Self::BeginSponsoringFutureReservesResultCode => { - "BeginSponsoringFutureReservesResultCode" - } - Self::BeginSponsoringFutureReservesResult => "BeginSponsoringFutureReservesResult", - Self::EndSponsoringFutureReservesResultCode => "EndSponsoringFutureReservesResultCode", - Self::EndSponsoringFutureReservesResult => "EndSponsoringFutureReservesResult", - Self::RevokeSponsorshipResultCode => "RevokeSponsorshipResultCode", - Self::RevokeSponsorshipResult => "RevokeSponsorshipResult", - Self::ClawbackResultCode => "ClawbackResultCode", - Self::ClawbackResult => "ClawbackResult", - Self::ClawbackClaimableBalanceResultCode => "ClawbackClaimableBalanceResultCode", - Self::ClawbackClaimableBalanceResult => "ClawbackClaimableBalanceResult", - Self::SetTrustLineFlagsResultCode => "SetTrustLineFlagsResultCode", - Self::SetTrustLineFlagsResult => "SetTrustLineFlagsResult", - Self::LiquidityPoolDepositResultCode => "LiquidityPoolDepositResultCode", - Self::LiquidityPoolDepositResult => "LiquidityPoolDepositResult", - Self::LiquidityPoolWithdrawResultCode => "LiquidityPoolWithdrawResultCode", - Self::LiquidityPoolWithdrawResult => "LiquidityPoolWithdrawResult", - Self::InvokeHostFunctionResultCode => "InvokeHostFunctionResultCode", - Self::InvokeHostFunctionResult => "InvokeHostFunctionResult", - Self::ExtendFootprintTtlResultCode => "ExtendFootprintTtlResultCode", - Self::ExtendFootprintTtlResult => "ExtendFootprintTtlResult", - Self::RestoreFootprintResultCode => "RestoreFootprintResultCode", - Self::RestoreFootprintResult => "RestoreFootprintResult", - Self::OperationResultCode => "OperationResultCode", - Self::OperationResult => "OperationResult", - Self::OperationResultTr => "OperationResultTr", - Self::TransactionResultCode => "TransactionResultCode", - Self::InnerTransactionResult => "InnerTransactionResult", - Self::InnerTransactionResultResult => "InnerTransactionResultResult", - Self::InnerTransactionResultExt => "InnerTransactionResultExt", - Self::InnerTransactionResultPair => "InnerTransactionResultPair", - Self::TransactionResult => "TransactionResult", - Self::TransactionResultResult => "TransactionResultResult", - Self::TransactionResultExt => "TransactionResultExt", - Self::Hash => "Hash", - Self::Uint256 => "Uint256", - Self::Uint32 => "Uint32", - Self::Int32 => "Int32", - Self::Uint64 => "Uint64", - Self::Int64 => "Int64", - Self::TimePoint => "TimePoint", - Self::Duration => "Duration", - Self::ExtensionPoint => "ExtensionPoint", - Self::CryptoKeyType => "CryptoKeyType", - Self::PublicKeyType => "PublicKeyType", - Self::SignerKeyType => "SignerKeyType", - Self::PublicKey => "PublicKey", - Self::SignerKey => "SignerKey", - Self::SignerKeyEd25519SignedPayload => "SignerKeyEd25519SignedPayload", - Self::Signature => "Signature", - Self::SignatureHint => "SignatureHint", - Self::NodeId => "NodeId", - Self::AccountId => "AccountId", - Self::ContractId => "ContractId", - Self::Curve25519Secret => "Curve25519Secret", - Self::Curve25519Public => "Curve25519Public", - Self::HmacSha256Key => "HmacSha256Key", - Self::HmacSha256Mac => "HmacSha256Mac", - Self::ShortHashSeed => "ShortHashSeed", - Self::BinaryFuseFilterType => "BinaryFuseFilterType", - Self::SerializedBinaryFuseFilter => "SerializedBinaryFuseFilter", - Self::PoolId => "PoolId", - Self::ClaimableBalanceIdType => "ClaimableBalanceIdType", - Self::ClaimableBalanceId => "ClaimableBalanceId", - } - } - - #[must_use] - #[allow(clippy::too_many_lines)] - pub const fn variants() -> [TypeVariant; Self::_VARIANTS.len()] { - Self::VARIANTS - } - - #[cfg(feature = "schemars")] - #[must_use] - #[allow(clippy::too_many_lines)] - pub fn json_schema(&self, gen: schemars::gen::SchemaGenerator) -> schemars::schema::RootSchema { - match self { - Self::Value => gen.into_root_schema_for::(), - Self::ScpBallot => gen.into_root_schema_for::(), - Self::ScpStatementType => gen.into_root_schema_for::(), - Self::ScpNomination => gen.into_root_schema_for::(), - Self::ScpStatement => gen.into_root_schema_for::(), - Self::ScpStatementPledges => gen.into_root_schema_for::(), - Self::ScpStatementPrepare => gen.into_root_schema_for::(), - Self::ScpStatementConfirm => gen.into_root_schema_for::(), - Self::ScpStatementExternalize => gen.into_root_schema_for::(), - Self::ScpEnvelope => gen.into_root_schema_for::(), - Self::ScpQuorumSet => gen.into_root_schema_for::(), - Self::EncodedLedgerKey => gen.into_root_schema_for::(), - Self::ConfigSettingContractExecutionLanesV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractComputeV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractParallelComputeV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractLedgerCostV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractLedgerCostExtV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractHistoricalDataV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractEventsV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractBandwidthV0 => { - gen.into_root_schema_for::() - } - Self::ContractCostType => gen.into_root_schema_for::(), - Self::ContractCostParamEntry => gen.into_root_schema_for::(), - Self::StateArchivalSettings => gen.into_root_schema_for::(), - Self::EvictionIterator => gen.into_root_schema_for::(), - Self::ConfigSettingScpTiming => gen.into_root_schema_for::(), - Self::FrozenLedgerKeys => gen.into_root_schema_for::(), - Self::FrozenLedgerKeysDelta => gen.into_root_schema_for::(), - Self::FreezeBypassTxs => gen.into_root_schema_for::(), - Self::FreezeBypassTxsDelta => gen.into_root_schema_for::(), - Self::ContractCostParams => gen.into_root_schema_for::(), - Self::ConfigSettingId => gen.into_root_schema_for::(), - Self::ConfigSettingEntry => gen.into_root_schema_for::(), - Self::ScEnvMetaKind => gen.into_root_schema_for::(), - Self::ScEnvMetaEntry => gen.into_root_schema_for::(), - Self::ScEnvMetaEntryInterfaceVersion => { - gen.into_root_schema_for::() - } - Self::ScMetaV0 => gen.into_root_schema_for::(), - Self::ScMetaKind => gen.into_root_schema_for::(), - Self::ScMetaEntry => gen.into_root_schema_for::(), - Self::ScSpecType => gen.into_root_schema_for::(), - Self::ScSpecTypeOption => gen.into_root_schema_for::(), - Self::ScSpecTypeResult => gen.into_root_schema_for::(), - Self::ScSpecTypeVec => gen.into_root_schema_for::(), - Self::ScSpecTypeMap => gen.into_root_schema_for::(), - Self::ScSpecTypeTuple => gen.into_root_schema_for::(), - Self::ScSpecTypeBytesN => gen.into_root_schema_for::(), - Self::ScSpecTypeUdt => gen.into_root_schema_for::(), - Self::ScSpecTypeDef => gen.into_root_schema_for::(), - Self::ScSpecUdtStructFieldV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtStructV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtUnionCaseVoidV0 => { - gen.into_root_schema_for::() - } - Self::ScSpecUdtUnionCaseTupleV0 => { - gen.into_root_schema_for::() - } - Self::ScSpecUdtUnionCaseV0Kind => { - gen.into_root_schema_for::() - } - Self::ScSpecUdtUnionCaseV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtUnionV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtEnumCaseV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtEnumV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtErrorEnumCaseV0 => { - gen.into_root_schema_for::() - } - Self::ScSpecUdtErrorEnumV0 => gen.into_root_schema_for::(), - Self::ScSpecFunctionInputV0 => gen.into_root_schema_for::(), - Self::ScSpecFunctionV0 => gen.into_root_schema_for::(), - Self::ScSpecEventParamLocationV0 => { - gen.into_root_schema_for::() - } - Self::ScSpecEventParamV0 => gen.into_root_schema_for::(), - Self::ScSpecEventDataFormat => gen.into_root_schema_for::(), - Self::ScSpecEventV0 => gen.into_root_schema_for::(), - Self::ScSpecEntryKind => gen.into_root_schema_for::(), - Self::ScSpecEntry => gen.into_root_schema_for::(), - Self::ScValType => gen.into_root_schema_for::(), - Self::ScErrorType => gen.into_root_schema_for::(), - Self::ScErrorCode => gen.into_root_schema_for::(), - Self::ScError => gen.into_root_schema_for::(), - Self::UInt128Parts => gen.into_root_schema_for::(), - Self::Int128Parts => gen.into_root_schema_for::(), - Self::UInt256Parts => gen.into_root_schema_for::(), - Self::Int256Parts => gen.into_root_schema_for::(), - Self::ContractExecutableType => gen.into_root_schema_for::(), - Self::ContractExecutable => gen.into_root_schema_for::(), - Self::ScAddressType => gen.into_root_schema_for::(), - Self::MuxedEd25519Account => gen.into_root_schema_for::(), - Self::ScAddress => gen.into_root_schema_for::(), - Self::ScVec => gen.into_root_schema_for::(), - Self::ScMap => gen.into_root_schema_for::(), - Self::ScBytes => gen.into_root_schema_for::(), - Self::ScString => gen.into_root_schema_for::(), - Self::ScSymbol => gen.into_root_schema_for::(), - Self::ScNonceKey => gen.into_root_schema_for::(), - Self::ScContractInstance => gen.into_root_schema_for::(), - Self::ScVal => gen.into_root_schema_for::(), - Self::ScMapEntry => gen.into_root_schema_for::(), - Self::LedgerCloseMetaBatch => gen.into_root_schema_for::(), - Self::StoredTransactionSet => gen.into_root_schema_for::(), - Self::StoredDebugTransactionSet => { - gen.into_root_schema_for::() - } - Self::PersistedScpStateV0 => gen.into_root_schema_for::(), - Self::PersistedScpStateV1 => gen.into_root_schema_for::(), - Self::PersistedScpState => gen.into_root_schema_for::(), - Self::Thresholds => gen.into_root_schema_for::(), - Self::String32 => gen.into_root_schema_for::(), - Self::String64 => gen.into_root_schema_for::(), - Self::SequenceNumber => gen.into_root_schema_for::(), - Self::DataValue => gen.into_root_schema_for::(), - Self::AssetCode4 => gen.into_root_schema_for::(), - Self::AssetCode12 => gen.into_root_schema_for::(), - Self::AssetType => gen.into_root_schema_for::(), - Self::AssetCode => gen.into_root_schema_for::(), - Self::AlphaNum4 => gen.into_root_schema_for::(), - Self::AlphaNum12 => gen.into_root_schema_for::(), - Self::Asset => gen.into_root_schema_for::(), - Self::Price => gen.into_root_schema_for::(), - Self::Liabilities => gen.into_root_schema_for::(), - Self::ThresholdIndexes => gen.into_root_schema_for::(), - Self::LedgerEntryType => gen.into_root_schema_for::(), - Self::Signer => gen.into_root_schema_for::(), - Self::AccountFlags => gen.into_root_schema_for::(), - Self::SponsorshipDescriptor => gen.into_root_schema_for::(), - Self::AccountEntryExtensionV3 => gen.into_root_schema_for::(), - Self::AccountEntryExtensionV2 => gen.into_root_schema_for::(), - Self::AccountEntryExtensionV2Ext => { - gen.into_root_schema_for::() - } - Self::AccountEntryExtensionV1 => gen.into_root_schema_for::(), - Self::AccountEntryExtensionV1Ext => { - gen.into_root_schema_for::() - } - Self::AccountEntry => gen.into_root_schema_for::(), - Self::AccountEntryExt => gen.into_root_schema_for::(), - Self::TrustLineFlags => gen.into_root_schema_for::(), - Self::LiquidityPoolType => gen.into_root_schema_for::(), - Self::TrustLineAsset => gen.into_root_schema_for::(), - Self::TrustLineEntryExtensionV2 => { - gen.into_root_schema_for::() - } - Self::TrustLineEntryExtensionV2Ext => { - gen.into_root_schema_for::() - } - Self::TrustLineEntry => gen.into_root_schema_for::(), - Self::TrustLineEntryExt => gen.into_root_schema_for::(), - Self::TrustLineEntryV1 => gen.into_root_schema_for::(), - Self::TrustLineEntryV1Ext => gen.into_root_schema_for::(), - Self::OfferEntryFlags => gen.into_root_schema_for::(), - Self::OfferEntry => gen.into_root_schema_for::(), - Self::OfferEntryExt => gen.into_root_schema_for::(), - Self::DataEntry => gen.into_root_schema_for::(), - Self::DataEntryExt => gen.into_root_schema_for::(), - Self::ClaimPredicateType => gen.into_root_schema_for::(), - Self::ClaimPredicate => gen.into_root_schema_for::(), - Self::ClaimantType => gen.into_root_schema_for::(), - Self::Claimant => gen.into_root_schema_for::(), - Self::ClaimantV0 => gen.into_root_schema_for::(), - Self::ClaimableBalanceFlags => gen.into_root_schema_for::(), - Self::ClaimableBalanceEntryExtensionV1 => { - gen.into_root_schema_for::() - } - Self::ClaimableBalanceEntryExtensionV1Ext => { - gen.into_root_schema_for::() - } - Self::ClaimableBalanceEntry => gen.into_root_schema_for::(), - Self::ClaimableBalanceEntryExt => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolConstantProductParameters => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolEntry => gen.into_root_schema_for::(), - Self::LiquidityPoolEntryBody => gen.into_root_schema_for::(), - Self::LiquidityPoolEntryConstantProduct => { - gen.into_root_schema_for::() - } - Self::ContractDataDurability => gen.into_root_schema_for::(), - Self::ContractDataEntry => gen.into_root_schema_for::(), - Self::ContractCodeCostInputs => gen.into_root_schema_for::(), - Self::ContractCodeEntry => gen.into_root_schema_for::(), - Self::ContractCodeEntryExt => gen.into_root_schema_for::(), - Self::ContractCodeEntryV1 => gen.into_root_schema_for::(), - Self::TtlEntry => gen.into_root_schema_for::(), - Self::LedgerEntryExtensionV1 => gen.into_root_schema_for::(), - Self::LedgerEntryExtensionV1Ext => { - gen.into_root_schema_for::() - } - Self::LedgerEntry => gen.into_root_schema_for::(), - Self::LedgerEntryData => gen.into_root_schema_for::(), - Self::LedgerEntryExt => gen.into_root_schema_for::(), - Self::LedgerKey => gen.into_root_schema_for::(), - Self::LedgerKeyAccount => gen.into_root_schema_for::(), - Self::LedgerKeyTrustLine => gen.into_root_schema_for::(), - Self::LedgerKeyOffer => gen.into_root_schema_for::(), - Self::LedgerKeyData => gen.into_root_schema_for::(), - Self::LedgerKeyClaimableBalance => { - gen.into_root_schema_for::() - } - Self::LedgerKeyLiquidityPool => gen.into_root_schema_for::(), - Self::LedgerKeyContractData => gen.into_root_schema_for::(), - Self::LedgerKeyContractCode => gen.into_root_schema_for::(), - Self::LedgerKeyConfigSetting => gen.into_root_schema_for::(), - Self::LedgerKeyTtl => gen.into_root_schema_for::(), - Self::EnvelopeType => gen.into_root_schema_for::(), - Self::BucketListType => gen.into_root_schema_for::(), - Self::BucketEntryType => gen.into_root_schema_for::(), - Self::HotArchiveBucketEntryType => { - gen.into_root_schema_for::() - } - Self::BucketMetadata => gen.into_root_schema_for::(), - Self::BucketMetadataExt => gen.into_root_schema_for::(), - Self::BucketEntry => gen.into_root_schema_for::(), - Self::HotArchiveBucketEntry => gen.into_root_schema_for::(), - Self::UpgradeType => gen.into_root_schema_for::(), - Self::StellarValueType => gen.into_root_schema_for::(), - Self::LedgerCloseValueSignature => { - gen.into_root_schema_for::() - } - Self::StellarValue => gen.into_root_schema_for::(), - Self::StellarValueExt => gen.into_root_schema_for::(), - Self::LedgerHeaderFlags => gen.into_root_schema_for::(), - Self::LedgerHeaderExtensionV1 => gen.into_root_schema_for::(), - Self::LedgerHeaderExtensionV1Ext => { - gen.into_root_schema_for::() - } - Self::LedgerHeader => gen.into_root_schema_for::(), - Self::LedgerHeaderExt => gen.into_root_schema_for::(), - Self::LedgerUpgradeType => gen.into_root_schema_for::(), - Self::ConfigUpgradeSetKey => gen.into_root_schema_for::(), - Self::LedgerUpgrade => gen.into_root_schema_for::(), - Self::ConfigUpgradeSet => gen.into_root_schema_for::(), - Self::TxSetComponentType => gen.into_root_schema_for::(), - Self::DependentTxCluster => gen.into_root_schema_for::(), - Self::ParallelTxExecutionStage => { - gen.into_root_schema_for::() - } - Self::ParallelTxsComponent => gen.into_root_schema_for::(), - Self::TxSetComponent => gen.into_root_schema_for::(), - Self::TxSetComponentTxsMaybeDiscountedFee => { - gen.into_root_schema_for::() - } - Self::TransactionPhase => gen.into_root_schema_for::(), - Self::TransactionSet => gen.into_root_schema_for::(), - Self::TransactionSetV1 => gen.into_root_schema_for::(), - Self::GeneralizedTransactionSet => { - gen.into_root_schema_for::() - } - Self::TransactionResultPair => gen.into_root_schema_for::(), - Self::TransactionResultSet => gen.into_root_schema_for::(), - Self::TransactionHistoryEntry => gen.into_root_schema_for::(), - Self::TransactionHistoryEntryExt => { - gen.into_root_schema_for::() - } - Self::TransactionHistoryResultEntry => { - gen.into_root_schema_for::() - } - Self::TransactionHistoryResultEntryExt => { - gen.into_root_schema_for::() - } - Self::LedgerHeaderHistoryEntry => { - gen.into_root_schema_for::() - } - Self::LedgerHeaderHistoryEntryExt => { - gen.into_root_schema_for::() - } - Self::LedgerScpMessages => gen.into_root_schema_for::(), - Self::ScpHistoryEntryV0 => gen.into_root_schema_for::(), - Self::ScpHistoryEntry => gen.into_root_schema_for::(), - Self::LedgerEntryChangeType => gen.into_root_schema_for::(), - Self::LedgerEntryChange => gen.into_root_schema_for::(), - Self::LedgerEntryChanges => gen.into_root_schema_for::(), - Self::OperationMeta => gen.into_root_schema_for::(), - Self::TransactionMetaV1 => gen.into_root_schema_for::(), - Self::TransactionMetaV2 => gen.into_root_schema_for::(), - Self::ContractEventType => gen.into_root_schema_for::(), - Self::ContractEvent => gen.into_root_schema_for::(), - Self::ContractEventBody => gen.into_root_schema_for::(), - Self::ContractEventV0 => gen.into_root_schema_for::(), - Self::DiagnosticEvent => gen.into_root_schema_for::(), - Self::SorobanTransactionMetaExtV1 => { - gen.into_root_schema_for::() - } - Self::SorobanTransactionMetaExt => { - gen.into_root_schema_for::() - } - Self::SorobanTransactionMeta => gen.into_root_schema_for::(), - Self::TransactionMetaV3 => gen.into_root_schema_for::(), - Self::OperationMetaV2 => gen.into_root_schema_for::(), - Self::SorobanTransactionMetaV2 => { - gen.into_root_schema_for::() - } - Self::TransactionEventStage => gen.into_root_schema_for::(), - Self::TransactionEvent => gen.into_root_schema_for::(), - Self::TransactionMetaV4 => gen.into_root_schema_for::(), - Self::InvokeHostFunctionSuccessPreImage => { - gen.into_root_schema_for::() - } - Self::TransactionMeta => gen.into_root_schema_for::(), - Self::TransactionResultMeta => gen.into_root_schema_for::(), - Self::TransactionResultMetaV1 => gen.into_root_schema_for::(), - Self::UpgradeEntryMeta => gen.into_root_schema_for::(), - Self::LedgerCloseMetaV0 => gen.into_root_schema_for::(), - Self::LedgerCloseMetaExtV1 => gen.into_root_schema_for::(), - Self::LedgerCloseMetaExt => gen.into_root_schema_for::(), - Self::LedgerCloseMetaV1 => gen.into_root_schema_for::(), - Self::LedgerCloseMetaV2 => gen.into_root_schema_for::(), - Self::LedgerCloseMeta => gen.into_root_schema_for::(), - Self::ErrorCode => gen.into_root_schema_for::(), - Self::SError => gen.into_root_schema_for::(), - Self::SendMore => gen.into_root_schema_for::(), - Self::SendMoreExtended => gen.into_root_schema_for::(), - Self::AuthCert => gen.into_root_schema_for::(), - Self::Hello => gen.into_root_schema_for::(), - Self::Auth => gen.into_root_schema_for::(), - Self::IpAddrType => gen.into_root_schema_for::(), - Self::PeerAddress => gen.into_root_schema_for::(), - Self::PeerAddressIp => gen.into_root_schema_for::(), - Self::MessageType => gen.into_root_schema_for::(), - Self::DontHave => gen.into_root_schema_for::(), - Self::SurveyMessageCommandType => { - gen.into_root_schema_for::() - } - Self::SurveyMessageResponseType => { - gen.into_root_schema_for::() - } - Self::TimeSlicedSurveyStartCollectingMessage => { - gen.into_root_schema_for::() - } - Self::SignedTimeSlicedSurveyStartCollectingMessage => { - gen.into_root_schema_for::() - } - Self::TimeSlicedSurveyStopCollectingMessage => { - gen.into_root_schema_for::() - } - Self::SignedTimeSlicedSurveyStopCollectingMessage => { - gen.into_root_schema_for::() - } - Self::SurveyRequestMessage => gen.into_root_schema_for::(), - Self::TimeSlicedSurveyRequestMessage => { - gen.into_root_schema_for::() - } - Self::SignedTimeSlicedSurveyRequestMessage => { - gen.into_root_schema_for::() - } - Self::EncryptedBody => gen.into_root_schema_for::(), - Self::SurveyResponseMessage => gen.into_root_schema_for::(), - Self::TimeSlicedSurveyResponseMessage => { - gen.into_root_schema_for::() - } - Self::SignedTimeSlicedSurveyResponseMessage => { - gen.into_root_schema_for::() - } - Self::PeerStats => gen.into_root_schema_for::(), - Self::TimeSlicedNodeData => gen.into_root_schema_for::(), - Self::TimeSlicedPeerData => gen.into_root_schema_for::(), - Self::TimeSlicedPeerDataList => gen.into_root_schema_for::(), - Self::TopologyResponseBodyV2 => gen.into_root_schema_for::(), - Self::SurveyResponseBody => gen.into_root_schema_for::(), - Self::TxAdvertVector => gen.into_root_schema_for::(), - Self::FloodAdvert => gen.into_root_schema_for::(), - Self::TxDemandVector => gen.into_root_schema_for::(), - Self::FloodDemand => gen.into_root_schema_for::(), - Self::StellarMessage => gen.into_root_schema_for::(), - Self::AuthenticatedMessage => gen.into_root_schema_for::(), - Self::AuthenticatedMessageV0 => gen.into_root_schema_for::(), - Self::LiquidityPoolParameters => gen.into_root_schema_for::(), - Self::MuxedAccount => gen.into_root_schema_for::(), - Self::MuxedAccountMed25519 => gen.into_root_schema_for::(), - Self::DecoratedSignature => gen.into_root_schema_for::(), - Self::OperationType => gen.into_root_schema_for::(), - Self::CreateAccountOp => gen.into_root_schema_for::(), - Self::PaymentOp => gen.into_root_schema_for::(), - Self::PathPaymentStrictReceiveOp => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictSendOp => gen.into_root_schema_for::(), - Self::ManageSellOfferOp => gen.into_root_schema_for::(), - Self::ManageBuyOfferOp => gen.into_root_schema_for::(), - Self::CreatePassiveSellOfferOp => { - gen.into_root_schema_for::() - } - Self::SetOptionsOp => gen.into_root_schema_for::(), - Self::ChangeTrustAsset => gen.into_root_schema_for::(), - Self::ChangeTrustOp => gen.into_root_schema_for::(), - Self::AllowTrustOp => gen.into_root_schema_for::(), - Self::ManageDataOp => gen.into_root_schema_for::(), - Self::BumpSequenceOp => gen.into_root_schema_for::(), - Self::CreateClaimableBalanceOp => { - gen.into_root_schema_for::() - } - Self::ClaimClaimableBalanceOp => gen.into_root_schema_for::(), - Self::BeginSponsoringFutureReservesOp => { - gen.into_root_schema_for::() - } - Self::RevokeSponsorshipType => gen.into_root_schema_for::(), - Self::RevokeSponsorshipOp => gen.into_root_schema_for::(), - Self::RevokeSponsorshipOpSigner => { - gen.into_root_schema_for::() - } - Self::ClawbackOp => gen.into_root_schema_for::(), - Self::ClawbackClaimableBalanceOp => { - gen.into_root_schema_for::() - } - Self::SetTrustLineFlagsOp => gen.into_root_schema_for::(), - Self::LiquidityPoolDepositOp => gen.into_root_schema_for::(), - Self::LiquidityPoolWithdrawOp => gen.into_root_schema_for::(), - Self::HostFunctionType => gen.into_root_schema_for::(), - Self::ContractIdPreimageType => gen.into_root_schema_for::(), - Self::ContractIdPreimage => gen.into_root_schema_for::(), - Self::ContractIdPreimageFromAddress => { - gen.into_root_schema_for::() - } - Self::CreateContractArgs => gen.into_root_schema_for::(), - Self::CreateContractArgsV2 => gen.into_root_schema_for::(), - Self::InvokeContractArgs => gen.into_root_schema_for::(), - Self::HostFunction => gen.into_root_schema_for::(), - Self::SorobanAuthorizedFunctionType => { - gen.into_root_schema_for::() - } - Self::SorobanAuthorizedFunction => { - gen.into_root_schema_for::() - } - Self::SorobanAuthorizedInvocation => { - gen.into_root_schema_for::() - } - Self::SorobanAddressCredentials => { - gen.into_root_schema_for::() - } - Self::SorobanCredentialsType => gen.into_root_schema_for::(), - Self::SorobanCredentials => gen.into_root_schema_for::(), - Self::SorobanAuthorizationEntry => { - gen.into_root_schema_for::() - } - Self::SorobanAuthorizationEntries => { - gen.into_root_schema_for::() - } - Self::InvokeHostFunctionOp => gen.into_root_schema_for::(), - Self::ExtendFootprintTtlOp => gen.into_root_schema_for::(), - Self::RestoreFootprintOp => gen.into_root_schema_for::(), - Self::Operation => gen.into_root_schema_for::(), - Self::OperationBody => gen.into_root_schema_for::(), - Self::HashIdPreimage => gen.into_root_schema_for::(), - Self::HashIdPreimageOperationId => { - gen.into_root_schema_for::() - } - Self::HashIdPreimageRevokeId => gen.into_root_schema_for::(), - Self::HashIdPreimageContractId => { - gen.into_root_schema_for::() - } - Self::HashIdPreimageSorobanAuthorization => { - gen.into_root_schema_for::() - } - Self::MemoType => gen.into_root_schema_for::(), - Self::Memo => gen.into_root_schema_for::(), - Self::TimeBounds => gen.into_root_schema_for::(), - Self::LedgerBounds => gen.into_root_schema_for::(), - Self::PreconditionsV2 => gen.into_root_schema_for::(), - Self::PreconditionType => gen.into_root_schema_for::(), - Self::Preconditions => gen.into_root_schema_for::(), - Self::LedgerFootprint => gen.into_root_schema_for::(), - Self::SorobanResources => gen.into_root_schema_for::(), - Self::SorobanResourcesExtV0 => gen.into_root_schema_for::(), - Self::SorobanTransactionData => gen.into_root_schema_for::(), - Self::SorobanTransactionDataExt => { - gen.into_root_schema_for::() - } - Self::TransactionV0 => gen.into_root_schema_for::(), - Self::TransactionV0Ext => gen.into_root_schema_for::(), - Self::TransactionV0Envelope => gen.into_root_schema_for::(), - Self::Transaction => gen.into_root_schema_for::(), - Self::TransactionExt => gen.into_root_schema_for::(), - Self::TransactionV1Envelope => gen.into_root_schema_for::(), - Self::FeeBumpTransaction => gen.into_root_schema_for::(), - Self::FeeBumpTransactionInnerTx => { - gen.into_root_schema_for::() - } - Self::FeeBumpTransactionExt => gen.into_root_schema_for::(), - Self::FeeBumpTransactionEnvelope => { - gen.into_root_schema_for::() - } - Self::TransactionEnvelope => gen.into_root_schema_for::(), - Self::TransactionSignaturePayload => { - gen.into_root_schema_for::() - } - Self::TransactionSignaturePayloadTaggedTransaction => { - gen.into_root_schema_for::() - } - Self::ClaimAtomType => gen.into_root_schema_for::(), - Self::ClaimOfferAtomV0 => gen.into_root_schema_for::(), - Self::ClaimOfferAtom => gen.into_root_schema_for::(), - Self::ClaimLiquidityAtom => gen.into_root_schema_for::(), - Self::ClaimAtom => gen.into_root_schema_for::(), - Self::CreateAccountResultCode => gen.into_root_schema_for::(), - Self::CreateAccountResult => gen.into_root_schema_for::(), - Self::PaymentResultCode => gen.into_root_schema_for::(), - Self::PaymentResult => gen.into_root_schema_for::(), - Self::PathPaymentStrictReceiveResultCode => { - gen.into_root_schema_for::() - } - Self::SimplePaymentResult => gen.into_root_schema_for::(), - Self::PathPaymentStrictReceiveResult => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictReceiveResultSuccess => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictSendResultCode => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictSendResult => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictSendResultSuccess => { - gen.into_root_schema_for::() - } - Self::ManageSellOfferResultCode => { - gen.into_root_schema_for::() - } - Self::ManageOfferEffect => gen.into_root_schema_for::(), - Self::ManageOfferSuccessResult => { - gen.into_root_schema_for::() - } - Self::ManageOfferSuccessResultOffer => { - gen.into_root_schema_for::() - } - Self::ManageSellOfferResult => gen.into_root_schema_for::(), - Self::ManageBuyOfferResultCode => { - gen.into_root_schema_for::() - } - Self::ManageBuyOfferResult => gen.into_root_schema_for::(), - Self::SetOptionsResultCode => gen.into_root_schema_for::(), - Self::SetOptionsResult => gen.into_root_schema_for::(), - Self::ChangeTrustResultCode => gen.into_root_schema_for::(), - Self::ChangeTrustResult => gen.into_root_schema_for::(), - Self::AllowTrustResultCode => gen.into_root_schema_for::(), - Self::AllowTrustResult => gen.into_root_schema_for::(), - Self::AccountMergeResultCode => gen.into_root_schema_for::(), - Self::AccountMergeResult => gen.into_root_schema_for::(), - Self::InflationResultCode => gen.into_root_schema_for::(), - Self::InflationPayout => gen.into_root_schema_for::(), - Self::InflationResult => gen.into_root_schema_for::(), - Self::ManageDataResultCode => gen.into_root_schema_for::(), - Self::ManageDataResult => gen.into_root_schema_for::(), - Self::BumpSequenceResultCode => gen.into_root_schema_for::(), - Self::BumpSequenceResult => gen.into_root_schema_for::(), - Self::CreateClaimableBalanceResultCode => { - gen.into_root_schema_for::() - } - Self::CreateClaimableBalanceResult => { - gen.into_root_schema_for::() - } - Self::ClaimClaimableBalanceResultCode => { - gen.into_root_schema_for::() - } - Self::ClaimClaimableBalanceResult => { - gen.into_root_schema_for::() - } - Self::BeginSponsoringFutureReservesResultCode => { - gen.into_root_schema_for::() - } - Self::BeginSponsoringFutureReservesResult => { - gen.into_root_schema_for::() - } - Self::EndSponsoringFutureReservesResultCode => { - gen.into_root_schema_for::() - } - Self::EndSponsoringFutureReservesResult => { - gen.into_root_schema_for::() - } - Self::RevokeSponsorshipResultCode => { - gen.into_root_schema_for::() - } - Self::RevokeSponsorshipResult => gen.into_root_schema_for::(), - Self::ClawbackResultCode => gen.into_root_schema_for::(), - Self::ClawbackResult => gen.into_root_schema_for::(), - Self::ClawbackClaimableBalanceResultCode => { - gen.into_root_schema_for::() - } - Self::ClawbackClaimableBalanceResult => { - gen.into_root_schema_for::() - } - Self::SetTrustLineFlagsResultCode => { - gen.into_root_schema_for::() - } - Self::SetTrustLineFlagsResult => gen.into_root_schema_for::(), - Self::LiquidityPoolDepositResultCode => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolDepositResult => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolWithdrawResultCode => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolWithdrawResult => { - gen.into_root_schema_for::() - } - Self::InvokeHostFunctionResultCode => { - gen.into_root_schema_for::() - } - Self::InvokeHostFunctionResult => { - gen.into_root_schema_for::() - } - Self::ExtendFootprintTtlResultCode => { - gen.into_root_schema_for::() - } - Self::ExtendFootprintTtlResult => { - gen.into_root_schema_for::() - } - Self::RestoreFootprintResultCode => { - gen.into_root_schema_for::() - } - Self::RestoreFootprintResult => gen.into_root_schema_for::(), - Self::OperationResultCode => gen.into_root_schema_for::(), - Self::OperationResult => gen.into_root_schema_for::(), - Self::OperationResultTr => gen.into_root_schema_for::(), - Self::TransactionResultCode => gen.into_root_schema_for::(), - Self::InnerTransactionResult => gen.into_root_schema_for::(), - Self::InnerTransactionResultResult => { - gen.into_root_schema_for::() - } - Self::InnerTransactionResultExt => { - gen.into_root_schema_for::() - } - Self::InnerTransactionResultPair => { - gen.into_root_schema_for::() - } - Self::TransactionResult => gen.into_root_schema_for::(), - Self::TransactionResultResult => gen.into_root_schema_for::(), - Self::TransactionResultExt => gen.into_root_schema_for::(), - Self::Hash => gen.into_root_schema_for::(), - Self::Uint256 => gen.into_root_schema_for::(), - Self::Uint32 => gen.into_root_schema_for::(), - Self::Int32 => gen.into_root_schema_for::(), - Self::Uint64 => gen.into_root_schema_for::(), - Self::Int64 => gen.into_root_schema_for::(), - Self::TimePoint => gen.into_root_schema_for::(), - Self::Duration => gen.into_root_schema_for::(), - Self::ExtensionPoint => gen.into_root_schema_for::(), - Self::CryptoKeyType => gen.into_root_schema_for::(), - Self::PublicKeyType => gen.into_root_schema_for::(), - Self::SignerKeyType => gen.into_root_schema_for::(), - Self::PublicKey => gen.into_root_schema_for::(), - Self::SignerKey => gen.into_root_schema_for::(), - Self::SignerKeyEd25519SignedPayload => { - gen.into_root_schema_for::() - } - Self::Signature => gen.into_root_schema_for::(), - Self::SignatureHint => gen.into_root_schema_for::(), - Self::NodeId => gen.into_root_schema_for::(), - Self::AccountId => gen.into_root_schema_for::(), - Self::ContractId => gen.into_root_schema_for::(), - Self::Curve25519Secret => gen.into_root_schema_for::(), - Self::Curve25519Public => gen.into_root_schema_for::(), - Self::HmacSha256Key => gen.into_root_schema_for::(), - Self::HmacSha256Mac => gen.into_root_schema_for::(), - Self::ShortHashSeed => gen.into_root_schema_for::(), - Self::BinaryFuseFilterType => gen.into_root_schema_for::(), - Self::SerializedBinaryFuseFilter => { - gen.into_root_schema_for::() - } - Self::PoolId => gen.into_root_schema_for::(), - Self::ClaimableBalanceIdType => gen.into_root_schema_for::(), - Self::ClaimableBalanceId => gen.into_root_schema_for::(), - } - } -} - -impl Name for TypeVariant { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for TypeVariant { - fn variants() -> slice::Iter<'static, TypeVariant> { - Self::VARIANTS.iter() - } -} - -impl core::str::FromStr for TypeVariant { - type Err = Error; - #[allow(clippy::too_many_lines)] - fn from_str(s: &str) -> Result { - match s { - "Value" => Ok(Self::Value), - "ScpBallot" => Ok(Self::ScpBallot), - "ScpStatementType" => Ok(Self::ScpStatementType), - "ScpNomination" => Ok(Self::ScpNomination), - "ScpStatement" => Ok(Self::ScpStatement), - "ScpStatementPledges" => Ok(Self::ScpStatementPledges), - "ScpStatementPrepare" => Ok(Self::ScpStatementPrepare), - "ScpStatementConfirm" => Ok(Self::ScpStatementConfirm), - "ScpStatementExternalize" => Ok(Self::ScpStatementExternalize), - "ScpEnvelope" => Ok(Self::ScpEnvelope), - "ScpQuorumSet" => Ok(Self::ScpQuorumSet), - "EncodedLedgerKey" => Ok(Self::EncodedLedgerKey), - "ConfigSettingContractExecutionLanesV0" => { - Ok(Self::ConfigSettingContractExecutionLanesV0) - } - "ConfigSettingContractComputeV0" => Ok(Self::ConfigSettingContractComputeV0), - "ConfigSettingContractParallelComputeV0" => { - Ok(Self::ConfigSettingContractParallelComputeV0) - } - "ConfigSettingContractLedgerCostV0" => Ok(Self::ConfigSettingContractLedgerCostV0), - "ConfigSettingContractLedgerCostExtV0" => { - Ok(Self::ConfigSettingContractLedgerCostExtV0) - } - "ConfigSettingContractHistoricalDataV0" => { - Ok(Self::ConfigSettingContractHistoricalDataV0) - } - "ConfigSettingContractEventsV0" => Ok(Self::ConfigSettingContractEventsV0), - "ConfigSettingContractBandwidthV0" => Ok(Self::ConfigSettingContractBandwidthV0), - "ContractCostType" => Ok(Self::ContractCostType), - "ContractCostParamEntry" => Ok(Self::ContractCostParamEntry), - "StateArchivalSettings" => Ok(Self::StateArchivalSettings), - "EvictionIterator" => Ok(Self::EvictionIterator), - "ConfigSettingScpTiming" => Ok(Self::ConfigSettingScpTiming), - "FrozenLedgerKeys" => Ok(Self::FrozenLedgerKeys), - "FrozenLedgerKeysDelta" => Ok(Self::FrozenLedgerKeysDelta), - "FreezeBypassTxs" => Ok(Self::FreezeBypassTxs), - "FreezeBypassTxsDelta" => Ok(Self::FreezeBypassTxsDelta), - "ContractCostParams" => Ok(Self::ContractCostParams), - "ConfigSettingId" => Ok(Self::ConfigSettingId), - "ConfigSettingEntry" => Ok(Self::ConfigSettingEntry), - "ScEnvMetaKind" => Ok(Self::ScEnvMetaKind), - "ScEnvMetaEntry" => Ok(Self::ScEnvMetaEntry), - "ScEnvMetaEntryInterfaceVersion" => Ok(Self::ScEnvMetaEntryInterfaceVersion), - "ScMetaV0" => Ok(Self::ScMetaV0), - "ScMetaKind" => Ok(Self::ScMetaKind), - "ScMetaEntry" => Ok(Self::ScMetaEntry), - "ScSpecType" => Ok(Self::ScSpecType), - "ScSpecTypeOption" => Ok(Self::ScSpecTypeOption), - "ScSpecTypeResult" => Ok(Self::ScSpecTypeResult), - "ScSpecTypeVec" => Ok(Self::ScSpecTypeVec), - "ScSpecTypeMap" => Ok(Self::ScSpecTypeMap), - "ScSpecTypeTuple" => Ok(Self::ScSpecTypeTuple), - "ScSpecTypeBytesN" => Ok(Self::ScSpecTypeBytesN), - "ScSpecTypeUdt" => Ok(Self::ScSpecTypeUdt), - "ScSpecTypeDef" => Ok(Self::ScSpecTypeDef), - "ScSpecUdtStructFieldV0" => Ok(Self::ScSpecUdtStructFieldV0), - "ScSpecUdtStructV0" => Ok(Self::ScSpecUdtStructV0), - "ScSpecUdtUnionCaseVoidV0" => Ok(Self::ScSpecUdtUnionCaseVoidV0), - "ScSpecUdtUnionCaseTupleV0" => Ok(Self::ScSpecUdtUnionCaseTupleV0), - "ScSpecUdtUnionCaseV0Kind" => Ok(Self::ScSpecUdtUnionCaseV0Kind), - "ScSpecUdtUnionCaseV0" => Ok(Self::ScSpecUdtUnionCaseV0), - "ScSpecUdtUnionV0" => Ok(Self::ScSpecUdtUnionV0), - "ScSpecUdtEnumCaseV0" => Ok(Self::ScSpecUdtEnumCaseV0), - "ScSpecUdtEnumV0" => Ok(Self::ScSpecUdtEnumV0), - "ScSpecUdtErrorEnumCaseV0" => Ok(Self::ScSpecUdtErrorEnumCaseV0), - "ScSpecUdtErrorEnumV0" => Ok(Self::ScSpecUdtErrorEnumV0), - "ScSpecFunctionInputV0" => Ok(Self::ScSpecFunctionInputV0), - "ScSpecFunctionV0" => Ok(Self::ScSpecFunctionV0), - "ScSpecEventParamLocationV0" => Ok(Self::ScSpecEventParamLocationV0), - "ScSpecEventParamV0" => Ok(Self::ScSpecEventParamV0), - "ScSpecEventDataFormat" => Ok(Self::ScSpecEventDataFormat), - "ScSpecEventV0" => Ok(Self::ScSpecEventV0), - "ScSpecEntryKind" => Ok(Self::ScSpecEntryKind), - "ScSpecEntry" => Ok(Self::ScSpecEntry), - "ScValType" => Ok(Self::ScValType), - "ScErrorType" => Ok(Self::ScErrorType), - "ScErrorCode" => Ok(Self::ScErrorCode), - "ScError" => Ok(Self::ScError), - "UInt128Parts" => Ok(Self::UInt128Parts), - "Int128Parts" => Ok(Self::Int128Parts), - "UInt256Parts" => Ok(Self::UInt256Parts), - "Int256Parts" => Ok(Self::Int256Parts), - "ContractExecutableType" => Ok(Self::ContractExecutableType), - "ContractExecutable" => Ok(Self::ContractExecutable), - "ScAddressType" => Ok(Self::ScAddressType), - "MuxedEd25519Account" => Ok(Self::MuxedEd25519Account), - "ScAddress" => Ok(Self::ScAddress), - "ScVec" => Ok(Self::ScVec), - "ScMap" => Ok(Self::ScMap), - "ScBytes" => Ok(Self::ScBytes), - "ScString" => Ok(Self::ScString), - "ScSymbol" => Ok(Self::ScSymbol), - "ScNonceKey" => Ok(Self::ScNonceKey), - "ScContractInstance" => Ok(Self::ScContractInstance), - "ScVal" => Ok(Self::ScVal), - "ScMapEntry" => Ok(Self::ScMapEntry), - "LedgerCloseMetaBatch" => Ok(Self::LedgerCloseMetaBatch), - "StoredTransactionSet" => Ok(Self::StoredTransactionSet), - "StoredDebugTransactionSet" => Ok(Self::StoredDebugTransactionSet), - "PersistedScpStateV0" => Ok(Self::PersistedScpStateV0), - "PersistedScpStateV1" => Ok(Self::PersistedScpStateV1), - "PersistedScpState" => Ok(Self::PersistedScpState), - "Thresholds" => Ok(Self::Thresholds), - "String32" => Ok(Self::String32), - "String64" => Ok(Self::String64), - "SequenceNumber" => Ok(Self::SequenceNumber), - "DataValue" => Ok(Self::DataValue), - "AssetCode4" => Ok(Self::AssetCode4), - "AssetCode12" => Ok(Self::AssetCode12), - "AssetType" => Ok(Self::AssetType), - "AssetCode" => Ok(Self::AssetCode), - "AlphaNum4" => Ok(Self::AlphaNum4), - "AlphaNum12" => Ok(Self::AlphaNum12), - "Asset" => Ok(Self::Asset), - "Price" => Ok(Self::Price), - "Liabilities" => Ok(Self::Liabilities), - "ThresholdIndexes" => Ok(Self::ThresholdIndexes), - "LedgerEntryType" => Ok(Self::LedgerEntryType), - "Signer" => Ok(Self::Signer), - "AccountFlags" => Ok(Self::AccountFlags), - "SponsorshipDescriptor" => Ok(Self::SponsorshipDescriptor), - "AccountEntryExtensionV3" => Ok(Self::AccountEntryExtensionV3), - "AccountEntryExtensionV2" => Ok(Self::AccountEntryExtensionV2), - "AccountEntryExtensionV2Ext" => Ok(Self::AccountEntryExtensionV2Ext), - "AccountEntryExtensionV1" => Ok(Self::AccountEntryExtensionV1), - "AccountEntryExtensionV1Ext" => Ok(Self::AccountEntryExtensionV1Ext), - "AccountEntry" => Ok(Self::AccountEntry), - "AccountEntryExt" => Ok(Self::AccountEntryExt), - "TrustLineFlags" => Ok(Self::TrustLineFlags), - "LiquidityPoolType" => Ok(Self::LiquidityPoolType), - "TrustLineAsset" => Ok(Self::TrustLineAsset), - "TrustLineEntryExtensionV2" => Ok(Self::TrustLineEntryExtensionV2), - "TrustLineEntryExtensionV2Ext" => Ok(Self::TrustLineEntryExtensionV2Ext), - "TrustLineEntry" => Ok(Self::TrustLineEntry), - "TrustLineEntryExt" => Ok(Self::TrustLineEntryExt), - "TrustLineEntryV1" => Ok(Self::TrustLineEntryV1), - "TrustLineEntryV1Ext" => Ok(Self::TrustLineEntryV1Ext), - "OfferEntryFlags" => Ok(Self::OfferEntryFlags), - "OfferEntry" => Ok(Self::OfferEntry), - "OfferEntryExt" => Ok(Self::OfferEntryExt), - "DataEntry" => Ok(Self::DataEntry), - "DataEntryExt" => Ok(Self::DataEntryExt), - "ClaimPredicateType" => Ok(Self::ClaimPredicateType), - "ClaimPredicate" => Ok(Self::ClaimPredicate), - "ClaimantType" => Ok(Self::ClaimantType), - "Claimant" => Ok(Self::Claimant), - "ClaimantV0" => Ok(Self::ClaimantV0), - "ClaimableBalanceFlags" => Ok(Self::ClaimableBalanceFlags), - "ClaimableBalanceEntryExtensionV1" => Ok(Self::ClaimableBalanceEntryExtensionV1), - "ClaimableBalanceEntryExtensionV1Ext" => Ok(Self::ClaimableBalanceEntryExtensionV1Ext), - "ClaimableBalanceEntry" => Ok(Self::ClaimableBalanceEntry), - "ClaimableBalanceEntryExt" => Ok(Self::ClaimableBalanceEntryExt), - "LiquidityPoolConstantProductParameters" => { - Ok(Self::LiquidityPoolConstantProductParameters) - } - "LiquidityPoolEntry" => Ok(Self::LiquidityPoolEntry), - "LiquidityPoolEntryBody" => Ok(Self::LiquidityPoolEntryBody), - "LiquidityPoolEntryConstantProduct" => Ok(Self::LiquidityPoolEntryConstantProduct), - "ContractDataDurability" => Ok(Self::ContractDataDurability), - "ContractDataEntry" => Ok(Self::ContractDataEntry), - "ContractCodeCostInputs" => Ok(Self::ContractCodeCostInputs), - "ContractCodeEntry" => Ok(Self::ContractCodeEntry), - "ContractCodeEntryExt" => Ok(Self::ContractCodeEntryExt), - "ContractCodeEntryV1" => Ok(Self::ContractCodeEntryV1), - "TtlEntry" => Ok(Self::TtlEntry), - "LedgerEntryExtensionV1" => Ok(Self::LedgerEntryExtensionV1), - "LedgerEntryExtensionV1Ext" => Ok(Self::LedgerEntryExtensionV1Ext), - "LedgerEntry" => Ok(Self::LedgerEntry), - "LedgerEntryData" => Ok(Self::LedgerEntryData), - "LedgerEntryExt" => Ok(Self::LedgerEntryExt), - "LedgerKey" => Ok(Self::LedgerKey), - "LedgerKeyAccount" => Ok(Self::LedgerKeyAccount), - "LedgerKeyTrustLine" => Ok(Self::LedgerKeyTrustLine), - "LedgerKeyOffer" => Ok(Self::LedgerKeyOffer), - "LedgerKeyData" => Ok(Self::LedgerKeyData), - "LedgerKeyClaimableBalance" => Ok(Self::LedgerKeyClaimableBalance), - "LedgerKeyLiquidityPool" => Ok(Self::LedgerKeyLiquidityPool), - "LedgerKeyContractData" => Ok(Self::LedgerKeyContractData), - "LedgerKeyContractCode" => Ok(Self::LedgerKeyContractCode), - "LedgerKeyConfigSetting" => Ok(Self::LedgerKeyConfigSetting), - "LedgerKeyTtl" => Ok(Self::LedgerKeyTtl), - "EnvelopeType" => Ok(Self::EnvelopeType), - "BucketListType" => Ok(Self::BucketListType), - "BucketEntryType" => Ok(Self::BucketEntryType), - "HotArchiveBucketEntryType" => Ok(Self::HotArchiveBucketEntryType), - "BucketMetadata" => Ok(Self::BucketMetadata), - "BucketMetadataExt" => Ok(Self::BucketMetadataExt), - "BucketEntry" => Ok(Self::BucketEntry), - "HotArchiveBucketEntry" => Ok(Self::HotArchiveBucketEntry), - "UpgradeType" => Ok(Self::UpgradeType), - "StellarValueType" => Ok(Self::StellarValueType), - "LedgerCloseValueSignature" => Ok(Self::LedgerCloseValueSignature), - "StellarValue" => Ok(Self::StellarValue), - "StellarValueExt" => Ok(Self::StellarValueExt), - "LedgerHeaderFlags" => Ok(Self::LedgerHeaderFlags), - "LedgerHeaderExtensionV1" => Ok(Self::LedgerHeaderExtensionV1), - "LedgerHeaderExtensionV1Ext" => Ok(Self::LedgerHeaderExtensionV1Ext), - "LedgerHeader" => Ok(Self::LedgerHeader), - "LedgerHeaderExt" => Ok(Self::LedgerHeaderExt), - "LedgerUpgradeType" => Ok(Self::LedgerUpgradeType), - "ConfigUpgradeSetKey" => Ok(Self::ConfigUpgradeSetKey), - "LedgerUpgrade" => Ok(Self::LedgerUpgrade), - "ConfigUpgradeSet" => Ok(Self::ConfigUpgradeSet), - "TxSetComponentType" => Ok(Self::TxSetComponentType), - "DependentTxCluster" => Ok(Self::DependentTxCluster), - "ParallelTxExecutionStage" => Ok(Self::ParallelTxExecutionStage), - "ParallelTxsComponent" => Ok(Self::ParallelTxsComponent), - "TxSetComponent" => Ok(Self::TxSetComponent), - "TxSetComponentTxsMaybeDiscountedFee" => Ok(Self::TxSetComponentTxsMaybeDiscountedFee), - "TransactionPhase" => Ok(Self::TransactionPhase), - "TransactionSet" => Ok(Self::TransactionSet), - "TransactionSetV1" => Ok(Self::TransactionSetV1), - "GeneralizedTransactionSet" => Ok(Self::GeneralizedTransactionSet), - "TransactionResultPair" => Ok(Self::TransactionResultPair), - "TransactionResultSet" => Ok(Self::TransactionResultSet), - "TransactionHistoryEntry" => Ok(Self::TransactionHistoryEntry), - "TransactionHistoryEntryExt" => Ok(Self::TransactionHistoryEntryExt), - "TransactionHistoryResultEntry" => Ok(Self::TransactionHistoryResultEntry), - "TransactionHistoryResultEntryExt" => Ok(Self::TransactionHistoryResultEntryExt), - "LedgerHeaderHistoryEntry" => Ok(Self::LedgerHeaderHistoryEntry), - "LedgerHeaderHistoryEntryExt" => Ok(Self::LedgerHeaderHistoryEntryExt), - "LedgerScpMessages" => Ok(Self::LedgerScpMessages), - "ScpHistoryEntryV0" => Ok(Self::ScpHistoryEntryV0), - "ScpHistoryEntry" => Ok(Self::ScpHistoryEntry), - "LedgerEntryChangeType" => Ok(Self::LedgerEntryChangeType), - "LedgerEntryChange" => Ok(Self::LedgerEntryChange), - "LedgerEntryChanges" => Ok(Self::LedgerEntryChanges), - "OperationMeta" => Ok(Self::OperationMeta), - "TransactionMetaV1" => Ok(Self::TransactionMetaV1), - "TransactionMetaV2" => Ok(Self::TransactionMetaV2), - "ContractEventType" => Ok(Self::ContractEventType), - "ContractEvent" => Ok(Self::ContractEvent), - "ContractEventBody" => Ok(Self::ContractEventBody), - "ContractEventV0" => Ok(Self::ContractEventV0), - "DiagnosticEvent" => Ok(Self::DiagnosticEvent), - "SorobanTransactionMetaExtV1" => Ok(Self::SorobanTransactionMetaExtV1), - "SorobanTransactionMetaExt" => Ok(Self::SorobanTransactionMetaExt), - "SorobanTransactionMeta" => Ok(Self::SorobanTransactionMeta), - "TransactionMetaV3" => Ok(Self::TransactionMetaV3), - "OperationMetaV2" => Ok(Self::OperationMetaV2), - "SorobanTransactionMetaV2" => Ok(Self::SorobanTransactionMetaV2), - "TransactionEventStage" => Ok(Self::TransactionEventStage), - "TransactionEvent" => Ok(Self::TransactionEvent), - "TransactionMetaV4" => Ok(Self::TransactionMetaV4), - "InvokeHostFunctionSuccessPreImage" => Ok(Self::InvokeHostFunctionSuccessPreImage), - "TransactionMeta" => Ok(Self::TransactionMeta), - "TransactionResultMeta" => Ok(Self::TransactionResultMeta), - "TransactionResultMetaV1" => Ok(Self::TransactionResultMetaV1), - "UpgradeEntryMeta" => Ok(Self::UpgradeEntryMeta), - "LedgerCloseMetaV0" => Ok(Self::LedgerCloseMetaV0), - "LedgerCloseMetaExtV1" => Ok(Self::LedgerCloseMetaExtV1), - "LedgerCloseMetaExt" => Ok(Self::LedgerCloseMetaExt), - "LedgerCloseMetaV1" => Ok(Self::LedgerCloseMetaV1), - "LedgerCloseMetaV2" => Ok(Self::LedgerCloseMetaV2), - "LedgerCloseMeta" => Ok(Self::LedgerCloseMeta), - "ErrorCode" => Ok(Self::ErrorCode), - "SError" => Ok(Self::SError), - "SendMore" => Ok(Self::SendMore), - "SendMoreExtended" => Ok(Self::SendMoreExtended), - "AuthCert" => Ok(Self::AuthCert), - "Hello" => Ok(Self::Hello), - "Auth" => Ok(Self::Auth), - "IpAddrType" => Ok(Self::IpAddrType), - "PeerAddress" => Ok(Self::PeerAddress), - "PeerAddressIp" => Ok(Self::PeerAddressIp), - "MessageType" => Ok(Self::MessageType), - "DontHave" => Ok(Self::DontHave), - "SurveyMessageCommandType" => Ok(Self::SurveyMessageCommandType), - "SurveyMessageResponseType" => Ok(Self::SurveyMessageResponseType), - "TimeSlicedSurveyStartCollectingMessage" => { - Ok(Self::TimeSlicedSurveyStartCollectingMessage) - } - "SignedTimeSlicedSurveyStartCollectingMessage" => { - Ok(Self::SignedTimeSlicedSurveyStartCollectingMessage) - } - "TimeSlicedSurveyStopCollectingMessage" => { - Ok(Self::TimeSlicedSurveyStopCollectingMessage) - } - "SignedTimeSlicedSurveyStopCollectingMessage" => { - Ok(Self::SignedTimeSlicedSurveyStopCollectingMessage) - } - "SurveyRequestMessage" => Ok(Self::SurveyRequestMessage), - "TimeSlicedSurveyRequestMessage" => Ok(Self::TimeSlicedSurveyRequestMessage), - "SignedTimeSlicedSurveyRequestMessage" => { - Ok(Self::SignedTimeSlicedSurveyRequestMessage) - } - "EncryptedBody" => Ok(Self::EncryptedBody), - "SurveyResponseMessage" => Ok(Self::SurveyResponseMessage), - "TimeSlicedSurveyResponseMessage" => Ok(Self::TimeSlicedSurveyResponseMessage), - "SignedTimeSlicedSurveyResponseMessage" => { - Ok(Self::SignedTimeSlicedSurveyResponseMessage) - } - "PeerStats" => Ok(Self::PeerStats), - "TimeSlicedNodeData" => Ok(Self::TimeSlicedNodeData), - "TimeSlicedPeerData" => Ok(Self::TimeSlicedPeerData), - "TimeSlicedPeerDataList" => Ok(Self::TimeSlicedPeerDataList), - "TopologyResponseBodyV2" => Ok(Self::TopologyResponseBodyV2), - "SurveyResponseBody" => Ok(Self::SurveyResponseBody), - "TxAdvertVector" => Ok(Self::TxAdvertVector), - "FloodAdvert" => Ok(Self::FloodAdvert), - "TxDemandVector" => Ok(Self::TxDemandVector), - "FloodDemand" => Ok(Self::FloodDemand), - "StellarMessage" => Ok(Self::StellarMessage), - "AuthenticatedMessage" => Ok(Self::AuthenticatedMessage), - "AuthenticatedMessageV0" => Ok(Self::AuthenticatedMessageV0), - "LiquidityPoolParameters" => Ok(Self::LiquidityPoolParameters), - "MuxedAccount" => Ok(Self::MuxedAccount), - "MuxedAccountMed25519" => Ok(Self::MuxedAccountMed25519), - "DecoratedSignature" => Ok(Self::DecoratedSignature), - "OperationType" => Ok(Self::OperationType), - "CreateAccountOp" => Ok(Self::CreateAccountOp), - "PaymentOp" => Ok(Self::PaymentOp), - "PathPaymentStrictReceiveOp" => Ok(Self::PathPaymentStrictReceiveOp), - "PathPaymentStrictSendOp" => Ok(Self::PathPaymentStrictSendOp), - "ManageSellOfferOp" => Ok(Self::ManageSellOfferOp), - "ManageBuyOfferOp" => Ok(Self::ManageBuyOfferOp), - "CreatePassiveSellOfferOp" => Ok(Self::CreatePassiveSellOfferOp), - "SetOptionsOp" => Ok(Self::SetOptionsOp), - "ChangeTrustAsset" => Ok(Self::ChangeTrustAsset), - "ChangeTrustOp" => Ok(Self::ChangeTrustOp), - "AllowTrustOp" => Ok(Self::AllowTrustOp), - "ManageDataOp" => Ok(Self::ManageDataOp), - "BumpSequenceOp" => Ok(Self::BumpSequenceOp), - "CreateClaimableBalanceOp" => Ok(Self::CreateClaimableBalanceOp), - "ClaimClaimableBalanceOp" => Ok(Self::ClaimClaimableBalanceOp), - "BeginSponsoringFutureReservesOp" => Ok(Self::BeginSponsoringFutureReservesOp), - "RevokeSponsorshipType" => Ok(Self::RevokeSponsorshipType), - "RevokeSponsorshipOp" => Ok(Self::RevokeSponsorshipOp), - "RevokeSponsorshipOpSigner" => Ok(Self::RevokeSponsorshipOpSigner), - "ClawbackOp" => Ok(Self::ClawbackOp), - "ClawbackClaimableBalanceOp" => Ok(Self::ClawbackClaimableBalanceOp), - "SetTrustLineFlagsOp" => Ok(Self::SetTrustLineFlagsOp), - "LiquidityPoolDepositOp" => Ok(Self::LiquidityPoolDepositOp), - "LiquidityPoolWithdrawOp" => Ok(Self::LiquidityPoolWithdrawOp), - "HostFunctionType" => Ok(Self::HostFunctionType), - "ContractIdPreimageType" => Ok(Self::ContractIdPreimageType), - "ContractIdPreimage" => Ok(Self::ContractIdPreimage), - "ContractIdPreimageFromAddress" => Ok(Self::ContractIdPreimageFromAddress), - "CreateContractArgs" => Ok(Self::CreateContractArgs), - "CreateContractArgsV2" => Ok(Self::CreateContractArgsV2), - "InvokeContractArgs" => Ok(Self::InvokeContractArgs), - "HostFunction" => Ok(Self::HostFunction), - "SorobanAuthorizedFunctionType" => Ok(Self::SorobanAuthorizedFunctionType), - "SorobanAuthorizedFunction" => Ok(Self::SorobanAuthorizedFunction), - "SorobanAuthorizedInvocation" => Ok(Self::SorobanAuthorizedInvocation), - "SorobanAddressCredentials" => Ok(Self::SorobanAddressCredentials), - "SorobanCredentialsType" => Ok(Self::SorobanCredentialsType), - "SorobanCredentials" => Ok(Self::SorobanCredentials), - "SorobanAuthorizationEntry" => Ok(Self::SorobanAuthorizationEntry), - "SorobanAuthorizationEntries" => Ok(Self::SorobanAuthorizationEntries), - "InvokeHostFunctionOp" => Ok(Self::InvokeHostFunctionOp), - "ExtendFootprintTtlOp" => Ok(Self::ExtendFootprintTtlOp), - "RestoreFootprintOp" => Ok(Self::RestoreFootprintOp), - "Operation" => Ok(Self::Operation), - "OperationBody" => Ok(Self::OperationBody), - "HashIdPreimage" => Ok(Self::HashIdPreimage), - "HashIdPreimageOperationId" => Ok(Self::HashIdPreimageOperationId), - "HashIdPreimageRevokeId" => Ok(Self::HashIdPreimageRevokeId), - "HashIdPreimageContractId" => Ok(Self::HashIdPreimageContractId), - "HashIdPreimageSorobanAuthorization" => Ok(Self::HashIdPreimageSorobanAuthorization), - "MemoType" => Ok(Self::MemoType), - "Memo" => Ok(Self::Memo), - "TimeBounds" => Ok(Self::TimeBounds), - "LedgerBounds" => Ok(Self::LedgerBounds), - "PreconditionsV2" => Ok(Self::PreconditionsV2), - "PreconditionType" => Ok(Self::PreconditionType), - "Preconditions" => Ok(Self::Preconditions), - "LedgerFootprint" => Ok(Self::LedgerFootprint), - "SorobanResources" => Ok(Self::SorobanResources), - "SorobanResourcesExtV0" => Ok(Self::SorobanResourcesExtV0), - "SorobanTransactionData" => Ok(Self::SorobanTransactionData), - "SorobanTransactionDataExt" => Ok(Self::SorobanTransactionDataExt), - "TransactionV0" => Ok(Self::TransactionV0), - "TransactionV0Ext" => Ok(Self::TransactionV0Ext), - "TransactionV0Envelope" => Ok(Self::TransactionV0Envelope), - "Transaction" => Ok(Self::Transaction), - "TransactionExt" => Ok(Self::TransactionExt), - "TransactionV1Envelope" => Ok(Self::TransactionV1Envelope), - "FeeBumpTransaction" => Ok(Self::FeeBumpTransaction), - "FeeBumpTransactionInnerTx" => Ok(Self::FeeBumpTransactionInnerTx), - "FeeBumpTransactionExt" => Ok(Self::FeeBumpTransactionExt), - "FeeBumpTransactionEnvelope" => Ok(Self::FeeBumpTransactionEnvelope), - "TransactionEnvelope" => Ok(Self::TransactionEnvelope), - "TransactionSignaturePayload" => Ok(Self::TransactionSignaturePayload), - "TransactionSignaturePayloadTaggedTransaction" => { - Ok(Self::TransactionSignaturePayloadTaggedTransaction) - } - "ClaimAtomType" => Ok(Self::ClaimAtomType), - "ClaimOfferAtomV0" => Ok(Self::ClaimOfferAtomV0), - "ClaimOfferAtom" => Ok(Self::ClaimOfferAtom), - "ClaimLiquidityAtom" => Ok(Self::ClaimLiquidityAtom), - "ClaimAtom" => Ok(Self::ClaimAtom), - "CreateAccountResultCode" => Ok(Self::CreateAccountResultCode), - "CreateAccountResult" => Ok(Self::CreateAccountResult), - "PaymentResultCode" => Ok(Self::PaymentResultCode), - "PaymentResult" => Ok(Self::PaymentResult), - "PathPaymentStrictReceiveResultCode" => Ok(Self::PathPaymentStrictReceiveResultCode), - "SimplePaymentResult" => Ok(Self::SimplePaymentResult), - "PathPaymentStrictReceiveResult" => Ok(Self::PathPaymentStrictReceiveResult), - "PathPaymentStrictReceiveResultSuccess" => { - Ok(Self::PathPaymentStrictReceiveResultSuccess) - } - "PathPaymentStrictSendResultCode" => Ok(Self::PathPaymentStrictSendResultCode), - "PathPaymentStrictSendResult" => Ok(Self::PathPaymentStrictSendResult), - "PathPaymentStrictSendResultSuccess" => Ok(Self::PathPaymentStrictSendResultSuccess), - "ManageSellOfferResultCode" => Ok(Self::ManageSellOfferResultCode), - "ManageOfferEffect" => Ok(Self::ManageOfferEffect), - "ManageOfferSuccessResult" => Ok(Self::ManageOfferSuccessResult), - "ManageOfferSuccessResultOffer" => Ok(Self::ManageOfferSuccessResultOffer), - "ManageSellOfferResult" => Ok(Self::ManageSellOfferResult), - "ManageBuyOfferResultCode" => Ok(Self::ManageBuyOfferResultCode), - "ManageBuyOfferResult" => Ok(Self::ManageBuyOfferResult), - "SetOptionsResultCode" => Ok(Self::SetOptionsResultCode), - "SetOptionsResult" => Ok(Self::SetOptionsResult), - "ChangeTrustResultCode" => Ok(Self::ChangeTrustResultCode), - "ChangeTrustResult" => Ok(Self::ChangeTrustResult), - "AllowTrustResultCode" => Ok(Self::AllowTrustResultCode), - "AllowTrustResult" => Ok(Self::AllowTrustResult), - "AccountMergeResultCode" => Ok(Self::AccountMergeResultCode), - "AccountMergeResult" => Ok(Self::AccountMergeResult), - "InflationResultCode" => Ok(Self::InflationResultCode), - "InflationPayout" => Ok(Self::InflationPayout), - "InflationResult" => Ok(Self::InflationResult), - "ManageDataResultCode" => Ok(Self::ManageDataResultCode), - "ManageDataResult" => Ok(Self::ManageDataResult), - "BumpSequenceResultCode" => Ok(Self::BumpSequenceResultCode), - "BumpSequenceResult" => Ok(Self::BumpSequenceResult), - "CreateClaimableBalanceResultCode" => Ok(Self::CreateClaimableBalanceResultCode), - "CreateClaimableBalanceResult" => Ok(Self::CreateClaimableBalanceResult), - "ClaimClaimableBalanceResultCode" => Ok(Self::ClaimClaimableBalanceResultCode), - "ClaimClaimableBalanceResult" => Ok(Self::ClaimClaimableBalanceResult), - "BeginSponsoringFutureReservesResultCode" => { - Ok(Self::BeginSponsoringFutureReservesResultCode) - } - "BeginSponsoringFutureReservesResult" => Ok(Self::BeginSponsoringFutureReservesResult), - "EndSponsoringFutureReservesResultCode" => { - Ok(Self::EndSponsoringFutureReservesResultCode) - } - "EndSponsoringFutureReservesResult" => Ok(Self::EndSponsoringFutureReservesResult), - "RevokeSponsorshipResultCode" => Ok(Self::RevokeSponsorshipResultCode), - "RevokeSponsorshipResult" => Ok(Self::RevokeSponsorshipResult), - "ClawbackResultCode" => Ok(Self::ClawbackResultCode), - "ClawbackResult" => Ok(Self::ClawbackResult), - "ClawbackClaimableBalanceResultCode" => Ok(Self::ClawbackClaimableBalanceResultCode), - "ClawbackClaimableBalanceResult" => Ok(Self::ClawbackClaimableBalanceResult), - "SetTrustLineFlagsResultCode" => Ok(Self::SetTrustLineFlagsResultCode), - "SetTrustLineFlagsResult" => Ok(Self::SetTrustLineFlagsResult), - "LiquidityPoolDepositResultCode" => Ok(Self::LiquidityPoolDepositResultCode), - "LiquidityPoolDepositResult" => Ok(Self::LiquidityPoolDepositResult), - "LiquidityPoolWithdrawResultCode" => Ok(Self::LiquidityPoolWithdrawResultCode), - "LiquidityPoolWithdrawResult" => Ok(Self::LiquidityPoolWithdrawResult), - "InvokeHostFunctionResultCode" => Ok(Self::InvokeHostFunctionResultCode), - "InvokeHostFunctionResult" => Ok(Self::InvokeHostFunctionResult), - "ExtendFootprintTtlResultCode" => Ok(Self::ExtendFootprintTtlResultCode), - "ExtendFootprintTtlResult" => Ok(Self::ExtendFootprintTtlResult), - "RestoreFootprintResultCode" => Ok(Self::RestoreFootprintResultCode), - "RestoreFootprintResult" => Ok(Self::RestoreFootprintResult), - "OperationResultCode" => Ok(Self::OperationResultCode), - "OperationResult" => Ok(Self::OperationResult), - "OperationResultTr" => Ok(Self::OperationResultTr), - "TransactionResultCode" => Ok(Self::TransactionResultCode), - "InnerTransactionResult" => Ok(Self::InnerTransactionResult), - "InnerTransactionResultResult" => Ok(Self::InnerTransactionResultResult), - "InnerTransactionResultExt" => Ok(Self::InnerTransactionResultExt), - "InnerTransactionResultPair" => Ok(Self::InnerTransactionResultPair), - "TransactionResult" => Ok(Self::TransactionResult), - "TransactionResultResult" => Ok(Self::TransactionResultResult), - "TransactionResultExt" => Ok(Self::TransactionResultExt), - "Hash" => Ok(Self::Hash), - "Uint256" => Ok(Self::Uint256), - "Uint32" => Ok(Self::Uint32), - "Int32" => Ok(Self::Int32), - "Uint64" => Ok(Self::Uint64), - "Int64" => Ok(Self::Int64), - "TimePoint" => Ok(Self::TimePoint), - "Duration" => Ok(Self::Duration), - "ExtensionPoint" => Ok(Self::ExtensionPoint), - "CryptoKeyType" => Ok(Self::CryptoKeyType), - "PublicKeyType" => Ok(Self::PublicKeyType), - "SignerKeyType" => Ok(Self::SignerKeyType), - "PublicKey" => Ok(Self::PublicKey), - "SignerKey" => Ok(Self::SignerKey), - "SignerKeyEd25519SignedPayload" => Ok(Self::SignerKeyEd25519SignedPayload), - "Signature" => Ok(Self::Signature), - "SignatureHint" => Ok(Self::SignatureHint), - "NodeId" => Ok(Self::NodeId), - "AccountId" => Ok(Self::AccountId), - "ContractId" => Ok(Self::ContractId), - "Curve25519Secret" => Ok(Self::Curve25519Secret), - "Curve25519Public" => Ok(Self::Curve25519Public), - "HmacSha256Key" => Ok(Self::HmacSha256Key), - "HmacSha256Mac" => Ok(Self::HmacSha256Mac), - "ShortHashSeed" => Ok(Self::ShortHashSeed), - "BinaryFuseFilterType" => Ok(Self::BinaryFuseFilterType), - "SerializedBinaryFuseFilter" => Ok(Self::SerializedBinaryFuseFilter), - "PoolId" => Ok(Self::PoolId), - "ClaimableBalanceIdType" => Ok(Self::ClaimableBalanceIdType), - "ClaimableBalanceId" => Ok(Self::ClaimableBalanceId), - _ => Err(Error::Invalid), - } - } -} - -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case"), - serde(untagged) -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub enum Type { - Value(Box), - ScpBallot(Box), - ScpStatementType(Box), - ScpNomination(Box), - ScpStatement(Box), - ScpStatementPledges(Box), - ScpStatementPrepare(Box), - ScpStatementConfirm(Box), - ScpStatementExternalize(Box), - ScpEnvelope(Box), - ScpQuorumSet(Box), - EncodedLedgerKey(Box), - ConfigSettingContractExecutionLanesV0(Box), - ConfigSettingContractComputeV0(Box), - ConfigSettingContractParallelComputeV0(Box), - ConfigSettingContractLedgerCostV0(Box), - ConfigSettingContractLedgerCostExtV0(Box), - ConfigSettingContractHistoricalDataV0(Box), - ConfigSettingContractEventsV0(Box), - ConfigSettingContractBandwidthV0(Box), - ContractCostType(Box), - ContractCostParamEntry(Box), - StateArchivalSettings(Box), - EvictionIterator(Box), - ConfigSettingScpTiming(Box), - FrozenLedgerKeys(Box), - FrozenLedgerKeysDelta(Box), - FreezeBypassTxs(Box), - FreezeBypassTxsDelta(Box), - ContractCostParams(Box), - ConfigSettingId(Box), - ConfigSettingEntry(Box), - ScEnvMetaKind(Box), - ScEnvMetaEntry(Box), - ScEnvMetaEntryInterfaceVersion(Box), - ScMetaV0(Box), - ScMetaKind(Box), - ScMetaEntry(Box), - ScSpecType(Box), - ScSpecTypeOption(Box), - ScSpecTypeResult(Box), - ScSpecTypeVec(Box), - ScSpecTypeMap(Box), - ScSpecTypeTuple(Box), - ScSpecTypeBytesN(Box), - ScSpecTypeUdt(Box), - ScSpecTypeDef(Box), - ScSpecUdtStructFieldV0(Box), - ScSpecUdtStructV0(Box), - ScSpecUdtUnionCaseVoidV0(Box), - ScSpecUdtUnionCaseTupleV0(Box), - ScSpecUdtUnionCaseV0Kind(Box), - ScSpecUdtUnionCaseV0(Box), - ScSpecUdtUnionV0(Box), - ScSpecUdtEnumCaseV0(Box), - ScSpecUdtEnumV0(Box), - ScSpecUdtErrorEnumCaseV0(Box), - ScSpecUdtErrorEnumV0(Box), - ScSpecFunctionInputV0(Box), - ScSpecFunctionV0(Box), - ScSpecEventParamLocationV0(Box), - ScSpecEventParamV0(Box), - ScSpecEventDataFormat(Box), - ScSpecEventV0(Box), - ScSpecEntryKind(Box), - ScSpecEntry(Box), - ScValType(Box), - ScErrorType(Box), - ScErrorCode(Box), - ScError(Box), - UInt128Parts(Box), - Int128Parts(Box), - UInt256Parts(Box), - Int256Parts(Box), - ContractExecutableType(Box), - ContractExecutable(Box), - ScAddressType(Box), - MuxedEd25519Account(Box), - ScAddress(Box), - ScVec(Box), - ScMap(Box), - ScBytes(Box), - ScString(Box), - ScSymbol(Box), - ScNonceKey(Box), - ScContractInstance(Box), - ScVal(Box), - ScMapEntry(Box), - LedgerCloseMetaBatch(Box), - StoredTransactionSet(Box), - StoredDebugTransactionSet(Box), - PersistedScpStateV0(Box), - PersistedScpStateV1(Box), - PersistedScpState(Box), - Thresholds(Box), - String32(Box), - String64(Box), - SequenceNumber(Box), - DataValue(Box), - AssetCode4(Box), - AssetCode12(Box), - AssetType(Box), - AssetCode(Box), - AlphaNum4(Box), - AlphaNum12(Box), - Asset(Box), - Price(Box), - Liabilities(Box), - ThresholdIndexes(Box), - LedgerEntryType(Box), - Signer(Box), - AccountFlags(Box), - SponsorshipDescriptor(Box), - AccountEntryExtensionV3(Box), - AccountEntryExtensionV2(Box), - AccountEntryExtensionV2Ext(Box), - AccountEntryExtensionV1(Box), - AccountEntryExtensionV1Ext(Box), - AccountEntry(Box), - AccountEntryExt(Box), - TrustLineFlags(Box), - LiquidityPoolType(Box), - TrustLineAsset(Box), - TrustLineEntryExtensionV2(Box), - TrustLineEntryExtensionV2Ext(Box), - TrustLineEntry(Box), - TrustLineEntryExt(Box), - TrustLineEntryV1(Box), - TrustLineEntryV1Ext(Box), - OfferEntryFlags(Box), - OfferEntry(Box), - OfferEntryExt(Box), - DataEntry(Box), - DataEntryExt(Box), - ClaimPredicateType(Box), - ClaimPredicate(Box), - ClaimantType(Box), - Claimant(Box), - ClaimantV0(Box), - ClaimableBalanceFlags(Box), - ClaimableBalanceEntryExtensionV1(Box), - ClaimableBalanceEntryExtensionV1Ext(Box), - ClaimableBalanceEntry(Box), - ClaimableBalanceEntryExt(Box), - LiquidityPoolConstantProductParameters(Box), - LiquidityPoolEntry(Box), - LiquidityPoolEntryBody(Box), - LiquidityPoolEntryConstantProduct(Box), - ContractDataDurability(Box), - ContractDataEntry(Box), - ContractCodeCostInputs(Box), - ContractCodeEntry(Box), - ContractCodeEntryExt(Box), - ContractCodeEntryV1(Box), - TtlEntry(Box), - LedgerEntryExtensionV1(Box), - LedgerEntryExtensionV1Ext(Box), - LedgerEntry(Box), - LedgerEntryData(Box), - LedgerEntryExt(Box), - LedgerKey(Box), - LedgerKeyAccount(Box), - LedgerKeyTrustLine(Box), - LedgerKeyOffer(Box), - LedgerKeyData(Box), - LedgerKeyClaimableBalance(Box), - LedgerKeyLiquidityPool(Box), - LedgerKeyContractData(Box), - LedgerKeyContractCode(Box), - LedgerKeyConfigSetting(Box), - LedgerKeyTtl(Box), - EnvelopeType(Box), - BucketListType(Box), - BucketEntryType(Box), - HotArchiveBucketEntryType(Box), - BucketMetadata(Box), - BucketMetadataExt(Box), - BucketEntry(Box), - HotArchiveBucketEntry(Box), - UpgradeType(Box), - StellarValueType(Box), - LedgerCloseValueSignature(Box), - StellarValue(Box), - StellarValueExt(Box), - LedgerHeaderFlags(Box), - LedgerHeaderExtensionV1(Box), - LedgerHeaderExtensionV1Ext(Box), - LedgerHeader(Box), - LedgerHeaderExt(Box), - LedgerUpgradeType(Box), - ConfigUpgradeSetKey(Box), - LedgerUpgrade(Box), - ConfigUpgradeSet(Box), - TxSetComponentType(Box), - DependentTxCluster(Box), - ParallelTxExecutionStage(Box), - ParallelTxsComponent(Box), - TxSetComponent(Box), - TxSetComponentTxsMaybeDiscountedFee(Box), - TransactionPhase(Box), - TransactionSet(Box), - TransactionSetV1(Box), - GeneralizedTransactionSet(Box), - TransactionResultPair(Box), - TransactionResultSet(Box), - TransactionHistoryEntry(Box), - TransactionHistoryEntryExt(Box), - TransactionHistoryResultEntry(Box), - TransactionHistoryResultEntryExt(Box), - LedgerHeaderHistoryEntry(Box), - LedgerHeaderHistoryEntryExt(Box), - LedgerScpMessages(Box), - ScpHistoryEntryV0(Box), - ScpHistoryEntry(Box), - LedgerEntryChangeType(Box), - LedgerEntryChange(Box), - LedgerEntryChanges(Box), - OperationMeta(Box), - TransactionMetaV1(Box), - TransactionMetaV2(Box), - ContractEventType(Box), - ContractEvent(Box), - ContractEventBody(Box), - ContractEventV0(Box), - DiagnosticEvent(Box), - SorobanTransactionMetaExtV1(Box), - SorobanTransactionMetaExt(Box), - SorobanTransactionMeta(Box), - TransactionMetaV3(Box), - OperationMetaV2(Box), - SorobanTransactionMetaV2(Box), - TransactionEventStage(Box), - TransactionEvent(Box), - TransactionMetaV4(Box), - InvokeHostFunctionSuccessPreImage(Box), - TransactionMeta(Box), - TransactionResultMeta(Box), - TransactionResultMetaV1(Box), - UpgradeEntryMeta(Box), - LedgerCloseMetaV0(Box), - LedgerCloseMetaExtV1(Box), - LedgerCloseMetaExt(Box), - LedgerCloseMetaV1(Box), - LedgerCloseMetaV2(Box), - LedgerCloseMeta(Box), - ErrorCode(Box), - SError(Box), - SendMore(Box), - SendMoreExtended(Box), - AuthCert(Box), - Hello(Box), - Auth(Box), - IpAddrType(Box), - PeerAddress(Box), - PeerAddressIp(Box), - MessageType(Box), - DontHave(Box), - SurveyMessageCommandType(Box), - SurveyMessageResponseType(Box), - TimeSlicedSurveyStartCollectingMessage(Box), - SignedTimeSlicedSurveyStartCollectingMessage(Box), - TimeSlicedSurveyStopCollectingMessage(Box), - SignedTimeSlicedSurveyStopCollectingMessage(Box), - SurveyRequestMessage(Box), - TimeSlicedSurveyRequestMessage(Box), - SignedTimeSlicedSurveyRequestMessage(Box), - EncryptedBody(Box), - SurveyResponseMessage(Box), - TimeSlicedSurveyResponseMessage(Box), - SignedTimeSlicedSurveyResponseMessage(Box), - PeerStats(Box), - TimeSlicedNodeData(Box), - TimeSlicedPeerData(Box), - TimeSlicedPeerDataList(Box), - TopologyResponseBodyV2(Box), - SurveyResponseBody(Box), - TxAdvertVector(Box), - FloodAdvert(Box), - TxDemandVector(Box), - FloodDemand(Box), - StellarMessage(Box), - AuthenticatedMessage(Box), - AuthenticatedMessageV0(Box), - LiquidityPoolParameters(Box), - MuxedAccount(Box), - MuxedAccountMed25519(Box), - DecoratedSignature(Box), - OperationType(Box), - CreateAccountOp(Box), - PaymentOp(Box), - PathPaymentStrictReceiveOp(Box), - PathPaymentStrictSendOp(Box), - ManageSellOfferOp(Box), - ManageBuyOfferOp(Box), - CreatePassiveSellOfferOp(Box), - SetOptionsOp(Box), - ChangeTrustAsset(Box), - ChangeTrustOp(Box), - AllowTrustOp(Box), - ManageDataOp(Box), - BumpSequenceOp(Box), - CreateClaimableBalanceOp(Box), - ClaimClaimableBalanceOp(Box), - BeginSponsoringFutureReservesOp(Box), - RevokeSponsorshipType(Box), - RevokeSponsorshipOp(Box), - RevokeSponsorshipOpSigner(Box), - ClawbackOp(Box), - ClawbackClaimableBalanceOp(Box), - SetTrustLineFlagsOp(Box), - LiquidityPoolDepositOp(Box), - LiquidityPoolWithdrawOp(Box), - HostFunctionType(Box), - ContractIdPreimageType(Box), - ContractIdPreimage(Box), - ContractIdPreimageFromAddress(Box), - CreateContractArgs(Box), - CreateContractArgsV2(Box), - InvokeContractArgs(Box), - HostFunction(Box), - SorobanAuthorizedFunctionType(Box), - SorobanAuthorizedFunction(Box), - SorobanAuthorizedInvocation(Box), - SorobanAddressCredentials(Box), - SorobanCredentialsType(Box), - SorobanCredentials(Box), - SorobanAuthorizationEntry(Box), - SorobanAuthorizationEntries(Box), - InvokeHostFunctionOp(Box), - ExtendFootprintTtlOp(Box), - RestoreFootprintOp(Box), - Operation(Box), - OperationBody(Box), - HashIdPreimage(Box), - HashIdPreimageOperationId(Box), - HashIdPreimageRevokeId(Box), - HashIdPreimageContractId(Box), - HashIdPreimageSorobanAuthorization(Box), - MemoType(Box), - Memo(Box), - TimeBounds(Box), - LedgerBounds(Box), - PreconditionsV2(Box), - PreconditionType(Box), - Preconditions(Box), - LedgerFootprint(Box), - SorobanResources(Box), - SorobanResourcesExtV0(Box), - SorobanTransactionData(Box), - SorobanTransactionDataExt(Box), - TransactionV0(Box), - TransactionV0Ext(Box), - TransactionV0Envelope(Box), - Transaction(Box), - TransactionExt(Box), - TransactionV1Envelope(Box), - FeeBumpTransaction(Box), - FeeBumpTransactionInnerTx(Box), - FeeBumpTransactionExt(Box), - FeeBumpTransactionEnvelope(Box), - TransactionEnvelope(Box), - TransactionSignaturePayload(Box), - TransactionSignaturePayloadTaggedTransaction(Box), - ClaimAtomType(Box), - ClaimOfferAtomV0(Box), - ClaimOfferAtom(Box), - ClaimLiquidityAtom(Box), - ClaimAtom(Box), - CreateAccountResultCode(Box), - CreateAccountResult(Box), - PaymentResultCode(Box), - PaymentResult(Box), - PathPaymentStrictReceiveResultCode(Box), - SimplePaymentResult(Box), - PathPaymentStrictReceiveResult(Box), - PathPaymentStrictReceiveResultSuccess(Box), - PathPaymentStrictSendResultCode(Box), - PathPaymentStrictSendResult(Box), - PathPaymentStrictSendResultSuccess(Box), - ManageSellOfferResultCode(Box), - ManageOfferEffect(Box), - ManageOfferSuccessResult(Box), - ManageOfferSuccessResultOffer(Box), - ManageSellOfferResult(Box), - ManageBuyOfferResultCode(Box), - ManageBuyOfferResult(Box), - SetOptionsResultCode(Box), - SetOptionsResult(Box), - ChangeTrustResultCode(Box), - ChangeTrustResult(Box), - AllowTrustResultCode(Box), - AllowTrustResult(Box), - AccountMergeResultCode(Box), - AccountMergeResult(Box), - InflationResultCode(Box), - InflationPayout(Box), - InflationResult(Box), - ManageDataResultCode(Box), - ManageDataResult(Box), - BumpSequenceResultCode(Box), - BumpSequenceResult(Box), - CreateClaimableBalanceResultCode(Box), - CreateClaimableBalanceResult(Box), - ClaimClaimableBalanceResultCode(Box), - ClaimClaimableBalanceResult(Box), - BeginSponsoringFutureReservesResultCode(Box), - BeginSponsoringFutureReservesResult(Box), - EndSponsoringFutureReservesResultCode(Box), - EndSponsoringFutureReservesResult(Box), - RevokeSponsorshipResultCode(Box), - RevokeSponsorshipResult(Box), - ClawbackResultCode(Box), - ClawbackResult(Box), - ClawbackClaimableBalanceResultCode(Box), - ClawbackClaimableBalanceResult(Box), - SetTrustLineFlagsResultCode(Box), - SetTrustLineFlagsResult(Box), - LiquidityPoolDepositResultCode(Box), - LiquidityPoolDepositResult(Box), - LiquidityPoolWithdrawResultCode(Box), - LiquidityPoolWithdrawResult(Box), - InvokeHostFunctionResultCode(Box), - InvokeHostFunctionResult(Box), - ExtendFootprintTtlResultCode(Box), - ExtendFootprintTtlResult(Box), - RestoreFootprintResultCode(Box), - RestoreFootprintResult(Box), - OperationResultCode(Box), - OperationResult(Box), - OperationResultTr(Box), - TransactionResultCode(Box), - InnerTransactionResult(Box), - InnerTransactionResultResult(Box), - InnerTransactionResultExt(Box), - InnerTransactionResultPair(Box), - TransactionResult(Box), - TransactionResultResult(Box), - TransactionResultExt(Box), - Hash(Box), - Uint256(Box), - Uint32(Box), - Int32(Box), - Uint64(Box), - Int64(Box), - TimePoint(Box), - Duration(Box), - ExtensionPoint(Box), - CryptoKeyType(Box), - PublicKeyType(Box), - SignerKeyType(Box), - PublicKey(Box), - SignerKey(Box), - SignerKeyEd25519SignedPayload(Box), - Signature(Box), - SignatureHint(Box), - NodeId(Box), - AccountId(Box), - ContractId(Box), - Curve25519Secret(Box), - Curve25519Public(Box), - HmacSha256Key(Box), - HmacSha256Mac(Box), - ShortHashSeed(Box), - BinaryFuseFilterType(Box), - SerializedBinaryFuseFilter(Box), - PoolId(Box), - ClaimableBalanceIdType(Box), - ClaimableBalanceId(Box), -} - -impl Type { - // Private const slices used to compute the variant count, supporting - // cfg-gated entries whose presence varies by enabled features. - const _VARIANTS: &[TypeVariant] = &[ - TypeVariant::Value, - TypeVariant::ScpBallot, - TypeVariant::ScpStatementType, - TypeVariant::ScpNomination, - TypeVariant::ScpStatement, - TypeVariant::ScpStatementPledges, - TypeVariant::ScpStatementPrepare, - TypeVariant::ScpStatementConfirm, - TypeVariant::ScpStatementExternalize, - TypeVariant::ScpEnvelope, - TypeVariant::ScpQuorumSet, - TypeVariant::EncodedLedgerKey, - TypeVariant::ConfigSettingContractExecutionLanesV0, - TypeVariant::ConfigSettingContractComputeV0, - TypeVariant::ConfigSettingContractParallelComputeV0, - TypeVariant::ConfigSettingContractLedgerCostV0, - TypeVariant::ConfigSettingContractLedgerCostExtV0, - TypeVariant::ConfigSettingContractHistoricalDataV0, - TypeVariant::ConfigSettingContractEventsV0, - TypeVariant::ConfigSettingContractBandwidthV0, - TypeVariant::ContractCostType, - TypeVariant::ContractCostParamEntry, - TypeVariant::StateArchivalSettings, - TypeVariant::EvictionIterator, - TypeVariant::ConfigSettingScpTiming, - TypeVariant::FrozenLedgerKeys, - TypeVariant::FrozenLedgerKeysDelta, - TypeVariant::FreezeBypassTxs, - TypeVariant::FreezeBypassTxsDelta, - TypeVariant::ContractCostParams, - TypeVariant::ConfigSettingId, - TypeVariant::ConfigSettingEntry, - TypeVariant::ScEnvMetaKind, - TypeVariant::ScEnvMetaEntry, - TypeVariant::ScEnvMetaEntryInterfaceVersion, - TypeVariant::ScMetaV0, - TypeVariant::ScMetaKind, - TypeVariant::ScMetaEntry, - TypeVariant::ScSpecType, - TypeVariant::ScSpecTypeOption, - TypeVariant::ScSpecTypeResult, - TypeVariant::ScSpecTypeVec, - TypeVariant::ScSpecTypeMap, - TypeVariant::ScSpecTypeTuple, - TypeVariant::ScSpecTypeBytesN, - TypeVariant::ScSpecTypeUdt, - TypeVariant::ScSpecTypeDef, - TypeVariant::ScSpecUdtStructFieldV0, - TypeVariant::ScSpecUdtStructV0, - TypeVariant::ScSpecUdtUnionCaseVoidV0, - TypeVariant::ScSpecUdtUnionCaseTupleV0, - TypeVariant::ScSpecUdtUnionCaseV0Kind, - TypeVariant::ScSpecUdtUnionCaseV0, - TypeVariant::ScSpecUdtUnionV0, - TypeVariant::ScSpecUdtEnumCaseV0, - TypeVariant::ScSpecUdtEnumV0, - TypeVariant::ScSpecUdtErrorEnumCaseV0, - TypeVariant::ScSpecUdtErrorEnumV0, - TypeVariant::ScSpecFunctionInputV0, - TypeVariant::ScSpecFunctionV0, - TypeVariant::ScSpecEventParamLocationV0, - TypeVariant::ScSpecEventParamV0, - TypeVariant::ScSpecEventDataFormat, - TypeVariant::ScSpecEventV0, - TypeVariant::ScSpecEntryKind, - TypeVariant::ScSpecEntry, - TypeVariant::ScValType, - TypeVariant::ScErrorType, - TypeVariant::ScErrorCode, - TypeVariant::ScError, - TypeVariant::UInt128Parts, - TypeVariant::Int128Parts, - TypeVariant::UInt256Parts, - TypeVariant::Int256Parts, - TypeVariant::ContractExecutableType, - TypeVariant::ContractExecutable, - TypeVariant::ScAddressType, - TypeVariant::MuxedEd25519Account, - TypeVariant::ScAddress, - TypeVariant::ScVec, - TypeVariant::ScMap, - TypeVariant::ScBytes, - TypeVariant::ScString, - TypeVariant::ScSymbol, - TypeVariant::ScNonceKey, - TypeVariant::ScContractInstance, - TypeVariant::ScVal, - TypeVariant::ScMapEntry, - TypeVariant::LedgerCloseMetaBatch, - TypeVariant::StoredTransactionSet, - TypeVariant::StoredDebugTransactionSet, - TypeVariant::PersistedScpStateV0, - TypeVariant::PersistedScpStateV1, - TypeVariant::PersistedScpState, - TypeVariant::Thresholds, - TypeVariant::String32, - TypeVariant::String64, - TypeVariant::SequenceNumber, - TypeVariant::DataValue, - TypeVariant::AssetCode4, - TypeVariant::AssetCode12, - TypeVariant::AssetType, - TypeVariant::AssetCode, - TypeVariant::AlphaNum4, - TypeVariant::AlphaNum12, - TypeVariant::Asset, - TypeVariant::Price, - TypeVariant::Liabilities, - TypeVariant::ThresholdIndexes, - TypeVariant::LedgerEntryType, - TypeVariant::Signer, - TypeVariant::AccountFlags, - TypeVariant::SponsorshipDescriptor, - TypeVariant::AccountEntryExtensionV3, - TypeVariant::AccountEntryExtensionV2, - TypeVariant::AccountEntryExtensionV2Ext, - TypeVariant::AccountEntryExtensionV1, - TypeVariant::AccountEntryExtensionV1Ext, - TypeVariant::AccountEntry, - TypeVariant::AccountEntryExt, - TypeVariant::TrustLineFlags, - TypeVariant::LiquidityPoolType, - TypeVariant::TrustLineAsset, - TypeVariant::TrustLineEntryExtensionV2, - TypeVariant::TrustLineEntryExtensionV2Ext, - TypeVariant::TrustLineEntry, - TypeVariant::TrustLineEntryExt, - TypeVariant::TrustLineEntryV1, - TypeVariant::TrustLineEntryV1Ext, - TypeVariant::OfferEntryFlags, - TypeVariant::OfferEntry, - TypeVariant::OfferEntryExt, - TypeVariant::DataEntry, - TypeVariant::DataEntryExt, - TypeVariant::ClaimPredicateType, - TypeVariant::ClaimPredicate, - TypeVariant::ClaimantType, - TypeVariant::Claimant, - TypeVariant::ClaimantV0, - TypeVariant::ClaimableBalanceFlags, - TypeVariant::ClaimableBalanceEntryExtensionV1, - TypeVariant::ClaimableBalanceEntryExtensionV1Ext, - TypeVariant::ClaimableBalanceEntry, - TypeVariant::ClaimableBalanceEntryExt, - TypeVariant::LiquidityPoolConstantProductParameters, - TypeVariant::LiquidityPoolEntry, - TypeVariant::LiquidityPoolEntryBody, - TypeVariant::LiquidityPoolEntryConstantProduct, - TypeVariant::ContractDataDurability, - TypeVariant::ContractDataEntry, - TypeVariant::ContractCodeCostInputs, - TypeVariant::ContractCodeEntry, - TypeVariant::ContractCodeEntryExt, - TypeVariant::ContractCodeEntryV1, - TypeVariant::TtlEntry, - TypeVariant::LedgerEntryExtensionV1, - TypeVariant::LedgerEntryExtensionV1Ext, - TypeVariant::LedgerEntry, - TypeVariant::LedgerEntryData, - TypeVariant::LedgerEntryExt, - TypeVariant::LedgerKey, - TypeVariant::LedgerKeyAccount, - TypeVariant::LedgerKeyTrustLine, - TypeVariant::LedgerKeyOffer, - TypeVariant::LedgerKeyData, - TypeVariant::LedgerKeyClaimableBalance, - TypeVariant::LedgerKeyLiquidityPool, - TypeVariant::LedgerKeyContractData, - TypeVariant::LedgerKeyContractCode, - TypeVariant::LedgerKeyConfigSetting, - TypeVariant::LedgerKeyTtl, - TypeVariant::EnvelopeType, - TypeVariant::BucketListType, - TypeVariant::BucketEntryType, - TypeVariant::HotArchiveBucketEntryType, - TypeVariant::BucketMetadata, - TypeVariant::BucketMetadataExt, - TypeVariant::BucketEntry, - TypeVariant::HotArchiveBucketEntry, - TypeVariant::UpgradeType, - TypeVariant::StellarValueType, - TypeVariant::LedgerCloseValueSignature, - TypeVariant::StellarValue, - TypeVariant::StellarValueExt, - TypeVariant::LedgerHeaderFlags, - TypeVariant::LedgerHeaderExtensionV1, - TypeVariant::LedgerHeaderExtensionV1Ext, - TypeVariant::LedgerHeader, - TypeVariant::LedgerHeaderExt, - TypeVariant::LedgerUpgradeType, - TypeVariant::ConfigUpgradeSetKey, - TypeVariant::LedgerUpgrade, - TypeVariant::ConfigUpgradeSet, - TypeVariant::TxSetComponentType, - TypeVariant::DependentTxCluster, - TypeVariant::ParallelTxExecutionStage, - TypeVariant::ParallelTxsComponent, - TypeVariant::TxSetComponent, - TypeVariant::TxSetComponentTxsMaybeDiscountedFee, - TypeVariant::TransactionPhase, - TypeVariant::TransactionSet, - TypeVariant::TransactionSetV1, - TypeVariant::GeneralizedTransactionSet, - TypeVariant::TransactionResultPair, - TypeVariant::TransactionResultSet, - TypeVariant::TransactionHistoryEntry, - TypeVariant::TransactionHistoryEntryExt, - TypeVariant::TransactionHistoryResultEntry, - TypeVariant::TransactionHistoryResultEntryExt, - TypeVariant::LedgerHeaderHistoryEntry, - TypeVariant::LedgerHeaderHistoryEntryExt, - TypeVariant::LedgerScpMessages, - TypeVariant::ScpHistoryEntryV0, - TypeVariant::ScpHistoryEntry, - TypeVariant::LedgerEntryChangeType, - TypeVariant::LedgerEntryChange, - TypeVariant::LedgerEntryChanges, - TypeVariant::OperationMeta, - TypeVariant::TransactionMetaV1, - TypeVariant::TransactionMetaV2, - TypeVariant::ContractEventType, - TypeVariant::ContractEvent, - TypeVariant::ContractEventBody, - TypeVariant::ContractEventV0, - TypeVariant::DiagnosticEvent, - TypeVariant::SorobanTransactionMetaExtV1, - TypeVariant::SorobanTransactionMetaExt, - TypeVariant::SorobanTransactionMeta, - TypeVariant::TransactionMetaV3, - TypeVariant::OperationMetaV2, - TypeVariant::SorobanTransactionMetaV2, - TypeVariant::TransactionEventStage, - TypeVariant::TransactionEvent, - TypeVariant::TransactionMetaV4, - TypeVariant::InvokeHostFunctionSuccessPreImage, - TypeVariant::TransactionMeta, - TypeVariant::TransactionResultMeta, - TypeVariant::TransactionResultMetaV1, - TypeVariant::UpgradeEntryMeta, - TypeVariant::LedgerCloseMetaV0, - TypeVariant::LedgerCloseMetaExtV1, - TypeVariant::LedgerCloseMetaExt, - TypeVariant::LedgerCloseMetaV1, - TypeVariant::LedgerCloseMetaV2, - TypeVariant::LedgerCloseMeta, - TypeVariant::ErrorCode, - TypeVariant::SError, - TypeVariant::SendMore, - TypeVariant::SendMoreExtended, - TypeVariant::AuthCert, - TypeVariant::Hello, - TypeVariant::Auth, - TypeVariant::IpAddrType, - TypeVariant::PeerAddress, - TypeVariant::PeerAddressIp, - TypeVariant::MessageType, - TypeVariant::DontHave, - TypeVariant::SurveyMessageCommandType, - TypeVariant::SurveyMessageResponseType, - TypeVariant::TimeSlicedSurveyStartCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage, - TypeVariant::TimeSlicedSurveyStopCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage, - TypeVariant::SurveyRequestMessage, - TypeVariant::TimeSlicedSurveyRequestMessage, - TypeVariant::SignedTimeSlicedSurveyRequestMessage, - TypeVariant::EncryptedBody, - TypeVariant::SurveyResponseMessage, - TypeVariant::TimeSlicedSurveyResponseMessage, - TypeVariant::SignedTimeSlicedSurveyResponseMessage, - TypeVariant::PeerStats, - TypeVariant::TimeSlicedNodeData, - TypeVariant::TimeSlicedPeerData, - TypeVariant::TimeSlicedPeerDataList, - TypeVariant::TopologyResponseBodyV2, - TypeVariant::SurveyResponseBody, - TypeVariant::TxAdvertVector, - TypeVariant::FloodAdvert, - TypeVariant::TxDemandVector, - TypeVariant::FloodDemand, - TypeVariant::StellarMessage, - TypeVariant::AuthenticatedMessage, - TypeVariant::AuthenticatedMessageV0, - TypeVariant::LiquidityPoolParameters, - TypeVariant::MuxedAccount, - TypeVariant::MuxedAccountMed25519, - TypeVariant::DecoratedSignature, - TypeVariant::OperationType, - TypeVariant::CreateAccountOp, - TypeVariant::PaymentOp, - TypeVariant::PathPaymentStrictReceiveOp, - TypeVariant::PathPaymentStrictSendOp, - TypeVariant::ManageSellOfferOp, - TypeVariant::ManageBuyOfferOp, - TypeVariant::CreatePassiveSellOfferOp, - TypeVariant::SetOptionsOp, - TypeVariant::ChangeTrustAsset, - TypeVariant::ChangeTrustOp, - TypeVariant::AllowTrustOp, - TypeVariant::ManageDataOp, - TypeVariant::BumpSequenceOp, - TypeVariant::CreateClaimableBalanceOp, - TypeVariant::ClaimClaimableBalanceOp, - TypeVariant::BeginSponsoringFutureReservesOp, - TypeVariant::RevokeSponsorshipType, - TypeVariant::RevokeSponsorshipOp, - TypeVariant::RevokeSponsorshipOpSigner, - TypeVariant::ClawbackOp, - TypeVariant::ClawbackClaimableBalanceOp, - TypeVariant::SetTrustLineFlagsOp, - TypeVariant::LiquidityPoolDepositOp, - TypeVariant::LiquidityPoolWithdrawOp, - TypeVariant::HostFunctionType, - TypeVariant::ContractIdPreimageType, - TypeVariant::ContractIdPreimage, - TypeVariant::ContractIdPreimageFromAddress, - TypeVariant::CreateContractArgs, - TypeVariant::CreateContractArgsV2, - TypeVariant::InvokeContractArgs, - TypeVariant::HostFunction, - TypeVariant::SorobanAuthorizedFunctionType, - TypeVariant::SorobanAuthorizedFunction, - TypeVariant::SorobanAuthorizedInvocation, - TypeVariant::SorobanAddressCredentials, - TypeVariant::SorobanCredentialsType, - TypeVariant::SorobanCredentials, - TypeVariant::SorobanAuthorizationEntry, - TypeVariant::SorobanAuthorizationEntries, - TypeVariant::InvokeHostFunctionOp, - TypeVariant::ExtendFootprintTtlOp, - TypeVariant::RestoreFootprintOp, - TypeVariant::Operation, - TypeVariant::OperationBody, - TypeVariant::HashIdPreimage, - TypeVariant::HashIdPreimageOperationId, - TypeVariant::HashIdPreimageRevokeId, - TypeVariant::HashIdPreimageContractId, - TypeVariant::HashIdPreimageSorobanAuthorization, - TypeVariant::MemoType, - TypeVariant::Memo, - TypeVariant::TimeBounds, - TypeVariant::LedgerBounds, - TypeVariant::PreconditionsV2, - TypeVariant::PreconditionType, - TypeVariant::Preconditions, - TypeVariant::LedgerFootprint, - TypeVariant::SorobanResources, - TypeVariant::SorobanResourcesExtV0, - TypeVariant::SorobanTransactionData, - TypeVariant::SorobanTransactionDataExt, - TypeVariant::TransactionV0, - TypeVariant::TransactionV0Ext, - TypeVariant::TransactionV0Envelope, - TypeVariant::Transaction, - TypeVariant::TransactionExt, - TypeVariant::TransactionV1Envelope, - TypeVariant::FeeBumpTransaction, - TypeVariant::FeeBumpTransactionInnerTx, - TypeVariant::FeeBumpTransactionExt, - TypeVariant::FeeBumpTransactionEnvelope, - TypeVariant::TransactionEnvelope, - TypeVariant::TransactionSignaturePayload, - TypeVariant::TransactionSignaturePayloadTaggedTransaction, - TypeVariant::ClaimAtomType, - TypeVariant::ClaimOfferAtomV0, - TypeVariant::ClaimOfferAtom, - TypeVariant::ClaimLiquidityAtom, - TypeVariant::ClaimAtom, - TypeVariant::CreateAccountResultCode, - TypeVariant::CreateAccountResult, - TypeVariant::PaymentResultCode, - TypeVariant::PaymentResult, - TypeVariant::PathPaymentStrictReceiveResultCode, - TypeVariant::SimplePaymentResult, - TypeVariant::PathPaymentStrictReceiveResult, - TypeVariant::PathPaymentStrictReceiveResultSuccess, - TypeVariant::PathPaymentStrictSendResultCode, - TypeVariant::PathPaymentStrictSendResult, - TypeVariant::PathPaymentStrictSendResultSuccess, - TypeVariant::ManageSellOfferResultCode, - TypeVariant::ManageOfferEffect, - TypeVariant::ManageOfferSuccessResult, - TypeVariant::ManageOfferSuccessResultOffer, - TypeVariant::ManageSellOfferResult, - TypeVariant::ManageBuyOfferResultCode, - TypeVariant::ManageBuyOfferResult, - TypeVariant::SetOptionsResultCode, - TypeVariant::SetOptionsResult, - TypeVariant::ChangeTrustResultCode, - TypeVariant::ChangeTrustResult, - TypeVariant::AllowTrustResultCode, - TypeVariant::AllowTrustResult, - TypeVariant::AccountMergeResultCode, - TypeVariant::AccountMergeResult, - TypeVariant::InflationResultCode, - TypeVariant::InflationPayout, - TypeVariant::InflationResult, - TypeVariant::ManageDataResultCode, - TypeVariant::ManageDataResult, - TypeVariant::BumpSequenceResultCode, - TypeVariant::BumpSequenceResult, - TypeVariant::CreateClaimableBalanceResultCode, - TypeVariant::CreateClaimableBalanceResult, - TypeVariant::ClaimClaimableBalanceResultCode, - TypeVariant::ClaimClaimableBalanceResult, - TypeVariant::BeginSponsoringFutureReservesResultCode, - TypeVariant::BeginSponsoringFutureReservesResult, - TypeVariant::EndSponsoringFutureReservesResultCode, - TypeVariant::EndSponsoringFutureReservesResult, - TypeVariant::RevokeSponsorshipResultCode, - TypeVariant::RevokeSponsorshipResult, - TypeVariant::ClawbackResultCode, - TypeVariant::ClawbackResult, - TypeVariant::ClawbackClaimableBalanceResultCode, - TypeVariant::ClawbackClaimableBalanceResult, - TypeVariant::SetTrustLineFlagsResultCode, - TypeVariant::SetTrustLineFlagsResult, - TypeVariant::LiquidityPoolDepositResultCode, - TypeVariant::LiquidityPoolDepositResult, - TypeVariant::LiquidityPoolWithdrawResultCode, - TypeVariant::LiquidityPoolWithdrawResult, - TypeVariant::InvokeHostFunctionResultCode, - TypeVariant::InvokeHostFunctionResult, - TypeVariant::ExtendFootprintTtlResultCode, - TypeVariant::ExtendFootprintTtlResult, - TypeVariant::RestoreFootprintResultCode, - TypeVariant::RestoreFootprintResult, - TypeVariant::OperationResultCode, - TypeVariant::OperationResult, - TypeVariant::OperationResultTr, - TypeVariant::TransactionResultCode, - TypeVariant::InnerTransactionResult, - TypeVariant::InnerTransactionResultResult, - TypeVariant::InnerTransactionResultExt, - TypeVariant::InnerTransactionResultPair, - TypeVariant::TransactionResult, - TypeVariant::TransactionResultResult, - TypeVariant::TransactionResultExt, - TypeVariant::Hash, - TypeVariant::Uint256, - TypeVariant::Uint32, - TypeVariant::Int32, - TypeVariant::Uint64, - TypeVariant::Int64, - TypeVariant::TimePoint, - TypeVariant::Duration, - TypeVariant::ExtensionPoint, - TypeVariant::CryptoKeyType, - TypeVariant::PublicKeyType, - TypeVariant::SignerKeyType, - TypeVariant::PublicKey, - TypeVariant::SignerKey, - TypeVariant::SignerKeyEd25519SignedPayload, - TypeVariant::Signature, - TypeVariant::SignatureHint, - TypeVariant::NodeId, - TypeVariant::AccountId, - TypeVariant::ContractId, - TypeVariant::Curve25519Secret, - TypeVariant::Curve25519Public, - TypeVariant::HmacSha256Key, - TypeVariant::HmacSha256Mac, - TypeVariant::ShortHashSeed, - TypeVariant::BinaryFuseFilterType, - TypeVariant::SerializedBinaryFuseFilter, - TypeVariant::PoolId, - TypeVariant::ClaimableBalanceIdType, - TypeVariant::ClaimableBalanceId, - ]; - pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = [ - TypeVariant::Value, - TypeVariant::ScpBallot, - TypeVariant::ScpStatementType, - TypeVariant::ScpNomination, - TypeVariant::ScpStatement, - TypeVariant::ScpStatementPledges, - TypeVariant::ScpStatementPrepare, - TypeVariant::ScpStatementConfirm, - TypeVariant::ScpStatementExternalize, - TypeVariant::ScpEnvelope, - TypeVariant::ScpQuorumSet, - TypeVariant::EncodedLedgerKey, - TypeVariant::ConfigSettingContractExecutionLanesV0, - TypeVariant::ConfigSettingContractComputeV0, - TypeVariant::ConfigSettingContractParallelComputeV0, - TypeVariant::ConfigSettingContractLedgerCostV0, - TypeVariant::ConfigSettingContractLedgerCostExtV0, - TypeVariant::ConfigSettingContractHistoricalDataV0, - TypeVariant::ConfigSettingContractEventsV0, - TypeVariant::ConfigSettingContractBandwidthV0, - TypeVariant::ContractCostType, - TypeVariant::ContractCostParamEntry, - TypeVariant::StateArchivalSettings, - TypeVariant::EvictionIterator, - TypeVariant::ConfigSettingScpTiming, - TypeVariant::FrozenLedgerKeys, - TypeVariant::FrozenLedgerKeysDelta, - TypeVariant::FreezeBypassTxs, - TypeVariant::FreezeBypassTxsDelta, - TypeVariant::ContractCostParams, - TypeVariant::ConfigSettingId, - TypeVariant::ConfigSettingEntry, - TypeVariant::ScEnvMetaKind, - TypeVariant::ScEnvMetaEntry, - TypeVariant::ScEnvMetaEntryInterfaceVersion, - TypeVariant::ScMetaV0, - TypeVariant::ScMetaKind, - TypeVariant::ScMetaEntry, - TypeVariant::ScSpecType, - TypeVariant::ScSpecTypeOption, - TypeVariant::ScSpecTypeResult, - TypeVariant::ScSpecTypeVec, - TypeVariant::ScSpecTypeMap, - TypeVariant::ScSpecTypeTuple, - TypeVariant::ScSpecTypeBytesN, - TypeVariant::ScSpecTypeUdt, - TypeVariant::ScSpecTypeDef, - TypeVariant::ScSpecUdtStructFieldV0, - TypeVariant::ScSpecUdtStructV0, - TypeVariant::ScSpecUdtUnionCaseVoidV0, - TypeVariant::ScSpecUdtUnionCaseTupleV0, - TypeVariant::ScSpecUdtUnionCaseV0Kind, - TypeVariant::ScSpecUdtUnionCaseV0, - TypeVariant::ScSpecUdtUnionV0, - TypeVariant::ScSpecUdtEnumCaseV0, - TypeVariant::ScSpecUdtEnumV0, - TypeVariant::ScSpecUdtErrorEnumCaseV0, - TypeVariant::ScSpecUdtErrorEnumV0, - TypeVariant::ScSpecFunctionInputV0, - TypeVariant::ScSpecFunctionV0, - TypeVariant::ScSpecEventParamLocationV0, - TypeVariant::ScSpecEventParamV0, - TypeVariant::ScSpecEventDataFormat, - TypeVariant::ScSpecEventV0, - TypeVariant::ScSpecEntryKind, - TypeVariant::ScSpecEntry, - TypeVariant::ScValType, - TypeVariant::ScErrorType, - TypeVariant::ScErrorCode, - TypeVariant::ScError, - TypeVariant::UInt128Parts, - TypeVariant::Int128Parts, - TypeVariant::UInt256Parts, - TypeVariant::Int256Parts, - TypeVariant::ContractExecutableType, - TypeVariant::ContractExecutable, - TypeVariant::ScAddressType, - TypeVariant::MuxedEd25519Account, - TypeVariant::ScAddress, - TypeVariant::ScVec, - TypeVariant::ScMap, - TypeVariant::ScBytes, - TypeVariant::ScString, - TypeVariant::ScSymbol, - TypeVariant::ScNonceKey, - TypeVariant::ScContractInstance, - TypeVariant::ScVal, - TypeVariant::ScMapEntry, - TypeVariant::LedgerCloseMetaBatch, - TypeVariant::StoredTransactionSet, - TypeVariant::StoredDebugTransactionSet, - TypeVariant::PersistedScpStateV0, - TypeVariant::PersistedScpStateV1, - TypeVariant::PersistedScpState, - TypeVariant::Thresholds, - TypeVariant::String32, - TypeVariant::String64, - TypeVariant::SequenceNumber, - TypeVariant::DataValue, - TypeVariant::AssetCode4, - TypeVariant::AssetCode12, - TypeVariant::AssetType, - TypeVariant::AssetCode, - TypeVariant::AlphaNum4, - TypeVariant::AlphaNum12, - TypeVariant::Asset, - TypeVariant::Price, - TypeVariant::Liabilities, - TypeVariant::ThresholdIndexes, - TypeVariant::LedgerEntryType, - TypeVariant::Signer, - TypeVariant::AccountFlags, - TypeVariant::SponsorshipDescriptor, - TypeVariant::AccountEntryExtensionV3, - TypeVariant::AccountEntryExtensionV2, - TypeVariant::AccountEntryExtensionV2Ext, - TypeVariant::AccountEntryExtensionV1, - TypeVariant::AccountEntryExtensionV1Ext, - TypeVariant::AccountEntry, - TypeVariant::AccountEntryExt, - TypeVariant::TrustLineFlags, - TypeVariant::LiquidityPoolType, - TypeVariant::TrustLineAsset, - TypeVariant::TrustLineEntryExtensionV2, - TypeVariant::TrustLineEntryExtensionV2Ext, - TypeVariant::TrustLineEntry, - TypeVariant::TrustLineEntryExt, - TypeVariant::TrustLineEntryV1, - TypeVariant::TrustLineEntryV1Ext, - TypeVariant::OfferEntryFlags, - TypeVariant::OfferEntry, - TypeVariant::OfferEntryExt, - TypeVariant::DataEntry, - TypeVariant::DataEntryExt, - TypeVariant::ClaimPredicateType, - TypeVariant::ClaimPredicate, - TypeVariant::ClaimantType, - TypeVariant::Claimant, - TypeVariant::ClaimantV0, - TypeVariant::ClaimableBalanceFlags, - TypeVariant::ClaimableBalanceEntryExtensionV1, - TypeVariant::ClaimableBalanceEntryExtensionV1Ext, - TypeVariant::ClaimableBalanceEntry, - TypeVariant::ClaimableBalanceEntryExt, - TypeVariant::LiquidityPoolConstantProductParameters, - TypeVariant::LiquidityPoolEntry, - TypeVariant::LiquidityPoolEntryBody, - TypeVariant::LiquidityPoolEntryConstantProduct, - TypeVariant::ContractDataDurability, - TypeVariant::ContractDataEntry, - TypeVariant::ContractCodeCostInputs, - TypeVariant::ContractCodeEntry, - TypeVariant::ContractCodeEntryExt, - TypeVariant::ContractCodeEntryV1, - TypeVariant::TtlEntry, - TypeVariant::LedgerEntryExtensionV1, - TypeVariant::LedgerEntryExtensionV1Ext, - TypeVariant::LedgerEntry, - TypeVariant::LedgerEntryData, - TypeVariant::LedgerEntryExt, - TypeVariant::LedgerKey, - TypeVariant::LedgerKeyAccount, - TypeVariant::LedgerKeyTrustLine, - TypeVariant::LedgerKeyOffer, - TypeVariant::LedgerKeyData, - TypeVariant::LedgerKeyClaimableBalance, - TypeVariant::LedgerKeyLiquidityPool, - TypeVariant::LedgerKeyContractData, - TypeVariant::LedgerKeyContractCode, - TypeVariant::LedgerKeyConfigSetting, - TypeVariant::LedgerKeyTtl, - TypeVariant::EnvelopeType, - TypeVariant::BucketListType, - TypeVariant::BucketEntryType, - TypeVariant::HotArchiveBucketEntryType, - TypeVariant::BucketMetadata, - TypeVariant::BucketMetadataExt, - TypeVariant::BucketEntry, - TypeVariant::HotArchiveBucketEntry, - TypeVariant::UpgradeType, - TypeVariant::StellarValueType, - TypeVariant::LedgerCloseValueSignature, - TypeVariant::StellarValue, - TypeVariant::StellarValueExt, - TypeVariant::LedgerHeaderFlags, - TypeVariant::LedgerHeaderExtensionV1, - TypeVariant::LedgerHeaderExtensionV1Ext, - TypeVariant::LedgerHeader, - TypeVariant::LedgerHeaderExt, - TypeVariant::LedgerUpgradeType, - TypeVariant::ConfigUpgradeSetKey, - TypeVariant::LedgerUpgrade, - TypeVariant::ConfigUpgradeSet, - TypeVariant::TxSetComponentType, - TypeVariant::DependentTxCluster, - TypeVariant::ParallelTxExecutionStage, - TypeVariant::ParallelTxsComponent, - TypeVariant::TxSetComponent, - TypeVariant::TxSetComponentTxsMaybeDiscountedFee, - TypeVariant::TransactionPhase, - TypeVariant::TransactionSet, - TypeVariant::TransactionSetV1, - TypeVariant::GeneralizedTransactionSet, - TypeVariant::TransactionResultPair, - TypeVariant::TransactionResultSet, - TypeVariant::TransactionHistoryEntry, - TypeVariant::TransactionHistoryEntryExt, - TypeVariant::TransactionHistoryResultEntry, - TypeVariant::TransactionHistoryResultEntryExt, - TypeVariant::LedgerHeaderHistoryEntry, - TypeVariant::LedgerHeaderHistoryEntryExt, - TypeVariant::LedgerScpMessages, - TypeVariant::ScpHistoryEntryV0, - TypeVariant::ScpHistoryEntry, - TypeVariant::LedgerEntryChangeType, - TypeVariant::LedgerEntryChange, - TypeVariant::LedgerEntryChanges, - TypeVariant::OperationMeta, - TypeVariant::TransactionMetaV1, - TypeVariant::TransactionMetaV2, - TypeVariant::ContractEventType, - TypeVariant::ContractEvent, - TypeVariant::ContractEventBody, - TypeVariant::ContractEventV0, - TypeVariant::DiagnosticEvent, - TypeVariant::SorobanTransactionMetaExtV1, - TypeVariant::SorobanTransactionMetaExt, - TypeVariant::SorobanTransactionMeta, - TypeVariant::TransactionMetaV3, - TypeVariant::OperationMetaV2, - TypeVariant::SorobanTransactionMetaV2, - TypeVariant::TransactionEventStage, - TypeVariant::TransactionEvent, - TypeVariant::TransactionMetaV4, - TypeVariant::InvokeHostFunctionSuccessPreImage, - TypeVariant::TransactionMeta, - TypeVariant::TransactionResultMeta, - TypeVariant::TransactionResultMetaV1, - TypeVariant::UpgradeEntryMeta, - TypeVariant::LedgerCloseMetaV0, - TypeVariant::LedgerCloseMetaExtV1, - TypeVariant::LedgerCloseMetaExt, - TypeVariant::LedgerCloseMetaV1, - TypeVariant::LedgerCloseMetaV2, - TypeVariant::LedgerCloseMeta, - TypeVariant::ErrorCode, - TypeVariant::SError, - TypeVariant::SendMore, - TypeVariant::SendMoreExtended, - TypeVariant::AuthCert, - TypeVariant::Hello, - TypeVariant::Auth, - TypeVariant::IpAddrType, - TypeVariant::PeerAddress, - TypeVariant::PeerAddressIp, - TypeVariant::MessageType, - TypeVariant::DontHave, - TypeVariant::SurveyMessageCommandType, - TypeVariant::SurveyMessageResponseType, - TypeVariant::TimeSlicedSurveyStartCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage, - TypeVariant::TimeSlicedSurveyStopCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage, - TypeVariant::SurveyRequestMessage, - TypeVariant::TimeSlicedSurveyRequestMessage, - TypeVariant::SignedTimeSlicedSurveyRequestMessage, - TypeVariant::EncryptedBody, - TypeVariant::SurveyResponseMessage, - TypeVariant::TimeSlicedSurveyResponseMessage, - TypeVariant::SignedTimeSlicedSurveyResponseMessage, - TypeVariant::PeerStats, - TypeVariant::TimeSlicedNodeData, - TypeVariant::TimeSlicedPeerData, - TypeVariant::TimeSlicedPeerDataList, - TypeVariant::TopologyResponseBodyV2, - TypeVariant::SurveyResponseBody, - TypeVariant::TxAdvertVector, - TypeVariant::FloodAdvert, - TypeVariant::TxDemandVector, - TypeVariant::FloodDemand, - TypeVariant::StellarMessage, - TypeVariant::AuthenticatedMessage, - TypeVariant::AuthenticatedMessageV0, - TypeVariant::LiquidityPoolParameters, - TypeVariant::MuxedAccount, - TypeVariant::MuxedAccountMed25519, - TypeVariant::DecoratedSignature, - TypeVariant::OperationType, - TypeVariant::CreateAccountOp, - TypeVariant::PaymentOp, - TypeVariant::PathPaymentStrictReceiveOp, - TypeVariant::PathPaymentStrictSendOp, - TypeVariant::ManageSellOfferOp, - TypeVariant::ManageBuyOfferOp, - TypeVariant::CreatePassiveSellOfferOp, - TypeVariant::SetOptionsOp, - TypeVariant::ChangeTrustAsset, - TypeVariant::ChangeTrustOp, - TypeVariant::AllowTrustOp, - TypeVariant::ManageDataOp, - TypeVariant::BumpSequenceOp, - TypeVariant::CreateClaimableBalanceOp, - TypeVariant::ClaimClaimableBalanceOp, - TypeVariant::BeginSponsoringFutureReservesOp, - TypeVariant::RevokeSponsorshipType, - TypeVariant::RevokeSponsorshipOp, - TypeVariant::RevokeSponsorshipOpSigner, - TypeVariant::ClawbackOp, - TypeVariant::ClawbackClaimableBalanceOp, - TypeVariant::SetTrustLineFlagsOp, - TypeVariant::LiquidityPoolDepositOp, - TypeVariant::LiquidityPoolWithdrawOp, - TypeVariant::HostFunctionType, - TypeVariant::ContractIdPreimageType, - TypeVariant::ContractIdPreimage, - TypeVariant::ContractIdPreimageFromAddress, - TypeVariant::CreateContractArgs, - TypeVariant::CreateContractArgsV2, - TypeVariant::InvokeContractArgs, - TypeVariant::HostFunction, - TypeVariant::SorobanAuthorizedFunctionType, - TypeVariant::SorobanAuthorizedFunction, - TypeVariant::SorobanAuthorizedInvocation, - TypeVariant::SorobanAddressCredentials, - TypeVariant::SorobanCredentialsType, - TypeVariant::SorobanCredentials, - TypeVariant::SorobanAuthorizationEntry, - TypeVariant::SorobanAuthorizationEntries, - TypeVariant::InvokeHostFunctionOp, - TypeVariant::ExtendFootprintTtlOp, - TypeVariant::RestoreFootprintOp, - TypeVariant::Operation, - TypeVariant::OperationBody, - TypeVariant::HashIdPreimage, - TypeVariant::HashIdPreimageOperationId, - TypeVariant::HashIdPreimageRevokeId, - TypeVariant::HashIdPreimageContractId, - TypeVariant::HashIdPreimageSorobanAuthorization, - TypeVariant::MemoType, - TypeVariant::Memo, - TypeVariant::TimeBounds, - TypeVariant::LedgerBounds, - TypeVariant::PreconditionsV2, - TypeVariant::PreconditionType, - TypeVariant::Preconditions, - TypeVariant::LedgerFootprint, - TypeVariant::SorobanResources, - TypeVariant::SorobanResourcesExtV0, - TypeVariant::SorobanTransactionData, - TypeVariant::SorobanTransactionDataExt, - TypeVariant::TransactionV0, - TypeVariant::TransactionV0Ext, - TypeVariant::TransactionV0Envelope, - TypeVariant::Transaction, - TypeVariant::TransactionExt, - TypeVariant::TransactionV1Envelope, - TypeVariant::FeeBumpTransaction, - TypeVariant::FeeBumpTransactionInnerTx, - TypeVariant::FeeBumpTransactionExt, - TypeVariant::FeeBumpTransactionEnvelope, - TypeVariant::TransactionEnvelope, - TypeVariant::TransactionSignaturePayload, - TypeVariant::TransactionSignaturePayloadTaggedTransaction, - TypeVariant::ClaimAtomType, - TypeVariant::ClaimOfferAtomV0, - TypeVariant::ClaimOfferAtom, - TypeVariant::ClaimLiquidityAtom, - TypeVariant::ClaimAtom, - TypeVariant::CreateAccountResultCode, - TypeVariant::CreateAccountResult, - TypeVariant::PaymentResultCode, - TypeVariant::PaymentResult, - TypeVariant::PathPaymentStrictReceiveResultCode, - TypeVariant::SimplePaymentResult, - TypeVariant::PathPaymentStrictReceiveResult, - TypeVariant::PathPaymentStrictReceiveResultSuccess, - TypeVariant::PathPaymentStrictSendResultCode, - TypeVariant::PathPaymentStrictSendResult, - TypeVariant::PathPaymentStrictSendResultSuccess, - TypeVariant::ManageSellOfferResultCode, - TypeVariant::ManageOfferEffect, - TypeVariant::ManageOfferSuccessResult, - TypeVariant::ManageOfferSuccessResultOffer, - TypeVariant::ManageSellOfferResult, - TypeVariant::ManageBuyOfferResultCode, - TypeVariant::ManageBuyOfferResult, - TypeVariant::SetOptionsResultCode, - TypeVariant::SetOptionsResult, - TypeVariant::ChangeTrustResultCode, - TypeVariant::ChangeTrustResult, - TypeVariant::AllowTrustResultCode, - TypeVariant::AllowTrustResult, - TypeVariant::AccountMergeResultCode, - TypeVariant::AccountMergeResult, - TypeVariant::InflationResultCode, - TypeVariant::InflationPayout, - TypeVariant::InflationResult, - TypeVariant::ManageDataResultCode, - TypeVariant::ManageDataResult, - TypeVariant::BumpSequenceResultCode, - TypeVariant::BumpSequenceResult, - TypeVariant::CreateClaimableBalanceResultCode, - TypeVariant::CreateClaimableBalanceResult, - TypeVariant::ClaimClaimableBalanceResultCode, - TypeVariant::ClaimClaimableBalanceResult, - TypeVariant::BeginSponsoringFutureReservesResultCode, - TypeVariant::BeginSponsoringFutureReservesResult, - TypeVariant::EndSponsoringFutureReservesResultCode, - TypeVariant::EndSponsoringFutureReservesResult, - TypeVariant::RevokeSponsorshipResultCode, - TypeVariant::RevokeSponsorshipResult, - TypeVariant::ClawbackResultCode, - TypeVariant::ClawbackResult, - TypeVariant::ClawbackClaimableBalanceResultCode, - TypeVariant::ClawbackClaimableBalanceResult, - TypeVariant::SetTrustLineFlagsResultCode, - TypeVariant::SetTrustLineFlagsResult, - TypeVariant::LiquidityPoolDepositResultCode, - TypeVariant::LiquidityPoolDepositResult, - TypeVariant::LiquidityPoolWithdrawResultCode, - TypeVariant::LiquidityPoolWithdrawResult, - TypeVariant::InvokeHostFunctionResultCode, - TypeVariant::InvokeHostFunctionResult, - TypeVariant::ExtendFootprintTtlResultCode, - TypeVariant::ExtendFootprintTtlResult, - TypeVariant::RestoreFootprintResultCode, - TypeVariant::RestoreFootprintResult, - TypeVariant::OperationResultCode, - TypeVariant::OperationResult, - TypeVariant::OperationResultTr, - TypeVariant::TransactionResultCode, - TypeVariant::InnerTransactionResult, - TypeVariant::InnerTransactionResultResult, - TypeVariant::InnerTransactionResultExt, - TypeVariant::InnerTransactionResultPair, - TypeVariant::TransactionResult, - TypeVariant::TransactionResultResult, - TypeVariant::TransactionResultExt, - TypeVariant::Hash, - TypeVariant::Uint256, - TypeVariant::Uint32, - TypeVariant::Int32, - TypeVariant::Uint64, - TypeVariant::Int64, - TypeVariant::TimePoint, - TypeVariant::Duration, - TypeVariant::ExtensionPoint, - TypeVariant::CryptoKeyType, - TypeVariant::PublicKeyType, - TypeVariant::SignerKeyType, - TypeVariant::PublicKey, - TypeVariant::SignerKey, - TypeVariant::SignerKeyEd25519SignedPayload, - TypeVariant::Signature, - TypeVariant::SignatureHint, - TypeVariant::NodeId, - TypeVariant::AccountId, - TypeVariant::ContractId, - TypeVariant::Curve25519Secret, - TypeVariant::Curve25519Public, - TypeVariant::HmacSha256Key, - TypeVariant::HmacSha256Mac, - TypeVariant::ShortHashSeed, - TypeVariant::BinaryFuseFilterType, - TypeVariant::SerializedBinaryFuseFilter, - TypeVariant::PoolId, - TypeVariant::ClaimableBalanceIdType, - TypeVariant::ClaimableBalanceId, - ]; + pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; const _VARIANTS_STR: &[&str] = &[ "Value", "ScpBallot", @@ -56924,7 +52391,2687 @@ impl Type { "ClaimableBalanceIdType", "ClaimableBalanceId", ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = [ + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; + + #[must_use] + #[allow(clippy::too_many_lines)] + pub const fn name(&self) -> &'static str { + match self { + Self::Value => "Value", + Self::ScpBallot => "ScpBallot", + Self::ScpStatementType => "ScpStatementType", + Self::ScpNomination => "ScpNomination", + Self::ScpStatement => "ScpStatement", + Self::ScpStatementPledges => "ScpStatementPledges", + Self::ScpStatementPrepare => "ScpStatementPrepare", + Self::ScpStatementConfirm => "ScpStatementConfirm", + Self::ScpStatementExternalize => "ScpStatementExternalize", + Self::ScpEnvelope => "ScpEnvelope", + Self::ScpQuorumSet => "ScpQuorumSet", + Self::EncodedLedgerKey => "EncodedLedgerKey", + Self::ConfigSettingContractExecutionLanesV0 => "ConfigSettingContractExecutionLanesV0", + Self::ConfigSettingContractComputeV0 => "ConfigSettingContractComputeV0", + Self::ConfigSettingContractParallelComputeV0 => { + "ConfigSettingContractParallelComputeV0" + } + Self::ConfigSettingContractLedgerCostV0 => "ConfigSettingContractLedgerCostV0", + Self::ConfigSettingContractLedgerCostExtV0 => "ConfigSettingContractLedgerCostExtV0", + Self::ConfigSettingContractHistoricalDataV0 => "ConfigSettingContractHistoricalDataV0", + Self::ConfigSettingContractEventsV0 => "ConfigSettingContractEventsV0", + Self::ConfigSettingContractBandwidthV0 => "ConfigSettingContractBandwidthV0", + Self::ContractCostType => "ContractCostType", + Self::ContractCostParamEntry => "ContractCostParamEntry", + Self::StateArchivalSettings => "StateArchivalSettings", + Self::EvictionIterator => "EvictionIterator", + Self::ConfigSettingScpTiming => "ConfigSettingScpTiming", + Self::FrozenLedgerKeys => "FrozenLedgerKeys", + Self::FrozenLedgerKeysDelta => "FrozenLedgerKeysDelta", + Self::FreezeBypassTxs => "FreezeBypassTxs", + Self::FreezeBypassTxsDelta => "FreezeBypassTxsDelta", + Self::ContractCostParams => "ContractCostParams", + Self::ConfigSettingId => "ConfigSettingId", + Self::ConfigSettingEntry => "ConfigSettingEntry", + Self::ScEnvMetaKind => "ScEnvMetaKind", + Self::ScEnvMetaEntry => "ScEnvMetaEntry", + Self::ScEnvMetaEntryInterfaceVersion => "ScEnvMetaEntryInterfaceVersion", + Self::ScMetaV0 => "ScMetaV0", + Self::ScMetaKind => "ScMetaKind", + Self::ScMetaEntry => "ScMetaEntry", + Self::ScSpecType => "ScSpecType", + Self::ScSpecTypeOption => "ScSpecTypeOption", + Self::ScSpecTypeResult => "ScSpecTypeResult", + Self::ScSpecTypeVec => "ScSpecTypeVec", + Self::ScSpecTypeMap => "ScSpecTypeMap", + Self::ScSpecTypeTuple => "ScSpecTypeTuple", + Self::ScSpecTypeBytesN => "ScSpecTypeBytesN", + Self::ScSpecTypeUdt => "ScSpecTypeUdt", + Self::ScSpecTypeDef => "ScSpecTypeDef", + Self::ScSpecUdtStructFieldV0 => "ScSpecUdtStructFieldV0", + Self::ScSpecUdtStructV0 => "ScSpecUdtStructV0", + Self::ScSpecUdtUnionCaseVoidV0 => "ScSpecUdtUnionCaseVoidV0", + Self::ScSpecUdtUnionCaseTupleV0 => "ScSpecUdtUnionCaseTupleV0", + Self::ScSpecUdtUnionCaseV0Kind => "ScSpecUdtUnionCaseV0Kind", + Self::ScSpecUdtUnionCaseV0 => "ScSpecUdtUnionCaseV0", + Self::ScSpecUdtUnionV0 => "ScSpecUdtUnionV0", + Self::ScSpecUdtEnumCaseV0 => "ScSpecUdtEnumCaseV0", + Self::ScSpecUdtEnumV0 => "ScSpecUdtEnumV0", + Self::ScSpecUdtErrorEnumCaseV0 => "ScSpecUdtErrorEnumCaseV0", + Self::ScSpecUdtErrorEnumV0 => "ScSpecUdtErrorEnumV0", + Self::ScSpecFunctionInputV0 => "ScSpecFunctionInputV0", + Self::ScSpecFunctionV0 => "ScSpecFunctionV0", + Self::ScSpecEventParamLocationV0 => "ScSpecEventParamLocationV0", + Self::ScSpecEventParamV0 => "ScSpecEventParamV0", + Self::ScSpecEventDataFormat => "ScSpecEventDataFormat", + Self::ScSpecEventV0 => "ScSpecEventV0", + Self::ScSpecEntryKind => "ScSpecEntryKind", + Self::ScSpecEntry => "ScSpecEntry", + Self::ScValType => "ScValType", + Self::ScErrorType => "ScErrorType", + Self::ScErrorCode => "ScErrorCode", + Self::ScError => "ScError", + Self::UInt128Parts => "UInt128Parts", + Self::Int128Parts => "Int128Parts", + Self::UInt256Parts => "UInt256Parts", + Self::Int256Parts => "Int256Parts", + Self::ContractExecutableType => "ContractExecutableType", + Self::ContractExecutable => "ContractExecutable", + Self::ScAddressType => "ScAddressType", + Self::MuxedEd25519Account => "MuxedEd25519Account", + Self::ScAddress => "ScAddress", + Self::ScVec => "ScVec", + Self::ScMap => "ScMap", + Self::ScBytes => "ScBytes", + Self::ScString => "ScString", + Self::ScSymbol => "ScSymbol", + Self::ScNonceKey => "ScNonceKey", + Self::ScContractInstance => "ScContractInstance", + Self::ScVal => "ScVal", + Self::ScMapEntry => "ScMapEntry", + Self::LedgerCloseMetaBatch => "LedgerCloseMetaBatch", + Self::StoredTransactionSet => "StoredTransactionSet", + Self::StoredDebugTransactionSet => "StoredDebugTransactionSet", + Self::PersistedScpStateV0 => "PersistedScpStateV0", + Self::PersistedScpStateV1 => "PersistedScpStateV1", + Self::PersistedScpState => "PersistedScpState", + Self::Thresholds => "Thresholds", + Self::String32 => "String32", + Self::String64 => "String64", + Self::SequenceNumber => "SequenceNumber", + Self::DataValue => "DataValue", + Self::AssetCode4 => "AssetCode4", + Self::AssetCode12 => "AssetCode12", + Self::AssetType => "AssetType", + Self::AssetCode => "AssetCode", + Self::AlphaNum4 => "AlphaNum4", + Self::AlphaNum12 => "AlphaNum12", + Self::Asset => "Asset", + Self::Price => "Price", + Self::Liabilities => "Liabilities", + Self::ThresholdIndexes => "ThresholdIndexes", + Self::LedgerEntryType => "LedgerEntryType", + Self::Signer => "Signer", + Self::AccountFlags => "AccountFlags", + Self::SponsorshipDescriptor => "SponsorshipDescriptor", + Self::AccountEntryExtensionV3 => "AccountEntryExtensionV3", + Self::AccountEntryExtensionV2 => "AccountEntryExtensionV2", + Self::AccountEntryExtensionV2Ext => "AccountEntryExtensionV2Ext", + Self::AccountEntryExtensionV1 => "AccountEntryExtensionV1", + Self::AccountEntryExtensionV1Ext => "AccountEntryExtensionV1Ext", + Self::AccountEntry => "AccountEntry", + Self::AccountEntryExt => "AccountEntryExt", + Self::TrustLineFlags => "TrustLineFlags", + Self::LiquidityPoolType => "LiquidityPoolType", + Self::TrustLineAsset => "TrustLineAsset", + Self::TrustLineEntryExtensionV2 => "TrustLineEntryExtensionV2", + Self::TrustLineEntryExtensionV2Ext => "TrustLineEntryExtensionV2Ext", + Self::TrustLineEntry => "TrustLineEntry", + Self::TrustLineEntryExt => "TrustLineEntryExt", + Self::TrustLineEntryV1 => "TrustLineEntryV1", + Self::TrustLineEntryV1Ext => "TrustLineEntryV1Ext", + Self::OfferEntryFlags => "OfferEntryFlags", + Self::OfferEntry => "OfferEntry", + Self::OfferEntryExt => "OfferEntryExt", + Self::DataEntry => "DataEntry", + Self::DataEntryExt => "DataEntryExt", + Self::ClaimPredicateType => "ClaimPredicateType", + Self::ClaimPredicate => "ClaimPredicate", + Self::ClaimantType => "ClaimantType", + Self::Claimant => "Claimant", + Self::ClaimantV0 => "ClaimantV0", + Self::ClaimableBalanceFlags => "ClaimableBalanceFlags", + Self::ClaimableBalanceEntryExtensionV1 => "ClaimableBalanceEntryExtensionV1", + Self::ClaimableBalanceEntryExtensionV1Ext => "ClaimableBalanceEntryExtensionV1Ext", + Self::ClaimableBalanceEntry => "ClaimableBalanceEntry", + Self::ClaimableBalanceEntryExt => "ClaimableBalanceEntryExt", + Self::LiquidityPoolConstantProductParameters => { + "LiquidityPoolConstantProductParameters" + } + Self::LiquidityPoolEntry => "LiquidityPoolEntry", + Self::LiquidityPoolEntryBody => "LiquidityPoolEntryBody", + Self::LiquidityPoolEntryConstantProduct => "LiquidityPoolEntryConstantProduct", + Self::ContractDataDurability => "ContractDataDurability", + Self::ContractDataEntry => "ContractDataEntry", + Self::ContractCodeCostInputs => "ContractCodeCostInputs", + Self::ContractCodeEntry => "ContractCodeEntry", + Self::ContractCodeEntryExt => "ContractCodeEntryExt", + Self::ContractCodeEntryV1 => "ContractCodeEntryV1", + Self::TtlEntry => "TtlEntry", + Self::LedgerEntryExtensionV1 => "LedgerEntryExtensionV1", + Self::LedgerEntryExtensionV1Ext => "LedgerEntryExtensionV1Ext", + Self::LedgerEntry => "LedgerEntry", + Self::LedgerEntryData => "LedgerEntryData", + Self::LedgerEntryExt => "LedgerEntryExt", + Self::LedgerKey => "LedgerKey", + Self::LedgerKeyAccount => "LedgerKeyAccount", + Self::LedgerKeyTrustLine => "LedgerKeyTrustLine", + Self::LedgerKeyOffer => "LedgerKeyOffer", + Self::LedgerKeyData => "LedgerKeyData", + Self::LedgerKeyClaimableBalance => "LedgerKeyClaimableBalance", + Self::LedgerKeyLiquidityPool => "LedgerKeyLiquidityPool", + Self::LedgerKeyContractData => "LedgerKeyContractData", + Self::LedgerKeyContractCode => "LedgerKeyContractCode", + Self::LedgerKeyConfigSetting => "LedgerKeyConfigSetting", + Self::LedgerKeyTtl => "LedgerKeyTtl", + Self::EnvelopeType => "EnvelopeType", + Self::BucketListType => "BucketListType", + Self::BucketEntryType => "BucketEntryType", + Self::HotArchiveBucketEntryType => "HotArchiveBucketEntryType", + Self::BucketMetadata => "BucketMetadata", + Self::BucketMetadataExt => "BucketMetadataExt", + Self::BucketEntry => "BucketEntry", + Self::HotArchiveBucketEntry => "HotArchiveBucketEntry", + Self::UpgradeType => "UpgradeType", + Self::StellarValueType => "StellarValueType", + Self::LedgerCloseValueSignature => "LedgerCloseValueSignature", + Self::StellarValue => "StellarValue", + Self::StellarValueExt => "StellarValueExt", + Self::LedgerHeaderFlags => "LedgerHeaderFlags", + Self::LedgerHeaderExtensionV1 => "LedgerHeaderExtensionV1", + Self::LedgerHeaderExtensionV1Ext => "LedgerHeaderExtensionV1Ext", + Self::LedgerHeader => "LedgerHeader", + Self::LedgerHeaderExt => "LedgerHeaderExt", + Self::LedgerUpgradeType => "LedgerUpgradeType", + Self::ConfigUpgradeSetKey => "ConfigUpgradeSetKey", + Self::LedgerUpgrade => "LedgerUpgrade", + Self::ConfigUpgradeSet => "ConfigUpgradeSet", + Self::TxSetComponentType => "TxSetComponentType", + Self::DependentTxCluster => "DependentTxCluster", + Self::ParallelTxExecutionStage => "ParallelTxExecutionStage", + Self::ParallelTxsComponent => "ParallelTxsComponent", + Self::TxSetComponent => "TxSetComponent", + Self::TxSetComponentTxsMaybeDiscountedFee => "TxSetComponentTxsMaybeDiscountedFee", + Self::TransactionPhase => "TransactionPhase", + Self::TransactionSet => "TransactionSet", + Self::TransactionSetV1 => "TransactionSetV1", + Self::GeneralizedTransactionSet => "GeneralizedTransactionSet", + Self::TransactionResultPair => "TransactionResultPair", + Self::TransactionResultSet => "TransactionResultSet", + Self::TransactionHistoryEntry => "TransactionHistoryEntry", + Self::TransactionHistoryEntryExt => "TransactionHistoryEntryExt", + Self::TransactionHistoryResultEntry => "TransactionHistoryResultEntry", + Self::TransactionHistoryResultEntryExt => "TransactionHistoryResultEntryExt", + Self::LedgerHeaderHistoryEntry => "LedgerHeaderHistoryEntry", + Self::LedgerHeaderHistoryEntryExt => "LedgerHeaderHistoryEntryExt", + Self::LedgerScpMessages => "LedgerScpMessages", + Self::ScpHistoryEntryV0 => "ScpHistoryEntryV0", + Self::ScpHistoryEntry => "ScpHistoryEntry", + Self::LedgerEntryChangeType => "LedgerEntryChangeType", + Self::LedgerEntryChange => "LedgerEntryChange", + Self::LedgerEntryChanges => "LedgerEntryChanges", + Self::OperationMeta => "OperationMeta", + Self::TransactionMetaV1 => "TransactionMetaV1", + Self::TransactionMetaV2 => "TransactionMetaV2", + Self::ContractEventType => "ContractEventType", + Self::ContractEvent => "ContractEvent", + Self::ContractEventBody => "ContractEventBody", + Self::ContractEventV0 => "ContractEventV0", + Self::DiagnosticEvent => "DiagnosticEvent", + Self::SorobanTransactionMetaExtV1 => "SorobanTransactionMetaExtV1", + Self::SorobanTransactionMetaExt => "SorobanTransactionMetaExt", + Self::SorobanTransactionMeta => "SorobanTransactionMeta", + Self::TransactionMetaV3 => "TransactionMetaV3", + Self::OperationMetaV2 => "OperationMetaV2", + Self::SorobanTransactionMetaV2 => "SorobanTransactionMetaV2", + Self::TransactionEventStage => "TransactionEventStage", + Self::TransactionEvent => "TransactionEvent", + Self::TransactionMetaV4 => "TransactionMetaV4", + Self::InvokeHostFunctionSuccessPreImage => "InvokeHostFunctionSuccessPreImage", + Self::TransactionMeta => "TransactionMeta", + Self::TransactionResultMeta => "TransactionResultMeta", + Self::TransactionResultMetaV1 => "TransactionResultMetaV1", + Self::UpgradeEntryMeta => "UpgradeEntryMeta", + Self::LedgerCloseMetaV0 => "LedgerCloseMetaV0", + Self::LedgerCloseMetaExtV1 => "LedgerCloseMetaExtV1", + Self::LedgerCloseMetaExt => "LedgerCloseMetaExt", + Self::LedgerCloseMetaV1 => "LedgerCloseMetaV1", + Self::LedgerCloseMetaV2 => "LedgerCloseMetaV2", + Self::LedgerCloseMeta => "LedgerCloseMeta", + Self::ErrorCode => "ErrorCode", + Self::SError => "SError", + Self::SendMore => "SendMore", + Self::SendMoreExtended => "SendMoreExtended", + Self::AuthCert => "AuthCert", + Self::Hello => "Hello", + Self::Auth => "Auth", + Self::IpAddrType => "IpAddrType", + Self::PeerAddress => "PeerAddress", + Self::PeerAddressIp => "PeerAddressIp", + Self::MessageType => "MessageType", + Self::DontHave => "DontHave", + Self::SurveyMessageCommandType => "SurveyMessageCommandType", + Self::SurveyMessageResponseType => "SurveyMessageResponseType", + Self::TimeSlicedSurveyStartCollectingMessage => { + "TimeSlicedSurveyStartCollectingMessage" + } + Self::SignedTimeSlicedSurveyStartCollectingMessage => { + "SignedTimeSlicedSurveyStartCollectingMessage" + } + Self::TimeSlicedSurveyStopCollectingMessage => "TimeSlicedSurveyStopCollectingMessage", + Self::SignedTimeSlicedSurveyStopCollectingMessage => { + "SignedTimeSlicedSurveyStopCollectingMessage" + } + Self::SurveyRequestMessage => "SurveyRequestMessage", + Self::TimeSlicedSurveyRequestMessage => "TimeSlicedSurveyRequestMessage", + Self::SignedTimeSlicedSurveyRequestMessage => "SignedTimeSlicedSurveyRequestMessage", + Self::EncryptedBody => "EncryptedBody", + Self::SurveyResponseMessage => "SurveyResponseMessage", + Self::TimeSlicedSurveyResponseMessage => "TimeSlicedSurveyResponseMessage", + Self::SignedTimeSlicedSurveyResponseMessage => "SignedTimeSlicedSurveyResponseMessage", + Self::PeerStats => "PeerStats", + Self::TimeSlicedNodeData => "TimeSlicedNodeData", + Self::TimeSlicedPeerData => "TimeSlicedPeerData", + Self::TimeSlicedPeerDataList => "TimeSlicedPeerDataList", + Self::TopologyResponseBodyV2 => "TopologyResponseBodyV2", + Self::SurveyResponseBody => "SurveyResponseBody", + Self::TxAdvertVector => "TxAdvertVector", + Self::FloodAdvert => "FloodAdvert", + Self::TxDemandVector => "TxDemandVector", + Self::FloodDemand => "FloodDemand", + Self::StellarMessage => "StellarMessage", + Self::AuthenticatedMessage => "AuthenticatedMessage", + Self::AuthenticatedMessageV0 => "AuthenticatedMessageV0", + Self::LiquidityPoolParameters => "LiquidityPoolParameters", + Self::MuxedAccount => "MuxedAccount", + Self::MuxedAccountMed25519 => "MuxedAccountMed25519", + Self::DecoratedSignature => "DecoratedSignature", + Self::OperationType => "OperationType", + Self::CreateAccountOp => "CreateAccountOp", + Self::PaymentOp => "PaymentOp", + Self::PathPaymentStrictReceiveOp => "PathPaymentStrictReceiveOp", + Self::PathPaymentStrictSendOp => "PathPaymentStrictSendOp", + Self::ManageSellOfferOp => "ManageSellOfferOp", + Self::ManageBuyOfferOp => "ManageBuyOfferOp", + Self::CreatePassiveSellOfferOp => "CreatePassiveSellOfferOp", + Self::SetOptionsOp => "SetOptionsOp", + Self::ChangeTrustAsset => "ChangeTrustAsset", + Self::ChangeTrustOp => "ChangeTrustOp", + Self::AllowTrustOp => "AllowTrustOp", + Self::ManageDataOp => "ManageDataOp", + Self::BumpSequenceOp => "BumpSequenceOp", + Self::CreateClaimableBalanceOp => "CreateClaimableBalanceOp", + Self::ClaimClaimableBalanceOp => "ClaimClaimableBalanceOp", + Self::BeginSponsoringFutureReservesOp => "BeginSponsoringFutureReservesOp", + Self::RevokeSponsorshipType => "RevokeSponsorshipType", + Self::RevokeSponsorshipOp => "RevokeSponsorshipOp", + Self::RevokeSponsorshipOpSigner => "RevokeSponsorshipOpSigner", + Self::ClawbackOp => "ClawbackOp", + Self::ClawbackClaimableBalanceOp => "ClawbackClaimableBalanceOp", + Self::SetTrustLineFlagsOp => "SetTrustLineFlagsOp", + Self::LiquidityPoolDepositOp => "LiquidityPoolDepositOp", + Self::LiquidityPoolWithdrawOp => "LiquidityPoolWithdrawOp", + Self::HostFunctionType => "HostFunctionType", + Self::ContractIdPreimageType => "ContractIdPreimageType", + Self::ContractIdPreimage => "ContractIdPreimage", + Self::ContractIdPreimageFromAddress => "ContractIdPreimageFromAddress", + Self::CreateContractArgs => "CreateContractArgs", + Self::CreateContractArgsV2 => "CreateContractArgsV2", + Self::InvokeContractArgs => "InvokeContractArgs", + Self::HostFunction => "HostFunction", + Self::SorobanAuthorizedFunctionType => "SorobanAuthorizedFunctionType", + Self::SorobanAuthorizedFunction => "SorobanAuthorizedFunction", + Self::SorobanAuthorizedInvocation => "SorobanAuthorizedInvocation", + Self::SorobanAddressCredentials => "SorobanAddressCredentials", + Self::SorobanCredentialsType => "SorobanCredentialsType", + Self::SorobanCredentials => "SorobanCredentials", + Self::SorobanAuthorizationEntry => "SorobanAuthorizationEntry", + Self::SorobanAuthorizationEntries => "SorobanAuthorizationEntries", + Self::InvokeHostFunctionOp => "InvokeHostFunctionOp", + Self::ExtendFootprintTtlOp => "ExtendFootprintTtlOp", + Self::RestoreFootprintOp => "RestoreFootprintOp", + Self::Operation => "Operation", + Self::OperationBody => "OperationBody", + Self::HashIdPreimage => "HashIdPreimage", + Self::HashIdPreimageOperationId => "HashIdPreimageOperationId", + Self::HashIdPreimageRevokeId => "HashIdPreimageRevokeId", + Self::HashIdPreimageContractId => "HashIdPreimageContractId", + Self::HashIdPreimageSorobanAuthorization => "HashIdPreimageSorobanAuthorization", + Self::MemoType => "MemoType", + Self::Memo => "Memo", + Self::TimeBounds => "TimeBounds", + Self::LedgerBounds => "LedgerBounds", + Self::PreconditionsV2 => "PreconditionsV2", + Self::PreconditionType => "PreconditionType", + Self::Preconditions => "Preconditions", + Self::LedgerFootprint => "LedgerFootprint", + Self::SorobanResources => "SorobanResources", + Self::SorobanResourcesExtV0 => "SorobanResourcesExtV0", + Self::SorobanTransactionData => "SorobanTransactionData", + Self::SorobanTransactionDataExt => "SorobanTransactionDataExt", + Self::TransactionV0 => "TransactionV0", + Self::TransactionV0Ext => "TransactionV0Ext", + Self::TransactionV0Envelope => "TransactionV0Envelope", + Self::Transaction => "Transaction", + Self::TransactionExt => "TransactionExt", + Self::TransactionV1Envelope => "TransactionV1Envelope", + Self::FeeBumpTransaction => "FeeBumpTransaction", + Self::FeeBumpTransactionInnerTx => "FeeBumpTransactionInnerTx", + Self::FeeBumpTransactionExt => "FeeBumpTransactionExt", + Self::FeeBumpTransactionEnvelope => "FeeBumpTransactionEnvelope", + Self::TransactionEnvelope => "TransactionEnvelope", + Self::TransactionSignaturePayload => "TransactionSignaturePayload", + Self::TransactionSignaturePayloadTaggedTransaction => { + "TransactionSignaturePayloadTaggedTransaction" + } + Self::ClaimAtomType => "ClaimAtomType", + Self::ClaimOfferAtomV0 => "ClaimOfferAtomV0", + Self::ClaimOfferAtom => "ClaimOfferAtom", + Self::ClaimLiquidityAtom => "ClaimLiquidityAtom", + Self::ClaimAtom => "ClaimAtom", + Self::CreateAccountResultCode => "CreateAccountResultCode", + Self::CreateAccountResult => "CreateAccountResult", + Self::PaymentResultCode => "PaymentResultCode", + Self::PaymentResult => "PaymentResult", + Self::PathPaymentStrictReceiveResultCode => "PathPaymentStrictReceiveResultCode", + Self::SimplePaymentResult => "SimplePaymentResult", + Self::PathPaymentStrictReceiveResult => "PathPaymentStrictReceiveResult", + Self::PathPaymentStrictReceiveResultSuccess => "PathPaymentStrictReceiveResultSuccess", + Self::PathPaymentStrictSendResultCode => "PathPaymentStrictSendResultCode", + Self::PathPaymentStrictSendResult => "PathPaymentStrictSendResult", + Self::PathPaymentStrictSendResultSuccess => "PathPaymentStrictSendResultSuccess", + Self::ManageSellOfferResultCode => "ManageSellOfferResultCode", + Self::ManageOfferEffect => "ManageOfferEffect", + Self::ManageOfferSuccessResult => "ManageOfferSuccessResult", + Self::ManageOfferSuccessResultOffer => "ManageOfferSuccessResultOffer", + Self::ManageSellOfferResult => "ManageSellOfferResult", + Self::ManageBuyOfferResultCode => "ManageBuyOfferResultCode", + Self::ManageBuyOfferResult => "ManageBuyOfferResult", + Self::SetOptionsResultCode => "SetOptionsResultCode", + Self::SetOptionsResult => "SetOptionsResult", + Self::ChangeTrustResultCode => "ChangeTrustResultCode", + Self::ChangeTrustResult => "ChangeTrustResult", + Self::AllowTrustResultCode => "AllowTrustResultCode", + Self::AllowTrustResult => "AllowTrustResult", + Self::AccountMergeResultCode => "AccountMergeResultCode", + Self::AccountMergeResult => "AccountMergeResult", + Self::InflationResultCode => "InflationResultCode", + Self::InflationPayout => "InflationPayout", + Self::InflationResult => "InflationResult", + Self::ManageDataResultCode => "ManageDataResultCode", + Self::ManageDataResult => "ManageDataResult", + Self::BumpSequenceResultCode => "BumpSequenceResultCode", + Self::BumpSequenceResult => "BumpSequenceResult", + Self::CreateClaimableBalanceResultCode => "CreateClaimableBalanceResultCode", + Self::CreateClaimableBalanceResult => "CreateClaimableBalanceResult", + Self::ClaimClaimableBalanceResultCode => "ClaimClaimableBalanceResultCode", + Self::ClaimClaimableBalanceResult => "ClaimClaimableBalanceResult", + Self::BeginSponsoringFutureReservesResultCode => { + "BeginSponsoringFutureReservesResultCode" + } + Self::BeginSponsoringFutureReservesResult => "BeginSponsoringFutureReservesResult", + Self::EndSponsoringFutureReservesResultCode => "EndSponsoringFutureReservesResultCode", + Self::EndSponsoringFutureReservesResult => "EndSponsoringFutureReservesResult", + Self::RevokeSponsorshipResultCode => "RevokeSponsorshipResultCode", + Self::RevokeSponsorshipResult => "RevokeSponsorshipResult", + Self::ClawbackResultCode => "ClawbackResultCode", + Self::ClawbackResult => "ClawbackResult", + Self::ClawbackClaimableBalanceResultCode => "ClawbackClaimableBalanceResultCode", + Self::ClawbackClaimableBalanceResult => "ClawbackClaimableBalanceResult", + Self::SetTrustLineFlagsResultCode => "SetTrustLineFlagsResultCode", + Self::SetTrustLineFlagsResult => "SetTrustLineFlagsResult", + Self::LiquidityPoolDepositResultCode => "LiquidityPoolDepositResultCode", + Self::LiquidityPoolDepositResult => "LiquidityPoolDepositResult", + Self::LiquidityPoolWithdrawResultCode => "LiquidityPoolWithdrawResultCode", + Self::LiquidityPoolWithdrawResult => "LiquidityPoolWithdrawResult", + Self::InvokeHostFunctionResultCode => "InvokeHostFunctionResultCode", + Self::InvokeHostFunctionResult => "InvokeHostFunctionResult", + Self::ExtendFootprintTtlResultCode => "ExtendFootprintTtlResultCode", + Self::ExtendFootprintTtlResult => "ExtendFootprintTtlResult", + Self::RestoreFootprintResultCode => "RestoreFootprintResultCode", + Self::RestoreFootprintResult => "RestoreFootprintResult", + Self::OperationResultCode => "OperationResultCode", + Self::OperationResult => "OperationResult", + Self::OperationResultTr => "OperationResultTr", + Self::TransactionResultCode => "TransactionResultCode", + Self::InnerTransactionResult => "InnerTransactionResult", + Self::InnerTransactionResultResult => "InnerTransactionResultResult", + Self::InnerTransactionResultExt => "InnerTransactionResultExt", + Self::InnerTransactionResultPair => "InnerTransactionResultPair", + Self::TransactionResult => "TransactionResult", + Self::TransactionResultResult => "TransactionResultResult", + Self::TransactionResultExt => "TransactionResultExt", + Self::Hash => "Hash", + Self::Uint256 => "Uint256", + Self::Uint32 => "Uint32", + Self::Int32 => "Int32", + Self::Uint64 => "Uint64", + Self::Int64 => "Int64", + Self::TimePoint => "TimePoint", + Self::Duration => "Duration", + Self::ExtensionPoint => "ExtensionPoint", + Self::CryptoKeyType => "CryptoKeyType", + Self::PublicKeyType => "PublicKeyType", + Self::SignerKeyType => "SignerKeyType", + Self::PublicKey => "PublicKey", + Self::SignerKey => "SignerKey", + Self::SignerKeyEd25519SignedPayload => "SignerKeyEd25519SignedPayload", + Self::Signature => "Signature", + Self::SignatureHint => "SignatureHint", + Self::NodeId => "NodeId", + Self::AccountId => "AccountId", + Self::ContractId => "ContractId", + Self::Curve25519Secret => "Curve25519Secret", + Self::Curve25519Public => "Curve25519Public", + Self::HmacSha256Key => "HmacSha256Key", + Self::HmacSha256Mac => "HmacSha256Mac", + Self::ShortHashSeed => "ShortHashSeed", + Self::BinaryFuseFilterType => "BinaryFuseFilterType", + Self::SerializedBinaryFuseFilter => "SerializedBinaryFuseFilter", + Self::PoolId => "PoolId", + Self::ClaimableBalanceIdType => "ClaimableBalanceIdType", + Self::ClaimableBalanceId => "ClaimableBalanceId", + } + } + + #[must_use] + #[allow(clippy::too_many_lines)] + pub const fn variants() -> [TypeVariant; Self::_VARIANTS.len()] { + Self::VARIANTS + } + + #[cfg(feature = "schemars")] + #[must_use] + #[allow(clippy::too_many_lines)] + pub fn json_schema(&self, gen: schemars::gen::SchemaGenerator) -> schemars::schema::RootSchema { + match self { + Self::Value => gen.into_root_schema_for::(), + Self::ScpBallot => gen.into_root_schema_for::(), + Self::ScpStatementType => gen.into_root_schema_for::(), + Self::ScpNomination => gen.into_root_schema_for::(), + Self::ScpStatement => gen.into_root_schema_for::(), + Self::ScpStatementPledges => gen.into_root_schema_for::(), + Self::ScpStatementPrepare => gen.into_root_schema_for::(), + Self::ScpStatementConfirm => gen.into_root_schema_for::(), + Self::ScpStatementExternalize => gen.into_root_schema_for::(), + Self::ScpEnvelope => gen.into_root_schema_for::(), + Self::ScpQuorumSet => gen.into_root_schema_for::(), + Self::EncodedLedgerKey => gen.into_root_schema_for::(), + Self::ConfigSettingContractExecutionLanesV0 => { + gen.into_root_schema_for::() + } + Self::ConfigSettingContractComputeV0 => { + gen.into_root_schema_for::() + } + Self::ConfigSettingContractParallelComputeV0 => { + gen.into_root_schema_for::() + } + Self::ConfigSettingContractLedgerCostV0 => { + gen.into_root_schema_for::() + } + Self::ConfigSettingContractLedgerCostExtV0 => { + gen.into_root_schema_for::() + } + Self::ConfigSettingContractHistoricalDataV0 => { + gen.into_root_schema_for::() + } + Self::ConfigSettingContractEventsV0 => { + gen.into_root_schema_for::() + } + Self::ConfigSettingContractBandwidthV0 => { + gen.into_root_schema_for::() + } + Self::ContractCostType => gen.into_root_schema_for::(), + Self::ContractCostParamEntry => gen.into_root_schema_for::(), + Self::StateArchivalSettings => gen.into_root_schema_for::(), + Self::EvictionIterator => gen.into_root_schema_for::(), + Self::ConfigSettingScpTiming => gen.into_root_schema_for::(), + Self::FrozenLedgerKeys => gen.into_root_schema_for::(), + Self::FrozenLedgerKeysDelta => gen.into_root_schema_for::(), + Self::FreezeBypassTxs => gen.into_root_schema_for::(), + Self::FreezeBypassTxsDelta => gen.into_root_schema_for::(), + Self::ContractCostParams => gen.into_root_schema_for::(), + Self::ConfigSettingId => gen.into_root_schema_for::(), + Self::ConfigSettingEntry => gen.into_root_schema_for::(), + Self::ScEnvMetaKind => gen.into_root_schema_for::(), + Self::ScEnvMetaEntry => gen.into_root_schema_for::(), + Self::ScEnvMetaEntryInterfaceVersion => { + gen.into_root_schema_for::() + } + Self::ScMetaV0 => gen.into_root_schema_for::(), + Self::ScMetaKind => gen.into_root_schema_for::(), + Self::ScMetaEntry => gen.into_root_schema_for::(), + Self::ScSpecType => gen.into_root_schema_for::(), + Self::ScSpecTypeOption => gen.into_root_schema_for::(), + Self::ScSpecTypeResult => gen.into_root_schema_for::(), + Self::ScSpecTypeVec => gen.into_root_schema_for::(), + Self::ScSpecTypeMap => gen.into_root_schema_for::(), + Self::ScSpecTypeTuple => gen.into_root_schema_for::(), + Self::ScSpecTypeBytesN => gen.into_root_schema_for::(), + Self::ScSpecTypeUdt => gen.into_root_schema_for::(), + Self::ScSpecTypeDef => gen.into_root_schema_for::(), + Self::ScSpecUdtStructFieldV0 => gen.into_root_schema_for::(), + Self::ScSpecUdtStructV0 => gen.into_root_schema_for::(), + Self::ScSpecUdtUnionCaseVoidV0 => { + gen.into_root_schema_for::() + } + Self::ScSpecUdtUnionCaseTupleV0 => { + gen.into_root_schema_for::() + } + Self::ScSpecUdtUnionCaseV0Kind => { + gen.into_root_schema_for::() + } + Self::ScSpecUdtUnionCaseV0 => gen.into_root_schema_for::(), + Self::ScSpecUdtUnionV0 => gen.into_root_schema_for::(), + Self::ScSpecUdtEnumCaseV0 => gen.into_root_schema_for::(), + Self::ScSpecUdtEnumV0 => gen.into_root_schema_for::(), + Self::ScSpecUdtErrorEnumCaseV0 => { + gen.into_root_schema_for::() + } + Self::ScSpecUdtErrorEnumV0 => gen.into_root_schema_for::(), + Self::ScSpecFunctionInputV0 => gen.into_root_schema_for::(), + Self::ScSpecFunctionV0 => gen.into_root_schema_for::(), + Self::ScSpecEventParamLocationV0 => { + gen.into_root_schema_for::() + } + Self::ScSpecEventParamV0 => gen.into_root_schema_for::(), + Self::ScSpecEventDataFormat => gen.into_root_schema_for::(), + Self::ScSpecEventV0 => gen.into_root_schema_for::(), + Self::ScSpecEntryKind => gen.into_root_schema_for::(), + Self::ScSpecEntry => gen.into_root_schema_for::(), + Self::ScValType => gen.into_root_schema_for::(), + Self::ScErrorType => gen.into_root_schema_for::(), + Self::ScErrorCode => gen.into_root_schema_for::(), + Self::ScError => gen.into_root_schema_for::(), + Self::UInt128Parts => gen.into_root_schema_for::(), + Self::Int128Parts => gen.into_root_schema_for::(), + Self::UInt256Parts => gen.into_root_schema_for::(), + Self::Int256Parts => gen.into_root_schema_for::(), + Self::ContractExecutableType => gen.into_root_schema_for::(), + Self::ContractExecutable => gen.into_root_schema_for::(), + Self::ScAddressType => gen.into_root_schema_for::(), + Self::MuxedEd25519Account => gen.into_root_schema_for::(), + Self::ScAddress => gen.into_root_schema_for::(), + Self::ScVec => gen.into_root_schema_for::(), + Self::ScMap => gen.into_root_schema_for::(), + Self::ScBytes => gen.into_root_schema_for::(), + Self::ScString => gen.into_root_schema_for::(), + Self::ScSymbol => gen.into_root_schema_for::(), + Self::ScNonceKey => gen.into_root_schema_for::(), + Self::ScContractInstance => gen.into_root_schema_for::(), + Self::ScVal => gen.into_root_schema_for::(), + Self::ScMapEntry => gen.into_root_schema_for::(), + Self::LedgerCloseMetaBatch => gen.into_root_schema_for::(), + Self::StoredTransactionSet => gen.into_root_schema_for::(), + Self::StoredDebugTransactionSet => { + gen.into_root_schema_for::() + } + Self::PersistedScpStateV0 => gen.into_root_schema_for::(), + Self::PersistedScpStateV1 => gen.into_root_schema_for::(), + Self::PersistedScpState => gen.into_root_schema_for::(), + Self::Thresholds => gen.into_root_schema_for::(), + Self::String32 => gen.into_root_schema_for::(), + Self::String64 => gen.into_root_schema_for::(), + Self::SequenceNumber => gen.into_root_schema_for::(), + Self::DataValue => gen.into_root_schema_for::(), + Self::AssetCode4 => gen.into_root_schema_for::(), + Self::AssetCode12 => gen.into_root_schema_for::(), + Self::AssetType => gen.into_root_schema_for::(), + Self::AssetCode => gen.into_root_schema_for::(), + Self::AlphaNum4 => gen.into_root_schema_for::(), + Self::AlphaNum12 => gen.into_root_schema_for::(), + Self::Asset => gen.into_root_schema_for::(), + Self::Price => gen.into_root_schema_for::(), + Self::Liabilities => gen.into_root_schema_for::(), + Self::ThresholdIndexes => gen.into_root_schema_for::(), + Self::LedgerEntryType => gen.into_root_schema_for::(), + Self::Signer => gen.into_root_schema_for::(), + Self::AccountFlags => gen.into_root_schema_for::(), + Self::SponsorshipDescriptor => gen.into_root_schema_for::(), + Self::AccountEntryExtensionV3 => gen.into_root_schema_for::(), + Self::AccountEntryExtensionV2 => gen.into_root_schema_for::(), + Self::AccountEntryExtensionV2Ext => { + gen.into_root_schema_for::() + } + Self::AccountEntryExtensionV1 => gen.into_root_schema_for::(), + Self::AccountEntryExtensionV1Ext => { + gen.into_root_schema_for::() + } + Self::AccountEntry => gen.into_root_schema_for::(), + Self::AccountEntryExt => gen.into_root_schema_for::(), + Self::TrustLineFlags => gen.into_root_schema_for::(), + Self::LiquidityPoolType => gen.into_root_schema_for::(), + Self::TrustLineAsset => gen.into_root_schema_for::(), + Self::TrustLineEntryExtensionV2 => { + gen.into_root_schema_for::() + } + Self::TrustLineEntryExtensionV2Ext => { + gen.into_root_schema_for::() + } + Self::TrustLineEntry => gen.into_root_schema_for::(), + Self::TrustLineEntryExt => gen.into_root_schema_for::(), + Self::TrustLineEntryV1 => gen.into_root_schema_for::(), + Self::TrustLineEntryV1Ext => gen.into_root_schema_for::(), + Self::OfferEntryFlags => gen.into_root_schema_for::(), + Self::OfferEntry => gen.into_root_schema_for::(), + Self::OfferEntryExt => gen.into_root_schema_for::(), + Self::DataEntry => gen.into_root_schema_for::(), + Self::DataEntryExt => gen.into_root_schema_for::(), + Self::ClaimPredicateType => gen.into_root_schema_for::(), + Self::ClaimPredicate => gen.into_root_schema_for::(), + Self::ClaimantType => gen.into_root_schema_for::(), + Self::Claimant => gen.into_root_schema_for::(), + Self::ClaimantV0 => gen.into_root_schema_for::(), + Self::ClaimableBalanceFlags => gen.into_root_schema_for::(), + Self::ClaimableBalanceEntryExtensionV1 => { + gen.into_root_schema_for::() + } + Self::ClaimableBalanceEntryExtensionV1Ext => { + gen.into_root_schema_for::() + } + Self::ClaimableBalanceEntry => gen.into_root_schema_for::(), + Self::ClaimableBalanceEntryExt => { + gen.into_root_schema_for::() + } + Self::LiquidityPoolConstantProductParameters => { + gen.into_root_schema_for::() + } + Self::LiquidityPoolEntry => gen.into_root_schema_for::(), + Self::LiquidityPoolEntryBody => gen.into_root_schema_for::(), + Self::LiquidityPoolEntryConstantProduct => { + gen.into_root_schema_for::() + } + Self::ContractDataDurability => gen.into_root_schema_for::(), + Self::ContractDataEntry => gen.into_root_schema_for::(), + Self::ContractCodeCostInputs => gen.into_root_schema_for::(), + Self::ContractCodeEntry => gen.into_root_schema_for::(), + Self::ContractCodeEntryExt => gen.into_root_schema_for::(), + Self::ContractCodeEntryV1 => gen.into_root_schema_for::(), + Self::TtlEntry => gen.into_root_schema_for::(), + Self::LedgerEntryExtensionV1 => gen.into_root_schema_for::(), + Self::LedgerEntryExtensionV1Ext => { + gen.into_root_schema_for::() + } + Self::LedgerEntry => gen.into_root_schema_for::(), + Self::LedgerEntryData => gen.into_root_schema_for::(), + Self::LedgerEntryExt => gen.into_root_schema_for::(), + Self::LedgerKey => gen.into_root_schema_for::(), + Self::LedgerKeyAccount => gen.into_root_schema_for::(), + Self::LedgerKeyTrustLine => gen.into_root_schema_for::(), + Self::LedgerKeyOffer => gen.into_root_schema_for::(), + Self::LedgerKeyData => gen.into_root_schema_for::(), + Self::LedgerKeyClaimableBalance => { + gen.into_root_schema_for::() + } + Self::LedgerKeyLiquidityPool => gen.into_root_schema_for::(), + Self::LedgerKeyContractData => gen.into_root_schema_for::(), + Self::LedgerKeyContractCode => gen.into_root_schema_for::(), + Self::LedgerKeyConfigSetting => gen.into_root_schema_for::(), + Self::LedgerKeyTtl => gen.into_root_schema_for::(), + Self::EnvelopeType => gen.into_root_schema_for::(), + Self::BucketListType => gen.into_root_schema_for::(), + Self::BucketEntryType => gen.into_root_schema_for::(), + Self::HotArchiveBucketEntryType => { + gen.into_root_schema_for::() + } + Self::BucketMetadata => gen.into_root_schema_for::(), + Self::BucketMetadataExt => gen.into_root_schema_for::(), + Self::BucketEntry => gen.into_root_schema_for::(), + Self::HotArchiveBucketEntry => gen.into_root_schema_for::(), + Self::UpgradeType => gen.into_root_schema_for::(), + Self::StellarValueType => gen.into_root_schema_for::(), + Self::LedgerCloseValueSignature => { + gen.into_root_schema_for::() + } + Self::StellarValue => gen.into_root_schema_for::(), + Self::StellarValueExt => gen.into_root_schema_for::(), + Self::LedgerHeaderFlags => gen.into_root_schema_for::(), + Self::LedgerHeaderExtensionV1 => gen.into_root_schema_for::(), + Self::LedgerHeaderExtensionV1Ext => { + gen.into_root_schema_for::() + } + Self::LedgerHeader => gen.into_root_schema_for::(), + Self::LedgerHeaderExt => gen.into_root_schema_for::(), + Self::LedgerUpgradeType => gen.into_root_schema_for::(), + Self::ConfigUpgradeSetKey => gen.into_root_schema_for::(), + Self::LedgerUpgrade => gen.into_root_schema_for::(), + Self::ConfigUpgradeSet => gen.into_root_schema_for::(), + Self::TxSetComponentType => gen.into_root_schema_for::(), + Self::DependentTxCluster => gen.into_root_schema_for::(), + Self::ParallelTxExecutionStage => { + gen.into_root_schema_for::() + } + Self::ParallelTxsComponent => gen.into_root_schema_for::(), + Self::TxSetComponent => gen.into_root_schema_for::(), + Self::TxSetComponentTxsMaybeDiscountedFee => { + gen.into_root_schema_for::() + } + Self::TransactionPhase => gen.into_root_schema_for::(), + Self::TransactionSet => gen.into_root_schema_for::(), + Self::TransactionSetV1 => gen.into_root_schema_for::(), + Self::GeneralizedTransactionSet => { + gen.into_root_schema_for::() + } + Self::TransactionResultPair => gen.into_root_schema_for::(), + Self::TransactionResultSet => gen.into_root_schema_for::(), + Self::TransactionHistoryEntry => gen.into_root_schema_for::(), + Self::TransactionHistoryEntryExt => { + gen.into_root_schema_for::() + } + Self::TransactionHistoryResultEntry => { + gen.into_root_schema_for::() + } + Self::TransactionHistoryResultEntryExt => { + gen.into_root_schema_for::() + } + Self::LedgerHeaderHistoryEntry => { + gen.into_root_schema_for::() + } + Self::LedgerHeaderHistoryEntryExt => { + gen.into_root_schema_for::() + } + Self::LedgerScpMessages => gen.into_root_schema_for::(), + Self::ScpHistoryEntryV0 => gen.into_root_schema_for::(), + Self::ScpHistoryEntry => gen.into_root_schema_for::(), + Self::LedgerEntryChangeType => gen.into_root_schema_for::(), + Self::LedgerEntryChange => gen.into_root_schema_for::(), + Self::LedgerEntryChanges => gen.into_root_schema_for::(), + Self::OperationMeta => gen.into_root_schema_for::(), + Self::TransactionMetaV1 => gen.into_root_schema_for::(), + Self::TransactionMetaV2 => gen.into_root_schema_for::(), + Self::ContractEventType => gen.into_root_schema_for::(), + Self::ContractEvent => gen.into_root_schema_for::(), + Self::ContractEventBody => gen.into_root_schema_for::(), + Self::ContractEventV0 => gen.into_root_schema_for::(), + Self::DiagnosticEvent => gen.into_root_schema_for::(), + Self::SorobanTransactionMetaExtV1 => { + gen.into_root_schema_for::() + } + Self::SorobanTransactionMetaExt => { + gen.into_root_schema_for::() + } + Self::SorobanTransactionMeta => gen.into_root_schema_for::(), + Self::TransactionMetaV3 => gen.into_root_schema_for::(), + Self::OperationMetaV2 => gen.into_root_schema_for::(), + Self::SorobanTransactionMetaV2 => { + gen.into_root_schema_for::() + } + Self::TransactionEventStage => gen.into_root_schema_for::(), + Self::TransactionEvent => gen.into_root_schema_for::(), + Self::TransactionMetaV4 => gen.into_root_schema_for::(), + Self::InvokeHostFunctionSuccessPreImage => { + gen.into_root_schema_for::() + } + Self::TransactionMeta => gen.into_root_schema_for::(), + Self::TransactionResultMeta => gen.into_root_schema_for::(), + Self::TransactionResultMetaV1 => gen.into_root_schema_for::(), + Self::UpgradeEntryMeta => gen.into_root_schema_for::(), + Self::LedgerCloseMetaV0 => gen.into_root_schema_for::(), + Self::LedgerCloseMetaExtV1 => gen.into_root_schema_for::(), + Self::LedgerCloseMetaExt => gen.into_root_schema_for::(), + Self::LedgerCloseMetaV1 => gen.into_root_schema_for::(), + Self::LedgerCloseMetaV2 => gen.into_root_schema_for::(), + Self::LedgerCloseMeta => gen.into_root_schema_for::(), + Self::ErrorCode => gen.into_root_schema_for::(), + Self::SError => gen.into_root_schema_for::(), + Self::SendMore => gen.into_root_schema_for::(), + Self::SendMoreExtended => gen.into_root_schema_for::(), + Self::AuthCert => gen.into_root_schema_for::(), + Self::Hello => gen.into_root_schema_for::(), + Self::Auth => gen.into_root_schema_for::(), + Self::IpAddrType => gen.into_root_schema_for::(), + Self::PeerAddress => gen.into_root_schema_for::(), + Self::PeerAddressIp => gen.into_root_schema_for::(), + Self::MessageType => gen.into_root_schema_for::(), + Self::DontHave => gen.into_root_schema_for::(), + Self::SurveyMessageCommandType => { + gen.into_root_schema_for::() + } + Self::SurveyMessageResponseType => { + gen.into_root_schema_for::() + } + Self::TimeSlicedSurveyStartCollectingMessage => { + gen.into_root_schema_for::() + } + Self::SignedTimeSlicedSurveyStartCollectingMessage => { + gen.into_root_schema_for::() + } + Self::TimeSlicedSurveyStopCollectingMessage => { + gen.into_root_schema_for::() + } + Self::SignedTimeSlicedSurveyStopCollectingMessage => { + gen.into_root_schema_for::() + } + Self::SurveyRequestMessage => gen.into_root_schema_for::(), + Self::TimeSlicedSurveyRequestMessage => { + gen.into_root_schema_for::() + } + Self::SignedTimeSlicedSurveyRequestMessage => { + gen.into_root_schema_for::() + } + Self::EncryptedBody => gen.into_root_schema_for::(), + Self::SurveyResponseMessage => gen.into_root_schema_for::(), + Self::TimeSlicedSurveyResponseMessage => { + gen.into_root_schema_for::() + } + Self::SignedTimeSlicedSurveyResponseMessage => { + gen.into_root_schema_for::() + } + Self::PeerStats => gen.into_root_schema_for::(), + Self::TimeSlicedNodeData => gen.into_root_schema_for::(), + Self::TimeSlicedPeerData => gen.into_root_schema_for::(), + Self::TimeSlicedPeerDataList => gen.into_root_schema_for::(), + Self::TopologyResponseBodyV2 => gen.into_root_schema_for::(), + Self::SurveyResponseBody => gen.into_root_schema_for::(), + Self::TxAdvertVector => gen.into_root_schema_for::(), + Self::FloodAdvert => gen.into_root_schema_for::(), + Self::TxDemandVector => gen.into_root_schema_for::(), + Self::FloodDemand => gen.into_root_schema_for::(), + Self::StellarMessage => gen.into_root_schema_for::(), + Self::AuthenticatedMessage => gen.into_root_schema_for::(), + Self::AuthenticatedMessageV0 => gen.into_root_schema_for::(), + Self::LiquidityPoolParameters => gen.into_root_schema_for::(), + Self::MuxedAccount => gen.into_root_schema_for::(), + Self::MuxedAccountMed25519 => gen.into_root_schema_for::(), + Self::DecoratedSignature => gen.into_root_schema_for::(), + Self::OperationType => gen.into_root_schema_for::(), + Self::CreateAccountOp => gen.into_root_schema_for::(), + Self::PaymentOp => gen.into_root_schema_for::(), + Self::PathPaymentStrictReceiveOp => { + gen.into_root_schema_for::() + } + Self::PathPaymentStrictSendOp => gen.into_root_schema_for::(), + Self::ManageSellOfferOp => gen.into_root_schema_for::(), + Self::ManageBuyOfferOp => gen.into_root_schema_for::(), + Self::CreatePassiveSellOfferOp => { + gen.into_root_schema_for::() + } + Self::SetOptionsOp => gen.into_root_schema_for::(), + Self::ChangeTrustAsset => gen.into_root_schema_for::(), + Self::ChangeTrustOp => gen.into_root_schema_for::(), + Self::AllowTrustOp => gen.into_root_schema_for::(), + Self::ManageDataOp => gen.into_root_schema_for::(), + Self::BumpSequenceOp => gen.into_root_schema_for::(), + Self::CreateClaimableBalanceOp => { + gen.into_root_schema_for::() + } + Self::ClaimClaimableBalanceOp => gen.into_root_schema_for::(), + Self::BeginSponsoringFutureReservesOp => { + gen.into_root_schema_for::() + } + Self::RevokeSponsorshipType => gen.into_root_schema_for::(), + Self::RevokeSponsorshipOp => gen.into_root_schema_for::(), + Self::RevokeSponsorshipOpSigner => { + gen.into_root_schema_for::() + } + Self::ClawbackOp => gen.into_root_schema_for::(), + Self::ClawbackClaimableBalanceOp => { + gen.into_root_schema_for::() + } + Self::SetTrustLineFlagsOp => gen.into_root_schema_for::(), + Self::LiquidityPoolDepositOp => gen.into_root_schema_for::(), + Self::LiquidityPoolWithdrawOp => gen.into_root_schema_for::(), + Self::HostFunctionType => gen.into_root_schema_for::(), + Self::ContractIdPreimageType => gen.into_root_schema_for::(), + Self::ContractIdPreimage => gen.into_root_schema_for::(), + Self::ContractIdPreimageFromAddress => { + gen.into_root_schema_for::() + } + Self::CreateContractArgs => gen.into_root_schema_for::(), + Self::CreateContractArgsV2 => gen.into_root_schema_for::(), + Self::InvokeContractArgs => gen.into_root_schema_for::(), + Self::HostFunction => gen.into_root_schema_for::(), + Self::SorobanAuthorizedFunctionType => { + gen.into_root_schema_for::() + } + Self::SorobanAuthorizedFunction => { + gen.into_root_schema_for::() + } + Self::SorobanAuthorizedInvocation => { + gen.into_root_schema_for::() + } + Self::SorobanAddressCredentials => { + gen.into_root_schema_for::() + } + Self::SorobanCredentialsType => gen.into_root_schema_for::(), + Self::SorobanCredentials => gen.into_root_schema_for::(), + Self::SorobanAuthorizationEntry => { + gen.into_root_schema_for::() + } + Self::SorobanAuthorizationEntries => { + gen.into_root_schema_for::() + } + Self::InvokeHostFunctionOp => gen.into_root_schema_for::(), + Self::ExtendFootprintTtlOp => gen.into_root_schema_for::(), + Self::RestoreFootprintOp => gen.into_root_schema_for::(), + Self::Operation => gen.into_root_schema_for::(), + Self::OperationBody => gen.into_root_schema_for::(), + Self::HashIdPreimage => gen.into_root_schema_for::(), + Self::HashIdPreimageOperationId => { + gen.into_root_schema_for::() + } + Self::HashIdPreimageRevokeId => gen.into_root_schema_for::(), + Self::HashIdPreimageContractId => { + gen.into_root_schema_for::() + } + Self::HashIdPreimageSorobanAuthorization => { + gen.into_root_schema_for::() + } + Self::MemoType => gen.into_root_schema_for::(), + Self::Memo => gen.into_root_schema_for::(), + Self::TimeBounds => gen.into_root_schema_for::(), + Self::LedgerBounds => gen.into_root_schema_for::(), + Self::PreconditionsV2 => gen.into_root_schema_for::(), + Self::PreconditionType => gen.into_root_schema_for::(), + Self::Preconditions => gen.into_root_schema_for::(), + Self::LedgerFootprint => gen.into_root_schema_for::(), + Self::SorobanResources => gen.into_root_schema_for::(), + Self::SorobanResourcesExtV0 => gen.into_root_schema_for::(), + Self::SorobanTransactionData => gen.into_root_schema_for::(), + Self::SorobanTransactionDataExt => { + gen.into_root_schema_for::() + } + Self::TransactionV0 => gen.into_root_schema_for::(), + Self::TransactionV0Ext => gen.into_root_schema_for::(), + Self::TransactionV0Envelope => gen.into_root_schema_for::(), + Self::Transaction => gen.into_root_schema_for::(), + Self::TransactionExt => gen.into_root_schema_for::(), + Self::TransactionV1Envelope => gen.into_root_schema_for::(), + Self::FeeBumpTransaction => gen.into_root_schema_for::(), + Self::FeeBumpTransactionInnerTx => { + gen.into_root_schema_for::() + } + Self::FeeBumpTransactionExt => gen.into_root_schema_for::(), + Self::FeeBumpTransactionEnvelope => { + gen.into_root_schema_for::() + } + Self::TransactionEnvelope => gen.into_root_schema_for::(), + Self::TransactionSignaturePayload => { + gen.into_root_schema_for::() + } + Self::TransactionSignaturePayloadTaggedTransaction => { + gen.into_root_schema_for::() + } + Self::ClaimAtomType => gen.into_root_schema_for::(), + Self::ClaimOfferAtomV0 => gen.into_root_schema_for::(), + Self::ClaimOfferAtom => gen.into_root_schema_for::(), + Self::ClaimLiquidityAtom => gen.into_root_schema_for::(), + Self::ClaimAtom => gen.into_root_schema_for::(), + Self::CreateAccountResultCode => gen.into_root_schema_for::(), + Self::CreateAccountResult => gen.into_root_schema_for::(), + Self::PaymentResultCode => gen.into_root_schema_for::(), + Self::PaymentResult => gen.into_root_schema_for::(), + Self::PathPaymentStrictReceiveResultCode => { + gen.into_root_schema_for::() + } + Self::SimplePaymentResult => gen.into_root_schema_for::(), + Self::PathPaymentStrictReceiveResult => { + gen.into_root_schema_for::() + } + Self::PathPaymentStrictReceiveResultSuccess => { + gen.into_root_schema_for::() + } + Self::PathPaymentStrictSendResultCode => { + gen.into_root_schema_for::() + } + Self::PathPaymentStrictSendResult => { + gen.into_root_schema_for::() + } + Self::PathPaymentStrictSendResultSuccess => { + gen.into_root_schema_for::() + } + Self::ManageSellOfferResultCode => { + gen.into_root_schema_for::() + } + Self::ManageOfferEffect => gen.into_root_schema_for::(), + Self::ManageOfferSuccessResult => { + gen.into_root_schema_for::() + } + Self::ManageOfferSuccessResultOffer => { + gen.into_root_schema_for::() + } + Self::ManageSellOfferResult => gen.into_root_schema_for::(), + Self::ManageBuyOfferResultCode => { + gen.into_root_schema_for::() + } + Self::ManageBuyOfferResult => gen.into_root_schema_for::(), + Self::SetOptionsResultCode => gen.into_root_schema_for::(), + Self::SetOptionsResult => gen.into_root_schema_for::(), + Self::ChangeTrustResultCode => gen.into_root_schema_for::(), + Self::ChangeTrustResult => gen.into_root_schema_for::(), + Self::AllowTrustResultCode => gen.into_root_schema_for::(), + Self::AllowTrustResult => gen.into_root_schema_for::(), + Self::AccountMergeResultCode => gen.into_root_schema_for::(), + Self::AccountMergeResult => gen.into_root_schema_for::(), + Self::InflationResultCode => gen.into_root_schema_for::(), + Self::InflationPayout => gen.into_root_schema_for::(), + Self::InflationResult => gen.into_root_schema_for::(), + Self::ManageDataResultCode => gen.into_root_schema_for::(), + Self::ManageDataResult => gen.into_root_schema_for::(), + Self::BumpSequenceResultCode => gen.into_root_schema_for::(), + Self::BumpSequenceResult => gen.into_root_schema_for::(), + Self::CreateClaimableBalanceResultCode => { + gen.into_root_schema_for::() + } + Self::CreateClaimableBalanceResult => { + gen.into_root_schema_for::() + } + Self::ClaimClaimableBalanceResultCode => { + gen.into_root_schema_for::() + } + Self::ClaimClaimableBalanceResult => { + gen.into_root_schema_for::() + } + Self::BeginSponsoringFutureReservesResultCode => { + gen.into_root_schema_for::() + } + Self::BeginSponsoringFutureReservesResult => { + gen.into_root_schema_for::() + } + Self::EndSponsoringFutureReservesResultCode => { + gen.into_root_schema_for::() + } + Self::EndSponsoringFutureReservesResult => { + gen.into_root_schema_for::() + } + Self::RevokeSponsorshipResultCode => { + gen.into_root_schema_for::() + } + Self::RevokeSponsorshipResult => gen.into_root_schema_for::(), + Self::ClawbackResultCode => gen.into_root_schema_for::(), + Self::ClawbackResult => gen.into_root_schema_for::(), + Self::ClawbackClaimableBalanceResultCode => { + gen.into_root_schema_for::() + } + Self::ClawbackClaimableBalanceResult => { + gen.into_root_schema_for::() + } + Self::SetTrustLineFlagsResultCode => { + gen.into_root_schema_for::() + } + Self::SetTrustLineFlagsResult => gen.into_root_schema_for::(), + Self::LiquidityPoolDepositResultCode => { + gen.into_root_schema_for::() + } + Self::LiquidityPoolDepositResult => { + gen.into_root_schema_for::() + } + Self::LiquidityPoolWithdrawResultCode => { + gen.into_root_schema_for::() + } + Self::LiquidityPoolWithdrawResult => { + gen.into_root_schema_for::() + } + Self::InvokeHostFunctionResultCode => { + gen.into_root_schema_for::() + } + Self::InvokeHostFunctionResult => { + gen.into_root_schema_for::() + } + Self::ExtendFootprintTtlResultCode => { + gen.into_root_schema_for::() + } + Self::ExtendFootprintTtlResult => { + gen.into_root_schema_for::() + } + Self::RestoreFootprintResultCode => { + gen.into_root_schema_for::() + } + Self::RestoreFootprintResult => gen.into_root_schema_for::(), + Self::OperationResultCode => gen.into_root_schema_for::(), + Self::OperationResult => gen.into_root_schema_for::(), + Self::OperationResultTr => gen.into_root_schema_for::(), + Self::TransactionResultCode => gen.into_root_schema_for::(), + Self::InnerTransactionResult => gen.into_root_schema_for::(), + Self::InnerTransactionResultResult => { + gen.into_root_schema_for::() + } + Self::InnerTransactionResultExt => { + gen.into_root_schema_for::() + } + Self::InnerTransactionResultPair => { + gen.into_root_schema_for::() + } + Self::TransactionResult => gen.into_root_schema_for::(), + Self::TransactionResultResult => gen.into_root_schema_for::(), + Self::TransactionResultExt => gen.into_root_schema_for::(), + Self::Hash => gen.into_root_schema_for::(), + Self::Uint256 => gen.into_root_schema_for::(), + Self::Uint32 => gen.into_root_schema_for::(), + Self::Int32 => gen.into_root_schema_for::(), + Self::Uint64 => gen.into_root_schema_for::(), + Self::Int64 => gen.into_root_schema_for::(), + Self::TimePoint => gen.into_root_schema_for::(), + Self::Duration => gen.into_root_schema_for::(), + Self::ExtensionPoint => gen.into_root_schema_for::(), + Self::CryptoKeyType => gen.into_root_schema_for::(), + Self::PublicKeyType => gen.into_root_schema_for::(), + Self::SignerKeyType => gen.into_root_schema_for::(), + Self::PublicKey => gen.into_root_schema_for::(), + Self::SignerKey => gen.into_root_schema_for::(), + Self::SignerKeyEd25519SignedPayload => { + gen.into_root_schema_for::() + } + Self::Signature => gen.into_root_schema_for::(), + Self::SignatureHint => gen.into_root_schema_for::(), + Self::NodeId => gen.into_root_schema_for::(), + Self::AccountId => gen.into_root_schema_for::(), + Self::ContractId => gen.into_root_schema_for::(), + Self::Curve25519Secret => gen.into_root_schema_for::(), + Self::Curve25519Public => gen.into_root_schema_for::(), + Self::HmacSha256Key => gen.into_root_schema_for::(), + Self::HmacSha256Mac => gen.into_root_schema_for::(), + Self::ShortHashSeed => gen.into_root_schema_for::(), + Self::BinaryFuseFilterType => gen.into_root_schema_for::(), + Self::SerializedBinaryFuseFilter => { + gen.into_root_schema_for::() + } + Self::PoolId => gen.into_root_schema_for::(), + Self::ClaimableBalanceIdType => gen.into_root_schema_for::(), + Self::ClaimableBalanceId => gen.into_root_schema_for::(), + } + } +} + +impl Name for TypeVariant { + #[must_use] + fn name(&self) -> &'static str { + Self::name(self) + } +} + +impl Variants for TypeVariant { + fn variants() -> slice::Iter<'static, TypeVariant> { + Self::VARIANTS.iter() + } +} + +impl core::str::FromStr for TypeVariant { + type Err = Error; + #[allow(clippy::too_many_lines)] + fn from_str(s: &str) -> Result { + match s { + "Value" => Ok(Self::Value), + "ScpBallot" => Ok(Self::ScpBallot), + "ScpStatementType" => Ok(Self::ScpStatementType), + "ScpNomination" => Ok(Self::ScpNomination), + "ScpStatement" => Ok(Self::ScpStatement), + "ScpStatementPledges" => Ok(Self::ScpStatementPledges), + "ScpStatementPrepare" => Ok(Self::ScpStatementPrepare), + "ScpStatementConfirm" => Ok(Self::ScpStatementConfirm), + "ScpStatementExternalize" => Ok(Self::ScpStatementExternalize), + "ScpEnvelope" => Ok(Self::ScpEnvelope), + "ScpQuorumSet" => Ok(Self::ScpQuorumSet), + "EncodedLedgerKey" => Ok(Self::EncodedLedgerKey), + "ConfigSettingContractExecutionLanesV0" => { + Ok(Self::ConfigSettingContractExecutionLanesV0) + } + "ConfigSettingContractComputeV0" => Ok(Self::ConfigSettingContractComputeV0), + "ConfigSettingContractParallelComputeV0" => { + Ok(Self::ConfigSettingContractParallelComputeV0) + } + "ConfigSettingContractLedgerCostV0" => Ok(Self::ConfigSettingContractLedgerCostV0), + "ConfigSettingContractLedgerCostExtV0" => { + Ok(Self::ConfigSettingContractLedgerCostExtV0) + } + "ConfigSettingContractHistoricalDataV0" => { + Ok(Self::ConfigSettingContractHistoricalDataV0) + } + "ConfigSettingContractEventsV0" => Ok(Self::ConfigSettingContractEventsV0), + "ConfigSettingContractBandwidthV0" => Ok(Self::ConfigSettingContractBandwidthV0), + "ContractCostType" => Ok(Self::ContractCostType), + "ContractCostParamEntry" => Ok(Self::ContractCostParamEntry), + "StateArchivalSettings" => Ok(Self::StateArchivalSettings), + "EvictionIterator" => Ok(Self::EvictionIterator), + "ConfigSettingScpTiming" => Ok(Self::ConfigSettingScpTiming), + "FrozenLedgerKeys" => Ok(Self::FrozenLedgerKeys), + "FrozenLedgerKeysDelta" => Ok(Self::FrozenLedgerKeysDelta), + "FreezeBypassTxs" => Ok(Self::FreezeBypassTxs), + "FreezeBypassTxsDelta" => Ok(Self::FreezeBypassTxsDelta), + "ContractCostParams" => Ok(Self::ContractCostParams), + "ConfigSettingId" => Ok(Self::ConfigSettingId), + "ConfigSettingEntry" => Ok(Self::ConfigSettingEntry), + "ScEnvMetaKind" => Ok(Self::ScEnvMetaKind), + "ScEnvMetaEntry" => Ok(Self::ScEnvMetaEntry), + "ScEnvMetaEntryInterfaceVersion" => Ok(Self::ScEnvMetaEntryInterfaceVersion), + "ScMetaV0" => Ok(Self::ScMetaV0), + "ScMetaKind" => Ok(Self::ScMetaKind), + "ScMetaEntry" => Ok(Self::ScMetaEntry), + "ScSpecType" => Ok(Self::ScSpecType), + "ScSpecTypeOption" => Ok(Self::ScSpecTypeOption), + "ScSpecTypeResult" => Ok(Self::ScSpecTypeResult), + "ScSpecTypeVec" => Ok(Self::ScSpecTypeVec), + "ScSpecTypeMap" => Ok(Self::ScSpecTypeMap), + "ScSpecTypeTuple" => Ok(Self::ScSpecTypeTuple), + "ScSpecTypeBytesN" => Ok(Self::ScSpecTypeBytesN), + "ScSpecTypeUdt" => Ok(Self::ScSpecTypeUdt), + "ScSpecTypeDef" => Ok(Self::ScSpecTypeDef), + "ScSpecUdtStructFieldV0" => Ok(Self::ScSpecUdtStructFieldV0), + "ScSpecUdtStructV0" => Ok(Self::ScSpecUdtStructV0), + "ScSpecUdtUnionCaseVoidV0" => Ok(Self::ScSpecUdtUnionCaseVoidV0), + "ScSpecUdtUnionCaseTupleV0" => Ok(Self::ScSpecUdtUnionCaseTupleV0), + "ScSpecUdtUnionCaseV0Kind" => Ok(Self::ScSpecUdtUnionCaseV0Kind), + "ScSpecUdtUnionCaseV0" => Ok(Self::ScSpecUdtUnionCaseV0), + "ScSpecUdtUnionV0" => Ok(Self::ScSpecUdtUnionV0), + "ScSpecUdtEnumCaseV0" => Ok(Self::ScSpecUdtEnumCaseV0), + "ScSpecUdtEnumV0" => Ok(Self::ScSpecUdtEnumV0), + "ScSpecUdtErrorEnumCaseV0" => Ok(Self::ScSpecUdtErrorEnumCaseV0), + "ScSpecUdtErrorEnumV0" => Ok(Self::ScSpecUdtErrorEnumV0), + "ScSpecFunctionInputV0" => Ok(Self::ScSpecFunctionInputV0), + "ScSpecFunctionV0" => Ok(Self::ScSpecFunctionV0), + "ScSpecEventParamLocationV0" => Ok(Self::ScSpecEventParamLocationV0), + "ScSpecEventParamV0" => Ok(Self::ScSpecEventParamV0), + "ScSpecEventDataFormat" => Ok(Self::ScSpecEventDataFormat), + "ScSpecEventV0" => Ok(Self::ScSpecEventV0), + "ScSpecEntryKind" => Ok(Self::ScSpecEntryKind), + "ScSpecEntry" => Ok(Self::ScSpecEntry), + "ScValType" => Ok(Self::ScValType), + "ScErrorType" => Ok(Self::ScErrorType), + "ScErrorCode" => Ok(Self::ScErrorCode), + "ScError" => Ok(Self::ScError), + "UInt128Parts" => Ok(Self::UInt128Parts), + "Int128Parts" => Ok(Self::Int128Parts), + "UInt256Parts" => Ok(Self::UInt256Parts), + "Int256Parts" => Ok(Self::Int256Parts), + "ContractExecutableType" => Ok(Self::ContractExecutableType), + "ContractExecutable" => Ok(Self::ContractExecutable), + "ScAddressType" => Ok(Self::ScAddressType), + "MuxedEd25519Account" => Ok(Self::MuxedEd25519Account), + "ScAddress" => Ok(Self::ScAddress), + "ScVec" => Ok(Self::ScVec), + "ScMap" => Ok(Self::ScMap), + "ScBytes" => Ok(Self::ScBytes), + "ScString" => Ok(Self::ScString), + "ScSymbol" => Ok(Self::ScSymbol), + "ScNonceKey" => Ok(Self::ScNonceKey), + "ScContractInstance" => Ok(Self::ScContractInstance), + "ScVal" => Ok(Self::ScVal), + "ScMapEntry" => Ok(Self::ScMapEntry), + "LedgerCloseMetaBatch" => Ok(Self::LedgerCloseMetaBatch), + "StoredTransactionSet" => Ok(Self::StoredTransactionSet), + "StoredDebugTransactionSet" => Ok(Self::StoredDebugTransactionSet), + "PersistedScpStateV0" => Ok(Self::PersistedScpStateV0), + "PersistedScpStateV1" => Ok(Self::PersistedScpStateV1), + "PersistedScpState" => Ok(Self::PersistedScpState), + "Thresholds" => Ok(Self::Thresholds), + "String32" => Ok(Self::String32), + "String64" => Ok(Self::String64), + "SequenceNumber" => Ok(Self::SequenceNumber), + "DataValue" => Ok(Self::DataValue), + "AssetCode4" => Ok(Self::AssetCode4), + "AssetCode12" => Ok(Self::AssetCode12), + "AssetType" => Ok(Self::AssetType), + "AssetCode" => Ok(Self::AssetCode), + "AlphaNum4" => Ok(Self::AlphaNum4), + "AlphaNum12" => Ok(Self::AlphaNum12), + "Asset" => Ok(Self::Asset), + "Price" => Ok(Self::Price), + "Liabilities" => Ok(Self::Liabilities), + "ThresholdIndexes" => Ok(Self::ThresholdIndexes), + "LedgerEntryType" => Ok(Self::LedgerEntryType), + "Signer" => Ok(Self::Signer), + "AccountFlags" => Ok(Self::AccountFlags), + "SponsorshipDescriptor" => Ok(Self::SponsorshipDescriptor), + "AccountEntryExtensionV3" => Ok(Self::AccountEntryExtensionV3), + "AccountEntryExtensionV2" => Ok(Self::AccountEntryExtensionV2), + "AccountEntryExtensionV2Ext" => Ok(Self::AccountEntryExtensionV2Ext), + "AccountEntryExtensionV1" => Ok(Self::AccountEntryExtensionV1), + "AccountEntryExtensionV1Ext" => Ok(Self::AccountEntryExtensionV1Ext), + "AccountEntry" => Ok(Self::AccountEntry), + "AccountEntryExt" => Ok(Self::AccountEntryExt), + "TrustLineFlags" => Ok(Self::TrustLineFlags), + "LiquidityPoolType" => Ok(Self::LiquidityPoolType), + "TrustLineAsset" => Ok(Self::TrustLineAsset), + "TrustLineEntryExtensionV2" => Ok(Self::TrustLineEntryExtensionV2), + "TrustLineEntryExtensionV2Ext" => Ok(Self::TrustLineEntryExtensionV2Ext), + "TrustLineEntry" => Ok(Self::TrustLineEntry), + "TrustLineEntryExt" => Ok(Self::TrustLineEntryExt), + "TrustLineEntryV1" => Ok(Self::TrustLineEntryV1), + "TrustLineEntryV1Ext" => Ok(Self::TrustLineEntryV1Ext), + "OfferEntryFlags" => Ok(Self::OfferEntryFlags), + "OfferEntry" => Ok(Self::OfferEntry), + "OfferEntryExt" => Ok(Self::OfferEntryExt), + "DataEntry" => Ok(Self::DataEntry), + "DataEntryExt" => Ok(Self::DataEntryExt), + "ClaimPredicateType" => Ok(Self::ClaimPredicateType), + "ClaimPredicate" => Ok(Self::ClaimPredicate), + "ClaimantType" => Ok(Self::ClaimantType), + "Claimant" => Ok(Self::Claimant), + "ClaimantV0" => Ok(Self::ClaimantV0), + "ClaimableBalanceFlags" => Ok(Self::ClaimableBalanceFlags), + "ClaimableBalanceEntryExtensionV1" => Ok(Self::ClaimableBalanceEntryExtensionV1), + "ClaimableBalanceEntryExtensionV1Ext" => Ok(Self::ClaimableBalanceEntryExtensionV1Ext), + "ClaimableBalanceEntry" => Ok(Self::ClaimableBalanceEntry), + "ClaimableBalanceEntryExt" => Ok(Self::ClaimableBalanceEntryExt), + "LiquidityPoolConstantProductParameters" => { + Ok(Self::LiquidityPoolConstantProductParameters) + } + "LiquidityPoolEntry" => Ok(Self::LiquidityPoolEntry), + "LiquidityPoolEntryBody" => Ok(Self::LiquidityPoolEntryBody), + "LiquidityPoolEntryConstantProduct" => Ok(Self::LiquidityPoolEntryConstantProduct), + "ContractDataDurability" => Ok(Self::ContractDataDurability), + "ContractDataEntry" => Ok(Self::ContractDataEntry), + "ContractCodeCostInputs" => Ok(Self::ContractCodeCostInputs), + "ContractCodeEntry" => Ok(Self::ContractCodeEntry), + "ContractCodeEntryExt" => Ok(Self::ContractCodeEntryExt), + "ContractCodeEntryV1" => Ok(Self::ContractCodeEntryV1), + "TtlEntry" => Ok(Self::TtlEntry), + "LedgerEntryExtensionV1" => Ok(Self::LedgerEntryExtensionV1), + "LedgerEntryExtensionV1Ext" => Ok(Self::LedgerEntryExtensionV1Ext), + "LedgerEntry" => Ok(Self::LedgerEntry), + "LedgerEntryData" => Ok(Self::LedgerEntryData), + "LedgerEntryExt" => Ok(Self::LedgerEntryExt), + "LedgerKey" => Ok(Self::LedgerKey), + "LedgerKeyAccount" => Ok(Self::LedgerKeyAccount), + "LedgerKeyTrustLine" => Ok(Self::LedgerKeyTrustLine), + "LedgerKeyOffer" => Ok(Self::LedgerKeyOffer), + "LedgerKeyData" => Ok(Self::LedgerKeyData), + "LedgerKeyClaimableBalance" => Ok(Self::LedgerKeyClaimableBalance), + "LedgerKeyLiquidityPool" => Ok(Self::LedgerKeyLiquidityPool), + "LedgerKeyContractData" => Ok(Self::LedgerKeyContractData), + "LedgerKeyContractCode" => Ok(Self::LedgerKeyContractCode), + "LedgerKeyConfigSetting" => Ok(Self::LedgerKeyConfigSetting), + "LedgerKeyTtl" => Ok(Self::LedgerKeyTtl), + "EnvelopeType" => Ok(Self::EnvelopeType), + "BucketListType" => Ok(Self::BucketListType), + "BucketEntryType" => Ok(Self::BucketEntryType), + "HotArchiveBucketEntryType" => Ok(Self::HotArchiveBucketEntryType), + "BucketMetadata" => Ok(Self::BucketMetadata), + "BucketMetadataExt" => Ok(Self::BucketMetadataExt), + "BucketEntry" => Ok(Self::BucketEntry), + "HotArchiveBucketEntry" => Ok(Self::HotArchiveBucketEntry), + "UpgradeType" => Ok(Self::UpgradeType), + "StellarValueType" => Ok(Self::StellarValueType), + "LedgerCloseValueSignature" => Ok(Self::LedgerCloseValueSignature), + "StellarValue" => Ok(Self::StellarValue), + "StellarValueExt" => Ok(Self::StellarValueExt), + "LedgerHeaderFlags" => Ok(Self::LedgerHeaderFlags), + "LedgerHeaderExtensionV1" => Ok(Self::LedgerHeaderExtensionV1), + "LedgerHeaderExtensionV1Ext" => Ok(Self::LedgerHeaderExtensionV1Ext), + "LedgerHeader" => Ok(Self::LedgerHeader), + "LedgerHeaderExt" => Ok(Self::LedgerHeaderExt), + "LedgerUpgradeType" => Ok(Self::LedgerUpgradeType), + "ConfigUpgradeSetKey" => Ok(Self::ConfigUpgradeSetKey), + "LedgerUpgrade" => Ok(Self::LedgerUpgrade), + "ConfigUpgradeSet" => Ok(Self::ConfigUpgradeSet), + "TxSetComponentType" => Ok(Self::TxSetComponentType), + "DependentTxCluster" => Ok(Self::DependentTxCluster), + "ParallelTxExecutionStage" => Ok(Self::ParallelTxExecutionStage), + "ParallelTxsComponent" => Ok(Self::ParallelTxsComponent), + "TxSetComponent" => Ok(Self::TxSetComponent), + "TxSetComponentTxsMaybeDiscountedFee" => Ok(Self::TxSetComponentTxsMaybeDiscountedFee), + "TransactionPhase" => Ok(Self::TransactionPhase), + "TransactionSet" => Ok(Self::TransactionSet), + "TransactionSetV1" => Ok(Self::TransactionSetV1), + "GeneralizedTransactionSet" => Ok(Self::GeneralizedTransactionSet), + "TransactionResultPair" => Ok(Self::TransactionResultPair), + "TransactionResultSet" => Ok(Self::TransactionResultSet), + "TransactionHistoryEntry" => Ok(Self::TransactionHistoryEntry), + "TransactionHistoryEntryExt" => Ok(Self::TransactionHistoryEntryExt), + "TransactionHistoryResultEntry" => Ok(Self::TransactionHistoryResultEntry), + "TransactionHistoryResultEntryExt" => Ok(Self::TransactionHistoryResultEntryExt), + "LedgerHeaderHistoryEntry" => Ok(Self::LedgerHeaderHistoryEntry), + "LedgerHeaderHistoryEntryExt" => Ok(Self::LedgerHeaderHistoryEntryExt), + "LedgerScpMessages" => Ok(Self::LedgerScpMessages), + "ScpHistoryEntryV0" => Ok(Self::ScpHistoryEntryV0), + "ScpHistoryEntry" => Ok(Self::ScpHistoryEntry), + "LedgerEntryChangeType" => Ok(Self::LedgerEntryChangeType), + "LedgerEntryChange" => Ok(Self::LedgerEntryChange), + "LedgerEntryChanges" => Ok(Self::LedgerEntryChanges), + "OperationMeta" => Ok(Self::OperationMeta), + "TransactionMetaV1" => Ok(Self::TransactionMetaV1), + "TransactionMetaV2" => Ok(Self::TransactionMetaV2), + "ContractEventType" => Ok(Self::ContractEventType), + "ContractEvent" => Ok(Self::ContractEvent), + "ContractEventBody" => Ok(Self::ContractEventBody), + "ContractEventV0" => Ok(Self::ContractEventV0), + "DiagnosticEvent" => Ok(Self::DiagnosticEvent), + "SorobanTransactionMetaExtV1" => Ok(Self::SorobanTransactionMetaExtV1), + "SorobanTransactionMetaExt" => Ok(Self::SorobanTransactionMetaExt), + "SorobanTransactionMeta" => Ok(Self::SorobanTransactionMeta), + "TransactionMetaV3" => Ok(Self::TransactionMetaV3), + "OperationMetaV2" => Ok(Self::OperationMetaV2), + "SorobanTransactionMetaV2" => Ok(Self::SorobanTransactionMetaV2), + "TransactionEventStage" => Ok(Self::TransactionEventStage), + "TransactionEvent" => Ok(Self::TransactionEvent), + "TransactionMetaV4" => Ok(Self::TransactionMetaV4), + "InvokeHostFunctionSuccessPreImage" => Ok(Self::InvokeHostFunctionSuccessPreImage), + "TransactionMeta" => Ok(Self::TransactionMeta), + "TransactionResultMeta" => Ok(Self::TransactionResultMeta), + "TransactionResultMetaV1" => Ok(Self::TransactionResultMetaV1), + "UpgradeEntryMeta" => Ok(Self::UpgradeEntryMeta), + "LedgerCloseMetaV0" => Ok(Self::LedgerCloseMetaV0), + "LedgerCloseMetaExtV1" => Ok(Self::LedgerCloseMetaExtV1), + "LedgerCloseMetaExt" => Ok(Self::LedgerCloseMetaExt), + "LedgerCloseMetaV1" => Ok(Self::LedgerCloseMetaV1), + "LedgerCloseMetaV2" => Ok(Self::LedgerCloseMetaV2), + "LedgerCloseMeta" => Ok(Self::LedgerCloseMeta), + "ErrorCode" => Ok(Self::ErrorCode), + "SError" => Ok(Self::SError), + "SendMore" => Ok(Self::SendMore), + "SendMoreExtended" => Ok(Self::SendMoreExtended), + "AuthCert" => Ok(Self::AuthCert), + "Hello" => Ok(Self::Hello), + "Auth" => Ok(Self::Auth), + "IpAddrType" => Ok(Self::IpAddrType), + "PeerAddress" => Ok(Self::PeerAddress), + "PeerAddressIp" => Ok(Self::PeerAddressIp), + "MessageType" => Ok(Self::MessageType), + "DontHave" => Ok(Self::DontHave), + "SurveyMessageCommandType" => Ok(Self::SurveyMessageCommandType), + "SurveyMessageResponseType" => Ok(Self::SurveyMessageResponseType), + "TimeSlicedSurveyStartCollectingMessage" => { + Ok(Self::TimeSlicedSurveyStartCollectingMessage) + } + "SignedTimeSlicedSurveyStartCollectingMessage" => { + Ok(Self::SignedTimeSlicedSurveyStartCollectingMessage) + } + "TimeSlicedSurveyStopCollectingMessage" => { + Ok(Self::TimeSlicedSurveyStopCollectingMessage) + } + "SignedTimeSlicedSurveyStopCollectingMessage" => { + Ok(Self::SignedTimeSlicedSurveyStopCollectingMessage) + } + "SurveyRequestMessage" => Ok(Self::SurveyRequestMessage), + "TimeSlicedSurveyRequestMessage" => Ok(Self::TimeSlicedSurveyRequestMessage), + "SignedTimeSlicedSurveyRequestMessage" => { + Ok(Self::SignedTimeSlicedSurveyRequestMessage) + } + "EncryptedBody" => Ok(Self::EncryptedBody), + "SurveyResponseMessage" => Ok(Self::SurveyResponseMessage), + "TimeSlicedSurveyResponseMessage" => Ok(Self::TimeSlicedSurveyResponseMessage), + "SignedTimeSlicedSurveyResponseMessage" => { + Ok(Self::SignedTimeSlicedSurveyResponseMessage) + } + "PeerStats" => Ok(Self::PeerStats), + "TimeSlicedNodeData" => Ok(Self::TimeSlicedNodeData), + "TimeSlicedPeerData" => Ok(Self::TimeSlicedPeerData), + "TimeSlicedPeerDataList" => Ok(Self::TimeSlicedPeerDataList), + "TopologyResponseBodyV2" => Ok(Self::TopologyResponseBodyV2), + "SurveyResponseBody" => Ok(Self::SurveyResponseBody), + "TxAdvertVector" => Ok(Self::TxAdvertVector), + "FloodAdvert" => Ok(Self::FloodAdvert), + "TxDemandVector" => Ok(Self::TxDemandVector), + "FloodDemand" => Ok(Self::FloodDemand), + "StellarMessage" => Ok(Self::StellarMessage), + "AuthenticatedMessage" => Ok(Self::AuthenticatedMessage), + "AuthenticatedMessageV0" => Ok(Self::AuthenticatedMessageV0), + "LiquidityPoolParameters" => Ok(Self::LiquidityPoolParameters), + "MuxedAccount" => Ok(Self::MuxedAccount), + "MuxedAccountMed25519" => Ok(Self::MuxedAccountMed25519), + "DecoratedSignature" => Ok(Self::DecoratedSignature), + "OperationType" => Ok(Self::OperationType), + "CreateAccountOp" => Ok(Self::CreateAccountOp), + "PaymentOp" => Ok(Self::PaymentOp), + "PathPaymentStrictReceiveOp" => Ok(Self::PathPaymentStrictReceiveOp), + "PathPaymentStrictSendOp" => Ok(Self::PathPaymentStrictSendOp), + "ManageSellOfferOp" => Ok(Self::ManageSellOfferOp), + "ManageBuyOfferOp" => Ok(Self::ManageBuyOfferOp), + "CreatePassiveSellOfferOp" => Ok(Self::CreatePassiveSellOfferOp), + "SetOptionsOp" => Ok(Self::SetOptionsOp), + "ChangeTrustAsset" => Ok(Self::ChangeTrustAsset), + "ChangeTrustOp" => Ok(Self::ChangeTrustOp), + "AllowTrustOp" => Ok(Self::AllowTrustOp), + "ManageDataOp" => Ok(Self::ManageDataOp), + "BumpSequenceOp" => Ok(Self::BumpSequenceOp), + "CreateClaimableBalanceOp" => Ok(Self::CreateClaimableBalanceOp), + "ClaimClaimableBalanceOp" => Ok(Self::ClaimClaimableBalanceOp), + "BeginSponsoringFutureReservesOp" => Ok(Self::BeginSponsoringFutureReservesOp), + "RevokeSponsorshipType" => Ok(Self::RevokeSponsorshipType), + "RevokeSponsorshipOp" => Ok(Self::RevokeSponsorshipOp), + "RevokeSponsorshipOpSigner" => Ok(Self::RevokeSponsorshipOpSigner), + "ClawbackOp" => Ok(Self::ClawbackOp), + "ClawbackClaimableBalanceOp" => Ok(Self::ClawbackClaimableBalanceOp), + "SetTrustLineFlagsOp" => Ok(Self::SetTrustLineFlagsOp), + "LiquidityPoolDepositOp" => Ok(Self::LiquidityPoolDepositOp), + "LiquidityPoolWithdrawOp" => Ok(Self::LiquidityPoolWithdrawOp), + "HostFunctionType" => Ok(Self::HostFunctionType), + "ContractIdPreimageType" => Ok(Self::ContractIdPreimageType), + "ContractIdPreimage" => Ok(Self::ContractIdPreimage), + "ContractIdPreimageFromAddress" => Ok(Self::ContractIdPreimageFromAddress), + "CreateContractArgs" => Ok(Self::CreateContractArgs), + "CreateContractArgsV2" => Ok(Self::CreateContractArgsV2), + "InvokeContractArgs" => Ok(Self::InvokeContractArgs), + "HostFunction" => Ok(Self::HostFunction), + "SorobanAuthorizedFunctionType" => Ok(Self::SorobanAuthorizedFunctionType), + "SorobanAuthorizedFunction" => Ok(Self::SorobanAuthorizedFunction), + "SorobanAuthorizedInvocation" => Ok(Self::SorobanAuthorizedInvocation), + "SorobanAddressCredentials" => Ok(Self::SorobanAddressCredentials), + "SorobanCredentialsType" => Ok(Self::SorobanCredentialsType), + "SorobanCredentials" => Ok(Self::SorobanCredentials), + "SorobanAuthorizationEntry" => Ok(Self::SorobanAuthorizationEntry), + "SorobanAuthorizationEntries" => Ok(Self::SorobanAuthorizationEntries), + "InvokeHostFunctionOp" => Ok(Self::InvokeHostFunctionOp), + "ExtendFootprintTtlOp" => Ok(Self::ExtendFootprintTtlOp), + "RestoreFootprintOp" => Ok(Self::RestoreFootprintOp), + "Operation" => Ok(Self::Operation), + "OperationBody" => Ok(Self::OperationBody), + "HashIdPreimage" => Ok(Self::HashIdPreimage), + "HashIdPreimageOperationId" => Ok(Self::HashIdPreimageOperationId), + "HashIdPreimageRevokeId" => Ok(Self::HashIdPreimageRevokeId), + "HashIdPreimageContractId" => Ok(Self::HashIdPreimageContractId), + "HashIdPreimageSorobanAuthorization" => Ok(Self::HashIdPreimageSorobanAuthorization), + "MemoType" => Ok(Self::MemoType), + "Memo" => Ok(Self::Memo), + "TimeBounds" => Ok(Self::TimeBounds), + "LedgerBounds" => Ok(Self::LedgerBounds), + "PreconditionsV2" => Ok(Self::PreconditionsV2), + "PreconditionType" => Ok(Self::PreconditionType), + "Preconditions" => Ok(Self::Preconditions), + "LedgerFootprint" => Ok(Self::LedgerFootprint), + "SorobanResources" => Ok(Self::SorobanResources), + "SorobanResourcesExtV0" => Ok(Self::SorobanResourcesExtV0), + "SorobanTransactionData" => Ok(Self::SorobanTransactionData), + "SorobanTransactionDataExt" => Ok(Self::SorobanTransactionDataExt), + "TransactionV0" => Ok(Self::TransactionV0), + "TransactionV0Ext" => Ok(Self::TransactionV0Ext), + "TransactionV0Envelope" => Ok(Self::TransactionV0Envelope), + "Transaction" => Ok(Self::Transaction), + "TransactionExt" => Ok(Self::TransactionExt), + "TransactionV1Envelope" => Ok(Self::TransactionV1Envelope), + "FeeBumpTransaction" => Ok(Self::FeeBumpTransaction), + "FeeBumpTransactionInnerTx" => Ok(Self::FeeBumpTransactionInnerTx), + "FeeBumpTransactionExt" => Ok(Self::FeeBumpTransactionExt), + "FeeBumpTransactionEnvelope" => Ok(Self::FeeBumpTransactionEnvelope), + "TransactionEnvelope" => Ok(Self::TransactionEnvelope), + "TransactionSignaturePayload" => Ok(Self::TransactionSignaturePayload), + "TransactionSignaturePayloadTaggedTransaction" => { + Ok(Self::TransactionSignaturePayloadTaggedTransaction) + } + "ClaimAtomType" => Ok(Self::ClaimAtomType), + "ClaimOfferAtomV0" => Ok(Self::ClaimOfferAtomV0), + "ClaimOfferAtom" => Ok(Self::ClaimOfferAtom), + "ClaimLiquidityAtom" => Ok(Self::ClaimLiquidityAtom), + "ClaimAtom" => Ok(Self::ClaimAtom), + "CreateAccountResultCode" => Ok(Self::CreateAccountResultCode), + "CreateAccountResult" => Ok(Self::CreateAccountResult), + "PaymentResultCode" => Ok(Self::PaymentResultCode), + "PaymentResult" => Ok(Self::PaymentResult), + "PathPaymentStrictReceiveResultCode" => Ok(Self::PathPaymentStrictReceiveResultCode), + "SimplePaymentResult" => Ok(Self::SimplePaymentResult), + "PathPaymentStrictReceiveResult" => Ok(Self::PathPaymentStrictReceiveResult), + "PathPaymentStrictReceiveResultSuccess" => { + Ok(Self::PathPaymentStrictReceiveResultSuccess) + } + "PathPaymentStrictSendResultCode" => Ok(Self::PathPaymentStrictSendResultCode), + "PathPaymentStrictSendResult" => Ok(Self::PathPaymentStrictSendResult), + "PathPaymentStrictSendResultSuccess" => Ok(Self::PathPaymentStrictSendResultSuccess), + "ManageSellOfferResultCode" => Ok(Self::ManageSellOfferResultCode), + "ManageOfferEffect" => Ok(Self::ManageOfferEffect), + "ManageOfferSuccessResult" => Ok(Self::ManageOfferSuccessResult), + "ManageOfferSuccessResultOffer" => Ok(Self::ManageOfferSuccessResultOffer), + "ManageSellOfferResult" => Ok(Self::ManageSellOfferResult), + "ManageBuyOfferResultCode" => Ok(Self::ManageBuyOfferResultCode), + "ManageBuyOfferResult" => Ok(Self::ManageBuyOfferResult), + "SetOptionsResultCode" => Ok(Self::SetOptionsResultCode), + "SetOptionsResult" => Ok(Self::SetOptionsResult), + "ChangeTrustResultCode" => Ok(Self::ChangeTrustResultCode), + "ChangeTrustResult" => Ok(Self::ChangeTrustResult), + "AllowTrustResultCode" => Ok(Self::AllowTrustResultCode), + "AllowTrustResult" => Ok(Self::AllowTrustResult), + "AccountMergeResultCode" => Ok(Self::AccountMergeResultCode), + "AccountMergeResult" => Ok(Self::AccountMergeResult), + "InflationResultCode" => Ok(Self::InflationResultCode), + "InflationPayout" => Ok(Self::InflationPayout), + "InflationResult" => Ok(Self::InflationResult), + "ManageDataResultCode" => Ok(Self::ManageDataResultCode), + "ManageDataResult" => Ok(Self::ManageDataResult), + "BumpSequenceResultCode" => Ok(Self::BumpSequenceResultCode), + "BumpSequenceResult" => Ok(Self::BumpSequenceResult), + "CreateClaimableBalanceResultCode" => Ok(Self::CreateClaimableBalanceResultCode), + "CreateClaimableBalanceResult" => Ok(Self::CreateClaimableBalanceResult), + "ClaimClaimableBalanceResultCode" => Ok(Self::ClaimClaimableBalanceResultCode), + "ClaimClaimableBalanceResult" => Ok(Self::ClaimClaimableBalanceResult), + "BeginSponsoringFutureReservesResultCode" => { + Ok(Self::BeginSponsoringFutureReservesResultCode) + } + "BeginSponsoringFutureReservesResult" => Ok(Self::BeginSponsoringFutureReservesResult), + "EndSponsoringFutureReservesResultCode" => { + Ok(Self::EndSponsoringFutureReservesResultCode) + } + "EndSponsoringFutureReservesResult" => Ok(Self::EndSponsoringFutureReservesResult), + "RevokeSponsorshipResultCode" => Ok(Self::RevokeSponsorshipResultCode), + "RevokeSponsorshipResult" => Ok(Self::RevokeSponsorshipResult), + "ClawbackResultCode" => Ok(Self::ClawbackResultCode), + "ClawbackResult" => Ok(Self::ClawbackResult), + "ClawbackClaimableBalanceResultCode" => Ok(Self::ClawbackClaimableBalanceResultCode), + "ClawbackClaimableBalanceResult" => Ok(Self::ClawbackClaimableBalanceResult), + "SetTrustLineFlagsResultCode" => Ok(Self::SetTrustLineFlagsResultCode), + "SetTrustLineFlagsResult" => Ok(Self::SetTrustLineFlagsResult), + "LiquidityPoolDepositResultCode" => Ok(Self::LiquidityPoolDepositResultCode), + "LiquidityPoolDepositResult" => Ok(Self::LiquidityPoolDepositResult), + "LiquidityPoolWithdrawResultCode" => Ok(Self::LiquidityPoolWithdrawResultCode), + "LiquidityPoolWithdrawResult" => Ok(Self::LiquidityPoolWithdrawResult), + "InvokeHostFunctionResultCode" => Ok(Self::InvokeHostFunctionResultCode), + "InvokeHostFunctionResult" => Ok(Self::InvokeHostFunctionResult), + "ExtendFootprintTtlResultCode" => Ok(Self::ExtendFootprintTtlResultCode), + "ExtendFootprintTtlResult" => Ok(Self::ExtendFootprintTtlResult), + "RestoreFootprintResultCode" => Ok(Self::RestoreFootprintResultCode), + "RestoreFootprintResult" => Ok(Self::RestoreFootprintResult), + "OperationResultCode" => Ok(Self::OperationResultCode), + "OperationResult" => Ok(Self::OperationResult), + "OperationResultTr" => Ok(Self::OperationResultTr), + "TransactionResultCode" => Ok(Self::TransactionResultCode), + "InnerTransactionResult" => Ok(Self::InnerTransactionResult), + "InnerTransactionResultResult" => Ok(Self::InnerTransactionResultResult), + "InnerTransactionResultExt" => Ok(Self::InnerTransactionResultExt), + "InnerTransactionResultPair" => Ok(Self::InnerTransactionResultPair), + "TransactionResult" => Ok(Self::TransactionResult), + "TransactionResultResult" => Ok(Self::TransactionResultResult), + "TransactionResultExt" => Ok(Self::TransactionResultExt), + "Hash" => Ok(Self::Hash), + "Uint256" => Ok(Self::Uint256), + "Uint32" => Ok(Self::Uint32), + "Int32" => Ok(Self::Int32), + "Uint64" => Ok(Self::Uint64), + "Int64" => Ok(Self::Int64), + "TimePoint" => Ok(Self::TimePoint), + "Duration" => Ok(Self::Duration), + "ExtensionPoint" => Ok(Self::ExtensionPoint), + "CryptoKeyType" => Ok(Self::CryptoKeyType), + "PublicKeyType" => Ok(Self::PublicKeyType), + "SignerKeyType" => Ok(Self::SignerKeyType), + "PublicKey" => Ok(Self::PublicKey), + "SignerKey" => Ok(Self::SignerKey), + "SignerKeyEd25519SignedPayload" => Ok(Self::SignerKeyEd25519SignedPayload), + "Signature" => Ok(Self::Signature), + "SignatureHint" => Ok(Self::SignatureHint), + "NodeId" => Ok(Self::NodeId), + "AccountId" => Ok(Self::AccountId), + "ContractId" => Ok(Self::ContractId), + "Curve25519Secret" => Ok(Self::Curve25519Secret), + "Curve25519Public" => Ok(Self::Curve25519Public), + "HmacSha256Key" => Ok(Self::HmacSha256Key), + "HmacSha256Mac" => Ok(Self::HmacSha256Mac), + "ShortHashSeed" => Ok(Self::ShortHashSeed), + "BinaryFuseFilterType" => Ok(Self::BinaryFuseFilterType), + "SerializedBinaryFuseFilter" => Ok(Self::SerializedBinaryFuseFilter), + "PoolId" => Ok(Self::PoolId), + "ClaimableBalanceIdType" => Ok(Self::ClaimableBalanceIdType), + "ClaimableBalanceId" => Ok(Self::ClaimableBalanceId), + _ => Err(Error::Invalid), + } + } +} + +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case"), + serde(untagged) +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub enum Type { + Value(Box), + ScpBallot(Box), + ScpStatementType(Box), + ScpNomination(Box), + ScpStatement(Box), + ScpStatementPledges(Box), + ScpStatementPrepare(Box), + ScpStatementConfirm(Box), + ScpStatementExternalize(Box), + ScpEnvelope(Box), + ScpQuorumSet(Box), + EncodedLedgerKey(Box), + ConfigSettingContractExecutionLanesV0(Box), + ConfigSettingContractComputeV0(Box), + ConfigSettingContractParallelComputeV0(Box), + ConfigSettingContractLedgerCostV0(Box), + ConfigSettingContractLedgerCostExtV0(Box), + ConfigSettingContractHistoricalDataV0(Box), + ConfigSettingContractEventsV0(Box), + ConfigSettingContractBandwidthV0(Box), + ContractCostType(Box), + ContractCostParamEntry(Box), + StateArchivalSettings(Box), + EvictionIterator(Box), + ConfigSettingScpTiming(Box), + FrozenLedgerKeys(Box), + FrozenLedgerKeysDelta(Box), + FreezeBypassTxs(Box), + FreezeBypassTxsDelta(Box), + ContractCostParams(Box), + ConfigSettingId(Box), + ConfigSettingEntry(Box), + ScEnvMetaKind(Box), + ScEnvMetaEntry(Box), + ScEnvMetaEntryInterfaceVersion(Box), + ScMetaV0(Box), + ScMetaKind(Box), + ScMetaEntry(Box), + ScSpecType(Box), + ScSpecTypeOption(Box), + ScSpecTypeResult(Box), + ScSpecTypeVec(Box), + ScSpecTypeMap(Box), + ScSpecTypeTuple(Box), + ScSpecTypeBytesN(Box), + ScSpecTypeUdt(Box), + ScSpecTypeDef(Box), + ScSpecUdtStructFieldV0(Box), + ScSpecUdtStructV0(Box), + ScSpecUdtUnionCaseVoidV0(Box), + ScSpecUdtUnionCaseTupleV0(Box), + ScSpecUdtUnionCaseV0Kind(Box), + ScSpecUdtUnionCaseV0(Box), + ScSpecUdtUnionV0(Box), + ScSpecUdtEnumCaseV0(Box), + ScSpecUdtEnumV0(Box), + ScSpecUdtErrorEnumCaseV0(Box), + ScSpecUdtErrorEnumV0(Box), + ScSpecFunctionInputV0(Box), + ScSpecFunctionV0(Box), + ScSpecEventParamLocationV0(Box), + ScSpecEventParamV0(Box), + ScSpecEventDataFormat(Box), + ScSpecEventV0(Box), + ScSpecEntryKind(Box), + ScSpecEntry(Box), + ScValType(Box), + ScErrorType(Box), + ScErrorCode(Box), + ScError(Box), + UInt128Parts(Box), + Int128Parts(Box), + UInt256Parts(Box), + Int256Parts(Box), + ContractExecutableType(Box), + ContractExecutable(Box), + ScAddressType(Box), + MuxedEd25519Account(Box), + ScAddress(Box), + ScVec(Box), + ScMap(Box), + ScBytes(Box), + ScString(Box), + ScSymbol(Box), + ScNonceKey(Box), + ScContractInstance(Box), + ScVal(Box), + ScMapEntry(Box), + LedgerCloseMetaBatch(Box), + StoredTransactionSet(Box), + StoredDebugTransactionSet(Box), + PersistedScpStateV0(Box), + PersistedScpStateV1(Box), + PersistedScpState(Box), + Thresholds(Box), + String32(Box), + String64(Box), + SequenceNumber(Box), + DataValue(Box), + AssetCode4(Box), + AssetCode12(Box), + AssetType(Box), + AssetCode(Box), + AlphaNum4(Box), + AlphaNum12(Box), + Asset(Box), + Price(Box), + Liabilities(Box), + ThresholdIndexes(Box), + LedgerEntryType(Box), + Signer(Box), + AccountFlags(Box), + SponsorshipDescriptor(Box), + AccountEntryExtensionV3(Box), + AccountEntryExtensionV2(Box), + AccountEntryExtensionV2Ext(Box), + AccountEntryExtensionV1(Box), + AccountEntryExtensionV1Ext(Box), + AccountEntry(Box), + AccountEntryExt(Box), + TrustLineFlags(Box), + LiquidityPoolType(Box), + TrustLineAsset(Box), + TrustLineEntryExtensionV2(Box), + TrustLineEntryExtensionV2Ext(Box), + TrustLineEntry(Box), + TrustLineEntryExt(Box), + TrustLineEntryV1(Box), + TrustLineEntryV1Ext(Box), + OfferEntryFlags(Box), + OfferEntry(Box), + OfferEntryExt(Box), + DataEntry(Box), + DataEntryExt(Box), + ClaimPredicateType(Box), + ClaimPredicate(Box), + ClaimantType(Box), + Claimant(Box), + ClaimantV0(Box), + ClaimableBalanceFlags(Box), + ClaimableBalanceEntryExtensionV1(Box), + ClaimableBalanceEntryExtensionV1Ext(Box), + ClaimableBalanceEntry(Box), + ClaimableBalanceEntryExt(Box), + LiquidityPoolConstantProductParameters(Box), + LiquidityPoolEntry(Box), + LiquidityPoolEntryBody(Box), + LiquidityPoolEntryConstantProduct(Box), + ContractDataDurability(Box), + ContractDataEntry(Box), + ContractCodeCostInputs(Box), + ContractCodeEntry(Box), + ContractCodeEntryExt(Box), + ContractCodeEntryV1(Box), + TtlEntry(Box), + LedgerEntryExtensionV1(Box), + LedgerEntryExtensionV1Ext(Box), + LedgerEntry(Box), + LedgerEntryData(Box), + LedgerEntryExt(Box), + LedgerKey(Box), + LedgerKeyAccount(Box), + LedgerKeyTrustLine(Box), + LedgerKeyOffer(Box), + LedgerKeyData(Box), + LedgerKeyClaimableBalance(Box), + LedgerKeyLiquidityPool(Box), + LedgerKeyContractData(Box), + LedgerKeyContractCode(Box), + LedgerKeyConfigSetting(Box), + LedgerKeyTtl(Box), + EnvelopeType(Box), + BucketListType(Box), + BucketEntryType(Box), + HotArchiveBucketEntryType(Box), + BucketMetadata(Box), + BucketMetadataExt(Box), + BucketEntry(Box), + HotArchiveBucketEntry(Box), + UpgradeType(Box), + StellarValueType(Box), + LedgerCloseValueSignature(Box), + StellarValue(Box), + StellarValueExt(Box), + LedgerHeaderFlags(Box), + LedgerHeaderExtensionV1(Box), + LedgerHeaderExtensionV1Ext(Box), + LedgerHeader(Box), + LedgerHeaderExt(Box), + LedgerUpgradeType(Box), + ConfigUpgradeSetKey(Box), + LedgerUpgrade(Box), + ConfigUpgradeSet(Box), + TxSetComponentType(Box), + DependentTxCluster(Box), + ParallelTxExecutionStage(Box), + ParallelTxsComponent(Box), + TxSetComponent(Box), + TxSetComponentTxsMaybeDiscountedFee(Box), + TransactionPhase(Box), + TransactionSet(Box), + TransactionSetV1(Box), + GeneralizedTransactionSet(Box), + TransactionResultPair(Box), + TransactionResultSet(Box), + TransactionHistoryEntry(Box), + TransactionHistoryEntryExt(Box), + TransactionHistoryResultEntry(Box), + TransactionHistoryResultEntryExt(Box), + LedgerHeaderHistoryEntry(Box), + LedgerHeaderHistoryEntryExt(Box), + LedgerScpMessages(Box), + ScpHistoryEntryV0(Box), + ScpHistoryEntry(Box), + LedgerEntryChangeType(Box), + LedgerEntryChange(Box), + LedgerEntryChanges(Box), + OperationMeta(Box), + TransactionMetaV1(Box), + TransactionMetaV2(Box), + ContractEventType(Box), + ContractEvent(Box), + ContractEventBody(Box), + ContractEventV0(Box), + DiagnosticEvent(Box), + SorobanTransactionMetaExtV1(Box), + SorobanTransactionMetaExt(Box), + SorobanTransactionMeta(Box), + TransactionMetaV3(Box), + OperationMetaV2(Box), + SorobanTransactionMetaV2(Box), + TransactionEventStage(Box), + TransactionEvent(Box), + TransactionMetaV4(Box), + InvokeHostFunctionSuccessPreImage(Box), + TransactionMeta(Box), + TransactionResultMeta(Box), + TransactionResultMetaV1(Box), + UpgradeEntryMeta(Box), + LedgerCloseMetaV0(Box), + LedgerCloseMetaExtV1(Box), + LedgerCloseMetaExt(Box), + LedgerCloseMetaV1(Box), + LedgerCloseMetaV2(Box), + LedgerCloseMeta(Box), + ErrorCode(Box), + SError(Box), + SendMore(Box), + SendMoreExtended(Box), + AuthCert(Box), + Hello(Box), + Auth(Box), + IpAddrType(Box), + PeerAddress(Box), + PeerAddressIp(Box), + MessageType(Box), + DontHave(Box), + SurveyMessageCommandType(Box), + SurveyMessageResponseType(Box), + TimeSlicedSurveyStartCollectingMessage(Box), + SignedTimeSlicedSurveyStartCollectingMessage(Box), + TimeSlicedSurveyStopCollectingMessage(Box), + SignedTimeSlicedSurveyStopCollectingMessage(Box), + SurveyRequestMessage(Box), + TimeSlicedSurveyRequestMessage(Box), + SignedTimeSlicedSurveyRequestMessage(Box), + EncryptedBody(Box), + SurveyResponseMessage(Box), + TimeSlicedSurveyResponseMessage(Box), + SignedTimeSlicedSurveyResponseMessage(Box), + PeerStats(Box), + TimeSlicedNodeData(Box), + TimeSlicedPeerData(Box), + TimeSlicedPeerDataList(Box), + TopologyResponseBodyV2(Box), + SurveyResponseBody(Box), + TxAdvertVector(Box), + FloodAdvert(Box), + TxDemandVector(Box), + FloodDemand(Box), + StellarMessage(Box), + AuthenticatedMessage(Box), + AuthenticatedMessageV0(Box), + LiquidityPoolParameters(Box), + MuxedAccount(Box), + MuxedAccountMed25519(Box), + DecoratedSignature(Box), + OperationType(Box), + CreateAccountOp(Box), + PaymentOp(Box), + PathPaymentStrictReceiveOp(Box), + PathPaymentStrictSendOp(Box), + ManageSellOfferOp(Box), + ManageBuyOfferOp(Box), + CreatePassiveSellOfferOp(Box), + SetOptionsOp(Box), + ChangeTrustAsset(Box), + ChangeTrustOp(Box), + AllowTrustOp(Box), + ManageDataOp(Box), + BumpSequenceOp(Box), + CreateClaimableBalanceOp(Box), + ClaimClaimableBalanceOp(Box), + BeginSponsoringFutureReservesOp(Box), + RevokeSponsorshipType(Box), + RevokeSponsorshipOp(Box), + RevokeSponsorshipOpSigner(Box), + ClawbackOp(Box), + ClawbackClaimableBalanceOp(Box), + SetTrustLineFlagsOp(Box), + LiquidityPoolDepositOp(Box), + LiquidityPoolWithdrawOp(Box), + HostFunctionType(Box), + ContractIdPreimageType(Box), + ContractIdPreimage(Box), + ContractIdPreimageFromAddress(Box), + CreateContractArgs(Box), + CreateContractArgsV2(Box), + InvokeContractArgs(Box), + HostFunction(Box), + SorobanAuthorizedFunctionType(Box), + SorobanAuthorizedFunction(Box), + SorobanAuthorizedInvocation(Box), + SorobanAddressCredentials(Box), + SorobanCredentialsType(Box), + SorobanCredentials(Box), + SorobanAuthorizationEntry(Box), + SorobanAuthorizationEntries(Box), + InvokeHostFunctionOp(Box), + ExtendFootprintTtlOp(Box), + RestoreFootprintOp(Box), + Operation(Box), + OperationBody(Box), + HashIdPreimage(Box), + HashIdPreimageOperationId(Box), + HashIdPreimageRevokeId(Box), + HashIdPreimageContractId(Box), + HashIdPreimageSorobanAuthorization(Box), + MemoType(Box), + Memo(Box), + TimeBounds(Box), + LedgerBounds(Box), + PreconditionsV2(Box), + PreconditionType(Box), + Preconditions(Box), + LedgerFootprint(Box), + SorobanResources(Box), + SorobanResourcesExtV0(Box), + SorobanTransactionData(Box), + SorobanTransactionDataExt(Box), + TransactionV0(Box), + TransactionV0Ext(Box), + TransactionV0Envelope(Box), + Transaction(Box), + TransactionExt(Box), + TransactionV1Envelope(Box), + FeeBumpTransaction(Box), + FeeBumpTransactionInnerTx(Box), + FeeBumpTransactionExt(Box), + FeeBumpTransactionEnvelope(Box), + TransactionEnvelope(Box), + TransactionSignaturePayload(Box), + TransactionSignaturePayloadTaggedTransaction(Box), + ClaimAtomType(Box), + ClaimOfferAtomV0(Box), + ClaimOfferAtom(Box), + ClaimLiquidityAtom(Box), + ClaimAtom(Box), + CreateAccountResultCode(Box), + CreateAccountResult(Box), + PaymentResultCode(Box), + PaymentResult(Box), + PathPaymentStrictReceiveResultCode(Box), + SimplePaymentResult(Box), + PathPaymentStrictReceiveResult(Box), + PathPaymentStrictReceiveResultSuccess(Box), + PathPaymentStrictSendResultCode(Box), + PathPaymentStrictSendResult(Box), + PathPaymentStrictSendResultSuccess(Box), + ManageSellOfferResultCode(Box), + ManageOfferEffect(Box), + ManageOfferSuccessResult(Box), + ManageOfferSuccessResultOffer(Box), + ManageSellOfferResult(Box), + ManageBuyOfferResultCode(Box), + ManageBuyOfferResult(Box), + SetOptionsResultCode(Box), + SetOptionsResult(Box), + ChangeTrustResultCode(Box), + ChangeTrustResult(Box), + AllowTrustResultCode(Box), + AllowTrustResult(Box), + AccountMergeResultCode(Box), + AccountMergeResult(Box), + InflationResultCode(Box), + InflationPayout(Box), + InflationResult(Box), + ManageDataResultCode(Box), + ManageDataResult(Box), + BumpSequenceResultCode(Box), + BumpSequenceResult(Box), + CreateClaimableBalanceResultCode(Box), + CreateClaimableBalanceResult(Box), + ClaimClaimableBalanceResultCode(Box), + ClaimClaimableBalanceResult(Box), + BeginSponsoringFutureReservesResultCode(Box), + BeginSponsoringFutureReservesResult(Box), + EndSponsoringFutureReservesResultCode(Box), + EndSponsoringFutureReservesResult(Box), + RevokeSponsorshipResultCode(Box), + RevokeSponsorshipResult(Box), + ClawbackResultCode(Box), + ClawbackResult(Box), + ClawbackClaimableBalanceResultCode(Box), + ClawbackClaimableBalanceResult(Box), + SetTrustLineFlagsResultCode(Box), + SetTrustLineFlagsResult(Box), + LiquidityPoolDepositResultCode(Box), + LiquidityPoolDepositResult(Box), + LiquidityPoolWithdrawResultCode(Box), + LiquidityPoolWithdrawResult(Box), + InvokeHostFunctionResultCode(Box), + InvokeHostFunctionResult(Box), + ExtendFootprintTtlResultCode(Box), + ExtendFootprintTtlResult(Box), + RestoreFootprintResultCode(Box), + RestoreFootprintResult(Box), + OperationResultCode(Box), + OperationResult(Box), + OperationResultTr(Box), + TransactionResultCode(Box), + InnerTransactionResult(Box), + InnerTransactionResultResult(Box), + InnerTransactionResultExt(Box), + InnerTransactionResultPair(Box), + TransactionResult(Box), + TransactionResultResult(Box), + TransactionResultExt(Box), + Hash(Box), + Uint256(Box), + Uint32(Box), + Int32(Box), + Uint64(Box), + Int64(Box), + TimePoint(Box), + Duration(Box), + ExtensionPoint(Box), + CryptoKeyType(Box), + PublicKeyType(Box), + SignerKeyType(Box), + PublicKey(Box), + SignerKey(Box), + SignerKeyEd25519SignedPayload(Box), + Signature(Box), + SignatureHint(Box), + NodeId(Box), + AccountId(Box), + ContractId(Box), + Curve25519Secret(Box), + Curve25519Public(Box), + HmacSha256Key(Box), + HmacSha256Mac(Box), + ShortHashSeed(Box), + BinaryFuseFilterType(Box), + SerializedBinaryFuseFilter(Box), + PoolId(Box), + ClaimableBalanceIdType(Box), + ClaimableBalanceId(Box), +} + +impl Type { + // Private const slices used to compute the variant count, supporting + // cfg-gated entries whose presence varies by enabled features. + const _VARIANTS: &[TypeVariant] = &[ + TypeVariant::Value, + TypeVariant::ScpBallot, + TypeVariant::ScpStatementType, + TypeVariant::ScpNomination, + TypeVariant::ScpStatement, + TypeVariant::ScpStatementPledges, + TypeVariant::ScpStatementPrepare, + TypeVariant::ScpStatementConfirm, + TypeVariant::ScpStatementExternalize, + TypeVariant::ScpEnvelope, + TypeVariant::ScpQuorumSet, + TypeVariant::EncodedLedgerKey, + TypeVariant::ConfigSettingContractExecutionLanesV0, + TypeVariant::ConfigSettingContractComputeV0, + TypeVariant::ConfigSettingContractParallelComputeV0, + TypeVariant::ConfigSettingContractLedgerCostV0, + TypeVariant::ConfigSettingContractLedgerCostExtV0, + TypeVariant::ConfigSettingContractHistoricalDataV0, + TypeVariant::ConfigSettingContractEventsV0, + TypeVariant::ConfigSettingContractBandwidthV0, + TypeVariant::ContractCostType, + TypeVariant::ContractCostParamEntry, + TypeVariant::StateArchivalSettings, + TypeVariant::EvictionIterator, + TypeVariant::ConfigSettingScpTiming, + TypeVariant::FrozenLedgerKeys, + TypeVariant::FrozenLedgerKeysDelta, + TypeVariant::FreezeBypassTxs, + TypeVariant::FreezeBypassTxsDelta, + TypeVariant::ContractCostParams, + TypeVariant::ConfigSettingId, + TypeVariant::ConfigSettingEntry, + TypeVariant::ScEnvMetaKind, + TypeVariant::ScEnvMetaEntry, + TypeVariant::ScEnvMetaEntryInterfaceVersion, + TypeVariant::ScMetaV0, + TypeVariant::ScMetaKind, + TypeVariant::ScMetaEntry, + TypeVariant::ScSpecType, + TypeVariant::ScSpecTypeOption, + TypeVariant::ScSpecTypeResult, + TypeVariant::ScSpecTypeVec, + TypeVariant::ScSpecTypeMap, + TypeVariant::ScSpecTypeTuple, + TypeVariant::ScSpecTypeBytesN, + TypeVariant::ScSpecTypeUdt, + TypeVariant::ScSpecTypeDef, + TypeVariant::ScSpecUdtStructFieldV0, + TypeVariant::ScSpecUdtStructV0, + TypeVariant::ScSpecUdtUnionCaseVoidV0, + TypeVariant::ScSpecUdtUnionCaseTupleV0, + TypeVariant::ScSpecUdtUnionCaseV0Kind, + TypeVariant::ScSpecUdtUnionCaseV0, + TypeVariant::ScSpecUdtUnionV0, + TypeVariant::ScSpecUdtEnumCaseV0, + TypeVariant::ScSpecUdtEnumV0, + TypeVariant::ScSpecUdtErrorEnumCaseV0, + TypeVariant::ScSpecUdtErrorEnumV0, + TypeVariant::ScSpecFunctionInputV0, + TypeVariant::ScSpecFunctionV0, + TypeVariant::ScSpecEventParamLocationV0, + TypeVariant::ScSpecEventParamV0, + TypeVariant::ScSpecEventDataFormat, + TypeVariant::ScSpecEventV0, + TypeVariant::ScSpecEntryKind, + TypeVariant::ScSpecEntry, + TypeVariant::ScValType, + TypeVariant::ScErrorType, + TypeVariant::ScErrorCode, + TypeVariant::ScError, + TypeVariant::UInt128Parts, + TypeVariant::Int128Parts, + TypeVariant::UInt256Parts, + TypeVariant::Int256Parts, + TypeVariant::ContractExecutableType, + TypeVariant::ContractExecutable, + TypeVariant::ScAddressType, + TypeVariant::MuxedEd25519Account, + TypeVariant::ScAddress, + TypeVariant::ScVec, + TypeVariant::ScMap, + TypeVariant::ScBytes, + TypeVariant::ScString, + TypeVariant::ScSymbol, + TypeVariant::ScNonceKey, + TypeVariant::ScContractInstance, + TypeVariant::ScVal, + TypeVariant::ScMapEntry, + TypeVariant::LedgerCloseMetaBatch, + TypeVariant::StoredTransactionSet, + TypeVariant::StoredDebugTransactionSet, + TypeVariant::PersistedScpStateV0, + TypeVariant::PersistedScpStateV1, + TypeVariant::PersistedScpState, + TypeVariant::Thresholds, + TypeVariant::String32, + TypeVariant::String64, + TypeVariant::SequenceNumber, + TypeVariant::DataValue, + TypeVariant::AssetCode4, + TypeVariant::AssetCode12, + TypeVariant::AssetType, + TypeVariant::AssetCode, + TypeVariant::AlphaNum4, + TypeVariant::AlphaNum12, + TypeVariant::Asset, + TypeVariant::Price, + TypeVariant::Liabilities, + TypeVariant::ThresholdIndexes, + TypeVariant::LedgerEntryType, + TypeVariant::Signer, + TypeVariant::AccountFlags, + TypeVariant::SponsorshipDescriptor, + TypeVariant::AccountEntryExtensionV3, + TypeVariant::AccountEntryExtensionV2, + TypeVariant::AccountEntryExtensionV2Ext, + TypeVariant::AccountEntryExtensionV1, + TypeVariant::AccountEntryExtensionV1Ext, + TypeVariant::AccountEntry, + TypeVariant::AccountEntryExt, + TypeVariant::TrustLineFlags, + TypeVariant::LiquidityPoolType, + TypeVariant::TrustLineAsset, + TypeVariant::TrustLineEntryExtensionV2, + TypeVariant::TrustLineEntryExtensionV2Ext, + TypeVariant::TrustLineEntry, + TypeVariant::TrustLineEntryExt, + TypeVariant::TrustLineEntryV1, + TypeVariant::TrustLineEntryV1Ext, + TypeVariant::OfferEntryFlags, + TypeVariant::OfferEntry, + TypeVariant::OfferEntryExt, + TypeVariant::DataEntry, + TypeVariant::DataEntryExt, + TypeVariant::ClaimPredicateType, + TypeVariant::ClaimPredicate, + TypeVariant::ClaimantType, + TypeVariant::Claimant, + TypeVariant::ClaimantV0, + TypeVariant::ClaimableBalanceFlags, + TypeVariant::ClaimableBalanceEntryExtensionV1, + TypeVariant::ClaimableBalanceEntryExtensionV1Ext, + TypeVariant::ClaimableBalanceEntry, + TypeVariant::ClaimableBalanceEntryExt, + TypeVariant::LiquidityPoolConstantProductParameters, + TypeVariant::LiquidityPoolEntry, + TypeVariant::LiquidityPoolEntryBody, + TypeVariant::LiquidityPoolEntryConstantProduct, + TypeVariant::ContractDataDurability, + TypeVariant::ContractDataEntry, + TypeVariant::ContractCodeCostInputs, + TypeVariant::ContractCodeEntry, + TypeVariant::ContractCodeEntryExt, + TypeVariant::ContractCodeEntryV1, + TypeVariant::TtlEntry, + TypeVariant::LedgerEntryExtensionV1, + TypeVariant::LedgerEntryExtensionV1Ext, + TypeVariant::LedgerEntry, + TypeVariant::LedgerEntryData, + TypeVariant::LedgerEntryExt, + TypeVariant::LedgerKey, + TypeVariant::LedgerKeyAccount, + TypeVariant::LedgerKeyTrustLine, + TypeVariant::LedgerKeyOffer, + TypeVariant::LedgerKeyData, + TypeVariant::LedgerKeyClaimableBalance, + TypeVariant::LedgerKeyLiquidityPool, + TypeVariant::LedgerKeyContractData, + TypeVariant::LedgerKeyContractCode, + TypeVariant::LedgerKeyConfigSetting, + TypeVariant::LedgerKeyTtl, + TypeVariant::EnvelopeType, + TypeVariant::BucketListType, + TypeVariant::BucketEntryType, + TypeVariant::HotArchiveBucketEntryType, + TypeVariant::BucketMetadata, + TypeVariant::BucketMetadataExt, + TypeVariant::BucketEntry, + TypeVariant::HotArchiveBucketEntry, + TypeVariant::UpgradeType, + TypeVariant::StellarValueType, + TypeVariant::LedgerCloseValueSignature, + TypeVariant::StellarValue, + TypeVariant::StellarValueExt, + TypeVariant::LedgerHeaderFlags, + TypeVariant::LedgerHeaderExtensionV1, + TypeVariant::LedgerHeaderExtensionV1Ext, + TypeVariant::LedgerHeader, + TypeVariant::LedgerHeaderExt, + TypeVariant::LedgerUpgradeType, + TypeVariant::ConfigUpgradeSetKey, + TypeVariant::LedgerUpgrade, + TypeVariant::ConfigUpgradeSet, + TypeVariant::TxSetComponentType, + TypeVariant::DependentTxCluster, + TypeVariant::ParallelTxExecutionStage, + TypeVariant::ParallelTxsComponent, + TypeVariant::TxSetComponent, + TypeVariant::TxSetComponentTxsMaybeDiscountedFee, + TypeVariant::TransactionPhase, + TypeVariant::TransactionSet, + TypeVariant::TransactionSetV1, + TypeVariant::GeneralizedTransactionSet, + TypeVariant::TransactionResultPair, + TypeVariant::TransactionResultSet, + TypeVariant::TransactionHistoryEntry, + TypeVariant::TransactionHistoryEntryExt, + TypeVariant::TransactionHistoryResultEntry, + TypeVariant::TransactionHistoryResultEntryExt, + TypeVariant::LedgerHeaderHistoryEntry, + TypeVariant::LedgerHeaderHistoryEntryExt, + TypeVariant::LedgerScpMessages, + TypeVariant::ScpHistoryEntryV0, + TypeVariant::ScpHistoryEntry, + TypeVariant::LedgerEntryChangeType, + TypeVariant::LedgerEntryChange, + TypeVariant::LedgerEntryChanges, + TypeVariant::OperationMeta, + TypeVariant::TransactionMetaV1, + TypeVariant::TransactionMetaV2, + TypeVariant::ContractEventType, + TypeVariant::ContractEvent, + TypeVariant::ContractEventBody, + TypeVariant::ContractEventV0, + TypeVariant::DiagnosticEvent, + TypeVariant::SorobanTransactionMetaExtV1, + TypeVariant::SorobanTransactionMetaExt, + TypeVariant::SorobanTransactionMeta, + TypeVariant::TransactionMetaV3, + TypeVariant::OperationMetaV2, + TypeVariant::SorobanTransactionMetaV2, + TypeVariant::TransactionEventStage, + TypeVariant::TransactionEvent, + TypeVariant::TransactionMetaV4, + TypeVariant::InvokeHostFunctionSuccessPreImage, + TypeVariant::TransactionMeta, + TypeVariant::TransactionResultMeta, + TypeVariant::TransactionResultMetaV1, + TypeVariant::UpgradeEntryMeta, + TypeVariant::LedgerCloseMetaV0, + TypeVariant::LedgerCloseMetaExtV1, + TypeVariant::LedgerCloseMetaExt, + TypeVariant::LedgerCloseMetaV1, + TypeVariant::LedgerCloseMetaV2, + TypeVariant::LedgerCloseMeta, + TypeVariant::ErrorCode, + TypeVariant::SError, + TypeVariant::SendMore, + TypeVariant::SendMoreExtended, + TypeVariant::AuthCert, + TypeVariant::Hello, + TypeVariant::Auth, + TypeVariant::IpAddrType, + TypeVariant::PeerAddress, + TypeVariant::PeerAddressIp, + TypeVariant::MessageType, + TypeVariant::DontHave, + TypeVariant::SurveyMessageCommandType, + TypeVariant::SurveyMessageResponseType, + TypeVariant::TimeSlicedSurveyStartCollectingMessage, + TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage, + TypeVariant::TimeSlicedSurveyStopCollectingMessage, + TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage, + TypeVariant::SurveyRequestMessage, + TypeVariant::TimeSlicedSurveyRequestMessage, + TypeVariant::SignedTimeSlicedSurveyRequestMessage, + TypeVariant::EncryptedBody, + TypeVariant::SurveyResponseMessage, + TypeVariant::TimeSlicedSurveyResponseMessage, + TypeVariant::SignedTimeSlicedSurveyResponseMessage, + TypeVariant::PeerStats, + TypeVariant::TimeSlicedNodeData, + TypeVariant::TimeSlicedPeerData, + TypeVariant::TimeSlicedPeerDataList, + TypeVariant::TopologyResponseBodyV2, + TypeVariant::SurveyResponseBody, + TypeVariant::TxAdvertVector, + TypeVariant::FloodAdvert, + TypeVariant::TxDemandVector, + TypeVariant::FloodDemand, + TypeVariant::StellarMessage, + TypeVariant::AuthenticatedMessage, + TypeVariant::AuthenticatedMessageV0, + TypeVariant::LiquidityPoolParameters, + TypeVariant::MuxedAccount, + TypeVariant::MuxedAccountMed25519, + TypeVariant::DecoratedSignature, + TypeVariant::OperationType, + TypeVariant::CreateAccountOp, + TypeVariant::PaymentOp, + TypeVariant::PathPaymentStrictReceiveOp, + TypeVariant::PathPaymentStrictSendOp, + TypeVariant::ManageSellOfferOp, + TypeVariant::ManageBuyOfferOp, + TypeVariant::CreatePassiveSellOfferOp, + TypeVariant::SetOptionsOp, + TypeVariant::ChangeTrustAsset, + TypeVariant::ChangeTrustOp, + TypeVariant::AllowTrustOp, + TypeVariant::ManageDataOp, + TypeVariant::BumpSequenceOp, + TypeVariant::CreateClaimableBalanceOp, + TypeVariant::ClaimClaimableBalanceOp, + TypeVariant::BeginSponsoringFutureReservesOp, + TypeVariant::RevokeSponsorshipType, + TypeVariant::RevokeSponsorshipOp, + TypeVariant::RevokeSponsorshipOpSigner, + TypeVariant::ClawbackOp, + TypeVariant::ClawbackClaimableBalanceOp, + TypeVariant::SetTrustLineFlagsOp, + TypeVariant::LiquidityPoolDepositOp, + TypeVariant::LiquidityPoolWithdrawOp, + TypeVariant::HostFunctionType, + TypeVariant::ContractIdPreimageType, + TypeVariant::ContractIdPreimage, + TypeVariant::ContractIdPreimageFromAddress, + TypeVariant::CreateContractArgs, + TypeVariant::CreateContractArgsV2, + TypeVariant::InvokeContractArgs, + TypeVariant::HostFunction, + TypeVariant::SorobanAuthorizedFunctionType, + TypeVariant::SorobanAuthorizedFunction, + TypeVariant::SorobanAuthorizedInvocation, + TypeVariant::SorobanAddressCredentials, + TypeVariant::SorobanCredentialsType, + TypeVariant::SorobanCredentials, + TypeVariant::SorobanAuthorizationEntry, + TypeVariant::SorobanAuthorizationEntries, + TypeVariant::InvokeHostFunctionOp, + TypeVariant::ExtendFootprintTtlOp, + TypeVariant::RestoreFootprintOp, + TypeVariant::Operation, + TypeVariant::OperationBody, + TypeVariant::HashIdPreimage, + TypeVariant::HashIdPreimageOperationId, + TypeVariant::HashIdPreimageRevokeId, + TypeVariant::HashIdPreimageContractId, + TypeVariant::HashIdPreimageSorobanAuthorization, + TypeVariant::MemoType, + TypeVariant::Memo, + TypeVariant::TimeBounds, + TypeVariant::LedgerBounds, + TypeVariant::PreconditionsV2, + TypeVariant::PreconditionType, + TypeVariant::Preconditions, + TypeVariant::LedgerFootprint, + TypeVariant::SorobanResources, + TypeVariant::SorobanResourcesExtV0, + TypeVariant::SorobanTransactionData, + TypeVariant::SorobanTransactionDataExt, + TypeVariant::TransactionV0, + TypeVariant::TransactionV0Ext, + TypeVariant::TransactionV0Envelope, + TypeVariant::Transaction, + TypeVariant::TransactionExt, + TypeVariant::TransactionV1Envelope, + TypeVariant::FeeBumpTransaction, + TypeVariant::FeeBumpTransactionInnerTx, + TypeVariant::FeeBumpTransactionExt, + TypeVariant::FeeBumpTransactionEnvelope, + TypeVariant::TransactionEnvelope, + TypeVariant::TransactionSignaturePayload, + TypeVariant::TransactionSignaturePayloadTaggedTransaction, + TypeVariant::ClaimAtomType, + TypeVariant::ClaimOfferAtomV0, + TypeVariant::ClaimOfferAtom, + TypeVariant::ClaimLiquidityAtom, + TypeVariant::ClaimAtom, + TypeVariant::CreateAccountResultCode, + TypeVariant::CreateAccountResult, + TypeVariant::PaymentResultCode, + TypeVariant::PaymentResult, + TypeVariant::PathPaymentStrictReceiveResultCode, + TypeVariant::SimplePaymentResult, + TypeVariant::PathPaymentStrictReceiveResult, + TypeVariant::PathPaymentStrictReceiveResultSuccess, + TypeVariant::PathPaymentStrictSendResultCode, + TypeVariant::PathPaymentStrictSendResult, + TypeVariant::PathPaymentStrictSendResultSuccess, + TypeVariant::ManageSellOfferResultCode, + TypeVariant::ManageOfferEffect, + TypeVariant::ManageOfferSuccessResult, + TypeVariant::ManageOfferSuccessResultOffer, + TypeVariant::ManageSellOfferResult, + TypeVariant::ManageBuyOfferResultCode, + TypeVariant::ManageBuyOfferResult, + TypeVariant::SetOptionsResultCode, + TypeVariant::SetOptionsResult, + TypeVariant::ChangeTrustResultCode, + TypeVariant::ChangeTrustResult, + TypeVariant::AllowTrustResultCode, + TypeVariant::AllowTrustResult, + TypeVariant::AccountMergeResultCode, + TypeVariant::AccountMergeResult, + TypeVariant::InflationResultCode, + TypeVariant::InflationPayout, + TypeVariant::InflationResult, + TypeVariant::ManageDataResultCode, + TypeVariant::ManageDataResult, + TypeVariant::BumpSequenceResultCode, + TypeVariant::BumpSequenceResult, + TypeVariant::CreateClaimableBalanceResultCode, + TypeVariant::CreateClaimableBalanceResult, + TypeVariant::ClaimClaimableBalanceResultCode, + TypeVariant::ClaimClaimableBalanceResult, + TypeVariant::BeginSponsoringFutureReservesResultCode, + TypeVariant::BeginSponsoringFutureReservesResult, + TypeVariant::EndSponsoringFutureReservesResultCode, + TypeVariant::EndSponsoringFutureReservesResult, + TypeVariant::RevokeSponsorshipResultCode, + TypeVariant::RevokeSponsorshipResult, + TypeVariant::ClawbackResultCode, + TypeVariant::ClawbackResult, + TypeVariant::ClawbackClaimableBalanceResultCode, + TypeVariant::ClawbackClaimableBalanceResult, + TypeVariant::SetTrustLineFlagsResultCode, + TypeVariant::SetTrustLineFlagsResult, + TypeVariant::LiquidityPoolDepositResultCode, + TypeVariant::LiquidityPoolDepositResult, + TypeVariant::LiquidityPoolWithdrawResultCode, + TypeVariant::LiquidityPoolWithdrawResult, + TypeVariant::InvokeHostFunctionResultCode, + TypeVariant::InvokeHostFunctionResult, + TypeVariant::ExtendFootprintTtlResultCode, + TypeVariant::ExtendFootprintTtlResult, + TypeVariant::RestoreFootprintResultCode, + TypeVariant::RestoreFootprintResult, + TypeVariant::OperationResultCode, + TypeVariant::OperationResult, + TypeVariant::OperationResultTr, + TypeVariant::TransactionResultCode, + TypeVariant::InnerTransactionResult, + TypeVariant::InnerTransactionResultResult, + TypeVariant::InnerTransactionResultExt, + TypeVariant::InnerTransactionResultPair, + TypeVariant::TransactionResult, + TypeVariant::TransactionResultResult, + TypeVariant::TransactionResultExt, + TypeVariant::Hash, + TypeVariant::Uint256, + TypeVariant::Uint32, + TypeVariant::Int32, + TypeVariant::Uint64, + TypeVariant::Int64, + TypeVariant::TimePoint, + TypeVariant::Duration, + TypeVariant::ExtensionPoint, + TypeVariant::CryptoKeyType, + TypeVariant::PublicKeyType, + TypeVariant::SignerKeyType, + TypeVariant::PublicKey, + TypeVariant::SignerKey, + TypeVariant::SignerKeyEd25519SignedPayload, + TypeVariant::Signature, + TypeVariant::SignatureHint, + TypeVariant::NodeId, + TypeVariant::AccountId, + TypeVariant::ContractId, + TypeVariant::Curve25519Secret, + TypeVariant::Curve25519Public, + TypeVariant::HmacSha256Key, + TypeVariant::HmacSha256Mac, + TypeVariant::ShortHashSeed, + TypeVariant::BinaryFuseFilterType, + TypeVariant::SerializedBinaryFuseFilter, + TypeVariant::PoolId, + TypeVariant::ClaimableBalanceIdType, + TypeVariant::ClaimableBalanceId, + ]; + pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Value", "ScpBallot", "ScpStatementType", @@ -57394,6 +55541,15 @@ impl Type { "ClaimableBalanceIdType", "ClaimableBalanceId", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[cfg(feature = "std")] #[allow(clippy::too_many_lines)] diff --git a/xdr-generator-rust/generator/templates/type_enum.rs.jinja b/xdr-generator-rust/generator/templates/type_enum.rs.jinja index 2953d2ad..b596cc48 100644 --- a/xdr-generator-rust/generator/templates/type_enum.rs.jinja +++ b/xdr-generator-rust/generator/templates/type_enum.rs.jinja @@ -25,14 +25,15 @@ impl TypeVariant { TypeVariant::{{ t.name }}, {%- endfor %} ]; - pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = [ -{%- for t in type_variant_enum.types %} -{%- if let Some(cfg) = t.cfg %} - #[cfg({{ cfg }})] -{%- endif %} - TypeVariant::{{ t.name }}, -{%- endfor %} - ]; + pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; const _VARIANTS_STR: &[&str] = &[ {%- for t in type_variant_enum.types %} {%- if let Some(cfg) = t.cfg %} @@ -41,14 +42,15 @@ impl TypeVariant { "{{ t.name }}", {%- endfor %} ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = [ -{%- for t in type_variant_enum.types %} -{%- if let Some(cfg) = t.cfg %} - #[cfg({{ cfg }})] -{%- endif %} - "{{ t.name }}", -{%- endfor %} - ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] #[allow(clippy::too_many_lines)] @@ -141,14 +143,15 @@ impl Type { TypeVariant::{{ t.name }}, {%- endfor %} ]; - pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = [ -{%- for t in type_variant_enum.types %} -{%- if let Some(cfg) = t.cfg %} - #[cfg({{ cfg }})] -{%- endif %} - TypeVariant::{{ t.name }}, -{%- endfor %} - ]; + pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; const _VARIANTS_STR: &[&str] = &[ {%- for t in type_variant_enum.types %} {%- if let Some(cfg) = t.cfg %} @@ -157,14 +160,15 @@ impl Type { "{{ t.name }}", {%- endfor %} ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = [ -{%- for t in type_variant_enum.types %} -{%- if let Some(cfg) = t.cfg %} - #[cfg({{ cfg }})] -{%- endif %} - "{{ t.name }}", -{%- endfor %} - ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[cfg(feature = "std")] #[allow(clippy::too_many_lines)] From 67af0d87065504809e2803ab45377751fe94a1ec Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 18 Mar 2026 09:27:42 +1000 Subject: [PATCH 05/28] add ifdef support to xdr enum and union generator --- src/curr/generated.rs | 5532 +++++++++++++---- src/next/generated.rs | 4831 ++++++++++++-- xdr-generator-rust/generator/src/generator.rs | 2 + xdr-generator-rust/generator/src/output.rs | 2 + .../generator/templates/enum.rs.jinja | 43 +- .../generator/templates/union.rs.jinja | 49 +- xdr-generator-rust/xdr-parser/src/ast.rs | 9 +- xdr-generator-rust/xdr-parser/src/parser.rs | 133 +- xdr/curr | 2 +- 9 files changed, 8697 insertions(+), 1906 deletions(-) diff --git a/src/curr/generated.rs b/src/curr/generated.rs index 888d252f..76f3195a 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -23,7 +23,7 @@ pub const XDR_FILES_SHA256: [(&str, &str); 13] = [ ), ( "xdr/curr/Stellar-contract-config-setting.x", - "a034a3eb4d8b94f5c4c573fe14a1afc548aa316e1e897aa70e5a1688aada3c77", + "26c2c761d5e175c8b2f373611c942ef4484a6cd33f142f69638b2df82be85313", ), ( "xdr/curr/Stellar-contract-env-meta.x", @@ -39,7 +39,7 @@ pub const XDR_FILES_SHA256: [(&str, &str); 13] = [ ), ( "xdr/curr/Stellar-contract.x", - "dce61df115c93fef5bb352beac1b504a518cb11dcb8ee029b1bb1b5f8fe52982", + "caa002cf7e0b961b0f1f5be429c1a1b1478b49be494c9d547fc3c4b2fa6b38f0", ), ( "xdr/curr/Stellar-exporter.x", @@ -63,7 +63,7 @@ pub const XDR_FILES_SHA256: [(&str, &str); 13] = [ ), ( "xdr/curr/Stellar-transaction.x", - "30d03669fb29ca48fdda1c84258473fe6d798f3b881c0224b34df1a1f9e21e80", + "7c4c951f233ad7cdabedd740abd9697626ec5bc03ce97bf60cbaeee1481a48d1", ), ( "xdr/curr/Stellar-types.x", @@ -4285,13 +4285,31 @@ pub enum ScpStatementType { } impl ScpStatementType { - pub const VARIANTS: [ScpStatementType; 4] = [ + const _VARIANTS: &[ScpStatementType] = &[ ScpStatementType::Prepare, ScpStatementType::Confirm, ScpStatementType::Externalize, ScpStatementType::Nominate, ]; - pub const VARIANTS_STR: [&'static str; 4] = ["Prepare", "Confirm", "Externalize", "Nominate"]; + pub const VARIANTS: [ScpStatementType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Prepare", "Confirm", "Externalize", "Nominate"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -4304,7 +4322,7 @@ impl ScpStatementType { } #[must_use] - pub const fn variants() -> [ScpStatementType; 4] { + pub const fn variants() -> [ScpStatementType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -4669,13 +4687,31 @@ impl Default for ScpStatementPledges { } impl ScpStatementPledges { - pub const VARIANTS: [ScpStatementType; 4] = [ + const _VARIANTS: &[ScpStatementType] = &[ ScpStatementType::Prepare, ScpStatementType::Confirm, ScpStatementType::Externalize, ScpStatementType::Nominate, ]; - pub const VARIANTS_STR: [&'static str; 4] = ["Prepare", "Confirm", "Externalize", "Nominate"]; + pub const VARIANTS: [ScpStatementType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Prepare", "Confirm", "Externalize", "Nominate"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -4699,7 +4735,7 @@ impl ScpStatementPledges { } #[must_use] - pub const fn variants() -> [ScpStatementType; 4] { + pub const fn variants() -> [ScpStatementType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -4955,113 +4991,6 @@ impl WriteXdr for ScpQuorumSet { } } -/// EncodedLedgerKey is an XDR Typedef defined as: -/// -/// ```text -/// typedef opaque EncodedLedgerKey<>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct EncodedLedgerKey(pub BytesM); - -impl From for BytesM { - #[must_use] - fn from(x: EncodedLedgerKey) -> Self { - x.0 - } -} - -impl From for EncodedLedgerKey { - #[must_use] - fn from(x: BytesM) -> Self { - EncodedLedgerKey(x) - } -} - -impl AsRef for EncodedLedgerKey { - #[must_use] - fn as_ref(&self) -> &BytesM { - &self.0 - } -} - -impl ReadXdr for EncodedLedgerKey { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = BytesM::read_xdr(r)?; - let v = EncodedLedgerKey(i); - Ok(v) - }) - } -} - -impl WriteXdr for EncodedLedgerKey { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for EncodedLedgerKey { - type Target = BytesM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: EncodedLedgerKey) -> Self { - x.0 .0 - } -} - -impl TryFrom> for EncodedLedgerKey { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(EncodedLedgerKey(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for EncodedLedgerKey { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(EncodedLedgerKey(x.try_into()?)) - } -} - -impl AsRef> for EncodedLedgerKey { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[u8]> for EncodedLedgerKey { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0 .0 - } -} - /// ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as: /// /// ```text @@ -5780,9 +5709,7 @@ impl WriteXdr for ConfigSettingContractBandwidthV0 { /// // Cost of performing BN254 scalar element exponentiation /// Bn254FrPow = 83, /// // Cost of performing BN254 scalar element inversion -/// Bn254FrInv = 84, -/// // Cost of performing BN254 G1 multi-scalar multiplication (MSM) -/// Bn254G1Msm = 85 +/// Bn254FrInv = 84 /// }; /// ``` /// @@ -5884,11 +5811,10 @@ pub enum ContractCostType { Bn254FrMul = 82, Bn254FrPow = 83, Bn254FrInv = 84, - Bn254G1Msm = 85, } impl ContractCostType { - pub const VARIANTS: [ContractCostType; 86] = [ + const _VARIANTS: &[ContractCostType] = &[ ContractCostType::WasmInsnExec, ContractCostType::MemAlloc, ContractCostType::MemCpy, @@ -5974,9 +5900,17 @@ impl ContractCostType { ContractCostType::Bn254FrMul, ContractCostType::Bn254FrPow, ContractCostType::Bn254FrInv, - ContractCostType::Bn254G1Msm, ]; - pub const VARIANTS_STR: [&'static str; 86] = [ + pub const VARIANTS: [ContractCostType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "WasmInsnExec", "MemAlloc", "MemCpy", @@ -6062,8 +5996,16 @@ impl ContractCostType { "Bn254FrMul", "Bn254FrPow", "Bn254FrInv", - "Bn254G1Msm", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -6153,12 +6095,11 @@ impl ContractCostType { Self::Bn254FrMul => "Bn254FrMul", Self::Bn254FrPow => "Bn254FrPow", Self::Bn254FrInv => "Bn254FrInv", - Self::Bn254G1Msm => "Bn254G1Msm", } } #[must_use] - pub const fn variants() -> [ContractCostType; 86] { + pub const fn variants() -> [ContractCostType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -6274,7 +6215,6 @@ impl TryFrom for ContractCostType { 82 => ContractCostType::Bn254FrMul, 83 => ContractCostType::Bn254FrPow, 84 => ContractCostType::Bn254FrInv, - 85 => ContractCostType::Bn254G1Msm, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -6591,190 +6531,6 @@ impl WriteXdr for ConfigSettingScpTiming { } } -/// FrozenLedgerKeys is an XDR Struct defined as: -/// -/// ```text -/// struct FrozenLedgerKeys { -/// EncodedLedgerKey keys<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct FrozenLedgerKeys { - pub keys: VecM, -} - -impl ReadXdr for FrozenLedgerKeys { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - keys: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for FrozenLedgerKeys { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.keys.write_xdr(w)?; - Ok(()) - }) - } -} - -/// FrozenLedgerKeysDelta is an XDR Struct defined as: -/// -/// ```text -/// struct FrozenLedgerKeysDelta { -/// EncodedLedgerKey keysToFreeze<>; -/// EncodedLedgerKey keysToUnfreeze<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct FrozenLedgerKeysDelta { - pub keys_to_freeze: VecM, - pub keys_to_unfreeze: VecM, -} - -impl ReadXdr for FrozenLedgerKeysDelta { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - keys_to_freeze: VecM::::read_xdr(r)?, - keys_to_unfreeze: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for FrozenLedgerKeysDelta { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.keys_to_freeze.write_xdr(w)?; - self.keys_to_unfreeze.write_xdr(w)?; - Ok(()) - }) - } -} - -/// FreezeBypassTxs is an XDR Struct defined as: -/// -/// ```text -/// struct FreezeBypassTxs { -/// Hash txHashes<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct FreezeBypassTxs { - pub tx_hashes: VecM, -} - -impl ReadXdr for FreezeBypassTxs { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - tx_hashes: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for FreezeBypassTxs { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.tx_hashes.write_xdr(w)?; - Ok(()) - }) - } -} - -/// FreezeBypassTxsDelta is an XDR Struct defined as: -/// -/// ```text -/// struct FreezeBypassTxsDelta { -/// Hash addTxs<>; -/// Hash removeTxs<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct FreezeBypassTxsDelta { - pub add_txs: VecM, - pub remove_txs: VecM, -} - -impl ReadXdr for FreezeBypassTxsDelta { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - add_txs: VecM::::read_xdr(r)?, - remove_txs: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for FreezeBypassTxsDelta { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.add_txs.write_xdr(w)?; - self.remove_txs.write_xdr(w)?; - Ok(()) - }) - } -} - /// ContractCostCountLimit is an XDR Const defined as: /// /// ```text @@ -6911,11 +6667,7 @@ impl AsRef<[ContractCostParamEntry]> for ContractCostParams { /// CONFIG_SETTING_EVICTION_ITERATOR = 13, /// CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, /// CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, -/// CONFIG_SETTING_SCP_TIMING = 16, -/// CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, -/// CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, -/// CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, -/// CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 +/// CONFIG_SETTING_SCP_TIMING = 16 /// }; /// ``` /// @@ -6949,14 +6701,10 @@ pub enum ConfigSettingId { ContractParallelComputeV0 = 14, ContractLedgerCostExtV0 = 15, ScpTiming = 16, - FrozenLedgerKeys = 17, - FrozenLedgerKeysDelta = 18, - FreezeBypassTxs = 19, - FreezeBypassTxsDelta = 20, } impl ConfigSettingId { - pub const VARIANTS: [ConfigSettingId; 21] = [ + const _VARIANTS: &[ConfigSettingId] = &[ ConfigSettingId::ContractMaxSizeBytes, ConfigSettingId::ContractComputeV0, ConfigSettingId::ContractLedgerCostV0, @@ -6974,12 +6722,17 @@ impl ConfigSettingId { ConfigSettingId::ContractParallelComputeV0, ConfigSettingId::ContractLedgerCostExtV0, ConfigSettingId::ScpTiming, - ConfigSettingId::FrozenLedgerKeys, - ConfigSettingId::FrozenLedgerKeysDelta, - ConfigSettingId::FreezeBypassTxs, - ConfigSettingId::FreezeBypassTxsDelta, ]; - pub const VARIANTS_STR: [&'static str; 21] = [ + pub const VARIANTS: [ConfigSettingId; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "ContractMaxSizeBytes", "ContractComputeV0", "ContractLedgerCostV0", @@ -6997,11 +6750,16 @@ impl ConfigSettingId { "ContractParallelComputeV0", "ContractLedgerCostExtV0", "ScpTiming", - "FrozenLedgerKeys", - "FrozenLedgerKeysDelta", - "FreezeBypassTxs", - "FreezeBypassTxsDelta", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -7023,15 +6781,11 @@ impl ConfigSettingId { Self::ContractParallelComputeV0 => "ContractParallelComputeV0", Self::ContractLedgerCostExtV0 => "ContractLedgerCostExtV0", Self::ScpTiming => "ScpTiming", - Self::FrozenLedgerKeys => "FrozenLedgerKeys", - Self::FrozenLedgerKeysDelta => "FrozenLedgerKeysDelta", - Self::FreezeBypassTxs => "FreezeBypassTxs", - Self::FreezeBypassTxsDelta => "FreezeBypassTxsDelta", } } #[must_use] - pub const fn variants() -> [ConfigSettingId; 21] { + pub const fn variants() -> [ConfigSettingId; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -7079,10 +6833,6 @@ impl TryFrom for ConfigSettingId { 14 => ConfigSettingId::ContractParallelComputeV0, 15 => ConfigSettingId::ContractLedgerCostExtV0, 16 => ConfigSettingId::ScpTiming, - 17 => ConfigSettingId::FrozenLedgerKeys, - 18 => ConfigSettingId::FrozenLedgerKeysDelta, - 19 => ConfigSettingId::FreezeBypassTxs, - 20 => ConfigSettingId::FreezeBypassTxsDelta, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -7157,14 +6907,6 @@ impl WriteXdr for ConfigSettingId { /// ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; /// case CONFIG_SETTING_SCP_TIMING: /// ConfigSettingSCPTiming contractSCPTiming; -/// case CONFIG_SETTING_FROZEN_LEDGER_KEYS: -/// FrozenLedgerKeys frozenLedgerKeys; -/// case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: -/// FrozenLedgerKeysDelta frozenLedgerKeysDelta; -/// case CONFIG_SETTING_FREEZE_BYPASS_TXS: -/// FreezeBypassTxs freezeBypassTxs; -/// case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: -/// FreezeBypassTxsDelta freezeBypassTxsDelta; /// }; /// ``` /// @@ -7204,10 +6946,6 @@ pub enum ConfigSettingEntry { ContractParallelComputeV0(ConfigSettingContractParallelComputeV0), ContractLedgerCostExtV0(ConfigSettingContractLedgerCostExtV0), ScpTiming(ConfigSettingScpTiming), - FrozenLedgerKeys(FrozenLedgerKeys), - FrozenLedgerKeysDelta(FrozenLedgerKeysDelta), - FreezeBypassTxs(FreezeBypassTxs), - FreezeBypassTxsDelta(FreezeBypassTxsDelta), } #[cfg(feature = "alloc")] @@ -7218,7 +6956,7 @@ impl Default for ConfigSettingEntry { } impl ConfigSettingEntry { - pub const VARIANTS: [ConfigSettingId; 21] = [ + const _VARIANTS: &[ConfigSettingId] = &[ ConfigSettingId::ContractMaxSizeBytes, ConfigSettingId::ContractComputeV0, ConfigSettingId::ContractLedgerCostV0, @@ -7236,12 +6974,17 @@ impl ConfigSettingEntry { ConfigSettingId::ContractParallelComputeV0, ConfigSettingId::ContractLedgerCostExtV0, ConfigSettingId::ScpTiming, - ConfigSettingId::FrozenLedgerKeys, - ConfigSettingId::FrozenLedgerKeysDelta, - ConfigSettingId::FreezeBypassTxs, - ConfigSettingId::FreezeBypassTxsDelta, ]; - pub const VARIANTS_STR: [&'static str; 21] = [ + pub const VARIANTS: [ConfigSettingId; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "ContractMaxSizeBytes", "ContractComputeV0", "ContractLedgerCostV0", @@ -7259,11 +7002,16 @@ impl ConfigSettingEntry { "ContractParallelComputeV0", "ContractLedgerCostExtV0", "ScpTiming", - "FrozenLedgerKeys", - "FrozenLedgerKeysDelta", - "FreezeBypassTxs", - "FreezeBypassTxsDelta", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -7285,10 +7033,6 @@ impl ConfigSettingEntry { Self::ContractParallelComputeV0(_) => "ContractParallelComputeV0", Self::ContractLedgerCostExtV0(_) => "ContractLedgerCostExtV0", Self::ScpTiming(_) => "ScpTiming", - Self::FrozenLedgerKeys(_) => "FrozenLedgerKeys", - Self::FrozenLedgerKeysDelta(_) => "FrozenLedgerKeysDelta", - Self::FreezeBypassTxs(_) => "FreezeBypassTxs", - Self::FreezeBypassTxsDelta(_) => "FreezeBypassTxsDelta", } } @@ -7317,15 +7061,11 @@ impl ConfigSettingEntry { Self::ContractParallelComputeV0(_) => ConfigSettingId::ContractParallelComputeV0, Self::ContractLedgerCostExtV0(_) => ConfigSettingId::ContractLedgerCostExtV0, Self::ScpTiming(_) => ConfigSettingId::ScpTiming, - Self::FrozenLedgerKeys(_) => ConfigSettingId::FrozenLedgerKeys, - Self::FrozenLedgerKeysDelta(_) => ConfigSettingId::FrozenLedgerKeysDelta, - Self::FreezeBypassTxs(_) => ConfigSettingId::FreezeBypassTxs, - Self::FreezeBypassTxsDelta(_) => ConfigSettingId::FreezeBypassTxsDelta, } } #[must_use] - pub const fn variants() -> [ConfigSettingId; 21] { + pub const fn variants() -> [ConfigSettingId; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -7408,18 +7148,6 @@ impl ReadXdr for ConfigSettingEntry { ConfigSettingContractLedgerCostExtV0::read_xdr(r)?, ), ConfigSettingId::ScpTiming => Self::ScpTiming(ConfigSettingScpTiming::read_xdr(r)?), - ConfigSettingId::FrozenLedgerKeys => { - Self::FrozenLedgerKeys(FrozenLedgerKeys::read_xdr(r)?) - } - ConfigSettingId::FrozenLedgerKeysDelta => { - Self::FrozenLedgerKeysDelta(FrozenLedgerKeysDelta::read_xdr(r)?) - } - ConfigSettingId::FreezeBypassTxs => { - Self::FreezeBypassTxs(FreezeBypassTxs::read_xdr(r)?) - } - ConfigSettingId::FreezeBypassTxsDelta => { - Self::FreezeBypassTxsDelta(FreezeBypassTxsDelta::read_xdr(r)?) - } #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -7452,10 +7180,6 @@ impl WriteXdr for ConfigSettingEntry { Self::ContractParallelComputeV0(v) => v.write_xdr(w)?, Self::ContractLedgerCostExtV0(v) => v.write_xdr(w)?, Self::ScpTiming(v) => v.write_xdr(w)?, - Self::FrozenLedgerKeys(v) => v.write_xdr(w)?, - Self::FrozenLedgerKeysDelta(v) => v.write_xdr(w)?, - Self::FreezeBypassTxs(v) => v.write_xdr(w)?, - Self::FreezeBypassTxsDelta(v) => v.write_xdr(w)?, }; Ok(()) }) @@ -7488,8 +7212,26 @@ pub enum ScEnvMetaKind { } impl ScEnvMetaKind { - pub const VARIANTS: [ScEnvMetaKind; 1] = [ScEnvMetaKind::ScEnvMetaKindInterfaceVersion]; - pub const VARIANTS_STR: [&'static str; 1] = ["ScEnvMetaKindInterfaceVersion"]; + const _VARIANTS: &[ScEnvMetaKind] = &[ScEnvMetaKind::ScEnvMetaKindInterfaceVersion]; + pub const VARIANTS: [ScEnvMetaKind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ScEnvMetaKindInterfaceVersion"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -7499,7 +7241,7 @@ impl ScEnvMetaKind { } #[must_use] - pub const fn variants() -> [ScEnvMetaKind; 1] { + pub const fn variants() -> [ScEnvMetaKind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -7651,8 +7393,26 @@ impl Default for ScEnvMetaEntry { } impl ScEnvMetaEntry { - pub const VARIANTS: [ScEnvMetaKind; 1] = [ScEnvMetaKind::ScEnvMetaKindInterfaceVersion]; - pub const VARIANTS_STR: [&'static str; 1] = ["ScEnvMetaKindInterfaceVersion"]; + const _VARIANTS: &[ScEnvMetaKind] = &[ScEnvMetaKind::ScEnvMetaKindInterfaceVersion]; + pub const VARIANTS: [ScEnvMetaKind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ScEnvMetaKindInterfaceVersion"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -7670,7 +7430,7 @@ impl ScEnvMetaEntry { } #[must_use] - pub const fn variants() -> [ScEnvMetaKind; 1] { + pub const fn variants() -> [ScEnvMetaKind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -7806,8 +7566,26 @@ pub enum ScMetaKind { } impl ScMetaKind { - pub const VARIANTS: [ScMetaKind; 1] = [ScMetaKind::ScMetaV0]; - pub const VARIANTS_STR: [&'static str; 1] = ["ScMetaV0"]; + const _VARIANTS: &[ScMetaKind] = &[ScMetaKind::ScMetaV0]; + pub const VARIANTS: [ScMetaKind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ScMetaV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -7817,7 +7595,7 @@ impl ScMetaKind { } #[must_use] - pub const fn variants() -> [ScMetaKind; 1] { + pub const fn variants() -> [ScMetaKind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -7918,8 +7696,26 @@ impl Default for ScMetaEntry { } impl ScMetaEntry { - pub const VARIANTS: [ScMetaKind; 1] = [ScMetaKind::ScMetaV0]; - pub const VARIANTS_STR: [&'static str; 1] = ["ScMetaV0"]; + const _VARIANTS: &[ScMetaKind] = &[ScMetaKind::ScMetaV0]; + pub const VARIANTS: [ScMetaKind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ScMetaV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -7937,7 +7733,7 @@ impl ScMetaEntry { } #[must_use] - pub const fn variants() -> [ScMetaKind; 1] { + pub const fn variants() -> [ScMetaKind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -8084,7 +7880,7 @@ pub enum ScSpecType { } impl ScSpecType { - pub const VARIANTS: [ScSpecType; 26] = [ + const _VARIANTS: &[ScSpecType] = &[ ScSpecType::Val, ScSpecType::Bool, ScSpecType::Void, @@ -8112,7 +7908,16 @@ impl ScSpecType { ScSpecType::BytesN, ScSpecType::Udt, ]; - pub const VARIANTS_STR: [&'static str; 26] = [ + pub const VARIANTS: [ScSpecType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Val", "Bool", "Void", @@ -8140,6 +7945,15 @@ impl ScSpecType { "BytesN", "Udt", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -8174,7 +7988,7 @@ impl ScSpecType { } #[must_use] - pub const fn variants() -> [ScSpecType; 26] { + pub const fn variants() -> [ScSpecType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -8680,7 +8494,7 @@ impl Default for ScSpecTypeDef { } impl ScSpecTypeDef { - pub const VARIANTS: [ScSpecType; 26] = [ + const _VARIANTS: &[ScSpecType] = &[ ScSpecType::Val, ScSpecType::Bool, ScSpecType::Void, @@ -8708,7 +8522,16 @@ impl ScSpecTypeDef { ScSpecType::BytesN, ScSpecType::Udt, ]; - pub const VARIANTS_STR: [&'static str; 26] = [ + pub const VARIANTS: [ScSpecType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Val", "Bool", "Void", @@ -8736,6 +8559,15 @@ impl ScSpecTypeDef { "BytesN", "Udt", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -8803,7 +8635,7 @@ impl ScSpecTypeDef { } #[must_use] - pub const fn variants() -> [ScSpecType; 26] { + pub const fn variants() -> [ScSpecType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -9150,11 +8982,29 @@ pub enum ScSpecUdtUnionCaseV0Kind { } impl ScSpecUdtUnionCaseV0Kind { - pub const VARIANTS: [ScSpecUdtUnionCaseV0Kind; 2] = [ + const _VARIANTS: &[ScSpecUdtUnionCaseV0Kind] = &[ ScSpecUdtUnionCaseV0Kind::VoidV0, ScSpecUdtUnionCaseV0Kind::TupleV0, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["VoidV0", "TupleV0"]; + pub const VARIANTS: [ScSpecUdtUnionCaseV0Kind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["VoidV0", "TupleV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -9165,7 +9015,7 @@ impl ScSpecUdtUnionCaseV0Kind { } #[must_use] - pub const fn variants() -> [ScSpecUdtUnionCaseV0Kind; 2] { + pub const fn variants() -> [ScSpecUdtUnionCaseV0Kind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -9270,11 +9120,29 @@ impl Default for ScSpecUdtUnionCaseV0 { } impl ScSpecUdtUnionCaseV0 { - pub const VARIANTS: [ScSpecUdtUnionCaseV0Kind; 2] = [ + const _VARIANTS: &[ScSpecUdtUnionCaseV0Kind] = &[ ScSpecUdtUnionCaseV0Kind::VoidV0, ScSpecUdtUnionCaseV0Kind::TupleV0, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["VoidV0", "TupleV0"]; + pub const VARIANTS: [ScSpecUdtUnionCaseV0Kind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["VoidV0", "TupleV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -9294,7 +9162,7 @@ impl ScSpecUdtUnionCaseV0 { } #[must_use] - pub const fn variants() -> [ScSpecUdtUnionCaseV0Kind; 2] { + pub const fn variants() -> [ScSpecUdtUnionCaseV0Kind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -9772,11 +9640,29 @@ pub enum ScSpecEventParamLocationV0 { } impl ScSpecEventParamLocationV0 { - pub const VARIANTS: [ScSpecEventParamLocationV0; 2] = [ + const _VARIANTS: &[ScSpecEventParamLocationV0] = &[ ScSpecEventParamLocationV0::Data, ScSpecEventParamLocationV0::TopicList, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Data", "TopicList"]; + pub const VARIANTS: [ScSpecEventParamLocationV0; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Data", "TopicList"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -9787,7 +9673,7 @@ impl ScSpecEventParamLocationV0 { } #[must_use] - pub const fn variants() -> [ScSpecEventParamLocationV0; 2] { + pub const fn variants() -> [ScSpecEventParamLocationV0; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -9942,12 +9828,30 @@ pub enum ScSpecEventDataFormat { } impl ScSpecEventDataFormat { - pub const VARIANTS: [ScSpecEventDataFormat; 3] = [ + const _VARIANTS: &[ScSpecEventDataFormat] = &[ ScSpecEventDataFormat::SingleValue, ScSpecEventDataFormat::Vec, ScSpecEventDataFormat::Map, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["SingleValue", "Vec", "Map"]; + pub const VARIANTS: [ScSpecEventDataFormat; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["SingleValue", "Vec", "Map"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -9959,7 +9863,7 @@ impl ScSpecEventDataFormat { } #[must_use] - pub const fn variants() -> [ScSpecEventDataFormat; 3] { + pub const fn variants() -> [ScSpecEventDataFormat; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -10129,7 +10033,7 @@ pub enum ScSpecEntryKind { } impl ScSpecEntryKind { - pub const VARIANTS: [ScSpecEntryKind; 6] = [ + const _VARIANTS: &[ScSpecEntryKind] = &[ ScSpecEntryKind::FunctionV0, ScSpecEntryKind::UdtStructV0, ScSpecEntryKind::UdtUnionV0, @@ -10137,7 +10041,16 @@ impl ScSpecEntryKind { ScSpecEntryKind::UdtErrorEnumV0, ScSpecEntryKind::EventV0, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [ScSpecEntryKind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "FunctionV0", "UdtStructV0", "UdtUnionV0", @@ -10145,6 +10058,15 @@ impl ScSpecEntryKind { "UdtErrorEnumV0", "EventV0", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -10159,7 +10081,7 @@ impl ScSpecEntryKind { } #[must_use] - pub const fn variants() -> [ScSpecEntryKind; 6] { + pub const fn variants() -> [ScSpecEntryKind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -10280,7 +10202,7 @@ impl Default for ScSpecEntry { } impl ScSpecEntry { - pub const VARIANTS: [ScSpecEntryKind; 6] = [ + const _VARIANTS: &[ScSpecEntryKind] = &[ ScSpecEntryKind::FunctionV0, ScSpecEntryKind::UdtStructV0, ScSpecEntryKind::UdtUnionV0, @@ -10288,7 +10210,16 @@ impl ScSpecEntry { ScSpecEntryKind::UdtErrorEnumV0, ScSpecEntryKind::EventV0, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [ScSpecEntryKind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "FunctionV0", "UdtStructV0", "UdtUnionV0", @@ -10296,6 +10227,15 @@ impl ScSpecEntry { "UdtErrorEnumV0", "EventV0", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -10323,7 +10263,7 @@ impl ScSpecEntry { } #[must_use] - pub const fn variants() -> [ScSpecEntryKind; 6] { + pub const fn variants() -> [ScSpecEntryKind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -10447,7 +10387,12 @@ impl WriteXdr for ScSpecEntry { /// // symbolic SCVals used as the key for ledger entries for a contract's /// // instance and an address' nonce, respectively. /// SCV_LEDGER_KEY_CONTRACT_INSTANCE = 20, +/// #ifdef SPARSE_MAP +/// SCV_LEDGER_KEY_NONCE = 21, +/// SCV_SPARSE_MAP = 22 +/// #else /// SCV_LEDGER_KEY_NONCE = 21 +/// #endif /// }; /// ``` /// @@ -10485,11 +10430,16 @@ pub enum ScValType { Address = 18, ContractInstance = 19, LedgerKeyContractInstance = 20, + #[cfg(feature = "SPARSE_MAP")] + LedgerKeyNonce = 21, + #[cfg(feature = "SPARSE_MAP")] + SparseMap = 22, + #[cfg(not(feature = "SPARSE_MAP"))] LedgerKeyNonce = 21, } impl ScValType { - pub const VARIANTS: [ScValType; 22] = [ + const _VARIANTS: &[ScValType] = &[ ScValType::Bool, ScValType::Void, ScValType::Error, @@ -10511,9 +10461,23 @@ impl ScValType { ScValType::Address, ScValType::ContractInstance, ScValType::LedgerKeyContractInstance, + #[cfg(feature = "SPARSE_MAP")] + ScValType::LedgerKeyNonce, + #[cfg(feature = "SPARSE_MAP")] + ScValType::SparseMap, + #[cfg(not(feature = "SPARSE_MAP"))] ScValType::LedgerKeyNonce, ]; - pub const VARIANTS_STR: [&'static str; 22] = [ + pub const VARIANTS: [ScValType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Bool", "Void", "Error", @@ -10535,8 +10499,22 @@ impl ScValType { "Address", "ContractInstance", "LedgerKeyContractInstance", + #[cfg(feature = "SPARSE_MAP")] + "LedgerKeyNonce", + #[cfg(feature = "SPARSE_MAP")] + "SparseMap", + #[cfg(not(feature = "SPARSE_MAP"))] "LedgerKeyNonce", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -10562,12 +10540,17 @@ impl ScValType { Self::Address => "Address", Self::ContractInstance => "ContractInstance", Self::LedgerKeyContractInstance => "LedgerKeyContractInstance", + #[cfg(feature = "SPARSE_MAP")] + Self::LedgerKeyNonce => "LedgerKeyNonce", + #[cfg(feature = "SPARSE_MAP")] + Self::SparseMap => "SparseMap", + #[cfg(not(feature = "SPARSE_MAP"))] Self::LedgerKeyNonce => "LedgerKeyNonce", } } #[must_use] - pub const fn variants() -> [ScValType; 22] { + pub const fn variants() -> [ScValType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -10619,6 +10602,11 @@ impl TryFrom for ScValType { 18 => ScValType::Address, 19 => ScValType::ContractInstance, 20 => ScValType::LedgerKeyContractInstance, + #[cfg(feature = "SPARSE_MAP")] + 21 => ScValType::LedgerKeyNonce, + #[cfg(feature = "SPARSE_MAP")] + 22 => ScValType::SparseMap, + #[cfg(not(feature = "SPARSE_MAP"))] 21 => ScValType::LedgerKeyNonce, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), @@ -10699,7 +10687,7 @@ pub enum ScErrorType { } impl ScErrorType { - pub const VARIANTS: [ScErrorType; 10] = [ + const _VARIANTS: &[ScErrorType] = &[ ScErrorType::Contract, ScErrorType::WasmVm, ScErrorType::Context, @@ -10711,10 +10699,28 @@ impl ScErrorType { ScErrorType::Value, ScErrorType::Auth, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [ScErrorType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Contract", "WasmVm", "Context", "Storage", "Object", "Crypto", "Events", "Budget", "Value", "Auth", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -10733,7 +10739,7 @@ impl ScErrorType { } #[must_use] - pub const fn variants() -> [ScErrorType; 10] { + pub const fn variants() -> [ScErrorType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -10853,7 +10859,7 @@ pub enum ScErrorCode { } impl ScErrorCode { - pub const VARIANTS: [ScErrorCode; 10] = [ + const _VARIANTS: &[ScErrorCode] = &[ ScErrorCode::ArithDomain, ScErrorCode::IndexBounds, ScErrorCode::InvalidInput, @@ -10865,7 +10871,16 @@ impl ScErrorCode { ScErrorCode::UnexpectedType, ScErrorCode::UnexpectedSize, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [ScErrorCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "ArithDomain", "IndexBounds", "InvalidInput", @@ -10877,6 +10892,15 @@ impl ScErrorCode { "UnexpectedType", "UnexpectedSize", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -10895,7 +10919,7 @@ impl ScErrorCode { } #[must_use] - pub const fn variants() -> [ScErrorCode; 10] { + pub const fn variants() -> [ScErrorCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -11024,7 +11048,7 @@ impl Default for ScError { } impl ScError { - pub const VARIANTS: [ScErrorType; 10] = [ + const _VARIANTS: &[ScErrorType] = &[ ScErrorType::Contract, ScErrorType::WasmVm, ScErrorType::Context, @@ -11036,10 +11060,28 @@ impl ScError { ScErrorType::Value, ScErrorType::Auth, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [ScErrorType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Contract", "WasmVm", "Context", "Storage", "Object", "Crypto", "Events", "Budget", "Value", "Auth", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -11075,7 +11117,7 @@ impl ScError { } #[must_use] - pub const fn variants() -> [ScErrorType; 10] { + pub const fn variants() -> [ScErrorType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -11506,11 +11548,29 @@ pub enum ContractExecutableType { } impl ContractExecutableType { - pub const VARIANTS: [ContractExecutableType; 2] = [ + const _VARIANTS: &[ContractExecutableType] = &[ ContractExecutableType::Wasm, ContractExecutableType::StellarAsset, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Wasm", "StellarAsset"]; + pub const VARIANTS: [ContractExecutableType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Wasm", "StellarAsset"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -11521,7 +11581,7 @@ impl ContractExecutableType { } #[must_use] - pub const fn variants() -> [ContractExecutableType; 2] { + pub const fn variants() -> [ContractExecutableType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -11626,11 +11686,29 @@ impl Default for ContractExecutable { } impl ContractExecutable { - pub const VARIANTS: [ContractExecutableType; 2] = [ + const _VARIANTS: &[ContractExecutableType] = &[ ContractExecutableType::Wasm, ContractExecutableType::StellarAsset, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Wasm", "StellarAsset"]; + pub const VARIANTS: [ContractExecutableType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Wasm", "StellarAsset"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -11650,7 +11728,7 @@ impl ContractExecutable { } #[must_use] - pub const fn variants() -> [ContractExecutableType; 2] { + pub const fn variants() -> [ContractExecutableType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -11743,20 +11821,38 @@ pub enum ScAddressType { } impl ScAddressType { - pub const VARIANTS: [ScAddressType; 5] = [ + const _VARIANTS: &[ScAddressType] = &[ ScAddressType::Account, ScAddressType::Contract, ScAddressType::MuxedAccount, ScAddressType::ClaimableBalance, ScAddressType::LiquidityPool, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [ScAddressType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Account", "Contract", "MuxedAccount", "ClaimableBalance", "LiquidityPool", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -11770,7 +11866,7 @@ impl ScAddressType { } #[must_use] - pub const fn variants() -> [ScAddressType; 5] { + pub const fn variants() -> [ScAddressType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -11959,20 +12055,38 @@ impl Default for ScAddress { } impl ScAddress { - pub const VARIANTS: [ScAddressType; 5] = [ + const _VARIANTS: &[ScAddressType] = &[ ScAddressType::Account, ScAddressType::Contract, ScAddressType::MuxedAccount, ScAddressType::ClaimableBalance, ScAddressType::LiquidityPool, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [ScAddressType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Account", "Contract", "MuxedAccount", "ClaimableBalance", "LiquidityPool", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -11998,7 +12112,7 @@ impl ScAddress { } #[must_use] - pub const fn variants() -> [ScAddressType; 5] { + pub const fn variants() -> [ScAddressType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -12768,6 +12882,11 @@ impl WriteXdr for ScContractInstance { /// void; /// case SCV_LEDGER_KEY_NONCE: /// SCNonceKey nonce_key; +/// +/// #ifdef SPARSE_MAP +/// case SCV_SPARSE_MAP: +/// SCMap *sparseMap; +/// #endif /// }; /// ``` /// @@ -12818,6 +12937,8 @@ pub enum ScVal { ContractInstance(ScContractInstance), LedgerKeyContractInstance, LedgerKeyNonce(ScNonceKey), + #[cfg(feature = "SPARSE_MAP")] + SparseMap(Option), } #[cfg(feature = "alloc")] @@ -12828,7 +12949,7 @@ impl Default for ScVal { } impl ScVal { - pub const VARIANTS: [ScValType; 22] = [ + const _VARIANTS: &[ScValType] = &[ ScValType::Bool, ScValType::Void, ScValType::Error, @@ -12851,8 +12972,19 @@ impl ScVal { ScValType::ContractInstance, ScValType::LedgerKeyContractInstance, ScValType::LedgerKeyNonce, + #[cfg(feature = "SPARSE_MAP")] + ScValType::SparseMap, ]; - pub const VARIANTS_STR: [&'static str; 22] = [ + pub const VARIANTS: [ScValType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Bool", "Void", "Error", @@ -12875,7 +13007,18 @@ impl ScVal { "ContractInstance", "LedgerKeyContractInstance", "LedgerKeyNonce", + #[cfg(feature = "SPARSE_MAP")] + "SparseMap", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -12902,6 +13045,8 @@ impl ScVal { Self::ContractInstance(_) => "ContractInstance", Self::LedgerKeyContractInstance => "LedgerKeyContractInstance", Self::LedgerKeyNonce(_) => "LedgerKeyNonce", + #[cfg(feature = "SPARSE_MAP")] + Self::SparseMap(_) => "SparseMap", } } @@ -12931,11 +13076,13 @@ impl ScVal { Self::ContractInstance(_) => ScValType::ContractInstance, Self::LedgerKeyContractInstance => ScValType::LedgerKeyContractInstance, Self::LedgerKeyNonce(_) => ScValType::LedgerKeyNonce, + #[cfg(feature = "SPARSE_MAP")] + Self::SparseMap(_) => ScValType::SparseMap, } } #[must_use] - pub const fn variants() -> [ScValType; 22] { + pub const fn variants() -> [ScValType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -12993,6 +13140,8 @@ impl ReadXdr for ScVal { } ScValType::LedgerKeyContractInstance => Self::LedgerKeyContractInstance, ScValType::LedgerKeyNonce => Self::LedgerKeyNonce(ScNonceKey::read_xdr(r)?), + #[cfg(feature = "SPARSE_MAP")] + ScValType::SparseMap => Self::SparseMap(Option::::read_xdr(r)?), #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -13030,6 +13179,8 @@ impl WriteXdr for ScVal { Self::ContractInstance(v) => v.write_xdr(w)?, Self::LedgerKeyContractInstance => ().write_xdr(w)?, Self::LedgerKeyNonce(v) => v.write_xdr(w)?, + #[cfg(feature = "SPARSE_MAP")] + Self::SparseMap(v) => v.write_xdr(w)?, }; Ok(()) }) @@ -13180,8 +13331,26 @@ impl Default for StoredTransactionSet { } impl StoredTransactionSet { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -13201,7 +13370,7 @@ impl StoredTransactionSet { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -13453,8 +13622,26 @@ impl Default for PersistedScpState { } impl PersistedScpState { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -13474,7 +13661,7 @@ impl PersistedScpState { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -14310,14 +14497,31 @@ pub enum AssetType { } impl AssetType { - pub const VARIANTS: [AssetType; 4] = [ + const _VARIANTS: &[AssetType] = &[ AssetType::Native, AssetType::CreditAlphanum4, AssetType::CreditAlphanum12, AssetType::PoolShare, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; + pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -14330,7 +14534,7 @@ impl AssetType { } #[must_use] - pub const fn variants() -> [AssetType; 4] { + pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -14437,8 +14641,26 @@ impl Default for AssetCode { } impl AssetCode { - pub const VARIANTS: [AssetType; 2] = [AssetType::CreditAlphanum4, AssetType::CreditAlphanum12]; - pub const VARIANTS_STR: [&'static str; 2] = ["CreditAlphanum4", "CreditAlphanum12"]; + const _VARIANTS: &[AssetType] = &[AssetType::CreditAlphanum4, AssetType::CreditAlphanum12]; + pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["CreditAlphanum4", "CreditAlphanum12"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -14458,7 +14680,7 @@ impl AssetCode { } #[must_use] - pub const fn variants() -> [AssetType; 2] { + pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -14659,12 +14881,30 @@ impl Default for Asset { } impl Asset { - pub const VARIANTS: [AssetType; 3] = [ + const _VARIANTS: &[AssetType] = &[ AssetType::Native, AssetType::CreditAlphanum4, AssetType::CreditAlphanum12, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["Native", "CreditAlphanum4", "CreditAlphanum12"]; + pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -14686,7 +14926,7 @@ impl Asset { } #[must_use] - pub const fn variants() -> [AssetType; 3] { + pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -14885,13 +15125,31 @@ pub enum ThresholdIndexes { } impl ThresholdIndexes { - pub const VARIANTS: [ThresholdIndexes; 4] = [ + const _VARIANTS: &[ThresholdIndexes] = &[ ThresholdIndexes::MasterWeight, ThresholdIndexes::Low, ThresholdIndexes::Med, ThresholdIndexes::High, ]; - pub const VARIANTS_STR: [&'static str; 4] = ["MasterWeight", "Low", "Med", "High"]; + pub const VARIANTS: [ThresholdIndexes; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["MasterWeight", "Low", "Med", "High"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -14904,7 +15162,7 @@ impl ThresholdIndexes { } #[must_use] - pub const fn variants() -> [ThresholdIndexes; 4] { + pub const fn variants() -> [ThresholdIndexes; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -15018,7 +15276,7 @@ pub enum LedgerEntryType { } impl LedgerEntryType { - pub const VARIANTS: [LedgerEntryType; 10] = [ + const _VARIANTS: &[LedgerEntryType] = &[ LedgerEntryType::Account, LedgerEntryType::Trustline, LedgerEntryType::Offer, @@ -15030,7 +15288,16 @@ impl LedgerEntryType { LedgerEntryType::ConfigSetting, LedgerEntryType::Ttl, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [LedgerEntryType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Account", "Trustline", "Offer", @@ -15042,6 +15309,15 @@ impl LedgerEntryType { "ConfigSetting", "Ttl", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -15060,7 +15336,7 @@ impl LedgerEntryType { } #[must_use] - pub const fn variants() -> [LedgerEntryType; 10] { + pub const fn variants() -> [LedgerEntryType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -15227,18 +15503,36 @@ pub enum AccountFlags { } impl AccountFlags { - pub const VARIANTS: [AccountFlags; 4] = [ + const _VARIANTS: &[AccountFlags] = &[ AccountFlags::RequiredFlag, AccountFlags::RevocableFlag, AccountFlags::ImmutableFlag, AccountFlags::ClawbackEnabledFlag, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [AccountFlags; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "RequiredFlag", "RevocableFlag", "ImmutableFlag", "ClawbackEnabledFlag", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -15251,7 +15545,7 @@ impl AccountFlags { } #[must_use] - pub const fn variants() -> [AccountFlags; 4] { + pub const fn variants() -> [AccountFlags; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -15500,8 +15794,26 @@ impl Default for AccountEntryExtensionV2Ext { } impl AccountEntryExtensionV2Ext { - pub const VARIANTS: [i32; 2] = [0, 3]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V3"]; + const _VARIANTS: &[i32] = &[0, 3]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V3"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -15521,7 +15833,7 @@ impl AccountEntryExtensionV2Ext { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -15682,8 +15994,26 @@ impl Default for AccountEntryExtensionV1Ext { } impl AccountEntryExtensionV1Ext { - pub const VARIANTS: [i32; 2] = [0, 2]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V2"]; + const _VARIANTS: &[i32] = &[0, 2]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V2"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -15703,7 +16033,7 @@ impl AccountEntryExtensionV1Ext { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -15856,8 +16186,26 @@ impl Default for AccountEntryExt { } impl AccountEntryExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -15877,7 +16225,7 @@ impl AccountEntryExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -16071,16 +16419,34 @@ pub enum TrustLineFlags { } impl TrustLineFlags { - pub const VARIANTS: [TrustLineFlags; 3] = [ + const _VARIANTS: &[TrustLineFlags] = &[ TrustLineFlags::AuthorizedFlag, TrustLineFlags::AuthorizedToMaintainLiabilitiesFlag, TrustLineFlags::TrustlineClawbackEnabledFlag, ]; - pub const VARIANTS_STR: [&'static str; 3] = [ + pub const VARIANTS: [TrustLineFlags; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "AuthorizedFlag", "AuthorizedToMaintainLiabilitiesFlag", "TrustlineClawbackEnabledFlag", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -16092,7 +16458,7 @@ impl TrustLineFlags { } #[must_use] - pub const fn variants() -> [TrustLineFlags; 3] { + pub const fn variants() -> [TrustLineFlags; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -16211,8 +16577,26 @@ pub enum LiquidityPoolType { } impl LiquidityPoolType { - pub const VARIANTS: [LiquidityPoolType; 1] = [LiquidityPoolType::LiquidityPoolConstantProduct]; - pub const VARIANTS_STR: [&'static str; 1] = ["LiquidityPoolConstantProduct"]; + const _VARIANTS: &[LiquidityPoolType] = &[LiquidityPoolType::LiquidityPoolConstantProduct]; + pub const VARIANTS: [LiquidityPoolType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -16222,7 +16606,7 @@ impl LiquidityPoolType { } #[must_use] - pub const fn variants() -> [LiquidityPoolType; 1] { + pub const fn variants() -> [LiquidityPoolType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -16337,14 +16721,31 @@ impl Default for TrustLineAsset { } impl TrustLineAsset { - pub const VARIANTS: [AssetType; 4] = [ + const _VARIANTS: &[AssetType] = &[ AssetType::Native, AssetType::CreditAlphanum4, AssetType::CreditAlphanum12, AssetType::PoolShare, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; + pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -16368,7 +16769,7 @@ impl TrustLineAsset { } #[must_use] - pub const fn variants() -> [AssetType; 4] { + pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -16465,8 +16866,26 @@ impl Default for TrustLineEntryExtensionV2Ext { } impl TrustLineEntryExtensionV2Ext { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -16484,7 +16903,7 @@ impl TrustLineEntryExtensionV2Ext { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -16633,8 +17052,26 @@ impl Default for TrustLineEntryV1Ext { } impl TrustLineEntryV1Ext { - pub const VARIANTS: [i32; 2] = [0, 2]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V2"]; + const _VARIANTS: &[i32] = &[0, 2]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V2"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -16654,7 +17091,7 @@ impl TrustLineEntryV1Ext { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -16819,8 +17256,26 @@ impl Default for TrustLineEntryExt { } impl TrustLineEntryExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -16840,7 +17295,7 @@ impl TrustLineEntryExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -17023,8 +17478,26 @@ pub enum OfferEntryFlags { } impl OfferEntryFlags { - pub const VARIANTS: [OfferEntryFlags; 1] = [OfferEntryFlags::PassiveFlag]; - pub const VARIANTS_STR: [&'static str; 1] = ["PassiveFlag"]; + const _VARIANTS: &[OfferEntryFlags] = &[OfferEntryFlags::PassiveFlag]; + pub const VARIANTS: [OfferEntryFlags; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["PassiveFlag"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -17034,7 +17507,7 @@ impl OfferEntryFlags { } #[must_use] - pub const fn variants() -> [OfferEntryFlags; 1] { + pub const fn variants() -> [OfferEntryFlags; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -17143,8 +17616,26 @@ impl Default for OfferEntryExt { } impl OfferEntryExt { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -17162,7 +17653,7 @@ impl OfferEntryExt { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -17347,8 +17838,26 @@ impl Default for DataEntryExt { } impl DataEntryExt { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -17366,7 +17875,7 @@ impl DataEntryExt { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -17523,7 +18032,7 @@ pub enum ClaimPredicateType { } impl ClaimPredicateType { - pub const VARIANTS: [ClaimPredicateType; 6] = [ + const _VARIANTS: &[ClaimPredicateType] = &[ ClaimPredicateType::Unconditional, ClaimPredicateType::And, ClaimPredicateType::Or, @@ -17531,7 +18040,16 @@ impl ClaimPredicateType { ClaimPredicateType::BeforeAbsoluteTime, ClaimPredicateType::BeforeRelativeTime, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [ClaimPredicateType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Unconditional", "And", "Or", @@ -17539,6 +18057,15 @@ impl ClaimPredicateType { "BeforeAbsoluteTime", "BeforeRelativeTime", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -17553,7 +18080,7 @@ impl ClaimPredicateType { } #[must_use] - pub const fn variants() -> [ClaimPredicateType; 6] { + pub const fn variants() -> [ClaimPredicateType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -17687,7 +18214,7 @@ impl Default for ClaimPredicate { } impl ClaimPredicate { - pub const VARIANTS: [ClaimPredicateType; 6] = [ + const _VARIANTS: &[ClaimPredicateType] = &[ ClaimPredicateType::Unconditional, ClaimPredicateType::And, ClaimPredicateType::Or, @@ -17695,7 +18222,16 @@ impl ClaimPredicate { ClaimPredicateType::BeforeAbsoluteTime, ClaimPredicateType::BeforeRelativeTime, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [ClaimPredicateType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Unconditional", "And", "Or", @@ -17703,6 +18239,15 @@ impl ClaimPredicate { "BeforeAbsoluteTime", "BeforeRelativeTime", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -17730,7 +18275,7 @@ impl ClaimPredicate { } #[must_use] - pub const fn variants() -> [ClaimPredicateType; 6] { + pub const fn variants() -> [ClaimPredicateType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -17827,8 +18372,26 @@ pub enum ClaimantType { } impl ClaimantType { - pub const VARIANTS: [ClaimantType; 1] = [ClaimantType::ClaimantTypeV0]; - pub const VARIANTS_STR: [&'static str; 1] = ["ClaimantTypeV0"]; + const _VARIANTS: &[ClaimantType] = &[ClaimantType::ClaimantTypeV0]; + pub const VARIANTS: [ClaimantType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ClaimantTypeV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -17838,7 +18401,7 @@ impl ClaimantType { } #[must_use] - pub const fn variants() -> [ClaimantType; 1] { + pub const fn variants() -> [ClaimantType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -17992,8 +18555,26 @@ impl Default for Claimant { } impl Claimant { - pub const VARIANTS: [ClaimantType; 1] = [ClaimantType::ClaimantTypeV0]; - pub const VARIANTS_STR: [&'static str; 1] = ["ClaimantTypeV0"]; + const _VARIANTS: &[ClaimantType] = &[ClaimantType::ClaimantTypeV0]; + pub const VARIANTS: [ClaimantType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ClaimantTypeV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -18011,7 +18592,7 @@ impl Claimant { } #[must_use] - pub const fn variants() -> [ClaimantType; 1] { + pub const fn variants() -> [ClaimantType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -18096,9 +18677,27 @@ pub enum ClaimableBalanceFlags { } impl ClaimableBalanceFlags { - pub const VARIANTS: [ClaimableBalanceFlags; 1] = - [ClaimableBalanceFlags::ClaimableBalanceClawbackEnabledFlag]; - pub const VARIANTS_STR: [&'static str; 1] = ["ClaimableBalanceClawbackEnabledFlag"]; + const _VARIANTS: &[ClaimableBalanceFlags] = + &[ClaimableBalanceFlags::ClaimableBalanceClawbackEnabledFlag]; + pub const VARIANTS: [ClaimableBalanceFlags; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ClaimableBalanceClawbackEnabledFlag"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -18108,7 +18707,7 @@ impl ClaimableBalanceFlags { } #[must_use] - pub const fn variants() -> [ClaimableBalanceFlags; 1] { + pub const fn variants() -> [ClaimableBalanceFlags; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -18217,8 +18816,26 @@ impl Default for ClaimableBalanceEntryExtensionV1Ext { } impl ClaimableBalanceEntryExtensionV1Ext { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -18236,7 +18853,7 @@ impl ClaimableBalanceEntryExtensionV1Ext { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -18385,8 +19002,26 @@ impl Default for ClaimableBalanceEntryExt { } impl ClaimableBalanceEntryExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -18406,7 +19041,7 @@ impl ClaimableBalanceEntryExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -18721,8 +19356,26 @@ impl Default for LiquidityPoolEntryBody { } impl LiquidityPoolEntryBody { - pub const VARIANTS: [LiquidityPoolType; 1] = [LiquidityPoolType::LiquidityPoolConstantProduct]; - pub const VARIANTS_STR: [&'static str; 1] = ["LiquidityPoolConstantProduct"]; + const _VARIANTS: &[LiquidityPoolType] = &[LiquidityPoolType::LiquidityPoolConstantProduct]; + pub const VARIANTS: [LiquidityPoolType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -18742,7 +19395,7 @@ impl LiquidityPoolEntryBody { } #[must_use] - pub const fn variants() -> [LiquidityPoolType; 1] { + pub const fn variants() -> [LiquidityPoolType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -18894,11 +19547,29 @@ pub enum ContractDataDurability { } impl ContractDataDurability { - pub const VARIANTS: [ContractDataDurability; 2] = [ + const _VARIANTS: &[ContractDataDurability] = &[ ContractDataDurability::Temporary, ContractDataDurability::Persistent, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Temporary", "Persistent"]; + pub const VARIANTS: [ContractDataDurability; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Temporary", "Persistent"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -18909,7 +19580,7 @@ impl ContractDataDurability { } #[must_use] - pub const fn variants() -> [ContractDataDurability; 2] { + pub const fn variants() -> [ContractDataDurability; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -19212,8 +19883,26 @@ impl Default for ContractCodeEntryExt { } impl ContractCodeEntryExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -19233,7 +19922,7 @@ impl ContractCodeEntryExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -19438,8 +20127,26 @@ impl Default for LedgerEntryExtensionV1Ext { } impl LedgerEntryExtensionV1Ext { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -19457,7 +20164,7 @@ impl LedgerEntryExtensionV1Ext { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -19630,7 +20337,7 @@ impl Default for LedgerEntryData { } impl LedgerEntryData { - pub const VARIANTS: [LedgerEntryType; 10] = [ + const _VARIANTS: &[LedgerEntryType] = &[ LedgerEntryType::Account, LedgerEntryType::Trustline, LedgerEntryType::Offer, @@ -19642,7 +20349,16 @@ impl LedgerEntryData { LedgerEntryType::ConfigSetting, LedgerEntryType::Ttl, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [LedgerEntryType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Account", "Trustline", "Offer", @@ -19654,6 +20370,15 @@ impl LedgerEntryData { "ConfigSetting", "Ttl", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -19689,7 +20414,7 @@ impl LedgerEntryData { } #[must_use] - pub const fn variants() -> [LedgerEntryType; 10] { + pub const fn variants() -> [LedgerEntryType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -19811,8 +20536,26 @@ impl Default for LedgerEntryExt { } impl LedgerEntryExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -19832,7 +20575,7 @@ impl LedgerEntryExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -20554,7 +21297,7 @@ impl Default for LedgerKey { } impl LedgerKey { - pub const VARIANTS: [LedgerEntryType; 10] = [ + const _VARIANTS: &[LedgerEntryType] = &[ LedgerEntryType::Account, LedgerEntryType::Trustline, LedgerEntryType::Offer, @@ -20566,7 +21309,16 @@ impl LedgerKey { LedgerEntryType::ConfigSetting, LedgerEntryType::Ttl, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [LedgerEntryType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Account", "Trustline", "Offer", @@ -20578,6 +21330,15 @@ impl LedgerKey { "ConfigSetting", "Ttl", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -20613,7 +21374,7 @@ impl LedgerKey { } #[must_use] - pub const fn variants() -> [LedgerEntryType; 10] { + pub const fn variants() -> [LedgerEntryType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -20742,7 +21503,7 @@ pub enum EnvelopeType { } impl EnvelopeType { - pub const VARIANTS: [EnvelopeType; 10] = [ + const _VARIANTS: &[EnvelopeType] = &[ EnvelopeType::TxV0, EnvelopeType::Scp, EnvelopeType::Tx, @@ -20754,7 +21515,16 @@ impl EnvelopeType { EnvelopeType::ContractId, EnvelopeType::SorobanAuthorization, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "TxV0", "Scp", "Tx", @@ -20766,6 +21536,15 @@ impl EnvelopeType { "ContractId", "SorobanAuthorization", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -20784,7 +21563,7 @@ impl EnvelopeType { } #[must_use] - pub const fn variants() -> [EnvelopeType; 10] { + pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -20888,8 +21667,26 @@ pub enum BucketListType { } impl BucketListType { - pub const VARIANTS: [BucketListType; 2] = [BucketListType::Live, BucketListType::HotArchive]; - pub const VARIANTS_STR: [&'static str; 2] = ["Live", "HotArchive"]; + const _VARIANTS: &[BucketListType] = &[BucketListType::Live, BucketListType::HotArchive]; + pub const VARIANTS: [BucketListType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Live", "HotArchive"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -20900,7 +21697,7 @@ impl BucketListType { } #[must_use] - pub const fn variants() -> [BucketListType; 2] { + pub const fn variants() -> [BucketListType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -21002,14 +21799,31 @@ pub enum BucketEntryType { } impl BucketEntryType { - pub const VARIANTS: [BucketEntryType; 4] = [ + const _VARIANTS: &[BucketEntryType] = &[ BucketEntryType::Metaentry, BucketEntryType::Liveentry, BucketEntryType::Deadentry, BucketEntryType::Initentry, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Metaentry", "Liveentry", "Deadentry", "Initentry"]; + pub const VARIANTS: [BucketEntryType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Metaentry", "Liveentry", "Deadentry", "Initentry"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -21022,7 +21836,7 @@ impl BucketEntryType { } #[must_use] - pub const fn variants() -> [BucketEntryType; 4] { + pub const fn variants() -> [BucketEntryType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -21124,12 +21938,30 @@ pub enum HotArchiveBucketEntryType { } impl HotArchiveBucketEntryType { - pub const VARIANTS: [HotArchiveBucketEntryType; 3] = [ + const _VARIANTS: &[HotArchiveBucketEntryType] = &[ HotArchiveBucketEntryType::Metaentry, HotArchiveBucketEntryType::Archived, HotArchiveBucketEntryType::Live, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["Metaentry", "Archived", "Live"]; + pub const VARIANTS: [HotArchiveBucketEntryType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Metaentry", "Archived", "Live"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -21141,7 +21973,7 @@ impl HotArchiveBucketEntryType { } #[must_use] - pub const fn variants() -> [HotArchiveBucketEntryType; 3] { + pub const fn variants() -> [HotArchiveBucketEntryType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -21247,8 +22079,26 @@ impl Default for BucketMetadataExt { } impl BucketMetadataExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -21268,7 +22118,7 @@ impl BucketMetadataExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -21429,14 +22279,31 @@ impl Default for BucketEntry { } impl BucketEntry { - pub const VARIANTS: [BucketEntryType; 4] = [ + const _VARIANTS: &[BucketEntryType] = &[ BucketEntryType::Liveentry, BucketEntryType::Initentry, BucketEntryType::Deadentry, BucketEntryType::Metaentry, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Liveentry", "Initentry", "Deadentry", "Metaentry"]; + pub const VARIANTS: [BucketEntryType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Liveentry", "Initentry", "Deadentry", "Metaentry"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -21460,7 +22327,7 @@ impl BucketEntry { } #[must_use] - pub const fn variants() -> [BucketEntryType; 4] { + pub const fn variants() -> [BucketEntryType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -21564,12 +22431,30 @@ impl Default for HotArchiveBucketEntry { } impl HotArchiveBucketEntry { - pub const VARIANTS: [HotArchiveBucketEntryType; 3] = [ + const _VARIANTS: &[HotArchiveBucketEntryType] = &[ HotArchiveBucketEntryType::Archived, HotArchiveBucketEntryType::Live, HotArchiveBucketEntryType::Metaentry, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["Archived", "Live", "Metaentry"]; + pub const VARIANTS: [HotArchiveBucketEntryType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Archived", "Live", "Metaentry"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -21591,7 +22476,7 @@ impl HotArchiveBucketEntry { } #[must_use] - pub const fn variants() -> [HotArchiveBucketEntryType; 3] { + pub const fn variants() -> [HotArchiveBucketEntryType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -21790,8 +22675,26 @@ pub enum StellarValueType { } impl StellarValueType { - pub const VARIANTS: [StellarValueType; 2] = [StellarValueType::Basic, StellarValueType::Signed]; - pub const VARIANTS_STR: [&'static str; 2] = ["Basic", "Signed"]; + const _VARIANTS: &[StellarValueType] = &[StellarValueType::Basic, StellarValueType::Signed]; + pub const VARIANTS: [StellarValueType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Basic", "Signed"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -21802,7 +22705,7 @@ impl StellarValueType { } #[must_use] - pub const fn variants() -> [StellarValueType; 2] { + pub const fn variants() -> [StellarValueType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -21956,8 +22859,26 @@ impl Default for StellarValueExt { } impl StellarValueExt { - pub const VARIANTS: [StellarValueType; 2] = [StellarValueType::Basic, StellarValueType::Signed]; - pub const VARIANTS_STR: [&'static str; 2] = ["Basic", "Signed"]; + const _VARIANTS: &[StellarValueType] = &[StellarValueType::Basic, StellarValueType::Signed]; + pub const VARIANTS: [StellarValueType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Basic", "Signed"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -21977,7 +22898,7 @@ impl StellarValueExt { } #[must_use] - pub const fn variants() -> [StellarValueType; 2] { + pub const fn variants() -> [StellarValueType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -22146,12 +23067,30 @@ pub enum LedgerHeaderFlags { } impl LedgerHeaderFlags { - pub const VARIANTS: [LedgerHeaderFlags; 3] = [ + const _VARIANTS: &[LedgerHeaderFlags] = &[ LedgerHeaderFlags::TradingFlag, LedgerHeaderFlags::DepositFlag, LedgerHeaderFlags::WithdrawalFlag, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["TradingFlag", "DepositFlag", "WithdrawalFlag"]; + pub const VARIANTS: [LedgerHeaderFlags; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["TradingFlag", "DepositFlag", "WithdrawalFlag"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -22163,7 +23102,7 @@ impl LedgerHeaderFlags { } #[must_use] - pub const fn variants() -> [LedgerHeaderFlags; 3] { + pub const fn variants() -> [LedgerHeaderFlags; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -22266,8 +23205,26 @@ impl Default for LedgerHeaderExtensionV1Ext { } impl LedgerHeaderExtensionV1Ext { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -22285,7 +23242,7 @@ impl LedgerHeaderExtensionV1Ext { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -22434,8 +23391,26 @@ impl Default for LedgerHeaderExt { } impl LedgerHeaderExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -22455,7 +23430,7 @@ impl LedgerHeaderExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -22686,7 +23661,7 @@ pub enum LedgerUpgradeType { } impl LedgerUpgradeType { - pub const VARIANTS: [LedgerUpgradeType; 7] = [ + const _VARIANTS: &[LedgerUpgradeType] = &[ LedgerUpgradeType::Version, LedgerUpgradeType::BaseFee, LedgerUpgradeType::MaxTxSetSize, @@ -22695,7 +23670,16 @@ impl LedgerUpgradeType { LedgerUpgradeType::Config, LedgerUpgradeType::MaxSorobanTxSetSize, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [LedgerUpgradeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Version", "BaseFee", "MaxTxSetSize", @@ -22704,6 +23688,15 @@ impl LedgerUpgradeType { "Config", "MaxSorobanTxSetSize", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -22719,7 +23712,7 @@ impl LedgerUpgradeType { } #[must_use] - pub const fn variants() -> [LedgerUpgradeType; 7] { + pub const fn variants() -> [LedgerUpgradeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -22895,7 +23888,7 @@ impl Default for LedgerUpgrade { } impl LedgerUpgrade { - pub const VARIANTS: [LedgerUpgradeType; 7] = [ + const _VARIANTS: &[LedgerUpgradeType] = &[ LedgerUpgradeType::Version, LedgerUpgradeType::BaseFee, LedgerUpgradeType::MaxTxSetSize, @@ -22904,7 +23897,16 @@ impl LedgerUpgrade { LedgerUpgradeType::Config, LedgerUpgradeType::MaxSorobanTxSetSize, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [LedgerUpgradeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Version", "BaseFee", "MaxTxSetSize", @@ -22913,6 +23915,15 @@ impl LedgerUpgrade { "Config", "MaxSorobanTxSetSize", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -22942,7 +23953,7 @@ impl LedgerUpgrade { } #[must_use] - pub const fn variants() -> [LedgerUpgradeType; 7] { + pub const fn variants() -> [LedgerUpgradeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -23085,9 +24096,26 @@ pub enum TxSetComponentType { } impl TxSetComponentType { - pub const VARIANTS: [TxSetComponentType; 1] = - [TxSetComponentType::TxsetCompTxsMaybeDiscountedFee]; - pub const VARIANTS_STR: [&'static str; 1] = ["TxsetCompTxsMaybeDiscountedFee"]; + const _VARIANTS: &[TxSetComponentType] = &[TxSetComponentType::TxsetCompTxsMaybeDiscountedFee]; + pub const VARIANTS: [TxSetComponentType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["TxsetCompTxsMaybeDiscountedFee"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -23097,7 +24125,7 @@ impl TxSetComponentType { } #[must_use] - pub const fn variants() -> [TxSetComponentType; 1] { + pub const fn variants() -> [TxSetComponentType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -23525,9 +24553,26 @@ impl Default for TxSetComponent { } impl TxSetComponent { - pub const VARIANTS: [TxSetComponentType; 1] = - [TxSetComponentType::TxsetCompTxsMaybeDiscountedFee]; - pub const VARIANTS_STR: [&'static str; 1] = ["TxsetCompTxsMaybeDiscountedFee"]; + const _VARIANTS: &[TxSetComponentType] = &[TxSetComponentType::TxsetCompTxsMaybeDiscountedFee]; + pub const VARIANTS: [TxSetComponentType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["TxsetCompTxsMaybeDiscountedFee"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -23547,7 +24592,7 @@ impl TxSetComponent { } #[must_use] - pub const fn variants() -> [TxSetComponentType; 1] { + pub const fn variants() -> [TxSetComponentType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -23645,8 +24690,26 @@ impl Default for TransactionPhase { } impl TransactionPhase { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -23666,7 +24729,7 @@ impl TransactionPhase { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -23858,8 +24921,26 @@ impl Default for GeneralizedTransactionSet { } impl GeneralizedTransactionSet { - pub const VARIANTS: [i32; 1] = [1]; - pub const VARIANTS_STR: [&'static str; 1] = ["V1"]; + const _VARIANTS: &[i32] = &[1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -23877,7 +24958,7 @@ impl GeneralizedTransactionSet { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -24065,8 +25146,26 @@ impl Default for TransactionHistoryEntryExt { } impl TransactionHistoryEntryExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -24086,7 +25185,7 @@ impl TransactionHistoryEntryExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -24241,8 +25340,26 @@ impl Default for TransactionHistoryResultEntryExt { } impl TransactionHistoryResultEntryExt { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -24260,7 +25377,7 @@ impl TransactionHistoryResultEntryExt { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -24411,8 +25528,26 @@ impl Default for LedgerHeaderHistoryEntryExt { } impl LedgerHeaderHistoryEntryExt { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -24430,7 +25565,7 @@ impl LedgerHeaderHistoryEntryExt { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -24679,8 +25814,26 @@ impl Default for ScpHistoryEntry { } impl ScpHistoryEntry { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -24698,7 +25851,7 @@ impl ScpHistoryEntry { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -24789,15 +25942,32 @@ pub enum LedgerEntryChangeType { } impl LedgerEntryChangeType { - pub const VARIANTS: [LedgerEntryChangeType; 5] = [ + const _VARIANTS: &[LedgerEntryChangeType] = &[ LedgerEntryChangeType::Created, LedgerEntryChangeType::Updated, LedgerEntryChangeType::Removed, LedgerEntryChangeType::State, LedgerEntryChangeType::Restored, ]; - pub const VARIANTS_STR: [&'static str; 5] = - ["Created", "Updated", "Removed", "State", "Restored"]; + pub const VARIANTS: [LedgerEntryChangeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Removed", "State", "Restored"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -24811,7 +25981,7 @@ impl LedgerEntryChangeType { } #[must_use] - pub const fn variants() -> [LedgerEntryChangeType; 5] { + pub const fn variants() -> [LedgerEntryChangeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -24928,15 +26098,32 @@ impl Default for LedgerEntryChange { } impl LedgerEntryChange { - pub const VARIANTS: [LedgerEntryChangeType; 5] = [ + const _VARIANTS: &[LedgerEntryChangeType] = &[ LedgerEntryChangeType::Created, LedgerEntryChangeType::Updated, LedgerEntryChangeType::Removed, LedgerEntryChangeType::State, LedgerEntryChangeType::Restored, ]; - pub const VARIANTS_STR: [&'static str; 5] = - ["Created", "Updated", "Removed", "State", "Restored"]; + pub const VARIANTS: [LedgerEntryChangeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Removed", "State", "Restored"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -24962,7 +26149,7 @@ impl LedgerEntryChange { } #[must_use] - pub const fn variants() -> [LedgerEntryChangeType; 5] { + pub const fn variants() -> [LedgerEntryChangeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -25313,12 +26500,30 @@ pub enum ContractEventType { } impl ContractEventType { - pub const VARIANTS: [ContractEventType; 3] = [ + const _VARIANTS: &[ContractEventType] = &[ ContractEventType::System, ContractEventType::Contract, ContractEventType::Diagnostic, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["System", "Contract", "Diagnostic"]; + pub const VARIANTS: [ContractEventType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["System", "Contract", "Diagnostic"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -25330,7 +26535,7 @@ impl ContractEventType { } #[must_use] - pub const fn variants() -> [ContractEventType; 3] { + pub const fn variants() -> [ContractEventType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -25486,8 +26691,26 @@ impl Default for ContractEventBody { } impl ContractEventBody { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -25505,7 +26728,7 @@ impl ContractEventBody { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -25814,8 +27037,26 @@ impl Default for SorobanTransactionMetaExt { } impl SorobanTransactionMetaExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -25835,7 +27076,7 @@ impl SorobanTransactionMetaExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -26162,12 +27403,30 @@ pub enum TransactionEventStage { } impl TransactionEventStage { - pub const VARIANTS: [TransactionEventStage; 3] = [ + const _VARIANTS: &[TransactionEventStage] = &[ TransactionEventStage::BeforeAllTxs, TransactionEventStage::AfterTx, TransactionEventStage::AfterAllTxs, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["BeforeAllTxs", "AfterTx", "AfterAllTxs"]; + pub const VARIANTS: [TransactionEventStage; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["BeforeAllTxs", "AfterTx", "AfterAllTxs"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -26179,7 +27438,7 @@ impl TransactionEventStage { } #[must_use] - pub const fn variants() -> [TransactionEventStage; 3] { + pub const fn variants() -> [TransactionEventStage; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -26465,8 +27724,26 @@ impl Default for TransactionMeta { } impl TransactionMeta { - pub const VARIANTS: [i32; 5] = [0, 1, 2, 3, 4]; - pub const VARIANTS_STR: [&'static str; 5] = ["V0", "V1", "V2", "V3", "V4"]; + const _VARIANTS: &[i32] = &[0, 1, 2, 3, 4]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1", "V2", "V3", "V4"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -26492,7 +27769,7 @@ impl TransactionMeta { } #[must_use] - pub const fn variants() -> [i32; 5] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -26882,8 +28159,26 @@ impl Default for LedgerCloseMetaExt { } impl LedgerCloseMetaExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -26903,7 +28198,7 @@ impl LedgerCloseMetaExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -27192,8 +28487,26 @@ impl Default for LedgerCloseMeta { } impl LedgerCloseMeta { - pub const VARIANTS: [i32; 3] = [0, 1, 2]; - pub const VARIANTS_STR: [&'static str; 3] = ["V0", "V1", "V2"]; + const _VARIANTS: &[i32] = &[0, 1, 2]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1", "V2"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -27215,7 +28528,7 @@ impl LedgerCloseMeta { } #[must_use] - pub const fn variants() -> [i32; 3] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -27310,14 +28623,32 @@ pub enum ErrorCode { } impl ErrorCode { - pub const VARIANTS: [ErrorCode; 5] = [ + const _VARIANTS: &[ErrorCode] = &[ ErrorCode::Misc, ErrorCode::Data, ErrorCode::Conf, ErrorCode::Auth, ErrorCode::Load, ]; - pub const VARIANTS_STR: [&'static str; 5] = ["Misc", "Data", "Conf", "Auth", "Load"]; + pub const VARIANTS: [ErrorCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Misc", "Data", "Conf", "Auth", "Load"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -27331,7 +28662,7 @@ impl ErrorCode { } #[must_use] - pub const fn variants() -> [ErrorCode; 5] { + pub const fn variants() -> [ErrorCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -27760,8 +29091,26 @@ pub enum IpAddrType { } impl IpAddrType { - pub const VARIANTS: [IpAddrType; 2] = [IpAddrType::IPv4, IpAddrType::IPv6]; - pub const VARIANTS_STR: [&'static str; 2] = ["IPv4", "IPv6"]; + const _VARIANTS: &[IpAddrType] = &[IpAddrType::IPv4, IpAddrType::IPv6]; + pub const VARIANTS: [IpAddrType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["IPv4", "IPv6"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -27772,7 +29121,7 @@ impl IpAddrType { } #[must_use] - pub const fn variants() -> [IpAddrType; 2] { + pub const fn variants() -> [IpAddrType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -27877,8 +29226,26 @@ impl Default for PeerAddressIp { } impl PeerAddressIp { - pub const VARIANTS: [IpAddrType; 2] = [IpAddrType::IPv4, IpAddrType::IPv6]; - pub const VARIANTS_STR: [&'static str; 2] = ["IPv4", "IPv6"]; + const _VARIANTS: &[IpAddrType] = &[IpAddrType::IPv4, IpAddrType::IPv6]; + pub const VARIANTS: [IpAddrType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["IPv4", "IPv6"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -27898,7 +29265,7 @@ impl PeerAddressIp { } #[must_use] - pub const fn variants() -> [IpAddrType; 2] { + pub const fn variants() -> [IpAddrType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -28097,7 +29464,7 @@ pub enum MessageType { } impl MessageType { - pub const VARIANTS: [MessageType; 21] = [ + const _VARIANTS: &[MessageType] = &[ MessageType::ErrorMsg, MessageType::Auth, MessageType::DontHave, @@ -28120,7 +29487,16 @@ impl MessageType { MessageType::TimeSlicedSurveyStartCollecting, MessageType::TimeSlicedSurveyStopCollecting, ]; - pub const VARIANTS_STR: [&'static str; 21] = [ + pub const VARIANTS: [MessageType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "ErrorMsg", "Auth", "DontHave", @@ -28143,6 +29519,15 @@ impl MessageType { "TimeSlicedSurveyStartCollecting", "TimeSlicedSurveyStopCollecting", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -28172,7 +29557,7 @@ impl MessageType { } #[must_use] - pub const fn variants() -> [MessageType; 21] { + pub const fn variants() -> [MessageType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -28334,9 +29719,27 @@ pub enum SurveyMessageCommandType { } impl SurveyMessageCommandType { - pub const VARIANTS: [SurveyMessageCommandType; 1] = - [SurveyMessageCommandType::TimeSlicedSurveyTopology]; - pub const VARIANTS_STR: [&'static str; 1] = ["TimeSlicedSurveyTopology"]; + const _VARIANTS: &[SurveyMessageCommandType] = + &[SurveyMessageCommandType::TimeSlicedSurveyTopology]; + pub const VARIANTS: [SurveyMessageCommandType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["TimeSlicedSurveyTopology"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -28346,7 +29749,7 @@ impl SurveyMessageCommandType { } #[must_use] - pub const fn variants() -> [SurveyMessageCommandType; 1] { + pub const fn variants() -> [SurveyMessageCommandType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -28439,9 +29842,27 @@ pub enum SurveyMessageResponseType { } impl SurveyMessageResponseType { - pub const VARIANTS: [SurveyMessageResponseType; 1] = - [SurveyMessageResponseType::SurveyTopologyResponseV2]; - pub const VARIANTS_STR: [&'static str; 1] = ["SurveyTopologyResponseV2"]; + const _VARIANTS: &[SurveyMessageResponseType] = + &[SurveyMessageResponseType::SurveyTopologyResponseV2]; + pub const VARIANTS: [SurveyMessageResponseType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["SurveyTopologyResponseV2"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -28451,7 +29872,7 @@ impl SurveyMessageResponseType { } #[must_use] - pub const fn variants() -> [SurveyMessageResponseType; 1] { + pub const fn variants() -> [SurveyMessageResponseType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -29640,9 +31061,27 @@ impl Default for SurveyResponseBody { } impl SurveyResponseBody { - pub const VARIANTS: [SurveyMessageResponseType; 1] = - [SurveyMessageResponseType::SurveyTopologyResponseV2]; - pub const VARIANTS_STR: [&'static str; 1] = ["SurveyTopologyResponseV2"]; + const _VARIANTS: &[SurveyMessageResponseType] = + &[SurveyMessageResponseType::SurveyTopologyResponseV2]; + pub const VARIANTS: [SurveyMessageResponseType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["SurveyTopologyResponseV2"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -29662,7 +31101,7 @@ impl SurveyResponseBody { } #[must_use] - pub const fn variants() -> [SurveyMessageResponseType; 1] { + pub const fn variants() -> [SurveyMessageResponseType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -30147,7 +31586,7 @@ impl Default for StellarMessage { } impl StellarMessage { - pub const VARIANTS: [MessageType; 21] = [ + const _VARIANTS: &[MessageType] = &[ MessageType::ErrorMsg, MessageType::Hello, MessageType::Auth, @@ -30170,7 +31609,16 @@ impl StellarMessage { MessageType::FloodAdvert, MessageType::FloodDemand, ]; - pub const VARIANTS_STR: [&'static str; 21] = [ + pub const VARIANTS: [MessageType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "ErrorMsg", "Hello", "Auth", @@ -30193,6 +31641,15 @@ impl StellarMessage { "FloodAdvert", "FloodDemand", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -30252,7 +31709,7 @@ impl StellarMessage { } #[must_use] - pub const fn variants() -> [MessageType; 21] { + pub const fn variants() -> [MessageType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -30461,8 +31918,26 @@ impl Default for AuthenticatedMessage { } impl AuthenticatedMessage { - pub const VARIANTS: [u32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[u32] = &[0]; + pub const VARIANTS: [u32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -30480,7 +31955,7 @@ impl AuthenticatedMessage { } #[must_use] - pub const fn variants() -> [u32; 1] { + pub const fn variants() -> [u32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -30579,8 +32054,26 @@ impl Default for LiquidityPoolParameters { } impl LiquidityPoolParameters { - pub const VARIANTS: [LiquidityPoolType; 1] = [LiquidityPoolType::LiquidityPoolConstantProduct]; - pub const VARIANTS_STR: [&'static str; 1] = ["LiquidityPoolConstantProduct"]; + const _VARIANTS: &[LiquidityPoolType] = &[LiquidityPoolType::LiquidityPoolConstantProduct]; + pub const VARIANTS: [LiquidityPoolType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -30600,7 +32093,7 @@ impl LiquidityPoolParameters { } #[must_use] - pub const fn variants() -> [LiquidityPoolType; 1] { + pub const fn variants() -> [LiquidityPoolType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -30774,8 +32267,26 @@ impl Default for MuxedAccount { } impl MuxedAccount { - pub const VARIANTS: [CryptoKeyType; 2] = [CryptoKeyType::Ed25519, CryptoKeyType::MuxedEd25519]; - pub const VARIANTS_STR: [&'static str; 2] = ["Ed25519", "MuxedEd25519"]; + const _VARIANTS: &[CryptoKeyType] = &[CryptoKeyType::Ed25519, CryptoKeyType::MuxedEd25519]; + pub const VARIANTS: [CryptoKeyType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Ed25519", "MuxedEd25519"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -30795,7 +32306,7 @@ impl MuxedAccount { } #[must_use] - pub const fn variants() -> [CryptoKeyType; 2] { + pub const fn variants() -> [CryptoKeyType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -30983,7 +32494,7 @@ pub enum OperationType { } impl OperationType { - pub const VARIANTS: [OperationType; 27] = [ + const _VARIANTS: &[OperationType] = &[ OperationType::CreateAccount, OperationType::Payment, OperationType::PathPaymentStrictReceive, @@ -31012,7 +32523,16 @@ impl OperationType { OperationType::ExtendFootprintTtl, OperationType::RestoreFootprint, ]; - pub const VARIANTS_STR: [&'static str; 27] = [ + pub const VARIANTS: [OperationType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "CreateAccount", "Payment", "PathPaymentStrictReceive", @@ -31041,6 +32561,15 @@ impl OperationType { "ExtendFootprintTtl", "RestoreFootprint", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -31076,7 +32605,7 @@ impl OperationType { } #[must_use] - pub const fn variants() -> [OperationType; 27] { + pub const fn variants() -> [OperationType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -31769,14 +33298,31 @@ impl Default for ChangeTrustAsset { } impl ChangeTrustAsset { - pub const VARIANTS: [AssetType; 4] = [ + const _VARIANTS: &[AssetType] = &[ AssetType::Native, AssetType::CreditAlphanum4, AssetType::CreditAlphanum12, AssetType::PoolShare, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; + pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -31800,7 +33346,7 @@ impl ChangeTrustAsset { } #[must_use] - pub const fn variants() -> [AssetType; 4] { + pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -32242,11 +33788,29 @@ pub enum RevokeSponsorshipType { } impl RevokeSponsorshipType { - pub const VARIANTS: [RevokeSponsorshipType; 2] = [ + const _VARIANTS: &[RevokeSponsorshipType] = &[ RevokeSponsorshipType::LedgerEntry, RevokeSponsorshipType::Signer, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["LedgerEntry", "Signer"]; + pub const VARIANTS: [RevokeSponsorshipType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["LedgerEntry", "Signer"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -32257,7 +33821,7 @@ impl RevokeSponsorshipType { } #[must_use] - pub const fn variants() -> [RevokeSponsorshipType; 2] { + pub const fn variants() -> [RevokeSponsorshipType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -32415,11 +33979,29 @@ impl Default for RevokeSponsorshipOp { } impl RevokeSponsorshipOp { - pub const VARIANTS: [RevokeSponsorshipType; 2] = [ + const _VARIANTS: &[RevokeSponsorshipType] = &[ RevokeSponsorshipType::LedgerEntry, RevokeSponsorshipType::Signer, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["LedgerEntry", "Signer"]; + pub const VARIANTS: [RevokeSponsorshipType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["LedgerEntry", "Signer"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -32439,7 +34021,7 @@ impl RevokeSponsorshipOp { } #[must_use] - pub const fn variants() -> [RevokeSponsorshipType; 2] { + pub const fn variants() -> [RevokeSponsorshipType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -32838,18 +34420,36 @@ pub enum HostFunctionType { } impl HostFunctionType { - pub const VARIANTS: [HostFunctionType; 4] = [ + const _VARIANTS: &[HostFunctionType] = &[ HostFunctionType::InvokeContract, HostFunctionType::CreateContract, HostFunctionType::UploadContractWasm, HostFunctionType::CreateContractV2, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [HostFunctionType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "InvokeContract", "CreateContract", "UploadContractWasm", "CreateContractV2", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -32862,7 +34462,7 @@ impl HostFunctionType { } #[must_use] - pub const fn variants() -> [HostFunctionType; 4] { + pub const fn variants() -> [HostFunctionType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -32960,11 +34560,29 @@ pub enum ContractIdPreimageType { } impl ContractIdPreimageType { - pub const VARIANTS: [ContractIdPreimageType; 2] = [ + const _VARIANTS: &[ContractIdPreimageType] = &[ ContractIdPreimageType::Address, ContractIdPreimageType::Asset, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Address", "Asset"]; + pub const VARIANTS: [ContractIdPreimageType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Address", "Asset"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -32975,7 +34593,7 @@ impl ContractIdPreimageType { } #[must_use] - pub const fn variants() -> [ContractIdPreimageType; 2] { + pub const fn variants() -> [ContractIdPreimageType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -33133,11 +34751,29 @@ impl Default for ContractIdPreimage { } impl ContractIdPreimage { - pub const VARIANTS: [ContractIdPreimageType; 2] = [ + const _VARIANTS: &[ContractIdPreimageType] = &[ ContractIdPreimageType::Address, ContractIdPreimageType::Asset, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Address", "Asset"]; + pub const VARIANTS: [ContractIdPreimageType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Address", "Asset"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -33157,7 +34793,7 @@ impl ContractIdPreimage { } #[must_use] - pub const fn variants() -> [ContractIdPreimageType; 2] { + pub const fn variants() -> [ContractIdPreimageType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -33416,18 +35052,36 @@ impl Default for HostFunction { } impl HostFunction { - pub const VARIANTS: [HostFunctionType; 4] = [ + const _VARIANTS: &[HostFunctionType] = &[ HostFunctionType::InvokeContract, HostFunctionType::CreateContract, HostFunctionType::UploadContractWasm, HostFunctionType::CreateContractV2, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [HostFunctionType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "InvokeContract", "CreateContract", "UploadContractWasm", "CreateContractV2", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -33451,7 +35105,7 @@ impl HostFunction { } #[must_use] - pub const fn variants() -> [HostFunctionType; 4] { + pub const fn variants() -> [HostFunctionType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -33552,16 +35206,34 @@ pub enum SorobanAuthorizedFunctionType { } impl SorobanAuthorizedFunctionType { - pub const VARIANTS: [SorobanAuthorizedFunctionType; 3] = [ + const _VARIANTS: &[SorobanAuthorizedFunctionType] = &[ SorobanAuthorizedFunctionType::ContractFn, SorobanAuthorizedFunctionType::CreateContractHostFn, SorobanAuthorizedFunctionType::CreateContractV2HostFn, ]; - pub const VARIANTS_STR: [&'static str; 3] = [ + pub const VARIANTS: [SorobanAuthorizedFunctionType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "ContractFn", "CreateContractHostFn", "CreateContractV2HostFn", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -33573,7 +35245,7 @@ impl SorobanAuthorizedFunctionType { } #[must_use] - pub const fn variants() -> [SorobanAuthorizedFunctionType; 3] { + pub const fn variants() -> [SorobanAuthorizedFunctionType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -33690,16 +35362,34 @@ impl Default for SorobanAuthorizedFunction { } impl SorobanAuthorizedFunction { - pub const VARIANTS: [SorobanAuthorizedFunctionType; 3] = [ + const _VARIANTS: &[SorobanAuthorizedFunctionType] = &[ SorobanAuthorizedFunctionType::ContractFn, SorobanAuthorizedFunctionType::CreateContractHostFn, SorobanAuthorizedFunctionType::CreateContractV2HostFn, ]; - pub const VARIANTS_STR: [&'static str; 3] = [ + pub const VARIANTS: [SorobanAuthorizedFunctionType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "ContractFn", "CreateContractHostFn", "CreateContractV2HostFn", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -33723,7 +35413,7 @@ impl SorobanAuthorizedFunction { } #[must_use] - pub const fn variants() -> [SorobanAuthorizedFunctionType; 3] { + pub const fn variants() -> [SorobanAuthorizedFunctionType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -33929,11 +35619,29 @@ pub enum SorobanCredentialsType { } impl SorobanCredentialsType { - pub const VARIANTS: [SorobanCredentialsType; 2] = [ + const _VARIANTS: &[SorobanCredentialsType] = &[ SorobanCredentialsType::SourceAccount, SorobanCredentialsType::Address, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["SourceAccount", "Address"]; + pub const VARIANTS: [SorobanCredentialsType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["SourceAccount", "Address"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -33944,7 +35652,7 @@ impl SorobanCredentialsType { } #[must_use] - pub const fn variants() -> [SorobanCredentialsType; 2] { + pub const fn variants() -> [SorobanCredentialsType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -34049,11 +35757,29 @@ impl Default for SorobanCredentials { } impl SorobanCredentials { - pub const VARIANTS: [SorobanCredentialsType; 2] = [ + const _VARIANTS: &[SorobanCredentialsType] = &[ SorobanCredentialsType::SourceAccount, SorobanCredentialsType::Address, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["SourceAccount", "Address"]; + pub const VARIANTS: [SorobanCredentialsType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["SourceAccount", "Address"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -34073,7 +35799,7 @@ impl SorobanCredentials { } #[must_use] - pub const fn variants() -> [SorobanCredentialsType; 2] { + pub const fn variants() -> [SorobanCredentialsType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -34547,7 +36273,7 @@ impl Default for OperationBody { } impl OperationBody { - pub const VARIANTS: [OperationType; 27] = [ + const _VARIANTS: &[OperationType] = &[ OperationType::CreateAccount, OperationType::Payment, OperationType::PathPaymentStrictReceive, @@ -34576,7 +36302,16 @@ impl OperationBody { OperationType::ExtendFootprintTtl, OperationType::RestoreFootprint, ]; - pub const VARIANTS_STR: [&'static str; 27] = [ + pub const VARIANTS: [OperationType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "CreateAccount", "Payment", "PathPaymentStrictReceive", @@ -34605,6 +36340,15 @@ impl OperationBody { "ExtendFootprintTtl", "RestoreFootprint", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -34674,7 +36418,7 @@ impl OperationBody { } #[must_use] - pub const fn variants() -> [OperationType; 27] { + pub const fn variants() -> [OperationType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -35216,18 +36960,36 @@ impl Default for HashIdPreimage { } impl HashIdPreimage { - pub const VARIANTS: [EnvelopeType; 4] = [ + const _VARIANTS: &[EnvelopeType] = &[ EnvelopeType::OpId, EnvelopeType::PoolRevokeOpId, EnvelopeType::ContractId, EnvelopeType::SorobanAuthorization, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "OpId", "PoolRevokeOpId", "ContractId", "SorobanAuthorization", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -35251,7 +37013,7 @@ impl HashIdPreimage { } #[must_use] - pub const fn variants() -> [EnvelopeType; 4] { + pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -35354,14 +37116,32 @@ pub enum MemoType { } impl MemoType { - pub const VARIANTS: [MemoType; 5] = [ + const _VARIANTS: &[MemoType] = &[ MemoType::None, MemoType::Text, MemoType::Id, MemoType::Hash, MemoType::Return, ]; - pub const VARIANTS_STR: [&'static str; 5] = ["None", "Text", "Id", "Hash", "Return"]; + pub const VARIANTS: [MemoType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["None", "Text", "Id", "Hash", "Return"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -35375,7 +37155,7 @@ impl MemoType { } #[must_use] - pub const fn variants() -> [MemoType; 5] { + pub const fn variants() -> [MemoType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -35498,14 +37278,32 @@ impl Default for Memo { } impl Memo { - pub const VARIANTS: [MemoType; 5] = [ + const _VARIANTS: &[MemoType] = &[ MemoType::None, MemoType::Text, MemoType::Id, MemoType::Hash, MemoType::Return, ]; - pub const VARIANTS_STR: [&'static str; 5] = ["None", "Text", "Id", "Hash", "Return"]; + pub const VARIANTS: [MemoType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["None", "Text", "Id", "Hash", "Return"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -35531,7 +37329,7 @@ impl Memo { } #[must_use] - pub const fn variants() -> [MemoType; 5] { + pub const fn variants() -> [MemoType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -35812,12 +37610,30 @@ pub enum PreconditionType { } impl PreconditionType { - pub const VARIANTS: [PreconditionType; 3] = [ + const _VARIANTS: &[PreconditionType] = &[ PreconditionType::None, PreconditionType::Time, PreconditionType::V2, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["None", "Time", "V2"]; + pub const VARIANTS: [PreconditionType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["None", "Time", "V2"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -35829,7 +37645,7 @@ impl PreconditionType { } #[must_use] - pub const fn variants() -> [PreconditionType; 3] { + pub const fn variants() -> [PreconditionType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -35938,12 +37754,30 @@ impl Default for Preconditions { } impl Preconditions { - pub const VARIANTS: [PreconditionType; 3] = [ + const _VARIANTS: &[PreconditionType] = &[ PreconditionType::None, PreconditionType::Time, PreconditionType::V2, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["None", "Time", "V2"]; + pub const VARIANTS: [PreconditionType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["None", "Time", "V2"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -35965,7 +37799,7 @@ impl Preconditions { } #[must_use] - pub const fn variants() -> [PreconditionType; 3] { + pub const fn variants() -> [PreconditionType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -36222,8 +38056,26 @@ impl Default for SorobanTransactionDataExt { } impl SorobanTransactionDataExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -36243,7 +38095,7 @@ impl SorobanTransactionDataExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -36408,8 +38260,26 @@ impl Default for TransactionV0Ext { } impl TransactionV0Ext { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -36427,7 +38297,7 @@ impl TransactionV0Ext { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -36646,8 +38516,26 @@ impl Default for TransactionExt { } impl TransactionExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -36667,7 +38555,7 @@ impl TransactionExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -36897,8 +38785,26 @@ impl Default for FeeBumpTransactionInnerTx { } impl FeeBumpTransactionInnerTx { - pub const VARIANTS: [EnvelopeType; 1] = [EnvelopeType::Tx]; - pub const VARIANTS_STR: [&'static str; 1] = ["Tx"]; + const _VARIANTS: &[EnvelopeType] = &[EnvelopeType::Tx]; + pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Tx"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -36916,7 +38822,7 @@ impl FeeBumpTransactionInnerTx { } #[must_use] - pub const fn variants() -> [EnvelopeType; 1] { + pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -37007,8 +38913,26 @@ impl Default for FeeBumpTransactionExt { } impl FeeBumpTransactionExt { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -37026,7 +38950,7 @@ impl FeeBumpTransactionExt { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -37238,12 +39162,30 @@ pub enum TransactionEnvelope { } impl TransactionEnvelope { - pub const VARIANTS: [EnvelopeType; 3] = [ + const _VARIANTS: &[EnvelopeType] = &[ EnvelopeType::TxV0, EnvelopeType::Tx, EnvelopeType::TxFeeBump, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["TxV0", "Tx", "TxFeeBump"]; + pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["TxV0", "Tx", "TxFeeBump"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -37265,7 +39207,7 @@ impl TransactionEnvelope { } #[must_use] - pub const fn variants() -> [EnvelopeType; 3] { + pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -37366,8 +39308,26 @@ impl Default for TransactionSignaturePayloadTaggedTransaction { } impl TransactionSignaturePayloadTaggedTransaction { - pub const VARIANTS: [EnvelopeType; 2] = [EnvelopeType::Tx, EnvelopeType::TxFeeBump]; - pub const VARIANTS_STR: [&'static str; 2] = ["Tx", "TxFeeBump"]; + const _VARIANTS: &[EnvelopeType] = &[EnvelopeType::Tx, EnvelopeType::TxFeeBump]; + pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Tx", "TxFeeBump"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -37387,7 +39347,7 @@ impl TransactionSignaturePayloadTaggedTransaction { } #[must_use] - pub const fn variants() -> [EnvelopeType; 2] { + pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -37533,12 +39493,30 @@ pub enum ClaimAtomType { } impl ClaimAtomType { - pub const VARIANTS: [ClaimAtomType; 3] = [ + const _VARIANTS: &[ClaimAtomType] = &[ ClaimAtomType::V0, ClaimAtomType::OrderBook, ClaimAtomType::LiquidityPool, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["V0", "OrderBook", "LiquidityPool"]; + pub const VARIANTS: [ClaimAtomType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "OrderBook", "LiquidityPool"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -37550,7 +39528,7 @@ impl ClaimAtomType { } #[must_use] - pub const fn variants() -> [ClaimAtomType; 3] { + pub const fn variants() -> [ClaimAtomType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -37896,12 +39874,30 @@ impl Default for ClaimAtom { } impl ClaimAtom { - pub const VARIANTS: [ClaimAtomType; 3] = [ + const _VARIANTS: &[ClaimAtomType] = &[ ClaimAtomType::V0, ClaimAtomType::OrderBook, ClaimAtomType::LiquidityPool, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["V0", "OrderBook", "LiquidityPool"]; + pub const VARIANTS: [ClaimAtomType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "OrderBook", "LiquidityPool"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -37923,7 +39919,7 @@ impl ClaimAtom { } #[must_use] - pub const fn variants() -> [ClaimAtomType; 3] { + pub const fn variants() -> [ClaimAtomType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -38024,20 +40020,38 @@ pub enum CreateAccountResultCode { } impl CreateAccountResultCode { - pub const VARIANTS: [CreateAccountResultCode; 5] = [ + const _VARIANTS: &[CreateAccountResultCode] = &[ CreateAccountResultCode::Success, CreateAccountResultCode::Malformed, CreateAccountResultCode::Underfunded, CreateAccountResultCode::LowReserve, CreateAccountResultCode::AlreadyExist, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [CreateAccountResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", "LowReserve", "AlreadyExist", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -38051,7 +40065,7 @@ impl CreateAccountResultCode { } #[must_use] - pub const fn variants() -> [CreateAccountResultCode; 5] { + pub const fn variants() -> [CreateAccountResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -38165,20 +40179,38 @@ impl Default for CreateAccountResult { } impl CreateAccountResult { - pub const VARIANTS: [CreateAccountResultCode; 5] = [ + const _VARIANTS: &[CreateAccountResultCode] = &[ CreateAccountResultCode::Success, CreateAccountResultCode::Malformed, CreateAccountResultCode::Underfunded, CreateAccountResultCode::LowReserve, CreateAccountResultCode::AlreadyExist, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [CreateAccountResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", "LowReserve", "AlreadyExist", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -38204,7 +40236,7 @@ impl CreateAccountResult { } #[must_use] - pub const fn variants() -> [CreateAccountResultCode; 5] { + pub const fn variants() -> [CreateAccountResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -38316,7 +40348,7 @@ pub enum PaymentResultCode { } impl PaymentResultCode { - pub const VARIANTS: [PaymentResultCode; 10] = [ + const _VARIANTS: &[PaymentResultCode] = &[ PaymentResultCode::Success, PaymentResultCode::Malformed, PaymentResultCode::Underfunded, @@ -38328,7 +40360,16 @@ impl PaymentResultCode { PaymentResultCode::LineFull, PaymentResultCode::NoIssuer, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [PaymentResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", @@ -38340,6 +40381,15 @@ impl PaymentResultCode { "LineFull", "NoIssuer", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -38358,7 +40408,7 @@ impl PaymentResultCode { } #[must_use] - pub const fn variants() -> [PaymentResultCode; 10] { + pub const fn variants() -> [PaymentResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -38487,7 +40537,7 @@ impl Default for PaymentResult { } impl PaymentResult { - pub const VARIANTS: [PaymentResultCode; 10] = [ + const _VARIANTS: &[PaymentResultCode] = &[ PaymentResultCode::Success, PaymentResultCode::Malformed, PaymentResultCode::Underfunded, @@ -38499,7 +40549,16 @@ impl PaymentResult { PaymentResultCode::LineFull, PaymentResultCode::NoIssuer, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [PaymentResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", @@ -38511,6 +40570,15 @@ impl PaymentResult { "LineFull", "NoIssuer", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -38546,7 +40614,7 @@ impl PaymentResult { } #[must_use] - pub const fn variants() -> [PaymentResultCode; 10] { + pub const fn variants() -> [PaymentResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -38683,7 +40751,7 @@ pub enum PathPaymentStrictReceiveResultCode { } impl PathPaymentStrictReceiveResultCode { - pub const VARIANTS: [PathPaymentStrictReceiveResultCode; 13] = [ + const _VARIANTS: &[PathPaymentStrictReceiveResultCode] = &[ PathPaymentStrictReceiveResultCode::Success, PathPaymentStrictReceiveResultCode::Malformed, PathPaymentStrictReceiveResultCode::Underfunded, @@ -38698,7 +40766,16 @@ impl PathPaymentStrictReceiveResultCode { PathPaymentStrictReceiveResultCode::OfferCrossSelf, PathPaymentStrictReceiveResultCode::OverSendmax, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [PathPaymentStrictReceiveResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", @@ -38713,6 +40790,15 @@ impl PathPaymentStrictReceiveResultCode { "OfferCrossSelf", "OverSendmax", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -38734,7 +40820,7 @@ impl PathPaymentStrictReceiveResultCode { } #[must_use] - pub const fn variants() -> [PathPaymentStrictReceiveResultCode; 13] { + pub const fn variants() -> [PathPaymentStrictReceiveResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -38985,7 +41071,7 @@ impl Default for PathPaymentStrictReceiveResult { } impl PathPaymentStrictReceiveResult { - pub const VARIANTS: [PathPaymentStrictReceiveResultCode; 13] = [ + const _VARIANTS: &[PathPaymentStrictReceiveResultCode] = &[ PathPaymentStrictReceiveResultCode::Success, PathPaymentStrictReceiveResultCode::Malformed, PathPaymentStrictReceiveResultCode::Underfunded, @@ -39000,7 +41086,16 @@ impl PathPaymentStrictReceiveResult { PathPaymentStrictReceiveResultCode::OfferCrossSelf, PathPaymentStrictReceiveResultCode::OverSendmax, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [PathPaymentStrictReceiveResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", @@ -39015,6 +41110,15 @@ impl PathPaymentStrictReceiveResult { "OfferCrossSelf", "OverSendmax", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -39056,7 +41160,7 @@ impl PathPaymentStrictReceiveResult { } #[must_use] - pub const fn variants() -> [PathPaymentStrictReceiveResultCode; 13] { + pub const fn variants() -> [PathPaymentStrictReceiveResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -39201,7 +41305,7 @@ pub enum PathPaymentStrictSendResultCode { } impl PathPaymentStrictSendResultCode { - pub const VARIANTS: [PathPaymentStrictSendResultCode; 13] = [ + const _VARIANTS: &[PathPaymentStrictSendResultCode] = &[ PathPaymentStrictSendResultCode::Success, PathPaymentStrictSendResultCode::Malformed, PathPaymentStrictSendResultCode::Underfunded, @@ -39216,7 +41320,16 @@ impl PathPaymentStrictSendResultCode { PathPaymentStrictSendResultCode::OfferCrossSelf, PathPaymentStrictSendResultCode::UnderDestmin, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [PathPaymentStrictSendResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", @@ -39231,6 +41344,15 @@ impl PathPaymentStrictSendResultCode { "OfferCrossSelf", "UnderDestmin", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -39252,7 +41374,7 @@ impl PathPaymentStrictSendResultCode { } #[must_use] - pub const fn variants() -> [PathPaymentStrictSendResultCode; 13] { + pub const fn variants() -> [PathPaymentStrictSendResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -39445,7 +41567,7 @@ impl Default for PathPaymentStrictSendResult { } impl PathPaymentStrictSendResult { - pub const VARIANTS: [PathPaymentStrictSendResultCode; 13] = [ + const _VARIANTS: &[PathPaymentStrictSendResultCode] = &[ PathPaymentStrictSendResultCode::Success, PathPaymentStrictSendResultCode::Malformed, PathPaymentStrictSendResultCode::Underfunded, @@ -39460,7 +41582,16 @@ impl PathPaymentStrictSendResult { PathPaymentStrictSendResultCode::OfferCrossSelf, PathPaymentStrictSendResultCode::UnderDestmin, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [PathPaymentStrictSendResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", @@ -39475,6 +41606,15 @@ impl PathPaymentStrictSendResult { "OfferCrossSelf", "UnderDestmin", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -39516,7 +41656,7 @@ impl PathPaymentStrictSendResult { } #[must_use] - pub const fn variants() -> [PathPaymentStrictSendResultCode; 13] { + pub const fn variants() -> [PathPaymentStrictSendResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -39660,7 +41800,7 @@ pub enum ManageSellOfferResultCode { } impl ManageSellOfferResultCode { - pub const VARIANTS: [ManageSellOfferResultCode; 13] = [ + const _VARIANTS: &[ManageSellOfferResultCode] = &[ ManageSellOfferResultCode::Success, ManageSellOfferResultCode::Malformed, ManageSellOfferResultCode::SellNoTrust, @@ -39675,7 +41815,16 @@ impl ManageSellOfferResultCode { ManageSellOfferResultCode::NotFound, ManageSellOfferResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [ManageSellOfferResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "SellNoTrust", @@ -39690,6 +41839,15 @@ impl ManageSellOfferResultCode { "NotFound", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -39711,7 +41869,7 @@ impl ManageSellOfferResultCode { } #[must_use] - pub const fn variants() -> [ManageSellOfferResultCode; 13] { + pub const fn variants() -> [ManageSellOfferResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -39820,12 +41978,30 @@ pub enum ManageOfferEffect { } impl ManageOfferEffect { - pub const VARIANTS: [ManageOfferEffect; 3] = [ + const _VARIANTS: &[ManageOfferEffect] = &[ ManageOfferEffect::Created, ManageOfferEffect::Updated, ManageOfferEffect::Deleted, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["Created", "Updated", "Deleted"]; + pub const VARIANTS: [ManageOfferEffect; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Deleted"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -39837,7 +42013,7 @@ impl ManageOfferEffect { } #[must_use] - pub const fn variants() -> [ManageOfferEffect; 3] { + pub const fn variants() -> [ManageOfferEffect; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -39945,12 +42121,30 @@ impl Default for ManageOfferSuccessResultOffer { } impl ManageOfferSuccessResultOffer { - pub const VARIANTS: [ManageOfferEffect; 3] = [ + const _VARIANTS: &[ManageOfferEffect] = &[ ManageOfferEffect::Created, ManageOfferEffect::Updated, ManageOfferEffect::Deleted, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["Created", "Updated", "Deleted"]; + pub const VARIANTS: [ManageOfferEffect; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Deleted"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -39972,7 +42166,7 @@ impl ManageOfferSuccessResultOffer { } #[must_use] - pub const fn variants() -> [ManageOfferEffect; 3] { + pub const fn variants() -> [ManageOfferEffect; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -40151,7 +42345,7 @@ impl Default for ManageSellOfferResult { } impl ManageSellOfferResult { - pub const VARIANTS: [ManageSellOfferResultCode; 13] = [ + const _VARIANTS: &[ManageSellOfferResultCode] = &[ ManageSellOfferResultCode::Success, ManageSellOfferResultCode::Malformed, ManageSellOfferResultCode::SellNoTrust, @@ -40166,7 +42360,16 @@ impl ManageSellOfferResult { ManageSellOfferResultCode::NotFound, ManageSellOfferResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [ManageSellOfferResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "SellNoTrust", @@ -40181,6 +42384,15 @@ impl ManageSellOfferResult { "NotFound", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -40222,7 +42434,7 @@ impl ManageSellOfferResult { } #[must_use] - pub const fn variants() -> [ManageSellOfferResultCode; 13] { + pub const fn variants() -> [ManageSellOfferResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -40363,7 +42575,7 @@ pub enum ManageBuyOfferResultCode { } impl ManageBuyOfferResultCode { - pub const VARIANTS: [ManageBuyOfferResultCode; 13] = [ + const _VARIANTS: &[ManageBuyOfferResultCode] = &[ ManageBuyOfferResultCode::Success, ManageBuyOfferResultCode::Malformed, ManageBuyOfferResultCode::SellNoTrust, @@ -40378,7 +42590,16 @@ impl ManageBuyOfferResultCode { ManageBuyOfferResultCode::NotFound, ManageBuyOfferResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [ManageBuyOfferResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "SellNoTrust", @@ -40393,6 +42614,15 @@ impl ManageBuyOfferResultCode { "NotFound", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -40414,7 +42644,7 @@ impl ManageBuyOfferResultCode { } #[must_use] - pub const fn variants() -> [ManageBuyOfferResultCode; 13] { + pub const fn variants() -> [ManageBuyOfferResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -40552,7 +42782,7 @@ impl Default for ManageBuyOfferResult { } impl ManageBuyOfferResult { - pub const VARIANTS: [ManageBuyOfferResultCode; 13] = [ + const _VARIANTS: &[ManageBuyOfferResultCode] = &[ ManageBuyOfferResultCode::Success, ManageBuyOfferResultCode::Malformed, ManageBuyOfferResultCode::SellNoTrust, @@ -40567,7 +42797,16 @@ impl ManageBuyOfferResult { ManageBuyOfferResultCode::NotFound, ManageBuyOfferResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [ManageBuyOfferResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "SellNoTrust", @@ -40582,6 +42821,15 @@ impl ManageBuyOfferResult { "NotFound", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -40623,7 +42871,7 @@ impl ManageBuyOfferResult { } #[must_use] - pub const fn variants() -> [ManageBuyOfferResultCode; 13] { + pub const fn variants() -> [ManageBuyOfferResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -40755,7 +43003,7 @@ pub enum SetOptionsResultCode { } impl SetOptionsResultCode { - pub const VARIANTS: [SetOptionsResultCode; 11] = [ + const _VARIANTS: &[SetOptionsResultCode] = &[ SetOptionsResultCode::Success, SetOptionsResultCode::LowReserve, SetOptionsResultCode::TooManySigners, @@ -40768,7 +43016,16 @@ impl SetOptionsResultCode { SetOptionsResultCode::InvalidHomeDomain, SetOptionsResultCode::AuthRevocableRequired, ]; - pub const VARIANTS_STR: [&'static str; 11] = [ + pub const VARIANTS: [SetOptionsResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "LowReserve", "TooManySigners", @@ -40781,6 +43038,15 @@ impl SetOptionsResultCode { "InvalidHomeDomain", "AuthRevocableRequired", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -40800,7 +43066,7 @@ impl SetOptionsResultCode { } #[must_use] - pub const fn variants() -> [SetOptionsResultCode; 11] { + pub const fn variants() -> [SetOptionsResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -40932,7 +43198,7 @@ impl Default for SetOptionsResult { } impl SetOptionsResult { - pub const VARIANTS: [SetOptionsResultCode; 11] = [ + const _VARIANTS: &[SetOptionsResultCode] = &[ SetOptionsResultCode::Success, SetOptionsResultCode::LowReserve, SetOptionsResultCode::TooManySigners, @@ -40945,7 +43211,16 @@ impl SetOptionsResult { SetOptionsResultCode::InvalidHomeDomain, SetOptionsResultCode::AuthRevocableRequired, ]; - pub const VARIANTS_STR: [&'static str; 11] = [ + pub const VARIANTS: [SetOptionsResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "LowReserve", "TooManySigners", @@ -40958,6 +43233,15 @@ impl SetOptionsResult { "InvalidHomeDomain", "AuthRevocableRequired", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -40995,7 +43279,7 @@ impl SetOptionsResult { } #[must_use] - pub const fn variants() -> [SetOptionsResultCode; 11] { + pub const fn variants() -> [SetOptionsResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -41120,7 +43404,7 @@ pub enum ChangeTrustResultCode { } impl ChangeTrustResultCode { - pub const VARIANTS: [ChangeTrustResultCode; 9] = [ + const _VARIANTS: &[ChangeTrustResultCode] = &[ ChangeTrustResultCode::Success, ChangeTrustResultCode::Malformed, ChangeTrustResultCode::NoIssuer, @@ -41131,7 +43415,16 @@ impl ChangeTrustResultCode { ChangeTrustResultCode::CannotDelete, ChangeTrustResultCode::NotAuthMaintainLiabilities, ]; - pub const VARIANTS_STR: [&'static str; 9] = [ + pub const VARIANTS: [ChangeTrustResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoIssuer", @@ -41142,6 +43435,15 @@ impl ChangeTrustResultCode { "CannotDelete", "NotAuthMaintainLiabilities", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -41159,7 +43461,7 @@ impl ChangeTrustResultCode { } #[must_use] - pub const fn variants() -> [ChangeTrustResultCode; 9] { + pub const fn variants() -> [ChangeTrustResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -41285,7 +43587,7 @@ impl Default for ChangeTrustResult { } impl ChangeTrustResult { - pub const VARIANTS: [ChangeTrustResultCode; 9] = [ + const _VARIANTS: &[ChangeTrustResultCode] = &[ ChangeTrustResultCode::Success, ChangeTrustResultCode::Malformed, ChangeTrustResultCode::NoIssuer, @@ -41296,7 +43598,16 @@ impl ChangeTrustResult { ChangeTrustResultCode::CannotDelete, ChangeTrustResultCode::NotAuthMaintainLiabilities, ]; - pub const VARIANTS_STR: [&'static str; 9] = [ + pub const VARIANTS: [ChangeTrustResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoIssuer", @@ -41307,6 +43618,15 @@ impl ChangeTrustResult { "CannotDelete", "NotAuthMaintainLiabilities", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -41340,7 +43660,7 @@ impl ChangeTrustResult { } #[must_use] - pub const fn variants() -> [ChangeTrustResultCode; 9] { + pub const fn variants() -> [ChangeTrustResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -41457,7 +43777,7 @@ pub enum AllowTrustResultCode { } impl AllowTrustResultCode { - pub const VARIANTS: [AllowTrustResultCode; 7] = [ + const _VARIANTS: &[AllowTrustResultCode] = &[ AllowTrustResultCode::Success, AllowTrustResultCode::Malformed, AllowTrustResultCode::NoTrustLine, @@ -41466,7 +43786,16 @@ impl AllowTrustResultCode { AllowTrustResultCode::SelfNotAllowed, AllowTrustResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [AllowTrustResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrustLine", @@ -41475,6 +43804,15 @@ impl AllowTrustResultCode { "SelfNotAllowed", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -41490,7 +43828,7 @@ impl AllowTrustResultCode { } #[must_use] - pub const fn variants() -> [AllowTrustResultCode; 7] { + pub const fn variants() -> [AllowTrustResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -41610,7 +43948,7 @@ impl Default for AllowTrustResult { } impl AllowTrustResult { - pub const VARIANTS: [AllowTrustResultCode; 7] = [ + const _VARIANTS: &[AllowTrustResultCode] = &[ AllowTrustResultCode::Success, AllowTrustResultCode::Malformed, AllowTrustResultCode::NoTrustLine, @@ -41619,7 +43957,16 @@ impl AllowTrustResult { AllowTrustResultCode::SelfNotAllowed, AllowTrustResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [AllowTrustResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrustLine", @@ -41628,6 +43975,15 @@ impl AllowTrustResult { "SelfNotAllowed", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -41657,7 +44013,7 @@ impl AllowTrustResult { } #[must_use] - pub const fn variants() -> [AllowTrustResultCode; 7] { + pub const fn variants() -> [AllowTrustResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -41769,7 +44125,7 @@ pub enum AccountMergeResultCode { } impl AccountMergeResultCode { - pub const VARIANTS: [AccountMergeResultCode; 8] = [ + const _VARIANTS: &[AccountMergeResultCode] = &[ AccountMergeResultCode::Success, AccountMergeResultCode::Malformed, AccountMergeResultCode::NoAccount, @@ -41779,7 +44135,16 @@ impl AccountMergeResultCode { AccountMergeResultCode::DestFull, AccountMergeResultCode::IsSponsor, ]; - pub const VARIANTS_STR: [&'static str; 8] = [ + pub const VARIANTS: [AccountMergeResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoAccount", @@ -41789,6 +44154,15 @@ impl AccountMergeResultCode { "DestFull", "IsSponsor", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -41805,7 +44179,7 @@ impl AccountMergeResultCode { } #[must_use] - pub const fn variants() -> [AccountMergeResultCode; 8] { + pub const fn variants() -> [AccountMergeResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -41934,7 +44308,7 @@ impl Default for AccountMergeResult { } impl AccountMergeResult { - pub const VARIANTS: [AccountMergeResultCode; 8] = [ + const _VARIANTS: &[AccountMergeResultCode] = &[ AccountMergeResultCode::Success, AccountMergeResultCode::Malformed, AccountMergeResultCode::NoAccount, @@ -41944,7 +44318,16 @@ impl AccountMergeResult { AccountMergeResultCode::DestFull, AccountMergeResultCode::IsSponsor, ]; - pub const VARIANTS_STR: [&'static str; 8] = [ + pub const VARIANTS: [AccountMergeResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoAccount", @@ -41954,6 +44337,15 @@ impl AccountMergeResult { "DestFull", "IsSponsor", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -41985,7 +44377,7 @@ impl AccountMergeResult { } #[must_use] - pub const fn variants() -> [AccountMergeResultCode; 8] { + pub const fn variants() -> [AccountMergeResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -42086,9 +44478,27 @@ pub enum InflationResultCode { } impl InflationResultCode { - pub const VARIANTS: [InflationResultCode; 2] = - [InflationResultCode::Success, InflationResultCode::NotTime]; - pub const VARIANTS_STR: [&'static str; 2] = ["Success", "NotTime"]; + const _VARIANTS: &[InflationResultCode] = + &[InflationResultCode::Success, InflationResultCode::NotTime]; + pub const VARIANTS: [InflationResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "NotTime"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -42099,7 +44509,7 @@ impl InflationResultCode { } #[must_use] - pub const fn variants() -> [InflationResultCode; 2] { + pub const fn variants() -> [InflationResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -42257,9 +44667,27 @@ impl Default for InflationResult { } impl InflationResult { - pub const VARIANTS: [InflationResultCode; 2] = - [InflationResultCode::Success, InflationResultCode::NotTime]; - pub const VARIANTS_STR: [&'static str; 2] = ["Success", "NotTime"]; + const _VARIANTS: &[InflationResultCode] = + &[InflationResultCode::Success, InflationResultCode::NotTime]; + pub const VARIANTS: [InflationResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "NotTime"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -42279,7 +44707,7 @@ impl InflationResult { } #[must_use] - pub const fn variants() -> [InflationResultCode; 2] { + pub const fn variants() -> [InflationResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -42378,20 +44806,38 @@ pub enum ManageDataResultCode { } impl ManageDataResultCode { - pub const VARIANTS: [ManageDataResultCode; 5] = [ + const _VARIANTS: &[ManageDataResultCode] = &[ ManageDataResultCode::Success, ManageDataResultCode::NotSupportedYet, ManageDataResultCode::NameNotFound, ManageDataResultCode::LowReserve, ManageDataResultCode::InvalidName, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [ManageDataResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "NotSupportedYet", "NameNotFound", "LowReserve", "InvalidName", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -42405,7 +44851,7 @@ impl ManageDataResultCode { } #[must_use] - pub const fn variants() -> [ManageDataResultCode; 5] { + pub const fn variants() -> [ManageDataResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -42519,20 +44965,38 @@ impl Default for ManageDataResult { } impl ManageDataResult { - pub const VARIANTS: [ManageDataResultCode; 5] = [ + const _VARIANTS: &[ManageDataResultCode] = &[ ManageDataResultCode::Success, ManageDataResultCode::NotSupportedYet, ManageDataResultCode::NameNotFound, ManageDataResultCode::LowReserve, ManageDataResultCode::InvalidName, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [ManageDataResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "NotSupportedYet", "NameNotFound", "LowReserve", "InvalidName", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -42558,7 +45022,7 @@ impl ManageDataResult { } #[must_use] - pub const fn variants() -> [ManageDataResultCode; 5] { + pub const fn variants() -> [ManageDataResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -42653,11 +45117,29 @@ pub enum BumpSequenceResultCode { } impl BumpSequenceResultCode { - pub const VARIANTS: [BumpSequenceResultCode; 2] = [ + const _VARIANTS: &[BumpSequenceResultCode] = &[ BumpSequenceResultCode::Success, BumpSequenceResultCode::BadSeq, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Success", "BadSeq"]; + pub const VARIANTS: [BumpSequenceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "BadSeq"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -42668,7 +45150,7 @@ impl BumpSequenceResultCode { } #[must_use] - pub const fn variants() -> [BumpSequenceResultCode; 2] { + pub const fn variants() -> [BumpSequenceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -42773,11 +45255,29 @@ impl Default for BumpSequenceResult { } impl BumpSequenceResult { - pub const VARIANTS: [BumpSequenceResultCode; 2] = [ + const _VARIANTS: &[BumpSequenceResultCode] = &[ BumpSequenceResultCode::Success, BumpSequenceResultCode::BadSeq, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Success", "BadSeq"]; + pub const VARIANTS: [BumpSequenceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "BadSeq"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -42797,7 +45297,7 @@ impl BumpSequenceResult { } #[must_use] - pub const fn variants() -> [BumpSequenceResultCode; 2] { + pub const fn variants() -> [BumpSequenceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -42892,7 +45392,7 @@ pub enum CreateClaimableBalanceResultCode { } impl CreateClaimableBalanceResultCode { - pub const VARIANTS: [CreateClaimableBalanceResultCode; 6] = [ + const _VARIANTS: &[CreateClaimableBalanceResultCode] = &[ CreateClaimableBalanceResultCode::Success, CreateClaimableBalanceResultCode::Malformed, CreateClaimableBalanceResultCode::LowReserve, @@ -42900,7 +45400,16 @@ impl CreateClaimableBalanceResultCode { CreateClaimableBalanceResultCode::NotAuthorized, CreateClaimableBalanceResultCode::Underfunded, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [CreateClaimableBalanceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "LowReserve", @@ -42908,6 +45417,15 @@ impl CreateClaimableBalanceResultCode { "NotAuthorized", "Underfunded", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -42922,7 +45440,7 @@ impl CreateClaimableBalanceResultCode { } #[must_use] - pub const fn variants() -> [CreateClaimableBalanceResultCode; 6] { + pub const fn variants() -> [CreateClaimableBalanceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43040,7 +45558,7 @@ impl Default for CreateClaimableBalanceResult { } impl CreateClaimableBalanceResult { - pub const VARIANTS: [CreateClaimableBalanceResultCode; 6] = [ + const _VARIANTS: &[CreateClaimableBalanceResultCode] = &[ CreateClaimableBalanceResultCode::Success, CreateClaimableBalanceResultCode::Malformed, CreateClaimableBalanceResultCode::LowReserve, @@ -43048,7 +45566,16 @@ impl CreateClaimableBalanceResult { CreateClaimableBalanceResultCode::NotAuthorized, CreateClaimableBalanceResultCode::Underfunded, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [CreateClaimableBalanceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "LowReserve", @@ -43056,6 +45583,15 @@ impl CreateClaimableBalanceResult { "NotAuthorized", "Underfunded", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -43083,7 +45619,7 @@ impl CreateClaimableBalanceResult { } #[must_use] - pub const fn variants() -> [CreateClaimableBalanceResultCode; 6] { + pub const fn variants() -> [CreateClaimableBalanceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43163,8 +45699,7 @@ impl WriteXdr for CreateClaimableBalanceResult { /// CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM = -2, /// CLAIM_CLAIMABLE_BALANCE_LINE_FULL = -3, /// CLAIM_CLAIMABLE_BALANCE_NO_TRUST = -4, -/// CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED = -5, -/// CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN = -6 +/// CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED = -5 /// }; /// ``` /// @@ -43187,28 +45722,43 @@ pub enum ClaimClaimableBalanceResultCode { LineFull = -3, NoTrust = -4, NotAuthorized = -5, - TrustlineFrozen = -6, } impl ClaimClaimableBalanceResultCode { - pub const VARIANTS: [ClaimClaimableBalanceResultCode; 7] = [ + const _VARIANTS: &[ClaimClaimableBalanceResultCode] = &[ ClaimClaimableBalanceResultCode::Success, ClaimClaimableBalanceResultCode::DoesNotExist, ClaimClaimableBalanceResultCode::CannotClaim, ClaimClaimableBalanceResultCode::LineFull, ClaimClaimableBalanceResultCode::NoTrust, ClaimClaimableBalanceResultCode::NotAuthorized, - ClaimClaimableBalanceResultCode::TrustlineFrozen, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [ClaimClaimableBalanceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "DoesNotExist", "CannotClaim", "LineFull", "NoTrust", "NotAuthorized", - "TrustlineFrozen", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -43219,12 +45769,11 @@ impl ClaimClaimableBalanceResultCode { Self::LineFull => "LineFull", Self::NoTrust => "NoTrust", Self::NotAuthorized => "NotAuthorized", - Self::TrustlineFrozen => "TrustlineFrozen", } } #[must_use] - pub const fn variants() -> [ClaimClaimableBalanceResultCode; 7] { + pub const fn variants() -> [ClaimClaimableBalanceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43261,7 +45810,6 @@ impl TryFrom for ClaimClaimableBalanceResultCode { -3 => ClaimClaimableBalanceResultCode::LineFull, -4 => ClaimClaimableBalanceResultCode::NoTrust, -5 => ClaimClaimableBalanceResultCode::NotAuthorized, - -6 => ClaimClaimableBalanceResultCode::TrustlineFrozen, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -43309,7 +45857,6 @@ impl WriteXdr for ClaimClaimableBalanceResultCode { /// case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: /// case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: /// case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: -/// case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: /// void; /// }; /// ``` @@ -43333,7 +45880,6 @@ pub enum ClaimClaimableBalanceResult { LineFull, NoTrust, NotAuthorized, - TrustlineFrozen, } #[cfg(feature = "alloc")] @@ -43344,24 +45890,40 @@ impl Default for ClaimClaimableBalanceResult { } impl ClaimClaimableBalanceResult { - pub const VARIANTS: [ClaimClaimableBalanceResultCode; 7] = [ + const _VARIANTS: &[ClaimClaimableBalanceResultCode] = &[ ClaimClaimableBalanceResultCode::Success, ClaimClaimableBalanceResultCode::DoesNotExist, ClaimClaimableBalanceResultCode::CannotClaim, ClaimClaimableBalanceResultCode::LineFull, ClaimClaimableBalanceResultCode::NoTrust, ClaimClaimableBalanceResultCode::NotAuthorized, - ClaimClaimableBalanceResultCode::TrustlineFrozen, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [ClaimClaimableBalanceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "DoesNotExist", "CannotClaim", "LineFull", "NoTrust", "NotAuthorized", - "TrustlineFrozen", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -43372,7 +45934,6 @@ impl ClaimClaimableBalanceResult { Self::LineFull => "LineFull", Self::NoTrust => "NoTrust", Self::NotAuthorized => "NotAuthorized", - Self::TrustlineFrozen => "TrustlineFrozen", } } @@ -43386,12 +45947,11 @@ impl ClaimClaimableBalanceResult { Self::LineFull => ClaimClaimableBalanceResultCode::LineFull, Self::NoTrust => ClaimClaimableBalanceResultCode::NoTrust, Self::NotAuthorized => ClaimClaimableBalanceResultCode::NotAuthorized, - Self::TrustlineFrozen => ClaimClaimableBalanceResultCode::TrustlineFrozen, } } #[must_use] - pub const fn variants() -> [ClaimClaimableBalanceResultCode; 7] { + pub const fn variants() -> [ClaimClaimableBalanceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43432,7 +45992,6 @@ impl ReadXdr for ClaimClaimableBalanceResult { ClaimClaimableBalanceResultCode::LineFull => Self::LineFull, ClaimClaimableBalanceResultCode::NoTrust => Self::NoTrust, ClaimClaimableBalanceResultCode::NotAuthorized => Self::NotAuthorized, - ClaimClaimableBalanceResultCode::TrustlineFrozen => Self::TrustlineFrozen, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -43454,7 +46013,6 @@ impl WriteXdr for ClaimClaimableBalanceResult { Self::LineFull => ().write_xdr(w)?, Self::NoTrust => ().write_xdr(w)?, Self::NotAuthorized => ().write_xdr(w)?, - Self::TrustlineFrozen => ().write_xdr(w)?, }; Ok(()) }) @@ -43496,14 +46054,31 @@ pub enum BeginSponsoringFutureReservesResultCode { } impl BeginSponsoringFutureReservesResultCode { - pub const VARIANTS: [BeginSponsoringFutureReservesResultCode; 4] = [ + const _VARIANTS: &[BeginSponsoringFutureReservesResultCode] = &[ BeginSponsoringFutureReservesResultCode::Success, BeginSponsoringFutureReservesResultCode::Malformed, BeginSponsoringFutureReservesResultCode::AlreadySponsored, BeginSponsoringFutureReservesResultCode::Recursive, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Success", "Malformed", "AlreadySponsored", "Recursive"]; + pub const VARIANTS: [BeginSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "Malformed", "AlreadySponsored", "Recursive"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -43516,7 +46091,7 @@ impl BeginSponsoringFutureReservesResultCode { } #[must_use] - pub const fn variants() -> [BeginSponsoringFutureReservesResultCode; 4] { + pub const fn variants() -> [BeginSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43628,14 +46203,31 @@ impl Default for BeginSponsoringFutureReservesResult { } impl BeginSponsoringFutureReservesResult { - pub const VARIANTS: [BeginSponsoringFutureReservesResultCode; 4] = [ + const _VARIANTS: &[BeginSponsoringFutureReservesResultCode] = &[ BeginSponsoringFutureReservesResultCode::Success, BeginSponsoringFutureReservesResultCode::Malformed, BeginSponsoringFutureReservesResultCode::AlreadySponsored, BeginSponsoringFutureReservesResultCode::Recursive, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Success", "Malformed", "AlreadySponsored", "Recursive"]; + pub const VARIANTS: [BeginSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "Malformed", "AlreadySponsored", "Recursive"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -43659,7 +46251,7 @@ impl BeginSponsoringFutureReservesResult { } #[must_use] - pub const fn variants() -> [BeginSponsoringFutureReservesResultCode; 4] { + pub const fn variants() -> [BeginSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43754,11 +46346,29 @@ pub enum EndSponsoringFutureReservesResultCode { } impl EndSponsoringFutureReservesResultCode { - pub const VARIANTS: [EndSponsoringFutureReservesResultCode; 2] = [ + const _VARIANTS: &[EndSponsoringFutureReservesResultCode] = &[ EndSponsoringFutureReservesResultCode::Success, EndSponsoringFutureReservesResultCode::NotSponsored, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Success", "NotSponsored"]; + pub const VARIANTS: [EndSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "NotSponsored"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -43769,7 +46379,7 @@ impl EndSponsoringFutureReservesResultCode { } #[must_use] - pub const fn variants() -> [EndSponsoringFutureReservesResultCode; 2] { + pub const fn variants() -> [EndSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43875,11 +46485,29 @@ impl Default for EndSponsoringFutureReservesResult { } impl EndSponsoringFutureReservesResult { - pub const VARIANTS: [EndSponsoringFutureReservesResultCode; 2] = [ + const _VARIANTS: &[EndSponsoringFutureReservesResultCode] = &[ EndSponsoringFutureReservesResultCode::Success, EndSponsoringFutureReservesResultCode::NotSponsored, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Success", "NotSponsored"]; + pub const VARIANTS: [EndSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "NotSponsored"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -43899,7 +46527,7 @@ impl EndSponsoringFutureReservesResult { } #[must_use] - pub const fn variants() -> [EndSponsoringFutureReservesResultCode; 2] { + pub const fn variants() -> [EndSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43998,7 +46626,7 @@ pub enum RevokeSponsorshipResultCode { } impl RevokeSponsorshipResultCode { - pub const VARIANTS: [RevokeSponsorshipResultCode; 6] = [ + const _VARIANTS: &[RevokeSponsorshipResultCode] = &[ RevokeSponsorshipResultCode::Success, RevokeSponsorshipResultCode::DoesNotExist, RevokeSponsorshipResultCode::NotSponsor, @@ -44006,7 +46634,16 @@ impl RevokeSponsorshipResultCode { RevokeSponsorshipResultCode::OnlyTransferable, RevokeSponsorshipResultCode::Malformed, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [RevokeSponsorshipResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "DoesNotExist", "NotSponsor", @@ -44014,6 +46651,15 @@ impl RevokeSponsorshipResultCode { "OnlyTransferable", "Malformed", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -44028,7 +46674,7 @@ impl RevokeSponsorshipResultCode { } #[must_use] - pub const fn variants() -> [RevokeSponsorshipResultCode; 6] { + pub const fn variants() -> [RevokeSponsorshipResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -44145,7 +46791,7 @@ impl Default for RevokeSponsorshipResult { } impl RevokeSponsorshipResult { - pub const VARIANTS: [RevokeSponsorshipResultCode; 6] = [ + const _VARIANTS: &[RevokeSponsorshipResultCode] = &[ RevokeSponsorshipResultCode::Success, RevokeSponsorshipResultCode::DoesNotExist, RevokeSponsorshipResultCode::NotSponsor, @@ -44153,7 +46799,16 @@ impl RevokeSponsorshipResult { RevokeSponsorshipResultCode::OnlyTransferable, RevokeSponsorshipResultCode::Malformed, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [RevokeSponsorshipResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "DoesNotExist", "NotSponsor", @@ -44161,6 +46816,15 @@ impl RevokeSponsorshipResult { "OnlyTransferable", "Malformed", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -44188,7 +46852,7 @@ impl RevokeSponsorshipResult { } #[must_use] - pub const fn variants() -> [RevokeSponsorshipResultCode; 6] { + pub const fn variants() -> [RevokeSponsorshipResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -44293,20 +46957,38 @@ pub enum ClawbackResultCode { } impl ClawbackResultCode { - pub const VARIANTS: [ClawbackResultCode; 5] = [ + const _VARIANTS: &[ClawbackResultCode] = &[ ClawbackResultCode::Success, ClawbackResultCode::Malformed, ClawbackResultCode::NotClawbackEnabled, ClawbackResultCode::NoTrust, ClawbackResultCode::Underfunded, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [ClawbackResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NotClawbackEnabled", "NoTrust", "Underfunded", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -44320,7 +47002,7 @@ impl ClawbackResultCode { } #[must_use] - pub const fn variants() -> [ClawbackResultCode; 5] { + pub const fn variants() -> [ClawbackResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -44434,20 +47116,38 @@ impl Default for ClawbackResult { } impl ClawbackResult { - pub const VARIANTS: [ClawbackResultCode; 5] = [ + const _VARIANTS: &[ClawbackResultCode] = &[ ClawbackResultCode::Success, ClawbackResultCode::Malformed, ClawbackResultCode::NotClawbackEnabled, ClawbackResultCode::NoTrust, ClawbackResultCode::Underfunded, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [ClawbackResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NotClawbackEnabled", "NoTrust", "Underfunded", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -44473,7 +47173,7 @@ impl ClawbackResult { } #[must_use] - pub const fn variants() -> [ClawbackResultCode; 5] { + pub const fn variants() -> [ClawbackResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -44573,14 +47273,31 @@ pub enum ClawbackClaimableBalanceResultCode { } impl ClawbackClaimableBalanceResultCode { - pub const VARIANTS: [ClawbackClaimableBalanceResultCode; 4] = [ + const _VARIANTS: &[ClawbackClaimableBalanceResultCode] = &[ ClawbackClaimableBalanceResultCode::Success, ClawbackClaimableBalanceResultCode::DoesNotExist, ClawbackClaimableBalanceResultCode::NotIssuer, ClawbackClaimableBalanceResultCode::NotClawbackEnabled, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Success", "DoesNotExist", "NotIssuer", "NotClawbackEnabled"]; + pub const VARIANTS: [ClawbackClaimableBalanceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "DoesNotExist", "NotIssuer", "NotClawbackEnabled"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -44593,7 +47310,7 @@ impl ClawbackClaimableBalanceResultCode { } #[must_use] - pub const fn variants() -> [ClawbackClaimableBalanceResultCode; 4] { + pub const fn variants() -> [ClawbackClaimableBalanceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -44705,14 +47422,31 @@ impl Default for ClawbackClaimableBalanceResult { } impl ClawbackClaimableBalanceResult { - pub const VARIANTS: [ClawbackClaimableBalanceResultCode; 4] = [ + const _VARIANTS: &[ClawbackClaimableBalanceResultCode] = &[ ClawbackClaimableBalanceResultCode::Success, ClawbackClaimableBalanceResultCode::DoesNotExist, ClawbackClaimableBalanceResultCode::NotIssuer, ClawbackClaimableBalanceResultCode::NotClawbackEnabled, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Success", "DoesNotExist", "NotIssuer", "NotClawbackEnabled"]; + pub const VARIANTS: [ClawbackClaimableBalanceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "DoesNotExist", "NotIssuer", "NotClawbackEnabled"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -44736,7 +47470,7 @@ impl ClawbackClaimableBalanceResult { } #[must_use] - pub const fn variants() -> [ClawbackClaimableBalanceResultCode; 4] { + pub const fn variants() -> [ClawbackClaimableBalanceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -44840,7 +47574,7 @@ pub enum SetTrustLineFlagsResultCode { } impl SetTrustLineFlagsResultCode { - pub const VARIANTS: [SetTrustLineFlagsResultCode; 6] = [ + const _VARIANTS: &[SetTrustLineFlagsResultCode] = &[ SetTrustLineFlagsResultCode::Success, SetTrustLineFlagsResultCode::Malformed, SetTrustLineFlagsResultCode::NoTrustLine, @@ -44848,7 +47582,16 @@ impl SetTrustLineFlagsResultCode { SetTrustLineFlagsResultCode::InvalidState, SetTrustLineFlagsResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [SetTrustLineFlagsResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrustLine", @@ -44856,6 +47599,15 @@ impl SetTrustLineFlagsResultCode { "InvalidState", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -44870,7 +47622,7 @@ impl SetTrustLineFlagsResultCode { } #[must_use] - pub const fn variants() -> [SetTrustLineFlagsResultCode; 6] { + pub const fn variants() -> [SetTrustLineFlagsResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -44987,7 +47739,7 @@ impl Default for SetTrustLineFlagsResult { } impl SetTrustLineFlagsResult { - pub const VARIANTS: [SetTrustLineFlagsResultCode; 6] = [ + const _VARIANTS: &[SetTrustLineFlagsResultCode] = &[ SetTrustLineFlagsResultCode::Success, SetTrustLineFlagsResultCode::Malformed, SetTrustLineFlagsResultCode::NoTrustLine, @@ -44995,7 +47747,16 @@ impl SetTrustLineFlagsResult { SetTrustLineFlagsResultCode::InvalidState, SetTrustLineFlagsResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [SetTrustLineFlagsResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrustLine", @@ -45003,6 +47764,15 @@ impl SetTrustLineFlagsResult { "InvalidState", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -45030,7 +47800,7 @@ impl SetTrustLineFlagsResult { } #[must_use] - pub const fn variants() -> [SetTrustLineFlagsResultCode; 6] { + pub const fn variants() -> [SetTrustLineFlagsResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -45117,9 +47887,7 @@ impl WriteXdr for SetTrustLineFlagsResult { /// LIQUIDITY_POOL_DEPOSIT_LINE_FULL = -5, // pool share trust line doesn't /// // have sufficient limit /// LIQUIDITY_POOL_DEPOSIT_BAD_PRICE = -6, // deposit price outside bounds -/// LIQUIDITY_POOL_DEPOSIT_POOL_FULL = -7, // pool reserves are full -/// LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN = -8 // trustline for one of the -/// // assets is frozen +/// LIQUIDITY_POOL_DEPOSIT_POOL_FULL = -7 // pool reserves are full /// }; /// ``` /// @@ -45144,11 +47912,10 @@ pub enum LiquidityPoolDepositResultCode { LineFull = -5, BadPrice = -6, PoolFull = -7, - TrustlineFrozen = -8, } impl LiquidityPoolDepositResultCode { - pub const VARIANTS: [LiquidityPoolDepositResultCode; 9] = [ + const _VARIANTS: &[LiquidityPoolDepositResultCode] = &[ LiquidityPoolDepositResultCode::Success, LiquidityPoolDepositResultCode::Malformed, LiquidityPoolDepositResultCode::NoTrust, @@ -45157,9 +47924,17 @@ impl LiquidityPoolDepositResultCode { LiquidityPoolDepositResultCode::LineFull, LiquidityPoolDepositResultCode::BadPrice, LiquidityPoolDepositResultCode::PoolFull, - LiquidityPoolDepositResultCode::TrustlineFrozen, ]; - pub const VARIANTS_STR: [&'static str; 9] = [ + pub const VARIANTS: [LiquidityPoolDepositResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrust", @@ -45168,8 +47943,16 @@ impl LiquidityPoolDepositResultCode { "LineFull", "BadPrice", "PoolFull", - "TrustlineFrozen", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -45182,12 +47965,11 @@ impl LiquidityPoolDepositResultCode { Self::LineFull => "LineFull", Self::BadPrice => "BadPrice", Self::PoolFull => "PoolFull", - Self::TrustlineFrozen => "TrustlineFrozen", } } #[must_use] - pub const fn variants() -> [LiquidityPoolDepositResultCode; 9] { + pub const fn variants() -> [LiquidityPoolDepositResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -45226,7 +48008,6 @@ impl TryFrom for LiquidityPoolDepositResultCode { -5 => LiquidityPoolDepositResultCode::LineFull, -6 => LiquidityPoolDepositResultCode::BadPrice, -7 => LiquidityPoolDepositResultCode::PoolFull, - -8 => LiquidityPoolDepositResultCode::TrustlineFrozen, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -45276,7 +48057,6 @@ impl WriteXdr for LiquidityPoolDepositResultCode { /// case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: /// case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: /// case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: -/// case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: /// void; /// }; /// ``` @@ -45302,7 +48082,6 @@ pub enum LiquidityPoolDepositResult { LineFull, BadPrice, PoolFull, - TrustlineFrozen, } #[cfg(feature = "alloc")] @@ -45313,7 +48092,7 @@ impl Default for LiquidityPoolDepositResult { } impl LiquidityPoolDepositResult { - pub const VARIANTS: [LiquidityPoolDepositResultCode; 9] = [ + const _VARIANTS: &[LiquidityPoolDepositResultCode] = &[ LiquidityPoolDepositResultCode::Success, LiquidityPoolDepositResultCode::Malformed, LiquidityPoolDepositResultCode::NoTrust, @@ -45322,9 +48101,17 @@ impl LiquidityPoolDepositResult { LiquidityPoolDepositResultCode::LineFull, LiquidityPoolDepositResultCode::BadPrice, LiquidityPoolDepositResultCode::PoolFull, - LiquidityPoolDepositResultCode::TrustlineFrozen, ]; - pub const VARIANTS_STR: [&'static str; 9] = [ + pub const VARIANTS: [LiquidityPoolDepositResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrust", @@ -45333,8 +48120,16 @@ impl LiquidityPoolDepositResult { "LineFull", "BadPrice", "PoolFull", - "TrustlineFrozen", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -45347,7 +48142,6 @@ impl LiquidityPoolDepositResult { Self::LineFull => "LineFull", Self::BadPrice => "BadPrice", Self::PoolFull => "PoolFull", - Self::TrustlineFrozen => "TrustlineFrozen", } } @@ -45363,12 +48157,11 @@ impl LiquidityPoolDepositResult { Self::LineFull => LiquidityPoolDepositResultCode::LineFull, Self::BadPrice => LiquidityPoolDepositResultCode::BadPrice, Self::PoolFull => LiquidityPoolDepositResultCode::PoolFull, - Self::TrustlineFrozen => LiquidityPoolDepositResultCode::TrustlineFrozen, } } #[must_use] - pub const fn variants() -> [LiquidityPoolDepositResultCode; 9] { + pub const fn variants() -> [LiquidityPoolDepositResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -45411,7 +48204,6 @@ impl ReadXdr for LiquidityPoolDepositResult { LiquidityPoolDepositResultCode::LineFull => Self::LineFull, LiquidityPoolDepositResultCode::BadPrice => Self::BadPrice, LiquidityPoolDepositResultCode::PoolFull => Self::PoolFull, - LiquidityPoolDepositResultCode::TrustlineFrozen => Self::TrustlineFrozen, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -45435,7 +48227,6 @@ impl WriteXdr for LiquidityPoolDepositResult { Self::LineFull => ().write_xdr(w)?, Self::BadPrice => ().write_xdr(w)?, Self::PoolFull => ().write_xdr(w)?, - Self::TrustlineFrozen => ().write_xdr(w)?, }; Ok(()) }) @@ -45458,9 +48249,7 @@ impl WriteXdr for LiquidityPoolDepositResult { /// // pool share /// LIQUIDITY_POOL_WITHDRAW_LINE_FULL = -4, // would go above limit for one /// // of the assets -/// LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM = -5, // didn't withdraw enough -/// LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN = -6 // trustline for one of the -/// // assets is frozen +/// LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM = -5 // didn't withdraw enough /// }; /// ``` /// @@ -45483,28 +48272,43 @@ pub enum LiquidityPoolWithdrawResultCode { Underfunded = -3, LineFull = -4, UnderMinimum = -5, - TrustlineFrozen = -6, } impl LiquidityPoolWithdrawResultCode { - pub const VARIANTS: [LiquidityPoolWithdrawResultCode; 7] = [ + const _VARIANTS: &[LiquidityPoolWithdrawResultCode] = &[ LiquidityPoolWithdrawResultCode::Success, LiquidityPoolWithdrawResultCode::Malformed, LiquidityPoolWithdrawResultCode::NoTrust, LiquidityPoolWithdrawResultCode::Underfunded, LiquidityPoolWithdrawResultCode::LineFull, LiquidityPoolWithdrawResultCode::UnderMinimum, - LiquidityPoolWithdrawResultCode::TrustlineFrozen, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [LiquidityPoolWithdrawResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrust", "Underfunded", "LineFull", "UnderMinimum", - "TrustlineFrozen", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -45515,12 +48319,11 @@ impl LiquidityPoolWithdrawResultCode { Self::Underfunded => "Underfunded", Self::LineFull => "LineFull", Self::UnderMinimum => "UnderMinimum", - Self::TrustlineFrozen => "TrustlineFrozen", } } #[must_use] - pub const fn variants() -> [LiquidityPoolWithdrawResultCode; 7] { + pub const fn variants() -> [LiquidityPoolWithdrawResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -45557,7 +48360,6 @@ impl TryFrom for LiquidityPoolWithdrawResultCode { -3 => LiquidityPoolWithdrawResultCode::Underfunded, -4 => LiquidityPoolWithdrawResultCode::LineFull, -5 => LiquidityPoolWithdrawResultCode::UnderMinimum, - -6 => LiquidityPoolWithdrawResultCode::TrustlineFrozen, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -45605,7 +48407,6 @@ impl WriteXdr for LiquidityPoolWithdrawResultCode { /// case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: /// case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: /// case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: -/// case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: /// void; /// }; /// ``` @@ -45629,7 +48430,6 @@ pub enum LiquidityPoolWithdrawResult { Underfunded, LineFull, UnderMinimum, - TrustlineFrozen, } #[cfg(feature = "alloc")] @@ -45640,24 +48440,40 @@ impl Default for LiquidityPoolWithdrawResult { } impl LiquidityPoolWithdrawResult { - pub const VARIANTS: [LiquidityPoolWithdrawResultCode; 7] = [ + const _VARIANTS: &[LiquidityPoolWithdrawResultCode] = &[ LiquidityPoolWithdrawResultCode::Success, LiquidityPoolWithdrawResultCode::Malformed, LiquidityPoolWithdrawResultCode::NoTrust, LiquidityPoolWithdrawResultCode::Underfunded, LiquidityPoolWithdrawResultCode::LineFull, LiquidityPoolWithdrawResultCode::UnderMinimum, - LiquidityPoolWithdrawResultCode::TrustlineFrozen, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [LiquidityPoolWithdrawResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrust", "Underfunded", "LineFull", "UnderMinimum", - "TrustlineFrozen", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -45668,7 +48484,6 @@ impl LiquidityPoolWithdrawResult { Self::Underfunded => "Underfunded", Self::LineFull => "LineFull", Self::UnderMinimum => "UnderMinimum", - Self::TrustlineFrozen => "TrustlineFrozen", } } @@ -45682,12 +48497,11 @@ impl LiquidityPoolWithdrawResult { Self::Underfunded => LiquidityPoolWithdrawResultCode::Underfunded, Self::LineFull => LiquidityPoolWithdrawResultCode::LineFull, Self::UnderMinimum => LiquidityPoolWithdrawResultCode::UnderMinimum, - Self::TrustlineFrozen => LiquidityPoolWithdrawResultCode::TrustlineFrozen, } } #[must_use] - pub const fn variants() -> [LiquidityPoolWithdrawResultCode; 7] { + pub const fn variants() -> [LiquidityPoolWithdrawResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -45728,7 +48542,6 @@ impl ReadXdr for LiquidityPoolWithdrawResult { LiquidityPoolWithdrawResultCode::Underfunded => Self::Underfunded, LiquidityPoolWithdrawResultCode::LineFull => Self::LineFull, LiquidityPoolWithdrawResultCode::UnderMinimum => Self::UnderMinimum, - LiquidityPoolWithdrawResultCode::TrustlineFrozen => Self::TrustlineFrozen, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -45750,7 +48563,6 @@ impl WriteXdr for LiquidityPoolWithdrawResult { Self::Underfunded => ().write_xdr(w)?, Self::LineFull => ().write_xdr(w)?, Self::UnderMinimum => ().write_xdr(w)?, - Self::TrustlineFrozen => ().write_xdr(w)?, }; Ok(()) }) @@ -45796,7 +48608,7 @@ pub enum InvokeHostFunctionResultCode { } impl InvokeHostFunctionResultCode { - pub const VARIANTS: [InvokeHostFunctionResultCode; 6] = [ + const _VARIANTS: &[InvokeHostFunctionResultCode] = &[ InvokeHostFunctionResultCode::Success, InvokeHostFunctionResultCode::Malformed, InvokeHostFunctionResultCode::Trapped, @@ -45804,7 +48616,16 @@ impl InvokeHostFunctionResultCode { InvokeHostFunctionResultCode::EntryArchived, InvokeHostFunctionResultCode::InsufficientRefundableFee, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [InvokeHostFunctionResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Trapped", @@ -45812,6 +48633,15 @@ impl InvokeHostFunctionResultCode { "EntryArchived", "InsufficientRefundableFee", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -45826,7 +48656,7 @@ impl InvokeHostFunctionResultCode { } #[must_use] - pub const fn variants() -> [InvokeHostFunctionResultCode; 6] { + pub const fn variants() -> [InvokeHostFunctionResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -45943,7 +48773,7 @@ impl Default for InvokeHostFunctionResult { } impl InvokeHostFunctionResult { - pub const VARIANTS: [InvokeHostFunctionResultCode; 6] = [ + const _VARIANTS: &[InvokeHostFunctionResultCode] = &[ InvokeHostFunctionResultCode::Success, InvokeHostFunctionResultCode::Malformed, InvokeHostFunctionResultCode::Trapped, @@ -45951,7 +48781,16 @@ impl InvokeHostFunctionResult { InvokeHostFunctionResultCode::EntryArchived, InvokeHostFunctionResultCode::InsufficientRefundableFee, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [InvokeHostFunctionResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Trapped", @@ -45959,6 +48798,15 @@ impl InvokeHostFunctionResult { "EntryArchived", "InsufficientRefundableFee", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -45988,7 +48836,7 @@ impl InvokeHostFunctionResult { } #[must_use] - pub const fn variants() -> [InvokeHostFunctionResultCode; 6] { + pub const fn variants() -> [InvokeHostFunctionResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -46093,18 +48941,36 @@ pub enum ExtendFootprintTtlResultCode { } impl ExtendFootprintTtlResultCode { - pub const VARIANTS: [ExtendFootprintTtlResultCode; 4] = [ + const _VARIANTS: &[ExtendFootprintTtlResultCode] = &[ ExtendFootprintTtlResultCode::Success, ExtendFootprintTtlResultCode::Malformed, ExtendFootprintTtlResultCode::ResourceLimitExceeded, ExtendFootprintTtlResultCode::InsufficientRefundableFee, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [ExtendFootprintTtlResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "ResourceLimitExceeded", "InsufficientRefundableFee", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -46117,7 +48983,7 @@ impl ExtendFootprintTtlResultCode { } #[must_use] - pub const fn variants() -> [ExtendFootprintTtlResultCode; 4] { + pub const fn variants() -> [ExtendFootprintTtlResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -46228,18 +49094,36 @@ impl Default for ExtendFootprintTtlResult { } impl ExtendFootprintTtlResult { - pub const VARIANTS: [ExtendFootprintTtlResultCode; 4] = [ + const _VARIANTS: &[ExtendFootprintTtlResultCode] = &[ ExtendFootprintTtlResultCode::Success, ExtendFootprintTtlResultCode::Malformed, ExtendFootprintTtlResultCode::ResourceLimitExceeded, ExtendFootprintTtlResultCode::InsufficientRefundableFee, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [ExtendFootprintTtlResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "ResourceLimitExceeded", "InsufficientRefundableFee", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -46265,7 +49149,7 @@ impl ExtendFootprintTtlResult { } #[must_use] - pub const fn variants() -> [ExtendFootprintTtlResultCode; 4] { + pub const fn variants() -> [ExtendFootprintTtlResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -46366,18 +49250,36 @@ pub enum RestoreFootprintResultCode { } impl RestoreFootprintResultCode { - pub const VARIANTS: [RestoreFootprintResultCode; 4] = [ + const _VARIANTS: &[RestoreFootprintResultCode] = &[ RestoreFootprintResultCode::Success, RestoreFootprintResultCode::Malformed, RestoreFootprintResultCode::ResourceLimitExceeded, RestoreFootprintResultCode::InsufficientRefundableFee, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [RestoreFootprintResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "ResourceLimitExceeded", "InsufficientRefundableFee", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -46390,7 +49292,7 @@ impl RestoreFootprintResultCode { } #[must_use] - pub const fn variants() -> [RestoreFootprintResultCode; 4] { + pub const fn variants() -> [RestoreFootprintResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -46501,18 +49403,36 @@ impl Default for RestoreFootprintResult { } impl RestoreFootprintResult { - pub const VARIANTS: [RestoreFootprintResultCode; 4] = [ + const _VARIANTS: &[RestoreFootprintResultCode] = &[ RestoreFootprintResultCode::Success, RestoreFootprintResultCode::Malformed, RestoreFootprintResultCode::ResourceLimitExceeded, RestoreFootprintResultCode::InsufficientRefundableFee, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [RestoreFootprintResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "ResourceLimitExceeded", "InsufficientRefundableFee", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -46538,7 +49458,7 @@ impl RestoreFootprintResult { } #[must_use] - pub const fn variants() -> [RestoreFootprintResultCode; 4] { + pub const fn variants() -> [RestoreFootprintResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -46643,7 +49563,7 @@ pub enum OperationResultCode { } impl OperationResultCode { - pub const VARIANTS: [OperationResultCode; 7] = [ + const _VARIANTS: &[OperationResultCode] = &[ OperationResultCode::OpInner, OperationResultCode::OpBadAuth, OperationResultCode::OpNoAccount, @@ -46652,7 +49572,16 @@ impl OperationResultCode { OperationResultCode::OpExceededWorkLimit, OperationResultCode::OpTooManySponsoring, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [OperationResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "OpInner", "OpBadAuth", "OpNoAccount", @@ -46661,6 +49590,15 @@ impl OperationResultCode { "OpExceededWorkLimit", "OpTooManySponsoring", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -46676,7 +49614,7 @@ impl OperationResultCode { } #[must_use] - pub const fn variants() -> [OperationResultCode; 7] { + pub const fn variants() -> [OperationResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -46861,7 +49799,7 @@ impl Default for OperationResultTr { } impl OperationResultTr { - pub const VARIANTS: [OperationType; 27] = [ + const _VARIANTS: &[OperationType] = &[ OperationType::CreateAccount, OperationType::Payment, OperationType::PathPaymentStrictReceive, @@ -46890,7 +49828,16 @@ impl OperationResultTr { OperationType::ExtendFootprintTtl, OperationType::RestoreFootprint, ]; - pub const VARIANTS_STR: [&'static str; 27] = [ + pub const VARIANTS: [OperationType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "CreateAccount", "Payment", "PathPaymentStrictReceive", @@ -46919,6 +49866,15 @@ impl OperationResultTr { "ExtendFootprintTtl", "RestoreFootprint", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -46988,7 +49944,7 @@ impl OperationResultTr { } #[must_use] - pub const fn variants() -> [OperationType; 27] { + pub const fn variants() -> [OperationType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -47239,7 +50195,7 @@ impl Default for OperationResult { } impl OperationResult { - pub const VARIANTS: [OperationResultCode; 7] = [ + const _VARIANTS: &[OperationResultCode] = &[ OperationResultCode::OpInner, OperationResultCode::OpBadAuth, OperationResultCode::OpNoAccount, @@ -47248,7 +50204,16 @@ impl OperationResult { OperationResultCode::OpExceededWorkLimit, OperationResultCode::OpTooManySponsoring, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [OperationResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "OpInner", "OpBadAuth", "OpNoAccount", @@ -47257,6 +50222,15 @@ impl OperationResult { "OpExceededWorkLimit", "OpTooManySponsoring", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -47286,7 +50260,7 @@ impl OperationResult { } #[must_use] - pub const fn variants() -> [OperationResultCode; 7] { + pub const fn variants() -> [OperationResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -47382,8 +50356,7 @@ impl WriteXdr for OperationResult { /// txBAD_SPONSORSHIP = -14, // sponsorship not confirmed /// txBAD_MIN_SEQ_AGE_OR_GAP = -15, // minSeqAge or minSeqLedgerGap conditions not met /// txMALFORMED = -16, // precondition is invalid -/// txSOROBAN_INVALID = -17, // soroban-specific preconditions were not met -/// txFROZEN_KEY_ACCESSED = -18 // a 'frozen' ledger key is accessed by any operation +/// txSOROBAN_INVALID = -17 // soroban-specific preconditions were not met /// }; /// ``` /// @@ -47419,11 +50392,10 @@ pub enum TransactionResultCode { TxBadMinSeqAgeOrGap = -15, TxMalformed = -16, TxSorobanInvalid = -17, - TxFrozenKeyAccessed = -18, } impl TransactionResultCode { - pub const VARIANTS: [TransactionResultCode; 20] = [ + const _VARIANTS: &[TransactionResultCode] = &[ TransactionResultCode::TxFeeBumpInnerSuccess, TransactionResultCode::TxSuccess, TransactionResultCode::TxFailed, @@ -47443,9 +50415,17 @@ impl TransactionResultCode { TransactionResultCode::TxBadMinSeqAgeOrGap, TransactionResultCode::TxMalformed, TransactionResultCode::TxSorobanInvalid, - TransactionResultCode::TxFrozenKeyAccessed, ]; - pub const VARIANTS_STR: [&'static str; 20] = [ + pub const VARIANTS: [TransactionResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "TxFeeBumpInnerSuccess", "TxSuccess", "TxFailed", @@ -47465,8 +50445,16 @@ impl TransactionResultCode { "TxBadMinSeqAgeOrGap", "TxMalformed", "TxSorobanInvalid", - "TxFrozenKeyAccessed", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -47490,12 +50478,11 @@ impl TransactionResultCode { Self::TxBadMinSeqAgeOrGap => "TxBadMinSeqAgeOrGap", Self::TxMalformed => "TxMalformed", Self::TxSorobanInvalid => "TxSorobanInvalid", - Self::TxFrozenKeyAccessed => "TxFrozenKeyAccessed", } } #[must_use] - pub const fn variants() -> [TransactionResultCode; 20] { + pub const fn variants() -> [TransactionResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -47545,7 +50532,6 @@ impl TryFrom for TransactionResultCode { -15 => TransactionResultCode::TxBadMinSeqAgeOrGap, -16 => TransactionResultCode::TxMalformed, -17 => TransactionResultCode::TxSorobanInvalid, - -18 => TransactionResultCode::TxFrozenKeyAccessed, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -47606,7 +50592,6 @@ impl WriteXdr for TransactionResultCode { /// case txBAD_MIN_SEQ_AGE_OR_GAP: /// case txMALFORMED: /// case txSOROBAN_INVALID: -/// case txFROZEN_KEY_ACCESSED: /// void; /// } /// ``` @@ -47641,7 +50626,6 @@ pub enum InnerTransactionResultResult { TxBadMinSeqAgeOrGap, TxMalformed, TxSorobanInvalid, - TxFrozenKeyAccessed, } #[cfg(feature = "alloc")] @@ -47652,7 +50636,7 @@ impl Default for InnerTransactionResultResult { } impl InnerTransactionResultResult { - pub const VARIANTS: [TransactionResultCode; 18] = [ + const _VARIANTS: &[TransactionResultCode] = &[ TransactionResultCode::TxSuccess, TransactionResultCode::TxFailed, TransactionResultCode::TxTooEarly, @@ -47670,9 +50654,17 @@ impl InnerTransactionResultResult { TransactionResultCode::TxBadMinSeqAgeOrGap, TransactionResultCode::TxMalformed, TransactionResultCode::TxSorobanInvalid, - TransactionResultCode::TxFrozenKeyAccessed, ]; - pub const VARIANTS_STR: [&'static str; 18] = [ + pub const VARIANTS: [TransactionResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "TxSuccess", "TxFailed", "TxTooEarly", @@ -47690,8 +50682,16 @@ impl InnerTransactionResultResult { "TxBadMinSeqAgeOrGap", "TxMalformed", "TxSorobanInvalid", - "TxFrozenKeyAccessed", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -47713,7 +50713,6 @@ impl InnerTransactionResultResult { Self::TxBadMinSeqAgeOrGap => "TxBadMinSeqAgeOrGap", Self::TxMalformed => "TxMalformed", Self::TxSorobanInvalid => "TxSorobanInvalid", - Self::TxFrozenKeyAccessed => "TxFrozenKeyAccessed", } } @@ -47738,12 +50737,11 @@ impl InnerTransactionResultResult { Self::TxBadMinSeqAgeOrGap => TransactionResultCode::TxBadMinSeqAgeOrGap, Self::TxMalformed => TransactionResultCode::TxMalformed, Self::TxSorobanInvalid => TransactionResultCode::TxSorobanInvalid, - Self::TxFrozenKeyAccessed => TransactionResultCode::TxFrozenKeyAccessed, } } #[must_use] - pub const fn variants() -> [TransactionResultCode; 18] { + pub const fn variants() -> [TransactionResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -47798,7 +50796,6 @@ impl ReadXdr for InnerTransactionResultResult { TransactionResultCode::TxBadMinSeqAgeOrGap => Self::TxBadMinSeqAgeOrGap, TransactionResultCode::TxMalformed => Self::TxMalformed, TransactionResultCode::TxSorobanInvalid => Self::TxSorobanInvalid, - TransactionResultCode::TxFrozenKeyAccessed => Self::TxFrozenKeyAccessed, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -47831,7 +50828,6 @@ impl WriteXdr for InnerTransactionResultResult { Self::TxBadMinSeqAgeOrGap => ().write_xdr(w)?, Self::TxMalformed => ().write_xdr(w)?, Self::TxSorobanInvalid => ().write_xdr(w)?, - Self::TxFrozenKeyAccessed => ().write_xdr(w)?, }; Ok(()) }) @@ -47872,8 +50868,26 @@ impl Default for InnerTransactionResultExt { } impl InnerTransactionResultExt { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -47891,7 +50905,7 @@ impl InnerTransactionResultExt { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -47978,7 +50992,6 @@ impl WriteXdr for InnerTransactionResultExt { /// case txBAD_MIN_SEQ_AGE_OR_GAP: /// case txMALFORMED: /// case txSOROBAN_INVALID: -/// case txFROZEN_KEY_ACCESSED: /// void; /// } /// result; @@ -48115,7 +51128,6 @@ impl WriteXdr for InnerTransactionResultPair { /// case txBAD_MIN_SEQ_AGE_OR_GAP: /// case txMALFORMED: /// case txSOROBAN_INVALID: -/// case txFROZEN_KEY_ACCESSED: /// void; /// } /// ``` @@ -48152,7 +51164,6 @@ pub enum TransactionResultResult { TxBadMinSeqAgeOrGap, TxMalformed, TxSorobanInvalid, - TxFrozenKeyAccessed, } #[cfg(feature = "alloc")] @@ -48163,7 +51174,7 @@ impl Default for TransactionResultResult { } impl TransactionResultResult { - pub const VARIANTS: [TransactionResultCode; 20] = [ + const _VARIANTS: &[TransactionResultCode] = &[ TransactionResultCode::TxFeeBumpInnerSuccess, TransactionResultCode::TxFeeBumpInnerFailed, TransactionResultCode::TxSuccess, @@ -48183,9 +51194,17 @@ impl TransactionResultResult { TransactionResultCode::TxBadMinSeqAgeOrGap, TransactionResultCode::TxMalformed, TransactionResultCode::TxSorobanInvalid, - TransactionResultCode::TxFrozenKeyAccessed, ]; - pub const VARIANTS_STR: [&'static str; 20] = [ + pub const VARIANTS: [TransactionResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "TxFeeBumpInnerSuccess", "TxFeeBumpInnerFailed", "TxSuccess", @@ -48205,8 +51224,16 @@ impl TransactionResultResult { "TxBadMinSeqAgeOrGap", "TxMalformed", "TxSorobanInvalid", - "TxFrozenKeyAccessed", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -48230,7 +51257,6 @@ impl TransactionResultResult { Self::TxBadMinSeqAgeOrGap => "TxBadMinSeqAgeOrGap", Self::TxMalformed => "TxMalformed", Self::TxSorobanInvalid => "TxSorobanInvalid", - Self::TxFrozenKeyAccessed => "TxFrozenKeyAccessed", } } @@ -48257,12 +51283,11 @@ impl TransactionResultResult { Self::TxBadMinSeqAgeOrGap => TransactionResultCode::TxBadMinSeqAgeOrGap, Self::TxMalformed => TransactionResultCode::TxMalformed, Self::TxSorobanInvalid => TransactionResultCode::TxSorobanInvalid, - Self::TxFrozenKeyAccessed => TransactionResultCode::TxFrozenKeyAccessed, } } #[must_use] - pub const fn variants() -> [TransactionResultCode; 20] { + pub const fn variants() -> [TransactionResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -48323,7 +51348,6 @@ impl ReadXdr for TransactionResultResult { TransactionResultCode::TxBadMinSeqAgeOrGap => Self::TxBadMinSeqAgeOrGap, TransactionResultCode::TxMalformed => Self::TxMalformed, TransactionResultCode::TxSorobanInvalid => Self::TxSorobanInvalid, - TransactionResultCode::TxFrozenKeyAccessed => Self::TxFrozenKeyAccessed, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -48358,7 +51382,6 @@ impl WriteXdr for TransactionResultResult { Self::TxBadMinSeqAgeOrGap => ().write_xdr(w)?, Self::TxMalformed => ().write_xdr(w)?, Self::TxSorobanInvalid => ().write_xdr(w)?, - Self::TxFrozenKeyAccessed => ().write_xdr(w)?, }; Ok(()) }) @@ -48399,8 +51422,26 @@ impl Default for TransactionResultExt { } impl TransactionResultExt { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -48418,7 +51459,7 @@ impl TransactionResultExt { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -48506,7 +51547,6 @@ impl WriteXdr for TransactionResultExt { /// case txBAD_MIN_SEQ_AGE_OR_GAP: /// case txMALFORMED: /// case txSOROBAN_INVALID: -/// case txFROZEN_KEY_ACCESSED: /// void; /// } /// result; @@ -49069,8 +52109,26 @@ impl Default for ExtensionPoint { } impl ExtensionPoint { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -49088,7 +52146,7 @@ impl ExtensionPoint { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -49181,20 +52239,38 @@ pub enum CryptoKeyType { } impl CryptoKeyType { - pub const VARIANTS: [CryptoKeyType; 5] = [ + const _VARIANTS: &[CryptoKeyType] = &[ CryptoKeyType::Ed25519, CryptoKeyType::PreAuthTx, CryptoKeyType::HashX, CryptoKeyType::Ed25519SignedPayload, CryptoKeyType::MuxedEd25519, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [CryptoKeyType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload", "MuxedEd25519", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -49208,7 +52284,7 @@ impl CryptoKeyType { } #[must_use] - pub const fn variants() -> [CryptoKeyType; 5] { + pub const fn variants() -> [CryptoKeyType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -49305,8 +52381,26 @@ pub enum PublicKeyType { } impl PublicKeyType { - pub const VARIANTS: [PublicKeyType; 1] = [PublicKeyType::PublicKeyTypeEd25519]; - pub const VARIANTS_STR: [&'static str; 1] = ["PublicKeyTypeEd25519"]; + const _VARIANTS: &[PublicKeyType] = &[PublicKeyType::PublicKeyTypeEd25519]; + pub const VARIANTS: [PublicKeyType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["PublicKeyTypeEd25519"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -49316,7 +52410,7 @@ impl PublicKeyType { } #[must_use] - pub const fn variants() -> [PublicKeyType; 1] { + pub const fn variants() -> [PublicKeyType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -49415,14 +52509,31 @@ pub enum SignerKeyType { } impl SignerKeyType { - pub const VARIANTS: [SignerKeyType; 4] = [ + const _VARIANTS: &[SignerKeyType] = &[ SignerKeyType::Ed25519, SignerKeyType::PreAuthTx, SignerKeyType::HashX, SignerKeyType::Ed25519SignedPayload, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload"]; + pub const VARIANTS: [SignerKeyType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -49435,7 +52546,7 @@ impl SignerKeyType { } #[must_use] - pub const fn variants() -> [SignerKeyType; 4] { + pub const fn variants() -> [SignerKeyType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -49536,8 +52647,26 @@ impl Default for PublicKey { } impl PublicKey { - pub const VARIANTS: [PublicKeyType; 1] = [PublicKeyType::PublicKeyTypeEd25519]; - pub const VARIANTS_STR: [&'static str; 1] = ["PublicKeyTypeEd25519"]; + const _VARIANTS: &[PublicKeyType] = &[PublicKeyType::PublicKeyTypeEd25519]; + pub const VARIANTS: [PublicKeyType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["PublicKeyTypeEd25519"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -49555,7 +52684,7 @@ impl PublicKey { } #[must_use] - pub const fn variants() -> [PublicKeyType; 1] { + pub const fn variants() -> [PublicKeyType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -49742,14 +52871,31 @@ impl Default for SignerKey { } impl SignerKey { - pub const VARIANTS: [SignerKeyType; 4] = [ + const _VARIANTS: &[SignerKeyType] = &[ SignerKeyType::Ed25519, SignerKeyType::PreAuthTx, SignerKeyType::HashX, SignerKeyType::Ed25519SignedPayload, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload"]; + pub const VARIANTS: [SignerKeyType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -49773,7 +52919,7 @@ impl SignerKey { } #[must_use] - pub const fn variants() -> [SignerKeyType; 4] { + pub const fn variants() -> [SignerKeyType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -50521,12 +53667,30 @@ pub enum BinaryFuseFilterType { } impl BinaryFuseFilterType { - pub const VARIANTS: [BinaryFuseFilterType; 3] = [ + const _VARIANTS: &[BinaryFuseFilterType] = &[ BinaryFuseFilterType::B8Bit, BinaryFuseFilterType::B16Bit, BinaryFuseFilterType::B32Bit, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["B8Bit", "B16Bit", "B32Bit"]; + pub const VARIANTS: [BinaryFuseFilterType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["B8Bit", "B16Bit", "B32Bit"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -50538,7 +53702,7 @@ impl BinaryFuseFilterType { } #[must_use] - pub const fn variants() -> [BinaryFuseFilterType; 3] { + pub const fn variants() -> [BinaryFuseFilterType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -50772,9 +53936,27 @@ pub enum ClaimableBalanceIdType { } impl ClaimableBalanceIdType { - pub const VARIANTS: [ClaimableBalanceIdType; 1] = - [ClaimableBalanceIdType::ClaimableBalanceIdTypeV0]; - pub const VARIANTS_STR: [&'static str; 1] = ["ClaimableBalanceIdTypeV0"]; + const _VARIANTS: &[ClaimableBalanceIdType] = + &[ClaimableBalanceIdType::ClaimableBalanceIdTypeV0]; + pub const VARIANTS: [ClaimableBalanceIdType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ClaimableBalanceIdTypeV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -50784,7 +53966,7 @@ impl ClaimableBalanceIdType { } #[must_use] - pub const fn variants() -> [ClaimableBalanceIdType; 1] { + pub const fn variants() -> [ClaimableBalanceIdType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -50882,9 +54064,27 @@ impl Default for ClaimableBalanceId { } impl ClaimableBalanceId { - pub const VARIANTS: [ClaimableBalanceIdType; 1] = - [ClaimableBalanceIdType::ClaimableBalanceIdTypeV0]; - pub const VARIANTS_STR: [&'static str; 1] = ["ClaimableBalanceIdTypeV0"]; + const _VARIANTS: &[ClaimableBalanceIdType] = + &[ClaimableBalanceIdType::ClaimableBalanceIdTypeV0]; + pub const VARIANTS: [ClaimableBalanceIdType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ClaimableBalanceIdTypeV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -50902,7 +54102,7 @@ impl ClaimableBalanceId { } #[must_use] - pub const fn variants() -> [ClaimableBalanceIdType; 1] { + pub const fn variants() -> [ClaimableBalanceIdType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -50980,7 +54180,6 @@ pub enum TypeVariant { ScpStatementExternalize, ScpEnvelope, ScpQuorumSet, - EncodedLedgerKey, ConfigSettingContractExecutionLanesV0, ConfigSettingContractComputeV0, ConfigSettingContractParallelComputeV0, @@ -50994,10 +54193,6 @@ pub enum TypeVariant { StateArchivalSettings, EvictionIterator, ConfigSettingScpTiming, - FrozenLedgerKeys, - FrozenLedgerKeysDelta, - FreezeBypassTxs, - FreezeBypassTxsDelta, ContractCostParams, ConfigSettingId, ConfigSettingEntry, @@ -51454,7 +54649,6 @@ impl TypeVariant { TypeVariant::ScpStatementExternalize, TypeVariant::ScpEnvelope, TypeVariant::ScpQuorumSet, - TypeVariant::EncodedLedgerKey, TypeVariant::ConfigSettingContractExecutionLanesV0, TypeVariant::ConfigSettingContractComputeV0, TypeVariant::ConfigSettingContractParallelComputeV0, @@ -51468,10 +54662,6 @@ impl TypeVariant { TypeVariant::StateArchivalSettings, TypeVariant::EvictionIterator, TypeVariant::ConfigSettingScpTiming, - TypeVariant::FrozenLedgerKeys, - TypeVariant::FrozenLedgerKeysDelta, - TypeVariant::FreezeBypassTxs, - TypeVariant::FreezeBypassTxsDelta, TypeVariant::ContractCostParams, TypeVariant::ConfigSettingId, TypeVariant::ConfigSettingEntry, @@ -51933,7 +55123,6 @@ impl TypeVariant { "ScpStatementExternalize", "ScpEnvelope", "ScpQuorumSet", - "EncodedLedgerKey", "ConfigSettingContractExecutionLanesV0", "ConfigSettingContractComputeV0", "ConfigSettingContractParallelComputeV0", @@ -51947,10 +55136,6 @@ impl TypeVariant { "StateArchivalSettings", "EvictionIterator", "ConfigSettingScpTiming", - "FrozenLedgerKeys", - "FrozenLedgerKeysDelta", - "FreezeBypassTxs", - "FreezeBypassTxsDelta", "ContractCostParams", "ConfigSettingId", "ConfigSettingEntry", @@ -52416,7 +55601,6 @@ impl TypeVariant { Self::ScpStatementExternalize => "ScpStatementExternalize", Self::ScpEnvelope => "ScpEnvelope", Self::ScpQuorumSet => "ScpQuorumSet", - Self::EncodedLedgerKey => "EncodedLedgerKey", Self::ConfigSettingContractExecutionLanesV0 => "ConfigSettingContractExecutionLanesV0", Self::ConfigSettingContractComputeV0 => "ConfigSettingContractComputeV0", Self::ConfigSettingContractParallelComputeV0 => { @@ -52432,10 +55616,6 @@ impl TypeVariant { Self::StateArchivalSettings => "StateArchivalSettings", Self::EvictionIterator => "EvictionIterator", Self::ConfigSettingScpTiming => "ConfigSettingScpTiming", - Self::FrozenLedgerKeys => "FrozenLedgerKeys", - Self::FrozenLedgerKeysDelta => "FrozenLedgerKeysDelta", - Self::FreezeBypassTxs => "FreezeBypassTxs", - Self::FreezeBypassTxsDelta => "FreezeBypassTxsDelta", Self::ContractCostParams => "ContractCostParams", Self::ConfigSettingId => "ConfigSettingId", Self::ConfigSettingEntry => "ConfigSettingEntry", @@ -52912,7 +56092,6 @@ impl TypeVariant { Self::ScpStatementExternalize => gen.into_root_schema_for::(), Self::ScpEnvelope => gen.into_root_schema_for::(), Self::ScpQuorumSet => gen.into_root_schema_for::(), - Self::EncodedLedgerKey => gen.into_root_schema_for::(), Self::ConfigSettingContractExecutionLanesV0 => { gen.into_root_schema_for::() } @@ -52942,10 +56121,6 @@ impl TypeVariant { Self::StateArchivalSettings => gen.into_root_schema_for::(), Self::EvictionIterator => gen.into_root_schema_for::(), Self::ConfigSettingScpTiming => gen.into_root_schema_for::(), - Self::FrozenLedgerKeys => gen.into_root_schema_for::(), - Self::FrozenLedgerKeysDelta => gen.into_root_schema_for::(), - Self::FreezeBypassTxs => gen.into_root_schema_for::(), - Self::FreezeBypassTxsDelta => gen.into_root_schema_for::(), Self::ContractCostParams => gen.into_root_schema_for::(), Self::ConfigSettingId => gen.into_root_schema_for::(), Self::ConfigSettingEntry => gen.into_root_schema_for::(), @@ -53618,7 +56793,6 @@ impl core::str::FromStr for TypeVariant { "ScpStatementExternalize" => Ok(Self::ScpStatementExternalize), "ScpEnvelope" => Ok(Self::ScpEnvelope), "ScpQuorumSet" => Ok(Self::ScpQuorumSet), - "EncodedLedgerKey" => Ok(Self::EncodedLedgerKey), "ConfigSettingContractExecutionLanesV0" => { Ok(Self::ConfigSettingContractExecutionLanesV0) } @@ -53640,10 +56814,6 @@ impl core::str::FromStr for TypeVariant { "StateArchivalSettings" => Ok(Self::StateArchivalSettings), "EvictionIterator" => Ok(Self::EvictionIterator), "ConfigSettingScpTiming" => Ok(Self::ConfigSettingScpTiming), - "FrozenLedgerKeys" => Ok(Self::FrozenLedgerKeys), - "FrozenLedgerKeysDelta" => Ok(Self::FrozenLedgerKeysDelta), - "FreezeBypassTxs" => Ok(Self::FreezeBypassTxs), - "FreezeBypassTxsDelta" => Ok(Self::FreezeBypassTxsDelta), "ContractCostParams" => Ok(Self::ContractCostParams), "ConfigSettingId" => Ok(Self::ConfigSettingId), "ConfigSettingEntry" => Ok(Self::ConfigSettingEntry), @@ -54130,7 +57300,6 @@ pub enum Type { ScpStatementExternalize(Box), ScpEnvelope(Box), ScpQuorumSet(Box), - EncodedLedgerKey(Box), ConfigSettingContractExecutionLanesV0(Box), ConfigSettingContractComputeV0(Box), ConfigSettingContractParallelComputeV0(Box), @@ -54144,10 +57313,6 @@ pub enum Type { StateArchivalSettings(Box), EvictionIterator(Box), ConfigSettingScpTiming(Box), - FrozenLedgerKeys(Box), - FrozenLedgerKeysDelta(Box), - FreezeBypassTxs(Box), - FreezeBypassTxsDelta(Box), ContractCostParams(Box), ConfigSettingId(Box), ConfigSettingEntry(Box), @@ -54604,7 +57769,6 @@ impl Type { TypeVariant::ScpStatementExternalize, TypeVariant::ScpEnvelope, TypeVariant::ScpQuorumSet, - TypeVariant::EncodedLedgerKey, TypeVariant::ConfigSettingContractExecutionLanesV0, TypeVariant::ConfigSettingContractComputeV0, TypeVariant::ConfigSettingContractParallelComputeV0, @@ -54618,10 +57782,6 @@ impl Type { TypeVariant::StateArchivalSettings, TypeVariant::EvictionIterator, TypeVariant::ConfigSettingScpTiming, - TypeVariant::FrozenLedgerKeys, - TypeVariant::FrozenLedgerKeysDelta, - TypeVariant::FreezeBypassTxs, - TypeVariant::FreezeBypassTxsDelta, TypeVariant::ContractCostParams, TypeVariant::ConfigSettingId, TypeVariant::ConfigSettingEntry, @@ -55083,7 +58243,6 @@ impl Type { "ScpStatementExternalize", "ScpEnvelope", "ScpQuorumSet", - "EncodedLedgerKey", "ConfigSettingContractExecutionLanesV0", "ConfigSettingContractComputeV0", "ConfigSettingContractParallelComputeV0", @@ -55097,10 +58256,6 @@ impl Type { "StateArchivalSettings", "EvictionIterator", "ConfigSettingScpTiming", - "FrozenLedgerKeys", - "FrozenLedgerKeysDelta", - "FreezeBypassTxs", - "FreezeBypassTxsDelta", "ContractCostParams", "ConfigSettingId", "ConfigSettingEntry", @@ -55598,11 +58753,6 @@ impl Type { TypeVariant::ScpQuorumSet => r.with_limited_depth(|r| { Ok(Self::ScpQuorumSet(Box::new(ScpQuorumSet::read_xdr(r)?))) }), - TypeVariant::EncodedLedgerKey => r.with_limited_depth(|r| { - Ok(Self::EncodedLedgerKey(Box::new( - EncodedLedgerKey::read_xdr(r)?, - ))) - }), TypeVariant::ConfigSettingContractExecutionLanesV0 => r.with_limited_depth(|r| { Ok(Self::ConfigSettingContractExecutionLanesV0(Box::new( ConfigSettingContractExecutionLanesV0::read_xdr(r)?, @@ -55668,26 +58818,6 @@ impl Type { ConfigSettingScpTiming::read_xdr(r)?, ))) }), - TypeVariant::FrozenLedgerKeys => r.with_limited_depth(|r| { - Ok(Self::FrozenLedgerKeys(Box::new( - FrozenLedgerKeys::read_xdr(r)?, - ))) - }), - TypeVariant::FrozenLedgerKeysDelta => r.with_limited_depth(|r| { - Ok(Self::FrozenLedgerKeysDelta(Box::new( - FrozenLedgerKeysDelta::read_xdr(r)?, - ))) - }), - TypeVariant::FreezeBypassTxs => r.with_limited_depth(|r| { - Ok(Self::FreezeBypassTxs(Box::new(FreezeBypassTxs::read_xdr( - r, - )?))) - }), - TypeVariant::FreezeBypassTxsDelta => r.with_limited_depth(|r| { - Ok(Self::FreezeBypassTxsDelta(Box::new( - FreezeBypassTxsDelta::read_xdr(r)?, - ))) - }), TypeVariant::ContractCostParams => r.with_limited_depth(|r| { Ok(Self::ContractCostParams(Box::new( ContractCostParams::read_xdr(r)?, @@ -57694,10 +60824,6 @@ impl Type { ReadXdrIter::<_, ScpQuorumSet>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ScpQuorumSet(Box::new(t)))), ), - TypeVariant::EncodedLedgerKey => Box::new( - ReadXdrIter::<_, EncodedLedgerKey>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::EncodedLedgerKey(Box::new(t)))), - ), TypeVariant::ConfigSettingContractExecutionLanesV0 => Box::new( ReadXdrIter::<_, ConfigSettingContractExecutionLanesV0>::new( &mut r.inner, @@ -57774,22 +60900,6 @@ impl Type { ReadXdrIter::<_, ConfigSettingScpTiming>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ConfigSettingScpTiming(Box::new(t)))), ), - TypeVariant::FrozenLedgerKeys => Box::new( - ReadXdrIter::<_, FrozenLedgerKeys>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FrozenLedgerKeys(Box::new(t)))), - ), - TypeVariant::FrozenLedgerKeysDelta => Box::new( - ReadXdrIter::<_, FrozenLedgerKeysDelta>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FrozenLedgerKeysDelta(Box::new(t)))), - ), - TypeVariant::FreezeBypassTxs => Box::new( - ReadXdrIter::<_, FreezeBypassTxs>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FreezeBypassTxs(Box::new(t)))), - ), - TypeVariant::FreezeBypassTxsDelta => Box::new( - ReadXdrIter::<_, FreezeBypassTxsDelta>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FreezeBypassTxsDelta(Box::new(t)))), - ), TypeVariant::ContractCostParams => Box::new( ReadXdrIter::<_, ContractCostParams>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ContractCostParams(Box::new(t)))), @@ -59724,10 +62834,6 @@ impl Type { ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ScpQuorumSet(Box::new(t.0)))), ), - TypeVariant::EncodedLedgerKey => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::EncodedLedgerKey(Box::new(t.0)))), - ), TypeVariant::ConfigSettingContractExecutionLanesV0 => Box::new( ReadXdrIter::<_, Frame>::new( &mut r.inner, @@ -59810,22 +62916,6 @@ impl Type { ) .map(|r| r.map(|t| Self::ConfigSettingScpTiming(Box::new(t.0)))), ), - TypeVariant::FrozenLedgerKeys => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FrozenLedgerKeys(Box::new(t.0)))), - ), - TypeVariant::FrozenLedgerKeysDelta => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FrozenLedgerKeysDelta(Box::new(t.0)))), - ), - TypeVariant::FreezeBypassTxs => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FreezeBypassTxs(Box::new(t.0)))), - ), - TypeVariant::FreezeBypassTxsDelta => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FreezeBypassTxsDelta(Box::new(t.0)))), - ), TypeVariant::ContractCostParams => Box::new( ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ContractCostParams(Box::new(t.0)))), @@ -62054,10 +65144,6 @@ impl Type { ReadXdrIter::<_, ScpQuorumSet>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::ScpQuorumSet(Box::new(t)))), ), - TypeVariant::EncodedLedgerKey => Box::new( - ReadXdrIter::<_, EncodedLedgerKey>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::EncodedLedgerKey(Box::new(t)))), - ), TypeVariant::ConfigSettingContractExecutionLanesV0 => Box::new( ReadXdrIter::<_, ConfigSettingContractExecutionLanesV0>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::ConfigSettingContractExecutionLanesV0(Box::new(t)))), @@ -62113,22 +65199,6 @@ impl Type { ReadXdrIter::<_, ConfigSettingScpTiming>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::ConfigSettingScpTiming(Box::new(t)))), ), - TypeVariant::FrozenLedgerKeys => Box::new( - ReadXdrIter::<_, FrozenLedgerKeys>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::FrozenLedgerKeys(Box::new(t)))), - ), - TypeVariant::FrozenLedgerKeysDelta => Box::new( - ReadXdrIter::<_, FrozenLedgerKeysDelta>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::FrozenLedgerKeysDelta(Box::new(t)))), - ), - TypeVariant::FreezeBypassTxs => Box::new( - ReadXdrIter::<_, FreezeBypassTxs>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::FreezeBypassTxs(Box::new(t)))), - ), - TypeVariant::FreezeBypassTxsDelta => Box::new( - ReadXdrIter::<_, FreezeBypassTxsDelta>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::FreezeBypassTxsDelta(Box::new(t)))), - ), TypeVariant::ContractCostParams => Box::new( ReadXdrIter::<_, ContractCostParams>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::ContractCostParams(Box::new(t)))), @@ -63977,9 +67047,6 @@ impl Type { TypeVariant::ScpQuorumSet => { Ok(Self::ScpQuorumSet(Box::new(serde_json::from_reader(r)?))) } - TypeVariant::EncodedLedgerKey => Ok(Self::EncodedLedgerKey(Box::new( - serde_json::from_reader(r)?, - ))), TypeVariant::ConfigSettingContractExecutionLanesV0 => Ok( Self::ConfigSettingContractExecutionLanesV0(Box::new(serde_json::from_reader(r)?)), ), @@ -64019,18 +67086,6 @@ impl Type { TypeVariant::ConfigSettingScpTiming => Ok(Self::ConfigSettingScpTiming(Box::new( serde_json::from_reader(r)?, ))), - TypeVariant::FrozenLedgerKeys => Ok(Self::FrozenLedgerKeys(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::FrozenLedgerKeysDelta => Ok(Self::FrozenLedgerKeysDelta(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::FreezeBypassTxs => { - Ok(Self::FreezeBypassTxs(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::FreezeBypassTxsDelta => Ok(Self::FreezeBypassTxsDelta(Box::new( - serde_json::from_reader(r)?, - ))), TypeVariant::ContractCostParams => Ok(Self::ContractCostParams(Box::new( serde_json::from_reader(r)?, ))), @@ -65273,9 +68328,6 @@ impl Type { TypeVariant::ScpQuorumSet => Ok(Self::ScpQuorumSet(Box::new( serde::de::Deserialize::deserialize(r)?, ))), - TypeVariant::EncodedLedgerKey => Ok(Self::EncodedLedgerKey(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), TypeVariant::ConfigSettingContractExecutionLanesV0 => { Ok(Self::ConfigSettingContractExecutionLanesV0(Box::new( serde::de::Deserialize::deserialize(r)?, @@ -65329,18 +68381,6 @@ impl Type { TypeVariant::ConfigSettingScpTiming => Ok(Self::ConfigSettingScpTiming(Box::new( serde::de::Deserialize::deserialize(r)?, ))), - TypeVariant::FrozenLedgerKeys => Ok(Self::FrozenLedgerKeys(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::FrozenLedgerKeysDelta => Ok(Self::FrozenLedgerKeysDelta(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::FreezeBypassTxs => Ok(Self::FreezeBypassTxs(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::FreezeBypassTxsDelta => Ok(Self::FreezeBypassTxsDelta(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), TypeVariant::ContractCostParams => Ok(Self::ContractCostParams(Box::new( serde::de::Deserialize::deserialize(r)?, ))), @@ -66760,9 +69800,6 @@ impl Type { TypeVariant::ScpQuorumSet => { Ok(Self::ScpQuorumSet(Box::new(ScpQuorumSet::arbitrary(u)?))) } - TypeVariant::EncodedLedgerKey => Ok(Self::EncodedLedgerKey(Box::new( - EncodedLedgerKey::arbitrary(u)?, - ))), TypeVariant::ConfigSettingContractExecutionLanesV0 => { Ok(Self::ConfigSettingContractExecutionLanesV0(Box::new( ConfigSettingContractExecutionLanesV0::arbitrary(u)?, @@ -66816,18 +69853,6 @@ impl Type { TypeVariant::ConfigSettingScpTiming => Ok(Self::ConfigSettingScpTiming(Box::new( ConfigSettingScpTiming::arbitrary(u)?, ))), - TypeVariant::FrozenLedgerKeys => Ok(Self::FrozenLedgerKeys(Box::new( - FrozenLedgerKeys::arbitrary(u)?, - ))), - TypeVariant::FrozenLedgerKeysDelta => Ok(Self::FrozenLedgerKeysDelta(Box::new( - FrozenLedgerKeysDelta::arbitrary(u)?, - ))), - TypeVariant::FreezeBypassTxs => Ok(Self::FreezeBypassTxs(Box::new( - FreezeBypassTxs::arbitrary(u)?, - ))), - TypeVariant::FreezeBypassTxsDelta => Ok(Self::FreezeBypassTxsDelta(Box::new( - FreezeBypassTxsDelta::arbitrary(u)?, - ))), TypeVariant::ContractCostParams => Ok(Self::ContractCostParams(Box::new( ContractCostParams::arbitrary(u)?, ))), @@ -68074,7 +71099,6 @@ impl Type { TypeVariant::ScpStatementExternalize => Self::ScpStatementExternalize(Box::default()), TypeVariant::ScpEnvelope => Self::ScpEnvelope(Box::default()), TypeVariant::ScpQuorumSet => Self::ScpQuorumSet(Box::default()), - TypeVariant::EncodedLedgerKey => Self::EncodedLedgerKey(Box::default()), TypeVariant::ConfigSettingContractExecutionLanesV0 => { Self::ConfigSettingContractExecutionLanesV0(Box::default()) } @@ -68104,10 +71128,6 @@ impl Type { TypeVariant::StateArchivalSettings => Self::StateArchivalSettings(Box::default()), TypeVariant::EvictionIterator => Self::EvictionIterator(Box::default()), TypeVariant::ConfigSettingScpTiming => Self::ConfigSettingScpTiming(Box::default()), - TypeVariant::FrozenLedgerKeys => Self::FrozenLedgerKeys(Box::default()), - TypeVariant::FrozenLedgerKeysDelta => Self::FrozenLedgerKeysDelta(Box::default()), - TypeVariant::FreezeBypassTxs => Self::FreezeBypassTxs(Box::default()), - TypeVariant::FreezeBypassTxsDelta => Self::FreezeBypassTxsDelta(Box::default()), TypeVariant::ContractCostParams => Self::ContractCostParams(Box::default()), TypeVariant::ConfigSettingId => Self::ConfigSettingId(Box::default()), TypeVariant::ConfigSettingEntry => Self::ConfigSettingEntry(Box::default()), @@ -68737,7 +71757,6 @@ impl Type { Self::ScpStatementExternalize(ref v) => v.as_ref(), Self::ScpEnvelope(ref v) => v.as_ref(), Self::ScpQuorumSet(ref v) => v.as_ref(), - Self::EncodedLedgerKey(ref v) => v.as_ref(), Self::ConfigSettingContractExecutionLanesV0(ref v) => v.as_ref(), Self::ConfigSettingContractComputeV0(ref v) => v.as_ref(), Self::ConfigSettingContractParallelComputeV0(ref v) => v.as_ref(), @@ -68751,10 +71770,6 @@ impl Type { Self::StateArchivalSettings(ref v) => v.as_ref(), Self::EvictionIterator(ref v) => v.as_ref(), Self::ConfigSettingScpTiming(ref v) => v.as_ref(), - Self::FrozenLedgerKeys(ref v) => v.as_ref(), - Self::FrozenLedgerKeysDelta(ref v) => v.as_ref(), - Self::FreezeBypassTxs(ref v) => v.as_ref(), - Self::FreezeBypassTxsDelta(ref v) => v.as_ref(), Self::ContractCostParams(ref v) => v.as_ref(), Self::ConfigSettingId(ref v) => v.as_ref(), Self::ConfigSettingEntry(ref v) => v.as_ref(), @@ -69212,7 +72227,6 @@ impl Type { Self::ScpStatementExternalize(_) => "ScpStatementExternalize", Self::ScpEnvelope(_) => "ScpEnvelope", Self::ScpQuorumSet(_) => "ScpQuorumSet", - Self::EncodedLedgerKey(_) => "EncodedLedgerKey", Self::ConfigSettingContractExecutionLanesV0(_) => { "ConfigSettingContractExecutionLanesV0" } @@ -69232,10 +72246,6 @@ impl Type { Self::StateArchivalSettings(_) => "StateArchivalSettings", Self::EvictionIterator(_) => "EvictionIterator", Self::ConfigSettingScpTiming(_) => "ConfigSettingScpTiming", - Self::FrozenLedgerKeys(_) => "FrozenLedgerKeys", - Self::FrozenLedgerKeysDelta(_) => "FrozenLedgerKeysDelta", - Self::FreezeBypassTxs(_) => "FreezeBypassTxs", - Self::FreezeBypassTxsDelta(_) => "FreezeBypassTxsDelta", Self::ContractCostParams(_) => "ContractCostParams", Self::ConfigSettingId(_) => "ConfigSettingId", Self::ConfigSettingEntry(_) => "ConfigSettingEntry", @@ -69719,7 +72729,6 @@ impl Type { Self::ScpStatementExternalize(_) => TypeVariant::ScpStatementExternalize, Self::ScpEnvelope(_) => TypeVariant::ScpEnvelope, Self::ScpQuorumSet(_) => TypeVariant::ScpQuorumSet, - Self::EncodedLedgerKey(_) => TypeVariant::EncodedLedgerKey, Self::ConfigSettingContractExecutionLanesV0(_) => { TypeVariant::ConfigSettingContractExecutionLanesV0 } @@ -69745,10 +72754,6 @@ impl Type { Self::StateArchivalSettings(_) => TypeVariant::StateArchivalSettings, Self::EvictionIterator(_) => TypeVariant::EvictionIterator, Self::ConfigSettingScpTiming(_) => TypeVariant::ConfigSettingScpTiming, - Self::FrozenLedgerKeys(_) => TypeVariant::FrozenLedgerKeys, - Self::FrozenLedgerKeysDelta(_) => TypeVariant::FrozenLedgerKeysDelta, - Self::FreezeBypassTxs(_) => TypeVariant::FreezeBypassTxs, - Self::FreezeBypassTxsDelta(_) => TypeVariant::FreezeBypassTxsDelta, Self::ContractCostParams(_) => TypeVariant::ContractCostParams, Self::ConfigSettingId(_) => TypeVariant::ConfigSettingId, Self::ConfigSettingEntry(_) => TypeVariant::ConfigSettingEntry, @@ -70279,7 +73284,6 @@ impl WriteXdr for Type { Self::ScpStatementExternalize(v) => v.write_xdr(w), Self::ScpEnvelope(v) => v.write_xdr(w), Self::ScpQuorumSet(v) => v.write_xdr(w), - Self::EncodedLedgerKey(v) => v.write_xdr(w), Self::ConfigSettingContractExecutionLanesV0(v) => v.write_xdr(w), Self::ConfigSettingContractComputeV0(v) => v.write_xdr(w), Self::ConfigSettingContractParallelComputeV0(v) => v.write_xdr(w), @@ -70293,10 +73297,6 @@ impl WriteXdr for Type { Self::StateArchivalSettings(v) => v.write_xdr(w), Self::EvictionIterator(v) => v.write_xdr(w), Self::ConfigSettingScpTiming(v) => v.write_xdr(w), - Self::FrozenLedgerKeys(v) => v.write_xdr(w), - Self::FrozenLedgerKeysDelta(v) => v.write_xdr(w), - Self::FreezeBypassTxs(v) => v.write_xdr(w), - Self::FreezeBypassTxsDelta(v) => v.write_xdr(w), Self::ContractCostParams(v) => v.write_xdr(w), Self::ConfigSettingId(v) => v.write_xdr(w), Self::ConfigSettingEntry(v) => v.write_xdr(w), diff --git a/src/next/generated.rs b/src/next/generated.rs index 962a6521..8ae28846 100644 --- a/src/next/generated.rs +++ b/src/next/generated.rs @@ -4285,13 +4285,31 @@ pub enum ScpStatementType { } impl ScpStatementType { - pub const VARIANTS: [ScpStatementType; 4] = [ + const _VARIANTS: &[ScpStatementType] = &[ ScpStatementType::Prepare, ScpStatementType::Confirm, ScpStatementType::Externalize, ScpStatementType::Nominate, ]; - pub const VARIANTS_STR: [&'static str; 4] = ["Prepare", "Confirm", "Externalize", "Nominate"]; + pub const VARIANTS: [ScpStatementType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Prepare", "Confirm", "Externalize", "Nominate"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -4304,7 +4322,7 @@ impl ScpStatementType { } #[must_use] - pub const fn variants() -> [ScpStatementType; 4] { + pub const fn variants() -> [ScpStatementType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -4669,13 +4687,31 @@ impl Default for ScpStatementPledges { } impl ScpStatementPledges { - pub const VARIANTS: [ScpStatementType; 4] = [ + const _VARIANTS: &[ScpStatementType] = &[ ScpStatementType::Prepare, ScpStatementType::Confirm, ScpStatementType::Externalize, ScpStatementType::Nominate, ]; - pub const VARIANTS_STR: [&'static str; 4] = ["Prepare", "Confirm", "Externalize", "Nominate"]; + pub const VARIANTS: [ScpStatementType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Prepare", "Confirm", "Externalize", "Nominate"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -4699,7 +4735,7 @@ impl ScpStatementPledges { } #[must_use] - pub const fn variants() -> [ScpStatementType; 4] { + pub const fn variants() -> [ScpStatementType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -5888,7 +5924,7 @@ pub enum ContractCostType { } impl ContractCostType { - pub const VARIANTS: [ContractCostType; 86] = [ + const _VARIANTS: &[ContractCostType] = &[ ContractCostType::WasmInsnExec, ContractCostType::MemAlloc, ContractCostType::MemCpy, @@ -5976,7 +6012,16 @@ impl ContractCostType { ContractCostType::Bn254FrInv, ContractCostType::Bn254G1Msm, ]; - pub const VARIANTS_STR: [&'static str; 86] = [ + pub const VARIANTS: [ContractCostType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "WasmInsnExec", "MemAlloc", "MemCpy", @@ -6064,6 +6109,15 @@ impl ContractCostType { "Bn254FrInv", "Bn254G1Msm", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -6158,7 +6212,7 @@ impl ContractCostType { } #[must_use] - pub const fn variants() -> [ContractCostType; 86] { + pub const fn variants() -> [ContractCostType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -6956,7 +7010,7 @@ pub enum ConfigSettingId { } impl ConfigSettingId { - pub const VARIANTS: [ConfigSettingId; 21] = [ + const _VARIANTS: &[ConfigSettingId] = &[ ConfigSettingId::ContractMaxSizeBytes, ConfigSettingId::ContractComputeV0, ConfigSettingId::ContractLedgerCostV0, @@ -6979,7 +7033,16 @@ impl ConfigSettingId { ConfigSettingId::FreezeBypassTxs, ConfigSettingId::FreezeBypassTxsDelta, ]; - pub const VARIANTS_STR: [&'static str; 21] = [ + pub const VARIANTS: [ConfigSettingId; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "ContractMaxSizeBytes", "ContractComputeV0", "ContractLedgerCostV0", @@ -7002,6 +7065,15 @@ impl ConfigSettingId { "FreezeBypassTxs", "FreezeBypassTxsDelta", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -7031,7 +7103,7 @@ impl ConfigSettingId { } #[must_use] - pub const fn variants() -> [ConfigSettingId; 21] { + pub const fn variants() -> [ConfigSettingId; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -7218,7 +7290,7 @@ impl Default for ConfigSettingEntry { } impl ConfigSettingEntry { - pub const VARIANTS: [ConfigSettingId; 21] = [ + const _VARIANTS: &[ConfigSettingId] = &[ ConfigSettingId::ContractMaxSizeBytes, ConfigSettingId::ContractComputeV0, ConfigSettingId::ContractLedgerCostV0, @@ -7241,7 +7313,16 @@ impl ConfigSettingEntry { ConfigSettingId::FreezeBypassTxs, ConfigSettingId::FreezeBypassTxsDelta, ]; - pub const VARIANTS_STR: [&'static str; 21] = [ + pub const VARIANTS: [ConfigSettingId; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "ContractMaxSizeBytes", "ContractComputeV0", "ContractLedgerCostV0", @@ -7264,6 +7345,15 @@ impl ConfigSettingEntry { "FreezeBypassTxs", "FreezeBypassTxsDelta", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -7325,7 +7415,7 @@ impl ConfigSettingEntry { } #[must_use] - pub const fn variants() -> [ConfigSettingId; 21] { + pub const fn variants() -> [ConfigSettingId; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -7488,8 +7578,26 @@ pub enum ScEnvMetaKind { } impl ScEnvMetaKind { - pub const VARIANTS: [ScEnvMetaKind; 1] = [ScEnvMetaKind::ScEnvMetaKindInterfaceVersion]; - pub const VARIANTS_STR: [&'static str; 1] = ["ScEnvMetaKindInterfaceVersion"]; + const _VARIANTS: &[ScEnvMetaKind] = &[ScEnvMetaKind::ScEnvMetaKindInterfaceVersion]; + pub const VARIANTS: [ScEnvMetaKind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ScEnvMetaKindInterfaceVersion"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -7499,7 +7607,7 @@ impl ScEnvMetaKind { } #[must_use] - pub const fn variants() -> [ScEnvMetaKind; 1] { + pub const fn variants() -> [ScEnvMetaKind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -7651,8 +7759,26 @@ impl Default for ScEnvMetaEntry { } impl ScEnvMetaEntry { - pub const VARIANTS: [ScEnvMetaKind; 1] = [ScEnvMetaKind::ScEnvMetaKindInterfaceVersion]; - pub const VARIANTS_STR: [&'static str; 1] = ["ScEnvMetaKindInterfaceVersion"]; + const _VARIANTS: &[ScEnvMetaKind] = &[ScEnvMetaKind::ScEnvMetaKindInterfaceVersion]; + pub const VARIANTS: [ScEnvMetaKind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ScEnvMetaKindInterfaceVersion"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -7670,7 +7796,7 @@ impl ScEnvMetaEntry { } #[must_use] - pub const fn variants() -> [ScEnvMetaKind; 1] { + pub const fn variants() -> [ScEnvMetaKind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -7806,8 +7932,26 @@ pub enum ScMetaKind { } impl ScMetaKind { - pub const VARIANTS: [ScMetaKind; 1] = [ScMetaKind::ScMetaV0]; - pub const VARIANTS_STR: [&'static str; 1] = ["ScMetaV0"]; + const _VARIANTS: &[ScMetaKind] = &[ScMetaKind::ScMetaV0]; + pub const VARIANTS: [ScMetaKind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ScMetaV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -7817,7 +7961,7 @@ impl ScMetaKind { } #[must_use] - pub const fn variants() -> [ScMetaKind; 1] { + pub const fn variants() -> [ScMetaKind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -7918,8 +8062,26 @@ impl Default for ScMetaEntry { } impl ScMetaEntry { - pub const VARIANTS: [ScMetaKind; 1] = [ScMetaKind::ScMetaV0]; - pub const VARIANTS_STR: [&'static str; 1] = ["ScMetaV0"]; + const _VARIANTS: &[ScMetaKind] = &[ScMetaKind::ScMetaV0]; + pub const VARIANTS: [ScMetaKind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ScMetaV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -7937,7 +8099,7 @@ impl ScMetaEntry { } #[must_use] - pub const fn variants() -> [ScMetaKind; 1] { + pub const fn variants() -> [ScMetaKind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -8084,7 +8246,7 @@ pub enum ScSpecType { } impl ScSpecType { - pub const VARIANTS: [ScSpecType; 26] = [ + const _VARIANTS: &[ScSpecType] = &[ ScSpecType::Val, ScSpecType::Bool, ScSpecType::Void, @@ -8112,7 +8274,16 @@ impl ScSpecType { ScSpecType::BytesN, ScSpecType::Udt, ]; - pub const VARIANTS_STR: [&'static str; 26] = [ + pub const VARIANTS: [ScSpecType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Val", "Bool", "Void", @@ -8140,6 +8311,15 @@ impl ScSpecType { "BytesN", "Udt", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -8174,7 +8354,7 @@ impl ScSpecType { } #[must_use] - pub const fn variants() -> [ScSpecType; 26] { + pub const fn variants() -> [ScSpecType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -8680,7 +8860,7 @@ impl Default for ScSpecTypeDef { } impl ScSpecTypeDef { - pub const VARIANTS: [ScSpecType; 26] = [ + const _VARIANTS: &[ScSpecType] = &[ ScSpecType::Val, ScSpecType::Bool, ScSpecType::Void, @@ -8708,7 +8888,16 @@ impl ScSpecTypeDef { ScSpecType::BytesN, ScSpecType::Udt, ]; - pub const VARIANTS_STR: [&'static str; 26] = [ + pub const VARIANTS: [ScSpecType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Val", "Bool", "Void", @@ -8736,6 +8925,15 @@ impl ScSpecTypeDef { "BytesN", "Udt", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -8803,7 +9001,7 @@ impl ScSpecTypeDef { } #[must_use] - pub const fn variants() -> [ScSpecType; 26] { + pub const fn variants() -> [ScSpecType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -9150,11 +9348,29 @@ pub enum ScSpecUdtUnionCaseV0Kind { } impl ScSpecUdtUnionCaseV0Kind { - pub const VARIANTS: [ScSpecUdtUnionCaseV0Kind; 2] = [ + const _VARIANTS: &[ScSpecUdtUnionCaseV0Kind] = &[ ScSpecUdtUnionCaseV0Kind::VoidV0, ScSpecUdtUnionCaseV0Kind::TupleV0, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["VoidV0", "TupleV0"]; + pub const VARIANTS: [ScSpecUdtUnionCaseV0Kind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["VoidV0", "TupleV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -9165,7 +9381,7 @@ impl ScSpecUdtUnionCaseV0Kind { } #[must_use] - pub const fn variants() -> [ScSpecUdtUnionCaseV0Kind; 2] { + pub const fn variants() -> [ScSpecUdtUnionCaseV0Kind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -9270,11 +9486,29 @@ impl Default for ScSpecUdtUnionCaseV0 { } impl ScSpecUdtUnionCaseV0 { - pub const VARIANTS: [ScSpecUdtUnionCaseV0Kind; 2] = [ + const _VARIANTS: &[ScSpecUdtUnionCaseV0Kind] = &[ ScSpecUdtUnionCaseV0Kind::VoidV0, ScSpecUdtUnionCaseV0Kind::TupleV0, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["VoidV0", "TupleV0"]; + pub const VARIANTS: [ScSpecUdtUnionCaseV0Kind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["VoidV0", "TupleV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -9294,7 +9528,7 @@ impl ScSpecUdtUnionCaseV0 { } #[must_use] - pub const fn variants() -> [ScSpecUdtUnionCaseV0Kind; 2] { + pub const fn variants() -> [ScSpecUdtUnionCaseV0Kind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -9772,11 +10006,29 @@ pub enum ScSpecEventParamLocationV0 { } impl ScSpecEventParamLocationV0 { - pub const VARIANTS: [ScSpecEventParamLocationV0; 2] = [ + const _VARIANTS: &[ScSpecEventParamLocationV0] = &[ ScSpecEventParamLocationV0::Data, ScSpecEventParamLocationV0::TopicList, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Data", "TopicList"]; + pub const VARIANTS: [ScSpecEventParamLocationV0; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Data", "TopicList"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -9787,7 +10039,7 @@ impl ScSpecEventParamLocationV0 { } #[must_use] - pub const fn variants() -> [ScSpecEventParamLocationV0; 2] { + pub const fn variants() -> [ScSpecEventParamLocationV0; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -9942,12 +10194,30 @@ pub enum ScSpecEventDataFormat { } impl ScSpecEventDataFormat { - pub const VARIANTS: [ScSpecEventDataFormat; 3] = [ + const _VARIANTS: &[ScSpecEventDataFormat] = &[ ScSpecEventDataFormat::SingleValue, ScSpecEventDataFormat::Vec, ScSpecEventDataFormat::Map, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["SingleValue", "Vec", "Map"]; + pub const VARIANTS: [ScSpecEventDataFormat; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["SingleValue", "Vec", "Map"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -9959,7 +10229,7 @@ impl ScSpecEventDataFormat { } #[must_use] - pub const fn variants() -> [ScSpecEventDataFormat; 3] { + pub const fn variants() -> [ScSpecEventDataFormat; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -10129,7 +10399,7 @@ pub enum ScSpecEntryKind { } impl ScSpecEntryKind { - pub const VARIANTS: [ScSpecEntryKind; 6] = [ + const _VARIANTS: &[ScSpecEntryKind] = &[ ScSpecEntryKind::FunctionV0, ScSpecEntryKind::UdtStructV0, ScSpecEntryKind::UdtUnionV0, @@ -10137,7 +10407,16 @@ impl ScSpecEntryKind { ScSpecEntryKind::UdtErrorEnumV0, ScSpecEntryKind::EventV0, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [ScSpecEntryKind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "FunctionV0", "UdtStructV0", "UdtUnionV0", @@ -10145,6 +10424,15 @@ impl ScSpecEntryKind { "UdtErrorEnumV0", "EventV0", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -10159,7 +10447,7 @@ impl ScSpecEntryKind { } #[must_use] - pub const fn variants() -> [ScSpecEntryKind; 6] { + pub const fn variants() -> [ScSpecEntryKind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -10280,7 +10568,7 @@ impl Default for ScSpecEntry { } impl ScSpecEntry { - pub const VARIANTS: [ScSpecEntryKind; 6] = [ + const _VARIANTS: &[ScSpecEntryKind] = &[ ScSpecEntryKind::FunctionV0, ScSpecEntryKind::UdtStructV0, ScSpecEntryKind::UdtUnionV0, @@ -10288,7 +10576,16 @@ impl ScSpecEntry { ScSpecEntryKind::UdtErrorEnumV0, ScSpecEntryKind::EventV0, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [ScSpecEntryKind; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "FunctionV0", "UdtStructV0", "UdtUnionV0", @@ -10296,6 +10593,15 @@ impl ScSpecEntry { "UdtErrorEnumV0", "EventV0", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -10323,7 +10629,7 @@ impl ScSpecEntry { } #[must_use] - pub const fn variants() -> [ScSpecEntryKind; 6] { + pub const fn variants() -> [ScSpecEntryKind; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -10489,7 +10795,7 @@ pub enum ScValType { } impl ScValType { - pub const VARIANTS: [ScValType; 22] = [ + const _VARIANTS: &[ScValType] = &[ ScValType::Bool, ScValType::Void, ScValType::Error, @@ -10513,7 +10819,16 @@ impl ScValType { ScValType::LedgerKeyContractInstance, ScValType::LedgerKeyNonce, ]; - pub const VARIANTS_STR: [&'static str; 22] = [ + pub const VARIANTS: [ScValType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Bool", "Void", "Error", @@ -10537,6 +10852,15 @@ impl ScValType { "LedgerKeyContractInstance", "LedgerKeyNonce", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -10567,7 +10891,7 @@ impl ScValType { } #[must_use] - pub const fn variants() -> [ScValType; 22] { + pub const fn variants() -> [ScValType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -10699,7 +11023,7 @@ pub enum ScErrorType { } impl ScErrorType { - pub const VARIANTS: [ScErrorType; 10] = [ + const _VARIANTS: &[ScErrorType] = &[ ScErrorType::Contract, ScErrorType::WasmVm, ScErrorType::Context, @@ -10711,10 +11035,28 @@ impl ScErrorType { ScErrorType::Value, ScErrorType::Auth, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [ScErrorType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Contract", "WasmVm", "Context", "Storage", "Object", "Crypto", "Events", "Budget", "Value", "Auth", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -10733,7 +11075,7 @@ impl ScErrorType { } #[must_use] - pub const fn variants() -> [ScErrorType; 10] { + pub const fn variants() -> [ScErrorType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -10853,7 +11195,7 @@ pub enum ScErrorCode { } impl ScErrorCode { - pub const VARIANTS: [ScErrorCode; 10] = [ + const _VARIANTS: &[ScErrorCode] = &[ ScErrorCode::ArithDomain, ScErrorCode::IndexBounds, ScErrorCode::InvalidInput, @@ -10865,7 +11207,16 @@ impl ScErrorCode { ScErrorCode::UnexpectedType, ScErrorCode::UnexpectedSize, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [ScErrorCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "ArithDomain", "IndexBounds", "InvalidInput", @@ -10877,6 +11228,15 @@ impl ScErrorCode { "UnexpectedType", "UnexpectedSize", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -10895,7 +11255,7 @@ impl ScErrorCode { } #[must_use] - pub const fn variants() -> [ScErrorCode; 10] { + pub const fn variants() -> [ScErrorCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -11024,7 +11384,7 @@ impl Default for ScError { } impl ScError { - pub const VARIANTS: [ScErrorType; 10] = [ + const _VARIANTS: &[ScErrorType] = &[ ScErrorType::Contract, ScErrorType::WasmVm, ScErrorType::Context, @@ -11036,10 +11396,28 @@ impl ScError { ScErrorType::Value, ScErrorType::Auth, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [ScErrorType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Contract", "WasmVm", "Context", "Storage", "Object", "Crypto", "Events", "Budget", "Value", "Auth", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -11075,7 +11453,7 @@ impl ScError { } #[must_use] - pub const fn variants() -> [ScErrorType; 10] { + pub const fn variants() -> [ScErrorType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -11506,11 +11884,29 @@ pub enum ContractExecutableType { } impl ContractExecutableType { - pub const VARIANTS: [ContractExecutableType; 2] = [ + const _VARIANTS: &[ContractExecutableType] = &[ ContractExecutableType::Wasm, ContractExecutableType::StellarAsset, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Wasm", "StellarAsset"]; + pub const VARIANTS: [ContractExecutableType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Wasm", "StellarAsset"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -11521,7 +11917,7 @@ impl ContractExecutableType { } #[must_use] - pub const fn variants() -> [ContractExecutableType; 2] { + pub const fn variants() -> [ContractExecutableType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -11626,11 +12022,29 @@ impl Default for ContractExecutable { } impl ContractExecutable { - pub const VARIANTS: [ContractExecutableType; 2] = [ + const _VARIANTS: &[ContractExecutableType] = &[ ContractExecutableType::Wasm, ContractExecutableType::StellarAsset, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Wasm", "StellarAsset"]; + pub const VARIANTS: [ContractExecutableType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Wasm", "StellarAsset"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -11650,7 +12064,7 @@ impl ContractExecutable { } #[must_use] - pub const fn variants() -> [ContractExecutableType; 2] { + pub const fn variants() -> [ContractExecutableType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -11743,20 +12157,38 @@ pub enum ScAddressType { } impl ScAddressType { - pub const VARIANTS: [ScAddressType; 5] = [ + const _VARIANTS: &[ScAddressType] = &[ ScAddressType::Account, ScAddressType::Contract, ScAddressType::MuxedAccount, ScAddressType::ClaimableBalance, ScAddressType::LiquidityPool, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [ScAddressType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Account", "Contract", "MuxedAccount", "ClaimableBalance", "LiquidityPool", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -11770,7 +12202,7 @@ impl ScAddressType { } #[must_use] - pub const fn variants() -> [ScAddressType; 5] { + pub const fn variants() -> [ScAddressType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -11959,20 +12391,38 @@ impl Default for ScAddress { } impl ScAddress { - pub const VARIANTS: [ScAddressType; 5] = [ + const _VARIANTS: &[ScAddressType] = &[ ScAddressType::Account, ScAddressType::Contract, ScAddressType::MuxedAccount, ScAddressType::ClaimableBalance, ScAddressType::LiquidityPool, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [ScAddressType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Account", "Contract", "MuxedAccount", "ClaimableBalance", "LiquidityPool", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -11998,7 +12448,7 @@ impl ScAddress { } #[must_use] - pub const fn variants() -> [ScAddressType; 5] { + pub const fn variants() -> [ScAddressType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -12828,7 +13278,7 @@ impl Default for ScVal { } impl ScVal { - pub const VARIANTS: [ScValType; 22] = [ + const _VARIANTS: &[ScValType] = &[ ScValType::Bool, ScValType::Void, ScValType::Error, @@ -12852,7 +13302,16 @@ impl ScVal { ScValType::LedgerKeyContractInstance, ScValType::LedgerKeyNonce, ]; - pub const VARIANTS_STR: [&'static str; 22] = [ + pub const VARIANTS: [ScValType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Bool", "Void", "Error", @@ -12876,6 +13335,15 @@ impl ScVal { "LedgerKeyContractInstance", "LedgerKeyNonce", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -12935,7 +13403,7 @@ impl ScVal { } #[must_use] - pub const fn variants() -> [ScValType; 22] { + pub const fn variants() -> [ScValType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -13180,8 +13648,26 @@ impl Default for StoredTransactionSet { } impl StoredTransactionSet { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -13201,7 +13687,7 @@ impl StoredTransactionSet { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -13453,8 +13939,26 @@ impl Default for PersistedScpState { } impl PersistedScpState { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -13474,7 +13978,7 @@ impl PersistedScpState { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -14310,14 +14814,31 @@ pub enum AssetType { } impl AssetType { - pub const VARIANTS: [AssetType; 4] = [ + const _VARIANTS: &[AssetType] = &[ AssetType::Native, AssetType::CreditAlphanum4, AssetType::CreditAlphanum12, AssetType::PoolShare, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; + pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -14330,7 +14851,7 @@ impl AssetType { } #[must_use] - pub const fn variants() -> [AssetType; 4] { + pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -14437,8 +14958,26 @@ impl Default for AssetCode { } impl AssetCode { - pub const VARIANTS: [AssetType; 2] = [AssetType::CreditAlphanum4, AssetType::CreditAlphanum12]; - pub const VARIANTS_STR: [&'static str; 2] = ["CreditAlphanum4", "CreditAlphanum12"]; + const _VARIANTS: &[AssetType] = &[AssetType::CreditAlphanum4, AssetType::CreditAlphanum12]; + pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["CreditAlphanum4", "CreditAlphanum12"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -14458,7 +14997,7 @@ impl AssetCode { } #[must_use] - pub const fn variants() -> [AssetType; 2] { + pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -14659,12 +15198,30 @@ impl Default for Asset { } impl Asset { - pub const VARIANTS: [AssetType; 3] = [ + const _VARIANTS: &[AssetType] = &[ AssetType::Native, AssetType::CreditAlphanum4, AssetType::CreditAlphanum12, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["Native", "CreditAlphanum4", "CreditAlphanum12"]; + pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -14686,7 +15243,7 @@ impl Asset { } #[must_use] - pub const fn variants() -> [AssetType; 3] { + pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -14885,13 +15442,31 @@ pub enum ThresholdIndexes { } impl ThresholdIndexes { - pub const VARIANTS: [ThresholdIndexes; 4] = [ + const _VARIANTS: &[ThresholdIndexes] = &[ ThresholdIndexes::MasterWeight, ThresholdIndexes::Low, ThresholdIndexes::Med, ThresholdIndexes::High, ]; - pub const VARIANTS_STR: [&'static str; 4] = ["MasterWeight", "Low", "Med", "High"]; + pub const VARIANTS: [ThresholdIndexes; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["MasterWeight", "Low", "Med", "High"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -14904,7 +15479,7 @@ impl ThresholdIndexes { } #[must_use] - pub const fn variants() -> [ThresholdIndexes; 4] { + pub const fn variants() -> [ThresholdIndexes; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -15018,7 +15593,7 @@ pub enum LedgerEntryType { } impl LedgerEntryType { - pub const VARIANTS: [LedgerEntryType; 10] = [ + const _VARIANTS: &[LedgerEntryType] = &[ LedgerEntryType::Account, LedgerEntryType::Trustline, LedgerEntryType::Offer, @@ -15030,7 +15605,16 @@ impl LedgerEntryType { LedgerEntryType::ConfigSetting, LedgerEntryType::Ttl, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [LedgerEntryType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Account", "Trustline", "Offer", @@ -15042,6 +15626,15 @@ impl LedgerEntryType { "ConfigSetting", "Ttl", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -15060,7 +15653,7 @@ impl LedgerEntryType { } #[must_use] - pub const fn variants() -> [LedgerEntryType; 10] { + pub const fn variants() -> [LedgerEntryType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -15227,18 +15820,36 @@ pub enum AccountFlags { } impl AccountFlags { - pub const VARIANTS: [AccountFlags; 4] = [ + const _VARIANTS: &[AccountFlags] = &[ AccountFlags::RequiredFlag, AccountFlags::RevocableFlag, AccountFlags::ImmutableFlag, AccountFlags::ClawbackEnabledFlag, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [AccountFlags; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "RequiredFlag", "RevocableFlag", "ImmutableFlag", "ClawbackEnabledFlag", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -15251,7 +15862,7 @@ impl AccountFlags { } #[must_use] - pub const fn variants() -> [AccountFlags; 4] { + pub const fn variants() -> [AccountFlags; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -15500,8 +16111,26 @@ impl Default for AccountEntryExtensionV2Ext { } impl AccountEntryExtensionV2Ext { - pub const VARIANTS: [i32; 2] = [0, 3]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V3"]; + const _VARIANTS: &[i32] = &[0, 3]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V3"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -15521,7 +16150,7 @@ impl AccountEntryExtensionV2Ext { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -15682,8 +16311,26 @@ impl Default for AccountEntryExtensionV1Ext { } impl AccountEntryExtensionV1Ext { - pub const VARIANTS: [i32; 2] = [0, 2]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V2"]; + const _VARIANTS: &[i32] = &[0, 2]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V2"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -15703,7 +16350,7 @@ impl AccountEntryExtensionV1Ext { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -15856,8 +16503,26 @@ impl Default for AccountEntryExt { } impl AccountEntryExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -15877,7 +16542,7 @@ impl AccountEntryExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -16071,16 +16736,34 @@ pub enum TrustLineFlags { } impl TrustLineFlags { - pub const VARIANTS: [TrustLineFlags; 3] = [ + const _VARIANTS: &[TrustLineFlags] = &[ TrustLineFlags::AuthorizedFlag, TrustLineFlags::AuthorizedToMaintainLiabilitiesFlag, TrustLineFlags::TrustlineClawbackEnabledFlag, ]; - pub const VARIANTS_STR: [&'static str; 3] = [ + pub const VARIANTS: [TrustLineFlags; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "AuthorizedFlag", "AuthorizedToMaintainLiabilitiesFlag", "TrustlineClawbackEnabledFlag", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -16092,7 +16775,7 @@ impl TrustLineFlags { } #[must_use] - pub const fn variants() -> [TrustLineFlags; 3] { + pub const fn variants() -> [TrustLineFlags; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -16211,8 +16894,26 @@ pub enum LiquidityPoolType { } impl LiquidityPoolType { - pub const VARIANTS: [LiquidityPoolType; 1] = [LiquidityPoolType::LiquidityPoolConstantProduct]; - pub const VARIANTS_STR: [&'static str; 1] = ["LiquidityPoolConstantProduct"]; + const _VARIANTS: &[LiquidityPoolType] = &[LiquidityPoolType::LiquidityPoolConstantProduct]; + pub const VARIANTS: [LiquidityPoolType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -16222,7 +16923,7 @@ impl LiquidityPoolType { } #[must_use] - pub const fn variants() -> [LiquidityPoolType; 1] { + pub const fn variants() -> [LiquidityPoolType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -16337,14 +17038,31 @@ impl Default for TrustLineAsset { } impl TrustLineAsset { - pub const VARIANTS: [AssetType; 4] = [ + const _VARIANTS: &[AssetType] = &[ AssetType::Native, AssetType::CreditAlphanum4, AssetType::CreditAlphanum12, AssetType::PoolShare, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; + pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -16368,7 +17086,7 @@ impl TrustLineAsset { } #[must_use] - pub const fn variants() -> [AssetType; 4] { + pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -16465,8 +17183,26 @@ impl Default for TrustLineEntryExtensionV2Ext { } impl TrustLineEntryExtensionV2Ext { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -16484,7 +17220,7 @@ impl TrustLineEntryExtensionV2Ext { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -16633,8 +17369,26 @@ impl Default for TrustLineEntryV1Ext { } impl TrustLineEntryV1Ext { - pub const VARIANTS: [i32; 2] = [0, 2]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V2"]; + const _VARIANTS: &[i32] = &[0, 2]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V2"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -16654,7 +17408,7 @@ impl TrustLineEntryV1Ext { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -16819,8 +17573,26 @@ impl Default for TrustLineEntryExt { } impl TrustLineEntryExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -16840,7 +17612,7 @@ impl TrustLineEntryExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -17023,8 +17795,26 @@ pub enum OfferEntryFlags { } impl OfferEntryFlags { - pub const VARIANTS: [OfferEntryFlags; 1] = [OfferEntryFlags::PassiveFlag]; - pub const VARIANTS_STR: [&'static str; 1] = ["PassiveFlag"]; + const _VARIANTS: &[OfferEntryFlags] = &[OfferEntryFlags::PassiveFlag]; + pub const VARIANTS: [OfferEntryFlags; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["PassiveFlag"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -17034,7 +17824,7 @@ impl OfferEntryFlags { } #[must_use] - pub const fn variants() -> [OfferEntryFlags; 1] { + pub const fn variants() -> [OfferEntryFlags; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -17143,8 +17933,26 @@ impl Default for OfferEntryExt { } impl OfferEntryExt { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -17162,7 +17970,7 @@ impl OfferEntryExt { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -17347,8 +18155,26 @@ impl Default for DataEntryExt { } impl DataEntryExt { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -17366,7 +18192,7 @@ impl DataEntryExt { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -17523,7 +18349,7 @@ pub enum ClaimPredicateType { } impl ClaimPredicateType { - pub const VARIANTS: [ClaimPredicateType; 6] = [ + const _VARIANTS: &[ClaimPredicateType] = &[ ClaimPredicateType::Unconditional, ClaimPredicateType::And, ClaimPredicateType::Or, @@ -17531,7 +18357,16 @@ impl ClaimPredicateType { ClaimPredicateType::BeforeAbsoluteTime, ClaimPredicateType::BeforeRelativeTime, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [ClaimPredicateType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Unconditional", "And", "Or", @@ -17539,6 +18374,15 @@ impl ClaimPredicateType { "BeforeAbsoluteTime", "BeforeRelativeTime", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -17553,7 +18397,7 @@ impl ClaimPredicateType { } #[must_use] - pub const fn variants() -> [ClaimPredicateType; 6] { + pub const fn variants() -> [ClaimPredicateType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -17687,7 +18531,7 @@ impl Default for ClaimPredicate { } impl ClaimPredicate { - pub const VARIANTS: [ClaimPredicateType; 6] = [ + const _VARIANTS: &[ClaimPredicateType] = &[ ClaimPredicateType::Unconditional, ClaimPredicateType::And, ClaimPredicateType::Or, @@ -17695,7 +18539,16 @@ impl ClaimPredicate { ClaimPredicateType::BeforeAbsoluteTime, ClaimPredicateType::BeforeRelativeTime, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [ClaimPredicateType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Unconditional", "And", "Or", @@ -17703,6 +18556,15 @@ impl ClaimPredicate { "BeforeAbsoluteTime", "BeforeRelativeTime", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -17730,7 +18592,7 @@ impl ClaimPredicate { } #[must_use] - pub const fn variants() -> [ClaimPredicateType; 6] { + pub const fn variants() -> [ClaimPredicateType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -17827,8 +18689,26 @@ pub enum ClaimantType { } impl ClaimantType { - pub const VARIANTS: [ClaimantType; 1] = [ClaimantType::ClaimantTypeV0]; - pub const VARIANTS_STR: [&'static str; 1] = ["ClaimantTypeV0"]; + const _VARIANTS: &[ClaimantType] = &[ClaimantType::ClaimantTypeV0]; + pub const VARIANTS: [ClaimantType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ClaimantTypeV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -17838,7 +18718,7 @@ impl ClaimantType { } #[must_use] - pub const fn variants() -> [ClaimantType; 1] { + pub const fn variants() -> [ClaimantType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -17992,8 +18872,26 @@ impl Default for Claimant { } impl Claimant { - pub const VARIANTS: [ClaimantType; 1] = [ClaimantType::ClaimantTypeV0]; - pub const VARIANTS_STR: [&'static str; 1] = ["ClaimantTypeV0"]; + const _VARIANTS: &[ClaimantType] = &[ClaimantType::ClaimantTypeV0]; + pub const VARIANTS: [ClaimantType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ClaimantTypeV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -18011,7 +18909,7 @@ impl Claimant { } #[must_use] - pub const fn variants() -> [ClaimantType; 1] { + pub const fn variants() -> [ClaimantType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -18096,9 +18994,27 @@ pub enum ClaimableBalanceFlags { } impl ClaimableBalanceFlags { - pub const VARIANTS: [ClaimableBalanceFlags; 1] = - [ClaimableBalanceFlags::ClaimableBalanceClawbackEnabledFlag]; - pub const VARIANTS_STR: [&'static str; 1] = ["ClaimableBalanceClawbackEnabledFlag"]; + const _VARIANTS: &[ClaimableBalanceFlags] = + &[ClaimableBalanceFlags::ClaimableBalanceClawbackEnabledFlag]; + pub const VARIANTS: [ClaimableBalanceFlags; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ClaimableBalanceClawbackEnabledFlag"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -18108,7 +19024,7 @@ impl ClaimableBalanceFlags { } #[must_use] - pub const fn variants() -> [ClaimableBalanceFlags; 1] { + pub const fn variants() -> [ClaimableBalanceFlags; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -18217,8 +19133,26 @@ impl Default for ClaimableBalanceEntryExtensionV1Ext { } impl ClaimableBalanceEntryExtensionV1Ext { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -18236,7 +19170,7 @@ impl ClaimableBalanceEntryExtensionV1Ext { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -18385,8 +19319,26 @@ impl Default for ClaimableBalanceEntryExt { } impl ClaimableBalanceEntryExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -18406,7 +19358,7 @@ impl ClaimableBalanceEntryExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -18721,8 +19673,26 @@ impl Default for LiquidityPoolEntryBody { } impl LiquidityPoolEntryBody { - pub const VARIANTS: [LiquidityPoolType; 1] = [LiquidityPoolType::LiquidityPoolConstantProduct]; - pub const VARIANTS_STR: [&'static str; 1] = ["LiquidityPoolConstantProduct"]; + const _VARIANTS: &[LiquidityPoolType] = &[LiquidityPoolType::LiquidityPoolConstantProduct]; + pub const VARIANTS: [LiquidityPoolType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -18742,7 +19712,7 @@ impl LiquidityPoolEntryBody { } #[must_use] - pub const fn variants() -> [LiquidityPoolType; 1] { + pub const fn variants() -> [LiquidityPoolType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -18894,11 +19864,29 @@ pub enum ContractDataDurability { } impl ContractDataDurability { - pub const VARIANTS: [ContractDataDurability; 2] = [ + const _VARIANTS: &[ContractDataDurability] = &[ ContractDataDurability::Temporary, ContractDataDurability::Persistent, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Temporary", "Persistent"]; + pub const VARIANTS: [ContractDataDurability; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Temporary", "Persistent"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -18909,7 +19897,7 @@ impl ContractDataDurability { } #[must_use] - pub const fn variants() -> [ContractDataDurability; 2] { + pub const fn variants() -> [ContractDataDurability; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -19212,8 +20200,26 @@ impl Default for ContractCodeEntryExt { } impl ContractCodeEntryExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -19233,7 +20239,7 @@ impl ContractCodeEntryExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -19438,8 +20444,26 @@ impl Default for LedgerEntryExtensionV1Ext { } impl LedgerEntryExtensionV1Ext { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -19457,7 +20481,7 @@ impl LedgerEntryExtensionV1Ext { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -19630,7 +20654,7 @@ impl Default for LedgerEntryData { } impl LedgerEntryData { - pub const VARIANTS: [LedgerEntryType; 10] = [ + const _VARIANTS: &[LedgerEntryType] = &[ LedgerEntryType::Account, LedgerEntryType::Trustline, LedgerEntryType::Offer, @@ -19642,7 +20666,16 @@ impl LedgerEntryData { LedgerEntryType::ConfigSetting, LedgerEntryType::Ttl, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [LedgerEntryType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Account", "Trustline", "Offer", @@ -19654,6 +20687,15 @@ impl LedgerEntryData { "ConfigSetting", "Ttl", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -19689,7 +20731,7 @@ impl LedgerEntryData { } #[must_use] - pub const fn variants() -> [LedgerEntryType; 10] { + pub const fn variants() -> [LedgerEntryType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -19811,8 +20853,26 @@ impl Default for LedgerEntryExt { } impl LedgerEntryExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -19832,7 +20892,7 @@ impl LedgerEntryExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -20554,7 +21614,7 @@ impl Default for LedgerKey { } impl LedgerKey { - pub const VARIANTS: [LedgerEntryType; 10] = [ + const _VARIANTS: &[LedgerEntryType] = &[ LedgerEntryType::Account, LedgerEntryType::Trustline, LedgerEntryType::Offer, @@ -20566,7 +21626,16 @@ impl LedgerKey { LedgerEntryType::ConfigSetting, LedgerEntryType::Ttl, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [LedgerEntryType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Account", "Trustline", "Offer", @@ -20578,6 +21647,15 @@ impl LedgerKey { "ConfigSetting", "Ttl", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -20613,7 +21691,7 @@ impl LedgerKey { } #[must_use] - pub const fn variants() -> [LedgerEntryType; 10] { + pub const fn variants() -> [LedgerEntryType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -20742,7 +21820,7 @@ pub enum EnvelopeType { } impl EnvelopeType { - pub const VARIANTS: [EnvelopeType; 10] = [ + const _VARIANTS: &[EnvelopeType] = &[ EnvelopeType::TxV0, EnvelopeType::Scp, EnvelopeType::Tx, @@ -20754,7 +21832,16 @@ impl EnvelopeType { EnvelopeType::ContractId, EnvelopeType::SorobanAuthorization, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "TxV0", "Scp", "Tx", @@ -20766,6 +21853,15 @@ impl EnvelopeType { "ContractId", "SorobanAuthorization", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -20784,7 +21880,7 @@ impl EnvelopeType { } #[must_use] - pub const fn variants() -> [EnvelopeType; 10] { + pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -20888,8 +21984,26 @@ pub enum BucketListType { } impl BucketListType { - pub const VARIANTS: [BucketListType; 2] = [BucketListType::Live, BucketListType::HotArchive]; - pub const VARIANTS_STR: [&'static str; 2] = ["Live", "HotArchive"]; + const _VARIANTS: &[BucketListType] = &[BucketListType::Live, BucketListType::HotArchive]; + pub const VARIANTS: [BucketListType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Live", "HotArchive"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -20900,7 +22014,7 @@ impl BucketListType { } #[must_use] - pub const fn variants() -> [BucketListType; 2] { + pub const fn variants() -> [BucketListType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -21002,14 +22116,31 @@ pub enum BucketEntryType { } impl BucketEntryType { - pub const VARIANTS: [BucketEntryType; 4] = [ + const _VARIANTS: &[BucketEntryType] = &[ BucketEntryType::Metaentry, BucketEntryType::Liveentry, BucketEntryType::Deadentry, BucketEntryType::Initentry, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Metaentry", "Liveentry", "Deadentry", "Initentry"]; + pub const VARIANTS: [BucketEntryType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Metaentry", "Liveentry", "Deadentry", "Initentry"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -21022,7 +22153,7 @@ impl BucketEntryType { } #[must_use] - pub const fn variants() -> [BucketEntryType; 4] { + pub const fn variants() -> [BucketEntryType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -21124,12 +22255,30 @@ pub enum HotArchiveBucketEntryType { } impl HotArchiveBucketEntryType { - pub const VARIANTS: [HotArchiveBucketEntryType; 3] = [ + const _VARIANTS: &[HotArchiveBucketEntryType] = &[ HotArchiveBucketEntryType::Metaentry, HotArchiveBucketEntryType::Archived, HotArchiveBucketEntryType::Live, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["Metaentry", "Archived", "Live"]; + pub const VARIANTS: [HotArchiveBucketEntryType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Metaentry", "Archived", "Live"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -21141,7 +22290,7 @@ impl HotArchiveBucketEntryType { } #[must_use] - pub const fn variants() -> [HotArchiveBucketEntryType; 3] { + pub const fn variants() -> [HotArchiveBucketEntryType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -21247,8 +22396,26 @@ impl Default for BucketMetadataExt { } impl BucketMetadataExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -21268,7 +22435,7 @@ impl BucketMetadataExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -21429,14 +22596,31 @@ impl Default for BucketEntry { } impl BucketEntry { - pub const VARIANTS: [BucketEntryType; 4] = [ + const _VARIANTS: &[BucketEntryType] = &[ BucketEntryType::Liveentry, BucketEntryType::Initentry, BucketEntryType::Deadentry, BucketEntryType::Metaentry, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Liveentry", "Initentry", "Deadentry", "Metaentry"]; + pub const VARIANTS: [BucketEntryType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Liveentry", "Initentry", "Deadentry", "Metaentry"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -21460,7 +22644,7 @@ impl BucketEntry { } #[must_use] - pub const fn variants() -> [BucketEntryType; 4] { + pub const fn variants() -> [BucketEntryType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -21564,12 +22748,30 @@ impl Default for HotArchiveBucketEntry { } impl HotArchiveBucketEntry { - pub const VARIANTS: [HotArchiveBucketEntryType; 3] = [ + const _VARIANTS: &[HotArchiveBucketEntryType] = &[ HotArchiveBucketEntryType::Archived, HotArchiveBucketEntryType::Live, HotArchiveBucketEntryType::Metaentry, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["Archived", "Live", "Metaentry"]; + pub const VARIANTS: [HotArchiveBucketEntryType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Archived", "Live", "Metaentry"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -21591,7 +22793,7 @@ impl HotArchiveBucketEntry { } #[must_use] - pub const fn variants() -> [HotArchiveBucketEntryType; 3] { + pub const fn variants() -> [HotArchiveBucketEntryType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -21790,8 +22992,26 @@ pub enum StellarValueType { } impl StellarValueType { - pub const VARIANTS: [StellarValueType; 2] = [StellarValueType::Basic, StellarValueType::Signed]; - pub const VARIANTS_STR: [&'static str; 2] = ["Basic", "Signed"]; + const _VARIANTS: &[StellarValueType] = &[StellarValueType::Basic, StellarValueType::Signed]; + pub const VARIANTS: [StellarValueType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Basic", "Signed"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -21802,7 +23022,7 @@ impl StellarValueType { } #[must_use] - pub const fn variants() -> [StellarValueType; 2] { + pub const fn variants() -> [StellarValueType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -21956,8 +23176,26 @@ impl Default for StellarValueExt { } impl StellarValueExt { - pub const VARIANTS: [StellarValueType; 2] = [StellarValueType::Basic, StellarValueType::Signed]; - pub const VARIANTS_STR: [&'static str; 2] = ["Basic", "Signed"]; + const _VARIANTS: &[StellarValueType] = &[StellarValueType::Basic, StellarValueType::Signed]; + pub const VARIANTS: [StellarValueType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Basic", "Signed"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -21977,7 +23215,7 @@ impl StellarValueExt { } #[must_use] - pub const fn variants() -> [StellarValueType; 2] { + pub const fn variants() -> [StellarValueType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -22146,12 +23384,30 @@ pub enum LedgerHeaderFlags { } impl LedgerHeaderFlags { - pub const VARIANTS: [LedgerHeaderFlags; 3] = [ + const _VARIANTS: &[LedgerHeaderFlags] = &[ LedgerHeaderFlags::TradingFlag, LedgerHeaderFlags::DepositFlag, LedgerHeaderFlags::WithdrawalFlag, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["TradingFlag", "DepositFlag", "WithdrawalFlag"]; + pub const VARIANTS: [LedgerHeaderFlags; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["TradingFlag", "DepositFlag", "WithdrawalFlag"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -22163,7 +23419,7 @@ impl LedgerHeaderFlags { } #[must_use] - pub const fn variants() -> [LedgerHeaderFlags; 3] { + pub const fn variants() -> [LedgerHeaderFlags; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -22266,8 +23522,26 @@ impl Default for LedgerHeaderExtensionV1Ext { } impl LedgerHeaderExtensionV1Ext { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -22285,7 +23559,7 @@ impl LedgerHeaderExtensionV1Ext { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -22434,8 +23708,26 @@ impl Default for LedgerHeaderExt { } impl LedgerHeaderExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -22455,7 +23747,7 @@ impl LedgerHeaderExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -22686,7 +23978,7 @@ pub enum LedgerUpgradeType { } impl LedgerUpgradeType { - pub const VARIANTS: [LedgerUpgradeType; 7] = [ + const _VARIANTS: &[LedgerUpgradeType] = &[ LedgerUpgradeType::Version, LedgerUpgradeType::BaseFee, LedgerUpgradeType::MaxTxSetSize, @@ -22695,7 +23987,16 @@ impl LedgerUpgradeType { LedgerUpgradeType::Config, LedgerUpgradeType::MaxSorobanTxSetSize, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [LedgerUpgradeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Version", "BaseFee", "MaxTxSetSize", @@ -22704,6 +24005,15 @@ impl LedgerUpgradeType { "Config", "MaxSorobanTxSetSize", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -22719,7 +24029,7 @@ impl LedgerUpgradeType { } #[must_use] - pub const fn variants() -> [LedgerUpgradeType; 7] { + pub const fn variants() -> [LedgerUpgradeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -22895,7 +24205,7 @@ impl Default for LedgerUpgrade { } impl LedgerUpgrade { - pub const VARIANTS: [LedgerUpgradeType; 7] = [ + const _VARIANTS: &[LedgerUpgradeType] = &[ LedgerUpgradeType::Version, LedgerUpgradeType::BaseFee, LedgerUpgradeType::MaxTxSetSize, @@ -22904,7 +24214,16 @@ impl LedgerUpgrade { LedgerUpgradeType::Config, LedgerUpgradeType::MaxSorobanTxSetSize, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [LedgerUpgradeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Version", "BaseFee", "MaxTxSetSize", @@ -22913,6 +24232,15 @@ impl LedgerUpgrade { "Config", "MaxSorobanTxSetSize", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -22942,7 +24270,7 @@ impl LedgerUpgrade { } #[must_use] - pub const fn variants() -> [LedgerUpgradeType; 7] { + pub const fn variants() -> [LedgerUpgradeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -23085,9 +24413,26 @@ pub enum TxSetComponentType { } impl TxSetComponentType { - pub const VARIANTS: [TxSetComponentType; 1] = - [TxSetComponentType::TxsetCompTxsMaybeDiscountedFee]; - pub const VARIANTS_STR: [&'static str; 1] = ["TxsetCompTxsMaybeDiscountedFee"]; + const _VARIANTS: &[TxSetComponentType] = &[TxSetComponentType::TxsetCompTxsMaybeDiscountedFee]; + pub const VARIANTS: [TxSetComponentType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["TxsetCompTxsMaybeDiscountedFee"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -23097,7 +24442,7 @@ impl TxSetComponentType { } #[must_use] - pub const fn variants() -> [TxSetComponentType; 1] { + pub const fn variants() -> [TxSetComponentType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -23525,9 +24870,26 @@ impl Default for TxSetComponent { } impl TxSetComponent { - pub const VARIANTS: [TxSetComponentType; 1] = - [TxSetComponentType::TxsetCompTxsMaybeDiscountedFee]; - pub const VARIANTS_STR: [&'static str; 1] = ["TxsetCompTxsMaybeDiscountedFee"]; + const _VARIANTS: &[TxSetComponentType] = &[TxSetComponentType::TxsetCompTxsMaybeDiscountedFee]; + pub const VARIANTS: [TxSetComponentType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["TxsetCompTxsMaybeDiscountedFee"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -23547,7 +24909,7 @@ impl TxSetComponent { } #[must_use] - pub const fn variants() -> [TxSetComponentType; 1] { + pub const fn variants() -> [TxSetComponentType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -23645,8 +25007,26 @@ impl Default for TransactionPhase { } impl TransactionPhase { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -23666,7 +25046,7 @@ impl TransactionPhase { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -23858,8 +25238,26 @@ impl Default for GeneralizedTransactionSet { } impl GeneralizedTransactionSet { - pub const VARIANTS: [i32; 1] = [1]; - pub const VARIANTS_STR: [&'static str; 1] = ["V1"]; + const _VARIANTS: &[i32] = &[1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -23877,7 +25275,7 @@ impl GeneralizedTransactionSet { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -24065,8 +25463,26 @@ impl Default for TransactionHistoryEntryExt { } impl TransactionHistoryEntryExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -24086,7 +25502,7 @@ impl TransactionHistoryEntryExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -24241,8 +25657,26 @@ impl Default for TransactionHistoryResultEntryExt { } impl TransactionHistoryResultEntryExt { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -24260,7 +25694,7 @@ impl TransactionHistoryResultEntryExt { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -24411,8 +25845,26 @@ impl Default for LedgerHeaderHistoryEntryExt { } impl LedgerHeaderHistoryEntryExt { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -24430,7 +25882,7 @@ impl LedgerHeaderHistoryEntryExt { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -24679,8 +26131,26 @@ impl Default for ScpHistoryEntry { } impl ScpHistoryEntry { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -24698,7 +26168,7 @@ impl ScpHistoryEntry { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -24789,15 +26259,32 @@ pub enum LedgerEntryChangeType { } impl LedgerEntryChangeType { - pub const VARIANTS: [LedgerEntryChangeType; 5] = [ + const _VARIANTS: &[LedgerEntryChangeType] = &[ LedgerEntryChangeType::Created, LedgerEntryChangeType::Updated, LedgerEntryChangeType::Removed, LedgerEntryChangeType::State, LedgerEntryChangeType::Restored, ]; - pub const VARIANTS_STR: [&'static str; 5] = - ["Created", "Updated", "Removed", "State", "Restored"]; + pub const VARIANTS: [LedgerEntryChangeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Removed", "State", "Restored"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -24811,7 +26298,7 @@ impl LedgerEntryChangeType { } #[must_use] - pub const fn variants() -> [LedgerEntryChangeType; 5] { + pub const fn variants() -> [LedgerEntryChangeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -24928,15 +26415,32 @@ impl Default for LedgerEntryChange { } impl LedgerEntryChange { - pub const VARIANTS: [LedgerEntryChangeType; 5] = [ + const _VARIANTS: &[LedgerEntryChangeType] = &[ LedgerEntryChangeType::Created, LedgerEntryChangeType::Updated, LedgerEntryChangeType::Removed, LedgerEntryChangeType::State, LedgerEntryChangeType::Restored, ]; - pub const VARIANTS_STR: [&'static str; 5] = - ["Created", "Updated", "Removed", "State", "Restored"]; + pub const VARIANTS: [LedgerEntryChangeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Removed", "State", "Restored"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -24962,7 +26466,7 @@ impl LedgerEntryChange { } #[must_use] - pub const fn variants() -> [LedgerEntryChangeType; 5] { + pub const fn variants() -> [LedgerEntryChangeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -25313,12 +26817,30 @@ pub enum ContractEventType { } impl ContractEventType { - pub const VARIANTS: [ContractEventType; 3] = [ + const _VARIANTS: &[ContractEventType] = &[ ContractEventType::System, ContractEventType::Contract, ContractEventType::Diagnostic, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["System", "Contract", "Diagnostic"]; + pub const VARIANTS: [ContractEventType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["System", "Contract", "Diagnostic"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -25330,7 +26852,7 @@ impl ContractEventType { } #[must_use] - pub const fn variants() -> [ContractEventType; 3] { + pub const fn variants() -> [ContractEventType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -25486,8 +27008,26 @@ impl Default for ContractEventBody { } impl ContractEventBody { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -25505,7 +27045,7 @@ impl ContractEventBody { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -25814,8 +27354,26 @@ impl Default for SorobanTransactionMetaExt { } impl SorobanTransactionMetaExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -25835,7 +27393,7 @@ impl SorobanTransactionMetaExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -26162,12 +27720,30 @@ pub enum TransactionEventStage { } impl TransactionEventStage { - pub const VARIANTS: [TransactionEventStage; 3] = [ + const _VARIANTS: &[TransactionEventStage] = &[ TransactionEventStage::BeforeAllTxs, TransactionEventStage::AfterTx, TransactionEventStage::AfterAllTxs, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["BeforeAllTxs", "AfterTx", "AfterAllTxs"]; + pub const VARIANTS: [TransactionEventStage; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["BeforeAllTxs", "AfterTx", "AfterAllTxs"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -26179,7 +27755,7 @@ impl TransactionEventStage { } #[must_use] - pub const fn variants() -> [TransactionEventStage; 3] { + pub const fn variants() -> [TransactionEventStage; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -26465,8 +28041,26 @@ impl Default for TransactionMeta { } impl TransactionMeta { - pub const VARIANTS: [i32; 5] = [0, 1, 2, 3, 4]; - pub const VARIANTS_STR: [&'static str; 5] = ["V0", "V1", "V2", "V3", "V4"]; + const _VARIANTS: &[i32] = &[0, 1, 2, 3, 4]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1", "V2", "V3", "V4"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -26492,7 +28086,7 @@ impl TransactionMeta { } #[must_use] - pub const fn variants() -> [i32; 5] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -26882,8 +28476,26 @@ impl Default for LedgerCloseMetaExt { } impl LedgerCloseMetaExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -26903,7 +28515,7 @@ impl LedgerCloseMetaExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -27192,8 +28804,26 @@ impl Default for LedgerCloseMeta { } impl LedgerCloseMeta { - pub const VARIANTS: [i32; 3] = [0, 1, 2]; - pub const VARIANTS_STR: [&'static str; 3] = ["V0", "V1", "V2"]; + const _VARIANTS: &[i32] = &[0, 1, 2]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1", "V2"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -27215,7 +28845,7 @@ impl LedgerCloseMeta { } #[must_use] - pub const fn variants() -> [i32; 3] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -27310,14 +28940,32 @@ pub enum ErrorCode { } impl ErrorCode { - pub const VARIANTS: [ErrorCode; 5] = [ + const _VARIANTS: &[ErrorCode] = &[ ErrorCode::Misc, ErrorCode::Data, ErrorCode::Conf, ErrorCode::Auth, ErrorCode::Load, ]; - pub const VARIANTS_STR: [&'static str; 5] = ["Misc", "Data", "Conf", "Auth", "Load"]; + pub const VARIANTS: [ErrorCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Misc", "Data", "Conf", "Auth", "Load"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -27331,7 +28979,7 @@ impl ErrorCode { } #[must_use] - pub const fn variants() -> [ErrorCode; 5] { + pub const fn variants() -> [ErrorCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -27760,8 +29408,26 @@ pub enum IpAddrType { } impl IpAddrType { - pub const VARIANTS: [IpAddrType; 2] = [IpAddrType::IPv4, IpAddrType::IPv6]; - pub const VARIANTS_STR: [&'static str; 2] = ["IPv4", "IPv6"]; + const _VARIANTS: &[IpAddrType] = &[IpAddrType::IPv4, IpAddrType::IPv6]; + pub const VARIANTS: [IpAddrType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["IPv4", "IPv6"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -27772,7 +29438,7 @@ impl IpAddrType { } #[must_use] - pub const fn variants() -> [IpAddrType; 2] { + pub const fn variants() -> [IpAddrType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -27877,8 +29543,26 @@ impl Default for PeerAddressIp { } impl PeerAddressIp { - pub const VARIANTS: [IpAddrType; 2] = [IpAddrType::IPv4, IpAddrType::IPv6]; - pub const VARIANTS_STR: [&'static str; 2] = ["IPv4", "IPv6"]; + const _VARIANTS: &[IpAddrType] = &[IpAddrType::IPv4, IpAddrType::IPv6]; + pub const VARIANTS: [IpAddrType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["IPv4", "IPv6"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -27898,7 +29582,7 @@ impl PeerAddressIp { } #[must_use] - pub const fn variants() -> [IpAddrType; 2] { + pub const fn variants() -> [IpAddrType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -28097,7 +29781,7 @@ pub enum MessageType { } impl MessageType { - pub const VARIANTS: [MessageType; 21] = [ + const _VARIANTS: &[MessageType] = &[ MessageType::ErrorMsg, MessageType::Auth, MessageType::DontHave, @@ -28120,7 +29804,16 @@ impl MessageType { MessageType::TimeSlicedSurveyStartCollecting, MessageType::TimeSlicedSurveyStopCollecting, ]; - pub const VARIANTS_STR: [&'static str; 21] = [ + pub const VARIANTS: [MessageType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "ErrorMsg", "Auth", "DontHave", @@ -28143,6 +29836,15 @@ impl MessageType { "TimeSlicedSurveyStartCollecting", "TimeSlicedSurveyStopCollecting", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -28172,7 +29874,7 @@ impl MessageType { } #[must_use] - pub const fn variants() -> [MessageType; 21] { + pub const fn variants() -> [MessageType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -28334,9 +30036,27 @@ pub enum SurveyMessageCommandType { } impl SurveyMessageCommandType { - pub const VARIANTS: [SurveyMessageCommandType; 1] = - [SurveyMessageCommandType::TimeSlicedSurveyTopology]; - pub const VARIANTS_STR: [&'static str; 1] = ["TimeSlicedSurveyTopology"]; + const _VARIANTS: &[SurveyMessageCommandType] = + &[SurveyMessageCommandType::TimeSlicedSurveyTopology]; + pub const VARIANTS: [SurveyMessageCommandType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["TimeSlicedSurveyTopology"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -28346,7 +30066,7 @@ impl SurveyMessageCommandType { } #[must_use] - pub const fn variants() -> [SurveyMessageCommandType; 1] { + pub const fn variants() -> [SurveyMessageCommandType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -28439,9 +30159,27 @@ pub enum SurveyMessageResponseType { } impl SurveyMessageResponseType { - pub const VARIANTS: [SurveyMessageResponseType; 1] = - [SurveyMessageResponseType::SurveyTopologyResponseV2]; - pub const VARIANTS_STR: [&'static str; 1] = ["SurveyTopologyResponseV2"]; + const _VARIANTS: &[SurveyMessageResponseType] = + &[SurveyMessageResponseType::SurveyTopologyResponseV2]; + pub const VARIANTS: [SurveyMessageResponseType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["SurveyTopologyResponseV2"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -28451,7 +30189,7 @@ impl SurveyMessageResponseType { } #[must_use] - pub const fn variants() -> [SurveyMessageResponseType; 1] { + pub const fn variants() -> [SurveyMessageResponseType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -29640,9 +31378,27 @@ impl Default for SurveyResponseBody { } impl SurveyResponseBody { - pub const VARIANTS: [SurveyMessageResponseType; 1] = - [SurveyMessageResponseType::SurveyTopologyResponseV2]; - pub const VARIANTS_STR: [&'static str; 1] = ["SurveyTopologyResponseV2"]; + const _VARIANTS: &[SurveyMessageResponseType] = + &[SurveyMessageResponseType::SurveyTopologyResponseV2]; + pub const VARIANTS: [SurveyMessageResponseType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["SurveyTopologyResponseV2"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -29662,7 +31418,7 @@ impl SurveyResponseBody { } #[must_use] - pub const fn variants() -> [SurveyMessageResponseType; 1] { + pub const fn variants() -> [SurveyMessageResponseType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -30147,7 +31903,7 @@ impl Default for StellarMessage { } impl StellarMessage { - pub const VARIANTS: [MessageType; 21] = [ + const _VARIANTS: &[MessageType] = &[ MessageType::ErrorMsg, MessageType::Hello, MessageType::Auth, @@ -30170,7 +31926,16 @@ impl StellarMessage { MessageType::FloodAdvert, MessageType::FloodDemand, ]; - pub const VARIANTS_STR: [&'static str; 21] = [ + pub const VARIANTS: [MessageType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "ErrorMsg", "Hello", "Auth", @@ -30193,6 +31958,15 @@ impl StellarMessage { "FloodAdvert", "FloodDemand", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -30252,7 +32026,7 @@ impl StellarMessage { } #[must_use] - pub const fn variants() -> [MessageType; 21] { + pub const fn variants() -> [MessageType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -30461,8 +32235,26 @@ impl Default for AuthenticatedMessage { } impl AuthenticatedMessage { - pub const VARIANTS: [u32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[u32] = &[0]; + pub const VARIANTS: [u32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -30480,7 +32272,7 @@ impl AuthenticatedMessage { } #[must_use] - pub const fn variants() -> [u32; 1] { + pub const fn variants() -> [u32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -30579,8 +32371,26 @@ impl Default for LiquidityPoolParameters { } impl LiquidityPoolParameters { - pub const VARIANTS: [LiquidityPoolType; 1] = [LiquidityPoolType::LiquidityPoolConstantProduct]; - pub const VARIANTS_STR: [&'static str; 1] = ["LiquidityPoolConstantProduct"]; + const _VARIANTS: &[LiquidityPoolType] = &[LiquidityPoolType::LiquidityPoolConstantProduct]; + pub const VARIANTS: [LiquidityPoolType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -30600,7 +32410,7 @@ impl LiquidityPoolParameters { } #[must_use] - pub const fn variants() -> [LiquidityPoolType; 1] { + pub const fn variants() -> [LiquidityPoolType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -30774,8 +32584,26 @@ impl Default for MuxedAccount { } impl MuxedAccount { - pub const VARIANTS: [CryptoKeyType; 2] = [CryptoKeyType::Ed25519, CryptoKeyType::MuxedEd25519]; - pub const VARIANTS_STR: [&'static str; 2] = ["Ed25519", "MuxedEd25519"]; + const _VARIANTS: &[CryptoKeyType] = &[CryptoKeyType::Ed25519, CryptoKeyType::MuxedEd25519]; + pub const VARIANTS: [CryptoKeyType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Ed25519", "MuxedEd25519"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -30795,7 +32623,7 @@ impl MuxedAccount { } #[must_use] - pub const fn variants() -> [CryptoKeyType; 2] { + pub const fn variants() -> [CryptoKeyType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -30983,7 +32811,7 @@ pub enum OperationType { } impl OperationType { - pub const VARIANTS: [OperationType; 27] = [ + const _VARIANTS: &[OperationType] = &[ OperationType::CreateAccount, OperationType::Payment, OperationType::PathPaymentStrictReceive, @@ -31012,7 +32840,16 @@ impl OperationType { OperationType::ExtendFootprintTtl, OperationType::RestoreFootprint, ]; - pub const VARIANTS_STR: [&'static str; 27] = [ + pub const VARIANTS: [OperationType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "CreateAccount", "Payment", "PathPaymentStrictReceive", @@ -31041,6 +32878,15 @@ impl OperationType { "ExtendFootprintTtl", "RestoreFootprint", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -31076,7 +32922,7 @@ impl OperationType { } #[must_use] - pub const fn variants() -> [OperationType; 27] { + pub const fn variants() -> [OperationType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -31769,14 +33615,31 @@ impl Default for ChangeTrustAsset { } impl ChangeTrustAsset { - pub const VARIANTS: [AssetType; 4] = [ + const _VARIANTS: &[AssetType] = &[ AssetType::Native, AssetType::CreditAlphanum4, AssetType::CreditAlphanum12, AssetType::PoolShare, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; + pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -31800,7 +33663,7 @@ impl ChangeTrustAsset { } #[must_use] - pub const fn variants() -> [AssetType; 4] { + pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -32242,11 +34105,29 @@ pub enum RevokeSponsorshipType { } impl RevokeSponsorshipType { - pub const VARIANTS: [RevokeSponsorshipType; 2] = [ + const _VARIANTS: &[RevokeSponsorshipType] = &[ RevokeSponsorshipType::LedgerEntry, RevokeSponsorshipType::Signer, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["LedgerEntry", "Signer"]; + pub const VARIANTS: [RevokeSponsorshipType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["LedgerEntry", "Signer"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -32257,7 +34138,7 @@ impl RevokeSponsorshipType { } #[must_use] - pub const fn variants() -> [RevokeSponsorshipType; 2] { + pub const fn variants() -> [RevokeSponsorshipType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -32415,11 +34296,29 @@ impl Default for RevokeSponsorshipOp { } impl RevokeSponsorshipOp { - pub const VARIANTS: [RevokeSponsorshipType; 2] = [ + const _VARIANTS: &[RevokeSponsorshipType] = &[ RevokeSponsorshipType::LedgerEntry, RevokeSponsorshipType::Signer, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["LedgerEntry", "Signer"]; + pub const VARIANTS: [RevokeSponsorshipType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["LedgerEntry", "Signer"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -32439,7 +34338,7 @@ impl RevokeSponsorshipOp { } #[must_use] - pub const fn variants() -> [RevokeSponsorshipType; 2] { + pub const fn variants() -> [RevokeSponsorshipType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -32838,18 +34737,36 @@ pub enum HostFunctionType { } impl HostFunctionType { - pub const VARIANTS: [HostFunctionType; 4] = [ + const _VARIANTS: &[HostFunctionType] = &[ HostFunctionType::InvokeContract, HostFunctionType::CreateContract, HostFunctionType::UploadContractWasm, HostFunctionType::CreateContractV2, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [HostFunctionType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "InvokeContract", "CreateContract", "UploadContractWasm", "CreateContractV2", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -32862,7 +34779,7 @@ impl HostFunctionType { } #[must_use] - pub const fn variants() -> [HostFunctionType; 4] { + pub const fn variants() -> [HostFunctionType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -32960,11 +34877,29 @@ pub enum ContractIdPreimageType { } impl ContractIdPreimageType { - pub const VARIANTS: [ContractIdPreimageType; 2] = [ + const _VARIANTS: &[ContractIdPreimageType] = &[ ContractIdPreimageType::Address, ContractIdPreimageType::Asset, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Address", "Asset"]; + pub const VARIANTS: [ContractIdPreimageType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Address", "Asset"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -32975,7 +34910,7 @@ impl ContractIdPreimageType { } #[must_use] - pub const fn variants() -> [ContractIdPreimageType; 2] { + pub const fn variants() -> [ContractIdPreimageType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -33133,11 +35068,29 @@ impl Default for ContractIdPreimage { } impl ContractIdPreimage { - pub const VARIANTS: [ContractIdPreimageType; 2] = [ + const _VARIANTS: &[ContractIdPreimageType] = &[ ContractIdPreimageType::Address, ContractIdPreimageType::Asset, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Address", "Asset"]; + pub const VARIANTS: [ContractIdPreimageType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Address", "Asset"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -33157,7 +35110,7 @@ impl ContractIdPreimage { } #[must_use] - pub const fn variants() -> [ContractIdPreimageType; 2] { + pub const fn variants() -> [ContractIdPreimageType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -33416,18 +35369,36 @@ impl Default for HostFunction { } impl HostFunction { - pub const VARIANTS: [HostFunctionType; 4] = [ + const _VARIANTS: &[HostFunctionType] = &[ HostFunctionType::InvokeContract, HostFunctionType::CreateContract, HostFunctionType::UploadContractWasm, HostFunctionType::CreateContractV2, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [HostFunctionType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "InvokeContract", "CreateContract", "UploadContractWasm", "CreateContractV2", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -33451,7 +35422,7 @@ impl HostFunction { } #[must_use] - pub const fn variants() -> [HostFunctionType; 4] { + pub const fn variants() -> [HostFunctionType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -33552,16 +35523,34 @@ pub enum SorobanAuthorizedFunctionType { } impl SorobanAuthorizedFunctionType { - pub const VARIANTS: [SorobanAuthorizedFunctionType; 3] = [ + const _VARIANTS: &[SorobanAuthorizedFunctionType] = &[ SorobanAuthorizedFunctionType::ContractFn, SorobanAuthorizedFunctionType::CreateContractHostFn, SorobanAuthorizedFunctionType::CreateContractV2HostFn, ]; - pub const VARIANTS_STR: [&'static str; 3] = [ + pub const VARIANTS: [SorobanAuthorizedFunctionType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "ContractFn", "CreateContractHostFn", "CreateContractV2HostFn", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -33573,7 +35562,7 @@ impl SorobanAuthorizedFunctionType { } #[must_use] - pub const fn variants() -> [SorobanAuthorizedFunctionType; 3] { + pub const fn variants() -> [SorobanAuthorizedFunctionType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -33690,16 +35679,34 @@ impl Default for SorobanAuthorizedFunction { } impl SorobanAuthorizedFunction { - pub const VARIANTS: [SorobanAuthorizedFunctionType; 3] = [ + const _VARIANTS: &[SorobanAuthorizedFunctionType] = &[ SorobanAuthorizedFunctionType::ContractFn, SorobanAuthorizedFunctionType::CreateContractHostFn, SorobanAuthorizedFunctionType::CreateContractV2HostFn, ]; - pub const VARIANTS_STR: [&'static str; 3] = [ + pub const VARIANTS: [SorobanAuthorizedFunctionType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "ContractFn", "CreateContractHostFn", "CreateContractV2HostFn", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -33723,7 +35730,7 @@ impl SorobanAuthorizedFunction { } #[must_use] - pub const fn variants() -> [SorobanAuthorizedFunctionType; 3] { + pub const fn variants() -> [SorobanAuthorizedFunctionType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -33929,11 +35936,29 @@ pub enum SorobanCredentialsType { } impl SorobanCredentialsType { - pub const VARIANTS: [SorobanCredentialsType; 2] = [ + const _VARIANTS: &[SorobanCredentialsType] = &[ SorobanCredentialsType::SourceAccount, SorobanCredentialsType::Address, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["SourceAccount", "Address"]; + pub const VARIANTS: [SorobanCredentialsType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["SourceAccount", "Address"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -33944,7 +35969,7 @@ impl SorobanCredentialsType { } #[must_use] - pub const fn variants() -> [SorobanCredentialsType; 2] { + pub const fn variants() -> [SorobanCredentialsType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -34049,11 +36074,29 @@ impl Default for SorobanCredentials { } impl SorobanCredentials { - pub const VARIANTS: [SorobanCredentialsType; 2] = [ + const _VARIANTS: &[SorobanCredentialsType] = &[ SorobanCredentialsType::SourceAccount, SorobanCredentialsType::Address, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["SourceAccount", "Address"]; + pub const VARIANTS: [SorobanCredentialsType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["SourceAccount", "Address"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -34073,7 +36116,7 @@ impl SorobanCredentials { } #[must_use] - pub const fn variants() -> [SorobanCredentialsType; 2] { + pub const fn variants() -> [SorobanCredentialsType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -34547,7 +36590,7 @@ impl Default for OperationBody { } impl OperationBody { - pub const VARIANTS: [OperationType; 27] = [ + const _VARIANTS: &[OperationType] = &[ OperationType::CreateAccount, OperationType::Payment, OperationType::PathPaymentStrictReceive, @@ -34576,7 +36619,16 @@ impl OperationBody { OperationType::ExtendFootprintTtl, OperationType::RestoreFootprint, ]; - pub const VARIANTS_STR: [&'static str; 27] = [ + pub const VARIANTS: [OperationType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "CreateAccount", "Payment", "PathPaymentStrictReceive", @@ -34605,6 +36657,15 @@ impl OperationBody { "ExtendFootprintTtl", "RestoreFootprint", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -34674,7 +36735,7 @@ impl OperationBody { } #[must_use] - pub const fn variants() -> [OperationType; 27] { + pub const fn variants() -> [OperationType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -35216,18 +37277,36 @@ impl Default for HashIdPreimage { } impl HashIdPreimage { - pub const VARIANTS: [EnvelopeType; 4] = [ + const _VARIANTS: &[EnvelopeType] = &[ EnvelopeType::OpId, EnvelopeType::PoolRevokeOpId, EnvelopeType::ContractId, EnvelopeType::SorobanAuthorization, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "OpId", "PoolRevokeOpId", "ContractId", "SorobanAuthorization", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -35251,7 +37330,7 @@ impl HashIdPreimage { } #[must_use] - pub const fn variants() -> [EnvelopeType; 4] { + pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -35354,14 +37433,32 @@ pub enum MemoType { } impl MemoType { - pub const VARIANTS: [MemoType; 5] = [ + const _VARIANTS: &[MemoType] = &[ MemoType::None, MemoType::Text, MemoType::Id, MemoType::Hash, MemoType::Return, ]; - pub const VARIANTS_STR: [&'static str; 5] = ["None", "Text", "Id", "Hash", "Return"]; + pub const VARIANTS: [MemoType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["None", "Text", "Id", "Hash", "Return"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -35375,7 +37472,7 @@ impl MemoType { } #[must_use] - pub const fn variants() -> [MemoType; 5] { + pub const fn variants() -> [MemoType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -35498,14 +37595,32 @@ impl Default for Memo { } impl Memo { - pub const VARIANTS: [MemoType; 5] = [ + const _VARIANTS: &[MemoType] = &[ MemoType::None, MemoType::Text, MemoType::Id, MemoType::Hash, MemoType::Return, ]; - pub const VARIANTS_STR: [&'static str; 5] = ["None", "Text", "Id", "Hash", "Return"]; + pub const VARIANTS: [MemoType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["None", "Text", "Id", "Hash", "Return"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -35531,7 +37646,7 @@ impl Memo { } #[must_use] - pub const fn variants() -> [MemoType; 5] { + pub const fn variants() -> [MemoType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -35812,12 +37927,30 @@ pub enum PreconditionType { } impl PreconditionType { - pub const VARIANTS: [PreconditionType; 3] = [ + const _VARIANTS: &[PreconditionType] = &[ PreconditionType::None, PreconditionType::Time, PreconditionType::V2, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["None", "Time", "V2"]; + pub const VARIANTS: [PreconditionType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["None", "Time", "V2"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -35829,7 +37962,7 @@ impl PreconditionType { } #[must_use] - pub const fn variants() -> [PreconditionType; 3] { + pub const fn variants() -> [PreconditionType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -35938,12 +38071,30 @@ impl Default for Preconditions { } impl Preconditions { - pub const VARIANTS: [PreconditionType; 3] = [ + const _VARIANTS: &[PreconditionType] = &[ PreconditionType::None, PreconditionType::Time, PreconditionType::V2, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["None", "Time", "V2"]; + pub const VARIANTS: [PreconditionType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["None", "Time", "V2"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -35965,7 +38116,7 @@ impl Preconditions { } #[must_use] - pub const fn variants() -> [PreconditionType; 3] { + pub const fn variants() -> [PreconditionType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -36222,8 +38373,26 @@ impl Default for SorobanTransactionDataExt { } impl SorobanTransactionDataExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -36243,7 +38412,7 @@ impl SorobanTransactionDataExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -36408,8 +38577,26 @@ impl Default for TransactionV0Ext { } impl TransactionV0Ext { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -36427,7 +38614,7 @@ impl TransactionV0Ext { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -36646,8 +38833,26 @@ impl Default for TransactionExt { } impl TransactionExt { - pub const VARIANTS: [i32; 2] = [0, 1]; - pub const VARIANTS_STR: [&'static str; 2] = ["V0", "V1"]; + const _VARIANTS: &[i32] = &[0, 1]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "V1"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -36667,7 +38872,7 @@ impl TransactionExt { } #[must_use] - pub const fn variants() -> [i32; 2] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -36897,8 +39102,26 @@ impl Default for FeeBumpTransactionInnerTx { } impl FeeBumpTransactionInnerTx { - pub const VARIANTS: [EnvelopeType; 1] = [EnvelopeType::Tx]; - pub const VARIANTS_STR: [&'static str; 1] = ["Tx"]; + const _VARIANTS: &[EnvelopeType] = &[EnvelopeType::Tx]; + pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Tx"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -36916,7 +39139,7 @@ impl FeeBumpTransactionInnerTx { } #[must_use] - pub const fn variants() -> [EnvelopeType; 1] { + pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -37007,8 +39230,26 @@ impl Default for FeeBumpTransactionExt { } impl FeeBumpTransactionExt { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -37026,7 +39267,7 @@ impl FeeBumpTransactionExt { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -37238,12 +39479,30 @@ pub enum TransactionEnvelope { } impl TransactionEnvelope { - pub const VARIANTS: [EnvelopeType; 3] = [ + const _VARIANTS: &[EnvelopeType] = &[ EnvelopeType::TxV0, EnvelopeType::Tx, EnvelopeType::TxFeeBump, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["TxV0", "Tx", "TxFeeBump"]; + pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["TxV0", "Tx", "TxFeeBump"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -37265,7 +39524,7 @@ impl TransactionEnvelope { } #[must_use] - pub const fn variants() -> [EnvelopeType; 3] { + pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -37366,8 +39625,26 @@ impl Default for TransactionSignaturePayloadTaggedTransaction { } impl TransactionSignaturePayloadTaggedTransaction { - pub const VARIANTS: [EnvelopeType; 2] = [EnvelopeType::Tx, EnvelopeType::TxFeeBump]; - pub const VARIANTS_STR: [&'static str; 2] = ["Tx", "TxFeeBump"]; + const _VARIANTS: &[EnvelopeType] = &[EnvelopeType::Tx, EnvelopeType::TxFeeBump]; + pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Tx", "TxFeeBump"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -37387,7 +39664,7 @@ impl TransactionSignaturePayloadTaggedTransaction { } #[must_use] - pub const fn variants() -> [EnvelopeType; 2] { + pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -37533,12 +39810,30 @@ pub enum ClaimAtomType { } impl ClaimAtomType { - pub const VARIANTS: [ClaimAtomType; 3] = [ + const _VARIANTS: &[ClaimAtomType] = &[ ClaimAtomType::V0, ClaimAtomType::OrderBook, ClaimAtomType::LiquidityPool, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["V0", "OrderBook", "LiquidityPool"]; + pub const VARIANTS: [ClaimAtomType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "OrderBook", "LiquidityPool"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -37550,7 +39845,7 @@ impl ClaimAtomType { } #[must_use] - pub const fn variants() -> [ClaimAtomType; 3] { + pub const fn variants() -> [ClaimAtomType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -37896,12 +40191,30 @@ impl Default for ClaimAtom { } impl ClaimAtom { - pub const VARIANTS: [ClaimAtomType; 3] = [ + const _VARIANTS: &[ClaimAtomType] = &[ ClaimAtomType::V0, ClaimAtomType::OrderBook, ClaimAtomType::LiquidityPool, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["V0", "OrderBook", "LiquidityPool"]; + pub const VARIANTS: [ClaimAtomType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0", "OrderBook", "LiquidityPool"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -37923,7 +40236,7 @@ impl ClaimAtom { } #[must_use] - pub const fn variants() -> [ClaimAtomType; 3] { + pub const fn variants() -> [ClaimAtomType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -38024,20 +40337,38 @@ pub enum CreateAccountResultCode { } impl CreateAccountResultCode { - pub const VARIANTS: [CreateAccountResultCode; 5] = [ + const _VARIANTS: &[CreateAccountResultCode] = &[ CreateAccountResultCode::Success, CreateAccountResultCode::Malformed, CreateAccountResultCode::Underfunded, CreateAccountResultCode::LowReserve, CreateAccountResultCode::AlreadyExist, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [CreateAccountResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", "LowReserve", "AlreadyExist", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -38051,7 +40382,7 @@ impl CreateAccountResultCode { } #[must_use] - pub const fn variants() -> [CreateAccountResultCode; 5] { + pub const fn variants() -> [CreateAccountResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -38165,20 +40496,38 @@ impl Default for CreateAccountResult { } impl CreateAccountResult { - pub const VARIANTS: [CreateAccountResultCode; 5] = [ + const _VARIANTS: &[CreateAccountResultCode] = &[ CreateAccountResultCode::Success, CreateAccountResultCode::Malformed, CreateAccountResultCode::Underfunded, CreateAccountResultCode::LowReserve, CreateAccountResultCode::AlreadyExist, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [CreateAccountResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", "LowReserve", "AlreadyExist", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -38204,7 +40553,7 @@ impl CreateAccountResult { } #[must_use] - pub const fn variants() -> [CreateAccountResultCode; 5] { + pub const fn variants() -> [CreateAccountResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -38316,7 +40665,7 @@ pub enum PaymentResultCode { } impl PaymentResultCode { - pub const VARIANTS: [PaymentResultCode; 10] = [ + const _VARIANTS: &[PaymentResultCode] = &[ PaymentResultCode::Success, PaymentResultCode::Malformed, PaymentResultCode::Underfunded, @@ -38328,7 +40677,16 @@ impl PaymentResultCode { PaymentResultCode::LineFull, PaymentResultCode::NoIssuer, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [PaymentResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", @@ -38340,6 +40698,15 @@ impl PaymentResultCode { "LineFull", "NoIssuer", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -38358,7 +40725,7 @@ impl PaymentResultCode { } #[must_use] - pub const fn variants() -> [PaymentResultCode; 10] { + pub const fn variants() -> [PaymentResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -38487,7 +40854,7 @@ impl Default for PaymentResult { } impl PaymentResult { - pub const VARIANTS: [PaymentResultCode; 10] = [ + const _VARIANTS: &[PaymentResultCode] = &[ PaymentResultCode::Success, PaymentResultCode::Malformed, PaymentResultCode::Underfunded, @@ -38499,7 +40866,16 @@ impl PaymentResult { PaymentResultCode::LineFull, PaymentResultCode::NoIssuer, ]; - pub const VARIANTS_STR: [&'static str; 10] = [ + pub const VARIANTS: [PaymentResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", @@ -38511,6 +40887,15 @@ impl PaymentResult { "LineFull", "NoIssuer", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -38546,7 +40931,7 @@ impl PaymentResult { } #[must_use] - pub const fn variants() -> [PaymentResultCode; 10] { + pub const fn variants() -> [PaymentResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -38683,7 +41068,7 @@ pub enum PathPaymentStrictReceiveResultCode { } impl PathPaymentStrictReceiveResultCode { - pub const VARIANTS: [PathPaymentStrictReceiveResultCode; 13] = [ + const _VARIANTS: &[PathPaymentStrictReceiveResultCode] = &[ PathPaymentStrictReceiveResultCode::Success, PathPaymentStrictReceiveResultCode::Malformed, PathPaymentStrictReceiveResultCode::Underfunded, @@ -38698,7 +41083,16 @@ impl PathPaymentStrictReceiveResultCode { PathPaymentStrictReceiveResultCode::OfferCrossSelf, PathPaymentStrictReceiveResultCode::OverSendmax, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [PathPaymentStrictReceiveResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", @@ -38713,6 +41107,15 @@ impl PathPaymentStrictReceiveResultCode { "OfferCrossSelf", "OverSendmax", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -38734,7 +41137,7 @@ impl PathPaymentStrictReceiveResultCode { } #[must_use] - pub const fn variants() -> [PathPaymentStrictReceiveResultCode; 13] { + pub const fn variants() -> [PathPaymentStrictReceiveResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -38985,7 +41388,7 @@ impl Default for PathPaymentStrictReceiveResult { } impl PathPaymentStrictReceiveResult { - pub const VARIANTS: [PathPaymentStrictReceiveResultCode; 13] = [ + const _VARIANTS: &[PathPaymentStrictReceiveResultCode] = &[ PathPaymentStrictReceiveResultCode::Success, PathPaymentStrictReceiveResultCode::Malformed, PathPaymentStrictReceiveResultCode::Underfunded, @@ -39000,7 +41403,16 @@ impl PathPaymentStrictReceiveResult { PathPaymentStrictReceiveResultCode::OfferCrossSelf, PathPaymentStrictReceiveResultCode::OverSendmax, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [PathPaymentStrictReceiveResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", @@ -39015,6 +41427,15 @@ impl PathPaymentStrictReceiveResult { "OfferCrossSelf", "OverSendmax", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -39056,7 +41477,7 @@ impl PathPaymentStrictReceiveResult { } #[must_use] - pub const fn variants() -> [PathPaymentStrictReceiveResultCode; 13] { + pub const fn variants() -> [PathPaymentStrictReceiveResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -39201,7 +41622,7 @@ pub enum PathPaymentStrictSendResultCode { } impl PathPaymentStrictSendResultCode { - pub const VARIANTS: [PathPaymentStrictSendResultCode; 13] = [ + const _VARIANTS: &[PathPaymentStrictSendResultCode] = &[ PathPaymentStrictSendResultCode::Success, PathPaymentStrictSendResultCode::Malformed, PathPaymentStrictSendResultCode::Underfunded, @@ -39216,7 +41637,16 @@ impl PathPaymentStrictSendResultCode { PathPaymentStrictSendResultCode::OfferCrossSelf, PathPaymentStrictSendResultCode::UnderDestmin, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [PathPaymentStrictSendResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", @@ -39231,6 +41661,15 @@ impl PathPaymentStrictSendResultCode { "OfferCrossSelf", "UnderDestmin", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -39252,7 +41691,7 @@ impl PathPaymentStrictSendResultCode { } #[must_use] - pub const fn variants() -> [PathPaymentStrictSendResultCode; 13] { + pub const fn variants() -> [PathPaymentStrictSendResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -39445,7 +41884,7 @@ impl Default for PathPaymentStrictSendResult { } impl PathPaymentStrictSendResult { - pub const VARIANTS: [PathPaymentStrictSendResultCode; 13] = [ + const _VARIANTS: &[PathPaymentStrictSendResultCode] = &[ PathPaymentStrictSendResultCode::Success, PathPaymentStrictSendResultCode::Malformed, PathPaymentStrictSendResultCode::Underfunded, @@ -39460,7 +41899,16 @@ impl PathPaymentStrictSendResult { PathPaymentStrictSendResultCode::OfferCrossSelf, PathPaymentStrictSendResultCode::UnderDestmin, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [PathPaymentStrictSendResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Underfunded", @@ -39475,6 +41923,15 @@ impl PathPaymentStrictSendResult { "OfferCrossSelf", "UnderDestmin", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -39516,7 +41973,7 @@ impl PathPaymentStrictSendResult { } #[must_use] - pub const fn variants() -> [PathPaymentStrictSendResultCode; 13] { + pub const fn variants() -> [PathPaymentStrictSendResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -39660,7 +42117,7 @@ pub enum ManageSellOfferResultCode { } impl ManageSellOfferResultCode { - pub const VARIANTS: [ManageSellOfferResultCode; 13] = [ + const _VARIANTS: &[ManageSellOfferResultCode] = &[ ManageSellOfferResultCode::Success, ManageSellOfferResultCode::Malformed, ManageSellOfferResultCode::SellNoTrust, @@ -39675,7 +42132,16 @@ impl ManageSellOfferResultCode { ManageSellOfferResultCode::NotFound, ManageSellOfferResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [ManageSellOfferResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "SellNoTrust", @@ -39690,6 +42156,15 @@ impl ManageSellOfferResultCode { "NotFound", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -39711,7 +42186,7 @@ impl ManageSellOfferResultCode { } #[must_use] - pub const fn variants() -> [ManageSellOfferResultCode; 13] { + pub const fn variants() -> [ManageSellOfferResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -39820,12 +42295,30 @@ pub enum ManageOfferEffect { } impl ManageOfferEffect { - pub const VARIANTS: [ManageOfferEffect; 3] = [ + const _VARIANTS: &[ManageOfferEffect] = &[ ManageOfferEffect::Created, ManageOfferEffect::Updated, ManageOfferEffect::Deleted, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["Created", "Updated", "Deleted"]; + pub const VARIANTS: [ManageOfferEffect; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Deleted"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -39837,7 +42330,7 @@ impl ManageOfferEffect { } #[must_use] - pub const fn variants() -> [ManageOfferEffect; 3] { + pub const fn variants() -> [ManageOfferEffect; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -39945,12 +42438,30 @@ impl Default for ManageOfferSuccessResultOffer { } impl ManageOfferSuccessResultOffer { - pub const VARIANTS: [ManageOfferEffect; 3] = [ + const _VARIANTS: &[ManageOfferEffect] = &[ ManageOfferEffect::Created, ManageOfferEffect::Updated, ManageOfferEffect::Deleted, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["Created", "Updated", "Deleted"]; + pub const VARIANTS: [ManageOfferEffect; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Deleted"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -39972,7 +42483,7 @@ impl ManageOfferSuccessResultOffer { } #[must_use] - pub const fn variants() -> [ManageOfferEffect; 3] { + pub const fn variants() -> [ManageOfferEffect; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -40151,7 +42662,7 @@ impl Default for ManageSellOfferResult { } impl ManageSellOfferResult { - pub const VARIANTS: [ManageSellOfferResultCode; 13] = [ + const _VARIANTS: &[ManageSellOfferResultCode] = &[ ManageSellOfferResultCode::Success, ManageSellOfferResultCode::Malformed, ManageSellOfferResultCode::SellNoTrust, @@ -40166,7 +42677,16 @@ impl ManageSellOfferResult { ManageSellOfferResultCode::NotFound, ManageSellOfferResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [ManageSellOfferResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "SellNoTrust", @@ -40181,6 +42701,15 @@ impl ManageSellOfferResult { "NotFound", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -40222,7 +42751,7 @@ impl ManageSellOfferResult { } #[must_use] - pub const fn variants() -> [ManageSellOfferResultCode; 13] { + pub const fn variants() -> [ManageSellOfferResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -40363,7 +42892,7 @@ pub enum ManageBuyOfferResultCode { } impl ManageBuyOfferResultCode { - pub const VARIANTS: [ManageBuyOfferResultCode; 13] = [ + const _VARIANTS: &[ManageBuyOfferResultCode] = &[ ManageBuyOfferResultCode::Success, ManageBuyOfferResultCode::Malformed, ManageBuyOfferResultCode::SellNoTrust, @@ -40378,7 +42907,16 @@ impl ManageBuyOfferResultCode { ManageBuyOfferResultCode::NotFound, ManageBuyOfferResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [ManageBuyOfferResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "SellNoTrust", @@ -40393,6 +42931,15 @@ impl ManageBuyOfferResultCode { "NotFound", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -40414,7 +42961,7 @@ impl ManageBuyOfferResultCode { } #[must_use] - pub const fn variants() -> [ManageBuyOfferResultCode; 13] { + pub const fn variants() -> [ManageBuyOfferResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -40552,7 +43099,7 @@ impl Default for ManageBuyOfferResult { } impl ManageBuyOfferResult { - pub const VARIANTS: [ManageBuyOfferResultCode; 13] = [ + const _VARIANTS: &[ManageBuyOfferResultCode] = &[ ManageBuyOfferResultCode::Success, ManageBuyOfferResultCode::Malformed, ManageBuyOfferResultCode::SellNoTrust, @@ -40567,7 +43114,16 @@ impl ManageBuyOfferResult { ManageBuyOfferResultCode::NotFound, ManageBuyOfferResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 13] = [ + pub const VARIANTS: [ManageBuyOfferResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "SellNoTrust", @@ -40582,6 +43138,15 @@ impl ManageBuyOfferResult { "NotFound", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -40623,7 +43188,7 @@ impl ManageBuyOfferResult { } #[must_use] - pub const fn variants() -> [ManageBuyOfferResultCode; 13] { + pub const fn variants() -> [ManageBuyOfferResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -40755,7 +43320,7 @@ pub enum SetOptionsResultCode { } impl SetOptionsResultCode { - pub const VARIANTS: [SetOptionsResultCode; 11] = [ + const _VARIANTS: &[SetOptionsResultCode] = &[ SetOptionsResultCode::Success, SetOptionsResultCode::LowReserve, SetOptionsResultCode::TooManySigners, @@ -40768,7 +43333,16 @@ impl SetOptionsResultCode { SetOptionsResultCode::InvalidHomeDomain, SetOptionsResultCode::AuthRevocableRequired, ]; - pub const VARIANTS_STR: [&'static str; 11] = [ + pub const VARIANTS: [SetOptionsResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "LowReserve", "TooManySigners", @@ -40781,6 +43355,15 @@ impl SetOptionsResultCode { "InvalidHomeDomain", "AuthRevocableRequired", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -40800,7 +43383,7 @@ impl SetOptionsResultCode { } #[must_use] - pub const fn variants() -> [SetOptionsResultCode; 11] { + pub const fn variants() -> [SetOptionsResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -40932,7 +43515,7 @@ impl Default for SetOptionsResult { } impl SetOptionsResult { - pub const VARIANTS: [SetOptionsResultCode; 11] = [ + const _VARIANTS: &[SetOptionsResultCode] = &[ SetOptionsResultCode::Success, SetOptionsResultCode::LowReserve, SetOptionsResultCode::TooManySigners, @@ -40945,7 +43528,16 @@ impl SetOptionsResult { SetOptionsResultCode::InvalidHomeDomain, SetOptionsResultCode::AuthRevocableRequired, ]; - pub const VARIANTS_STR: [&'static str; 11] = [ + pub const VARIANTS: [SetOptionsResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "LowReserve", "TooManySigners", @@ -40958,6 +43550,15 @@ impl SetOptionsResult { "InvalidHomeDomain", "AuthRevocableRequired", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -40995,7 +43596,7 @@ impl SetOptionsResult { } #[must_use] - pub const fn variants() -> [SetOptionsResultCode; 11] { + pub const fn variants() -> [SetOptionsResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -41120,7 +43721,7 @@ pub enum ChangeTrustResultCode { } impl ChangeTrustResultCode { - pub const VARIANTS: [ChangeTrustResultCode; 9] = [ + const _VARIANTS: &[ChangeTrustResultCode] = &[ ChangeTrustResultCode::Success, ChangeTrustResultCode::Malformed, ChangeTrustResultCode::NoIssuer, @@ -41131,7 +43732,16 @@ impl ChangeTrustResultCode { ChangeTrustResultCode::CannotDelete, ChangeTrustResultCode::NotAuthMaintainLiabilities, ]; - pub const VARIANTS_STR: [&'static str; 9] = [ + pub const VARIANTS: [ChangeTrustResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoIssuer", @@ -41142,6 +43752,15 @@ impl ChangeTrustResultCode { "CannotDelete", "NotAuthMaintainLiabilities", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -41159,7 +43778,7 @@ impl ChangeTrustResultCode { } #[must_use] - pub const fn variants() -> [ChangeTrustResultCode; 9] { + pub const fn variants() -> [ChangeTrustResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -41285,7 +43904,7 @@ impl Default for ChangeTrustResult { } impl ChangeTrustResult { - pub const VARIANTS: [ChangeTrustResultCode; 9] = [ + const _VARIANTS: &[ChangeTrustResultCode] = &[ ChangeTrustResultCode::Success, ChangeTrustResultCode::Malformed, ChangeTrustResultCode::NoIssuer, @@ -41296,7 +43915,16 @@ impl ChangeTrustResult { ChangeTrustResultCode::CannotDelete, ChangeTrustResultCode::NotAuthMaintainLiabilities, ]; - pub const VARIANTS_STR: [&'static str; 9] = [ + pub const VARIANTS: [ChangeTrustResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoIssuer", @@ -41307,6 +43935,15 @@ impl ChangeTrustResult { "CannotDelete", "NotAuthMaintainLiabilities", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -41340,7 +43977,7 @@ impl ChangeTrustResult { } #[must_use] - pub const fn variants() -> [ChangeTrustResultCode; 9] { + pub const fn variants() -> [ChangeTrustResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -41457,7 +44094,7 @@ pub enum AllowTrustResultCode { } impl AllowTrustResultCode { - pub const VARIANTS: [AllowTrustResultCode; 7] = [ + const _VARIANTS: &[AllowTrustResultCode] = &[ AllowTrustResultCode::Success, AllowTrustResultCode::Malformed, AllowTrustResultCode::NoTrustLine, @@ -41466,7 +44103,16 @@ impl AllowTrustResultCode { AllowTrustResultCode::SelfNotAllowed, AllowTrustResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [AllowTrustResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrustLine", @@ -41475,6 +44121,15 @@ impl AllowTrustResultCode { "SelfNotAllowed", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -41490,7 +44145,7 @@ impl AllowTrustResultCode { } #[must_use] - pub const fn variants() -> [AllowTrustResultCode; 7] { + pub const fn variants() -> [AllowTrustResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -41610,7 +44265,7 @@ impl Default for AllowTrustResult { } impl AllowTrustResult { - pub const VARIANTS: [AllowTrustResultCode; 7] = [ + const _VARIANTS: &[AllowTrustResultCode] = &[ AllowTrustResultCode::Success, AllowTrustResultCode::Malformed, AllowTrustResultCode::NoTrustLine, @@ -41619,7 +44274,16 @@ impl AllowTrustResult { AllowTrustResultCode::SelfNotAllowed, AllowTrustResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [AllowTrustResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrustLine", @@ -41628,6 +44292,15 @@ impl AllowTrustResult { "SelfNotAllowed", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -41657,7 +44330,7 @@ impl AllowTrustResult { } #[must_use] - pub const fn variants() -> [AllowTrustResultCode; 7] { + pub const fn variants() -> [AllowTrustResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -41769,7 +44442,7 @@ pub enum AccountMergeResultCode { } impl AccountMergeResultCode { - pub const VARIANTS: [AccountMergeResultCode; 8] = [ + const _VARIANTS: &[AccountMergeResultCode] = &[ AccountMergeResultCode::Success, AccountMergeResultCode::Malformed, AccountMergeResultCode::NoAccount, @@ -41779,7 +44452,16 @@ impl AccountMergeResultCode { AccountMergeResultCode::DestFull, AccountMergeResultCode::IsSponsor, ]; - pub const VARIANTS_STR: [&'static str; 8] = [ + pub const VARIANTS: [AccountMergeResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoAccount", @@ -41789,6 +44471,15 @@ impl AccountMergeResultCode { "DestFull", "IsSponsor", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -41805,7 +44496,7 @@ impl AccountMergeResultCode { } #[must_use] - pub const fn variants() -> [AccountMergeResultCode; 8] { + pub const fn variants() -> [AccountMergeResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -41934,7 +44625,7 @@ impl Default for AccountMergeResult { } impl AccountMergeResult { - pub const VARIANTS: [AccountMergeResultCode; 8] = [ + const _VARIANTS: &[AccountMergeResultCode] = &[ AccountMergeResultCode::Success, AccountMergeResultCode::Malformed, AccountMergeResultCode::NoAccount, @@ -41944,7 +44635,16 @@ impl AccountMergeResult { AccountMergeResultCode::DestFull, AccountMergeResultCode::IsSponsor, ]; - pub const VARIANTS_STR: [&'static str; 8] = [ + pub const VARIANTS: [AccountMergeResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoAccount", @@ -41954,6 +44654,15 @@ impl AccountMergeResult { "DestFull", "IsSponsor", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -41985,7 +44694,7 @@ impl AccountMergeResult { } #[must_use] - pub const fn variants() -> [AccountMergeResultCode; 8] { + pub const fn variants() -> [AccountMergeResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -42086,9 +44795,27 @@ pub enum InflationResultCode { } impl InflationResultCode { - pub const VARIANTS: [InflationResultCode; 2] = - [InflationResultCode::Success, InflationResultCode::NotTime]; - pub const VARIANTS_STR: [&'static str; 2] = ["Success", "NotTime"]; + const _VARIANTS: &[InflationResultCode] = + &[InflationResultCode::Success, InflationResultCode::NotTime]; + pub const VARIANTS: [InflationResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "NotTime"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -42099,7 +44826,7 @@ impl InflationResultCode { } #[must_use] - pub const fn variants() -> [InflationResultCode; 2] { + pub const fn variants() -> [InflationResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -42257,9 +44984,27 @@ impl Default for InflationResult { } impl InflationResult { - pub const VARIANTS: [InflationResultCode; 2] = - [InflationResultCode::Success, InflationResultCode::NotTime]; - pub const VARIANTS_STR: [&'static str; 2] = ["Success", "NotTime"]; + const _VARIANTS: &[InflationResultCode] = + &[InflationResultCode::Success, InflationResultCode::NotTime]; + pub const VARIANTS: [InflationResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "NotTime"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -42279,7 +45024,7 @@ impl InflationResult { } #[must_use] - pub const fn variants() -> [InflationResultCode; 2] { + pub const fn variants() -> [InflationResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -42378,20 +45123,38 @@ pub enum ManageDataResultCode { } impl ManageDataResultCode { - pub const VARIANTS: [ManageDataResultCode; 5] = [ + const _VARIANTS: &[ManageDataResultCode] = &[ ManageDataResultCode::Success, ManageDataResultCode::NotSupportedYet, ManageDataResultCode::NameNotFound, ManageDataResultCode::LowReserve, ManageDataResultCode::InvalidName, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [ManageDataResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "NotSupportedYet", "NameNotFound", "LowReserve", "InvalidName", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -42405,7 +45168,7 @@ impl ManageDataResultCode { } #[must_use] - pub const fn variants() -> [ManageDataResultCode; 5] { + pub const fn variants() -> [ManageDataResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -42519,20 +45282,38 @@ impl Default for ManageDataResult { } impl ManageDataResult { - pub const VARIANTS: [ManageDataResultCode; 5] = [ + const _VARIANTS: &[ManageDataResultCode] = &[ ManageDataResultCode::Success, ManageDataResultCode::NotSupportedYet, ManageDataResultCode::NameNotFound, ManageDataResultCode::LowReserve, ManageDataResultCode::InvalidName, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [ManageDataResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "NotSupportedYet", "NameNotFound", "LowReserve", "InvalidName", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -42558,7 +45339,7 @@ impl ManageDataResult { } #[must_use] - pub const fn variants() -> [ManageDataResultCode; 5] { + pub const fn variants() -> [ManageDataResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -42653,11 +45434,29 @@ pub enum BumpSequenceResultCode { } impl BumpSequenceResultCode { - pub const VARIANTS: [BumpSequenceResultCode; 2] = [ + const _VARIANTS: &[BumpSequenceResultCode] = &[ BumpSequenceResultCode::Success, BumpSequenceResultCode::BadSeq, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Success", "BadSeq"]; + pub const VARIANTS: [BumpSequenceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "BadSeq"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -42668,7 +45467,7 @@ impl BumpSequenceResultCode { } #[must_use] - pub const fn variants() -> [BumpSequenceResultCode; 2] { + pub const fn variants() -> [BumpSequenceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -42773,11 +45572,29 @@ impl Default for BumpSequenceResult { } impl BumpSequenceResult { - pub const VARIANTS: [BumpSequenceResultCode; 2] = [ + const _VARIANTS: &[BumpSequenceResultCode] = &[ BumpSequenceResultCode::Success, BumpSequenceResultCode::BadSeq, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Success", "BadSeq"]; + pub const VARIANTS: [BumpSequenceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "BadSeq"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -42797,7 +45614,7 @@ impl BumpSequenceResult { } #[must_use] - pub const fn variants() -> [BumpSequenceResultCode; 2] { + pub const fn variants() -> [BumpSequenceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -42892,7 +45709,7 @@ pub enum CreateClaimableBalanceResultCode { } impl CreateClaimableBalanceResultCode { - pub const VARIANTS: [CreateClaimableBalanceResultCode; 6] = [ + const _VARIANTS: &[CreateClaimableBalanceResultCode] = &[ CreateClaimableBalanceResultCode::Success, CreateClaimableBalanceResultCode::Malformed, CreateClaimableBalanceResultCode::LowReserve, @@ -42900,7 +45717,16 @@ impl CreateClaimableBalanceResultCode { CreateClaimableBalanceResultCode::NotAuthorized, CreateClaimableBalanceResultCode::Underfunded, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [CreateClaimableBalanceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "LowReserve", @@ -42908,6 +45734,15 @@ impl CreateClaimableBalanceResultCode { "NotAuthorized", "Underfunded", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -42922,7 +45757,7 @@ impl CreateClaimableBalanceResultCode { } #[must_use] - pub const fn variants() -> [CreateClaimableBalanceResultCode; 6] { + pub const fn variants() -> [CreateClaimableBalanceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43040,7 +45875,7 @@ impl Default for CreateClaimableBalanceResult { } impl CreateClaimableBalanceResult { - pub const VARIANTS: [CreateClaimableBalanceResultCode; 6] = [ + const _VARIANTS: &[CreateClaimableBalanceResultCode] = &[ CreateClaimableBalanceResultCode::Success, CreateClaimableBalanceResultCode::Malformed, CreateClaimableBalanceResultCode::LowReserve, @@ -43048,7 +45883,16 @@ impl CreateClaimableBalanceResult { CreateClaimableBalanceResultCode::NotAuthorized, CreateClaimableBalanceResultCode::Underfunded, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [CreateClaimableBalanceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "LowReserve", @@ -43056,6 +45900,15 @@ impl CreateClaimableBalanceResult { "NotAuthorized", "Underfunded", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -43083,7 +45936,7 @@ impl CreateClaimableBalanceResult { } #[must_use] - pub const fn variants() -> [CreateClaimableBalanceResultCode; 6] { + pub const fn variants() -> [CreateClaimableBalanceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43191,7 +46044,7 @@ pub enum ClaimClaimableBalanceResultCode { } impl ClaimClaimableBalanceResultCode { - pub const VARIANTS: [ClaimClaimableBalanceResultCode; 7] = [ + const _VARIANTS: &[ClaimClaimableBalanceResultCode] = &[ ClaimClaimableBalanceResultCode::Success, ClaimClaimableBalanceResultCode::DoesNotExist, ClaimClaimableBalanceResultCode::CannotClaim, @@ -43200,7 +46053,16 @@ impl ClaimClaimableBalanceResultCode { ClaimClaimableBalanceResultCode::NotAuthorized, ClaimClaimableBalanceResultCode::TrustlineFrozen, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [ClaimClaimableBalanceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "DoesNotExist", "CannotClaim", @@ -43209,6 +46071,15 @@ impl ClaimClaimableBalanceResultCode { "NotAuthorized", "TrustlineFrozen", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -43224,7 +46095,7 @@ impl ClaimClaimableBalanceResultCode { } #[must_use] - pub const fn variants() -> [ClaimClaimableBalanceResultCode; 7] { + pub const fn variants() -> [ClaimClaimableBalanceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43344,7 +46215,7 @@ impl Default for ClaimClaimableBalanceResult { } impl ClaimClaimableBalanceResult { - pub const VARIANTS: [ClaimClaimableBalanceResultCode; 7] = [ + const _VARIANTS: &[ClaimClaimableBalanceResultCode] = &[ ClaimClaimableBalanceResultCode::Success, ClaimClaimableBalanceResultCode::DoesNotExist, ClaimClaimableBalanceResultCode::CannotClaim, @@ -43353,7 +46224,16 @@ impl ClaimClaimableBalanceResult { ClaimClaimableBalanceResultCode::NotAuthorized, ClaimClaimableBalanceResultCode::TrustlineFrozen, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [ClaimClaimableBalanceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "DoesNotExist", "CannotClaim", @@ -43362,6 +46242,15 @@ impl ClaimClaimableBalanceResult { "NotAuthorized", "TrustlineFrozen", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -43391,7 +46280,7 @@ impl ClaimClaimableBalanceResult { } #[must_use] - pub const fn variants() -> [ClaimClaimableBalanceResultCode; 7] { + pub const fn variants() -> [ClaimClaimableBalanceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43496,14 +46385,31 @@ pub enum BeginSponsoringFutureReservesResultCode { } impl BeginSponsoringFutureReservesResultCode { - pub const VARIANTS: [BeginSponsoringFutureReservesResultCode; 4] = [ + const _VARIANTS: &[BeginSponsoringFutureReservesResultCode] = &[ BeginSponsoringFutureReservesResultCode::Success, BeginSponsoringFutureReservesResultCode::Malformed, BeginSponsoringFutureReservesResultCode::AlreadySponsored, BeginSponsoringFutureReservesResultCode::Recursive, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Success", "Malformed", "AlreadySponsored", "Recursive"]; + pub const VARIANTS: [BeginSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "Malformed", "AlreadySponsored", "Recursive"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -43516,7 +46422,7 @@ impl BeginSponsoringFutureReservesResultCode { } #[must_use] - pub const fn variants() -> [BeginSponsoringFutureReservesResultCode; 4] { + pub const fn variants() -> [BeginSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43628,14 +46534,31 @@ impl Default for BeginSponsoringFutureReservesResult { } impl BeginSponsoringFutureReservesResult { - pub const VARIANTS: [BeginSponsoringFutureReservesResultCode; 4] = [ + const _VARIANTS: &[BeginSponsoringFutureReservesResultCode] = &[ BeginSponsoringFutureReservesResultCode::Success, BeginSponsoringFutureReservesResultCode::Malformed, BeginSponsoringFutureReservesResultCode::AlreadySponsored, BeginSponsoringFutureReservesResultCode::Recursive, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Success", "Malformed", "AlreadySponsored", "Recursive"]; + pub const VARIANTS: [BeginSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "Malformed", "AlreadySponsored", "Recursive"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -43659,7 +46582,7 @@ impl BeginSponsoringFutureReservesResult { } #[must_use] - pub const fn variants() -> [BeginSponsoringFutureReservesResultCode; 4] { + pub const fn variants() -> [BeginSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43754,11 +46677,29 @@ pub enum EndSponsoringFutureReservesResultCode { } impl EndSponsoringFutureReservesResultCode { - pub const VARIANTS: [EndSponsoringFutureReservesResultCode; 2] = [ + const _VARIANTS: &[EndSponsoringFutureReservesResultCode] = &[ EndSponsoringFutureReservesResultCode::Success, EndSponsoringFutureReservesResultCode::NotSponsored, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Success", "NotSponsored"]; + pub const VARIANTS: [EndSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "NotSponsored"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -43769,7 +46710,7 @@ impl EndSponsoringFutureReservesResultCode { } #[must_use] - pub const fn variants() -> [EndSponsoringFutureReservesResultCode; 2] { + pub const fn variants() -> [EndSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43875,11 +46816,29 @@ impl Default for EndSponsoringFutureReservesResult { } impl EndSponsoringFutureReservesResult { - pub const VARIANTS: [EndSponsoringFutureReservesResultCode; 2] = [ + const _VARIANTS: &[EndSponsoringFutureReservesResultCode] = &[ EndSponsoringFutureReservesResultCode::Success, EndSponsoringFutureReservesResultCode::NotSponsored, ]; - pub const VARIANTS_STR: [&'static str; 2] = ["Success", "NotSponsored"]; + pub const VARIANTS: [EndSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "NotSponsored"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -43899,7 +46858,7 @@ impl EndSponsoringFutureReservesResult { } #[must_use] - pub const fn variants() -> [EndSponsoringFutureReservesResultCode; 2] { + pub const fn variants() -> [EndSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -43998,7 +46957,7 @@ pub enum RevokeSponsorshipResultCode { } impl RevokeSponsorshipResultCode { - pub const VARIANTS: [RevokeSponsorshipResultCode; 6] = [ + const _VARIANTS: &[RevokeSponsorshipResultCode] = &[ RevokeSponsorshipResultCode::Success, RevokeSponsorshipResultCode::DoesNotExist, RevokeSponsorshipResultCode::NotSponsor, @@ -44006,7 +46965,16 @@ impl RevokeSponsorshipResultCode { RevokeSponsorshipResultCode::OnlyTransferable, RevokeSponsorshipResultCode::Malformed, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [RevokeSponsorshipResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "DoesNotExist", "NotSponsor", @@ -44014,6 +46982,15 @@ impl RevokeSponsorshipResultCode { "OnlyTransferable", "Malformed", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -44028,7 +47005,7 @@ impl RevokeSponsorshipResultCode { } #[must_use] - pub const fn variants() -> [RevokeSponsorshipResultCode; 6] { + pub const fn variants() -> [RevokeSponsorshipResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -44145,7 +47122,7 @@ impl Default for RevokeSponsorshipResult { } impl RevokeSponsorshipResult { - pub const VARIANTS: [RevokeSponsorshipResultCode; 6] = [ + const _VARIANTS: &[RevokeSponsorshipResultCode] = &[ RevokeSponsorshipResultCode::Success, RevokeSponsorshipResultCode::DoesNotExist, RevokeSponsorshipResultCode::NotSponsor, @@ -44153,7 +47130,16 @@ impl RevokeSponsorshipResult { RevokeSponsorshipResultCode::OnlyTransferable, RevokeSponsorshipResultCode::Malformed, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [RevokeSponsorshipResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "DoesNotExist", "NotSponsor", @@ -44161,6 +47147,15 @@ impl RevokeSponsorshipResult { "OnlyTransferable", "Malformed", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -44188,7 +47183,7 @@ impl RevokeSponsorshipResult { } #[must_use] - pub const fn variants() -> [RevokeSponsorshipResultCode; 6] { + pub const fn variants() -> [RevokeSponsorshipResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -44293,20 +47288,38 @@ pub enum ClawbackResultCode { } impl ClawbackResultCode { - pub const VARIANTS: [ClawbackResultCode; 5] = [ + const _VARIANTS: &[ClawbackResultCode] = &[ ClawbackResultCode::Success, ClawbackResultCode::Malformed, ClawbackResultCode::NotClawbackEnabled, ClawbackResultCode::NoTrust, ClawbackResultCode::Underfunded, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [ClawbackResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NotClawbackEnabled", "NoTrust", "Underfunded", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -44320,7 +47333,7 @@ impl ClawbackResultCode { } #[must_use] - pub const fn variants() -> [ClawbackResultCode; 5] { + pub const fn variants() -> [ClawbackResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -44434,20 +47447,38 @@ impl Default for ClawbackResult { } impl ClawbackResult { - pub const VARIANTS: [ClawbackResultCode; 5] = [ + const _VARIANTS: &[ClawbackResultCode] = &[ ClawbackResultCode::Success, ClawbackResultCode::Malformed, ClawbackResultCode::NotClawbackEnabled, ClawbackResultCode::NoTrust, ClawbackResultCode::Underfunded, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [ClawbackResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NotClawbackEnabled", "NoTrust", "Underfunded", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -44473,7 +47504,7 @@ impl ClawbackResult { } #[must_use] - pub const fn variants() -> [ClawbackResultCode; 5] { + pub const fn variants() -> [ClawbackResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -44573,14 +47604,31 @@ pub enum ClawbackClaimableBalanceResultCode { } impl ClawbackClaimableBalanceResultCode { - pub const VARIANTS: [ClawbackClaimableBalanceResultCode; 4] = [ + const _VARIANTS: &[ClawbackClaimableBalanceResultCode] = &[ ClawbackClaimableBalanceResultCode::Success, ClawbackClaimableBalanceResultCode::DoesNotExist, ClawbackClaimableBalanceResultCode::NotIssuer, ClawbackClaimableBalanceResultCode::NotClawbackEnabled, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Success", "DoesNotExist", "NotIssuer", "NotClawbackEnabled"]; + pub const VARIANTS: [ClawbackClaimableBalanceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "DoesNotExist", "NotIssuer", "NotClawbackEnabled"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -44593,7 +47641,7 @@ impl ClawbackClaimableBalanceResultCode { } #[must_use] - pub const fn variants() -> [ClawbackClaimableBalanceResultCode; 4] { + pub const fn variants() -> [ClawbackClaimableBalanceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -44705,14 +47753,31 @@ impl Default for ClawbackClaimableBalanceResult { } impl ClawbackClaimableBalanceResult { - pub const VARIANTS: [ClawbackClaimableBalanceResultCode; 4] = [ + const _VARIANTS: &[ClawbackClaimableBalanceResultCode] = &[ ClawbackClaimableBalanceResultCode::Success, ClawbackClaimableBalanceResultCode::DoesNotExist, ClawbackClaimableBalanceResultCode::NotIssuer, ClawbackClaimableBalanceResultCode::NotClawbackEnabled, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Success", "DoesNotExist", "NotIssuer", "NotClawbackEnabled"]; + pub const VARIANTS: [ClawbackClaimableBalanceResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Success", "DoesNotExist", "NotIssuer", "NotClawbackEnabled"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -44736,7 +47801,7 @@ impl ClawbackClaimableBalanceResult { } #[must_use] - pub const fn variants() -> [ClawbackClaimableBalanceResultCode; 4] { + pub const fn variants() -> [ClawbackClaimableBalanceResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -44840,7 +47905,7 @@ pub enum SetTrustLineFlagsResultCode { } impl SetTrustLineFlagsResultCode { - pub const VARIANTS: [SetTrustLineFlagsResultCode; 6] = [ + const _VARIANTS: &[SetTrustLineFlagsResultCode] = &[ SetTrustLineFlagsResultCode::Success, SetTrustLineFlagsResultCode::Malformed, SetTrustLineFlagsResultCode::NoTrustLine, @@ -44848,7 +47913,16 @@ impl SetTrustLineFlagsResultCode { SetTrustLineFlagsResultCode::InvalidState, SetTrustLineFlagsResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [SetTrustLineFlagsResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrustLine", @@ -44856,6 +47930,15 @@ impl SetTrustLineFlagsResultCode { "InvalidState", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -44870,7 +47953,7 @@ impl SetTrustLineFlagsResultCode { } #[must_use] - pub const fn variants() -> [SetTrustLineFlagsResultCode; 6] { + pub const fn variants() -> [SetTrustLineFlagsResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -44987,7 +48070,7 @@ impl Default for SetTrustLineFlagsResult { } impl SetTrustLineFlagsResult { - pub const VARIANTS: [SetTrustLineFlagsResultCode; 6] = [ + const _VARIANTS: &[SetTrustLineFlagsResultCode] = &[ SetTrustLineFlagsResultCode::Success, SetTrustLineFlagsResultCode::Malformed, SetTrustLineFlagsResultCode::NoTrustLine, @@ -44995,7 +48078,16 @@ impl SetTrustLineFlagsResult { SetTrustLineFlagsResultCode::InvalidState, SetTrustLineFlagsResultCode::LowReserve, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [SetTrustLineFlagsResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrustLine", @@ -45003,6 +48095,15 @@ impl SetTrustLineFlagsResult { "InvalidState", "LowReserve", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -45030,7 +48131,7 @@ impl SetTrustLineFlagsResult { } #[must_use] - pub const fn variants() -> [SetTrustLineFlagsResultCode; 6] { + pub const fn variants() -> [SetTrustLineFlagsResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -45148,7 +48249,7 @@ pub enum LiquidityPoolDepositResultCode { } impl LiquidityPoolDepositResultCode { - pub const VARIANTS: [LiquidityPoolDepositResultCode; 9] = [ + const _VARIANTS: &[LiquidityPoolDepositResultCode] = &[ LiquidityPoolDepositResultCode::Success, LiquidityPoolDepositResultCode::Malformed, LiquidityPoolDepositResultCode::NoTrust, @@ -45159,7 +48260,16 @@ impl LiquidityPoolDepositResultCode { LiquidityPoolDepositResultCode::PoolFull, LiquidityPoolDepositResultCode::TrustlineFrozen, ]; - pub const VARIANTS_STR: [&'static str; 9] = [ + pub const VARIANTS: [LiquidityPoolDepositResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrust", @@ -45170,6 +48280,15 @@ impl LiquidityPoolDepositResultCode { "PoolFull", "TrustlineFrozen", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -45187,7 +48306,7 @@ impl LiquidityPoolDepositResultCode { } #[must_use] - pub const fn variants() -> [LiquidityPoolDepositResultCode; 9] { + pub const fn variants() -> [LiquidityPoolDepositResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -45313,7 +48432,7 @@ impl Default for LiquidityPoolDepositResult { } impl LiquidityPoolDepositResult { - pub const VARIANTS: [LiquidityPoolDepositResultCode; 9] = [ + const _VARIANTS: &[LiquidityPoolDepositResultCode] = &[ LiquidityPoolDepositResultCode::Success, LiquidityPoolDepositResultCode::Malformed, LiquidityPoolDepositResultCode::NoTrust, @@ -45324,7 +48443,16 @@ impl LiquidityPoolDepositResult { LiquidityPoolDepositResultCode::PoolFull, LiquidityPoolDepositResultCode::TrustlineFrozen, ]; - pub const VARIANTS_STR: [&'static str; 9] = [ + pub const VARIANTS: [LiquidityPoolDepositResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrust", @@ -45335,6 +48463,15 @@ impl LiquidityPoolDepositResult { "PoolFull", "TrustlineFrozen", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -45368,7 +48505,7 @@ impl LiquidityPoolDepositResult { } #[must_use] - pub const fn variants() -> [LiquidityPoolDepositResultCode; 9] { + pub const fn variants() -> [LiquidityPoolDepositResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -45487,7 +48624,7 @@ pub enum LiquidityPoolWithdrawResultCode { } impl LiquidityPoolWithdrawResultCode { - pub const VARIANTS: [LiquidityPoolWithdrawResultCode; 7] = [ + const _VARIANTS: &[LiquidityPoolWithdrawResultCode] = &[ LiquidityPoolWithdrawResultCode::Success, LiquidityPoolWithdrawResultCode::Malformed, LiquidityPoolWithdrawResultCode::NoTrust, @@ -45496,7 +48633,16 @@ impl LiquidityPoolWithdrawResultCode { LiquidityPoolWithdrawResultCode::UnderMinimum, LiquidityPoolWithdrawResultCode::TrustlineFrozen, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [LiquidityPoolWithdrawResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrust", @@ -45505,6 +48651,15 @@ impl LiquidityPoolWithdrawResultCode { "UnderMinimum", "TrustlineFrozen", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -45520,7 +48675,7 @@ impl LiquidityPoolWithdrawResultCode { } #[must_use] - pub const fn variants() -> [LiquidityPoolWithdrawResultCode; 7] { + pub const fn variants() -> [LiquidityPoolWithdrawResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -45640,7 +48795,7 @@ impl Default for LiquidityPoolWithdrawResult { } impl LiquidityPoolWithdrawResult { - pub const VARIANTS: [LiquidityPoolWithdrawResultCode; 7] = [ + const _VARIANTS: &[LiquidityPoolWithdrawResultCode] = &[ LiquidityPoolWithdrawResultCode::Success, LiquidityPoolWithdrawResultCode::Malformed, LiquidityPoolWithdrawResultCode::NoTrust, @@ -45649,7 +48804,16 @@ impl LiquidityPoolWithdrawResult { LiquidityPoolWithdrawResultCode::UnderMinimum, LiquidityPoolWithdrawResultCode::TrustlineFrozen, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [LiquidityPoolWithdrawResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "NoTrust", @@ -45658,6 +48822,15 @@ impl LiquidityPoolWithdrawResult { "UnderMinimum", "TrustlineFrozen", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -45687,7 +48860,7 @@ impl LiquidityPoolWithdrawResult { } #[must_use] - pub const fn variants() -> [LiquidityPoolWithdrawResultCode; 7] { + pub const fn variants() -> [LiquidityPoolWithdrawResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -45796,7 +48969,7 @@ pub enum InvokeHostFunctionResultCode { } impl InvokeHostFunctionResultCode { - pub const VARIANTS: [InvokeHostFunctionResultCode; 6] = [ + const _VARIANTS: &[InvokeHostFunctionResultCode] = &[ InvokeHostFunctionResultCode::Success, InvokeHostFunctionResultCode::Malformed, InvokeHostFunctionResultCode::Trapped, @@ -45804,7 +48977,16 @@ impl InvokeHostFunctionResultCode { InvokeHostFunctionResultCode::EntryArchived, InvokeHostFunctionResultCode::InsufficientRefundableFee, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [InvokeHostFunctionResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Trapped", @@ -45812,6 +48994,15 @@ impl InvokeHostFunctionResultCode { "EntryArchived", "InsufficientRefundableFee", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -45826,7 +49017,7 @@ impl InvokeHostFunctionResultCode { } #[must_use] - pub const fn variants() -> [InvokeHostFunctionResultCode; 6] { + pub const fn variants() -> [InvokeHostFunctionResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -45943,7 +49134,7 @@ impl Default for InvokeHostFunctionResult { } impl InvokeHostFunctionResult { - pub const VARIANTS: [InvokeHostFunctionResultCode; 6] = [ + const _VARIANTS: &[InvokeHostFunctionResultCode] = &[ InvokeHostFunctionResultCode::Success, InvokeHostFunctionResultCode::Malformed, InvokeHostFunctionResultCode::Trapped, @@ -45951,7 +49142,16 @@ impl InvokeHostFunctionResult { InvokeHostFunctionResultCode::EntryArchived, InvokeHostFunctionResultCode::InsufficientRefundableFee, ]; - pub const VARIANTS_STR: [&'static str; 6] = [ + pub const VARIANTS: [InvokeHostFunctionResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "Trapped", @@ -45959,6 +49159,15 @@ impl InvokeHostFunctionResult { "EntryArchived", "InsufficientRefundableFee", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -45988,7 +49197,7 @@ impl InvokeHostFunctionResult { } #[must_use] - pub const fn variants() -> [InvokeHostFunctionResultCode; 6] { + pub const fn variants() -> [InvokeHostFunctionResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -46093,18 +49302,36 @@ pub enum ExtendFootprintTtlResultCode { } impl ExtendFootprintTtlResultCode { - pub const VARIANTS: [ExtendFootprintTtlResultCode; 4] = [ + const _VARIANTS: &[ExtendFootprintTtlResultCode] = &[ ExtendFootprintTtlResultCode::Success, ExtendFootprintTtlResultCode::Malformed, ExtendFootprintTtlResultCode::ResourceLimitExceeded, ExtendFootprintTtlResultCode::InsufficientRefundableFee, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [ExtendFootprintTtlResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "ResourceLimitExceeded", "InsufficientRefundableFee", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -46117,7 +49344,7 @@ impl ExtendFootprintTtlResultCode { } #[must_use] - pub const fn variants() -> [ExtendFootprintTtlResultCode; 4] { + pub const fn variants() -> [ExtendFootprintTtlResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -46228,18 +49455,36 @@ impl Default for ExtendFootprintTtlResult { } impl ExtendFootprintTtlResult { - pub const VARIANTS: [ExtendFootprintTtlResultCode; 4] = [ + const _VARIANTS: &[ExtendFootprintTtlResultCode] = &[ ExtendFootprintTtlResultCode::Success, ExtendFootprintTtlResultCode::Malformed, ExtendFootprintTtlResultCode::ResourceLimitExceeded, ExtendFootprintTtlResultCode::InsufficientRefundableFee, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [ExtendFootprintTtlResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "ResourceLimitExceeded", "InsufficientRefundableFee", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -46265,7 +49510,7 @@ impl ExtendFootprintTtlResult { } #[must_use] - pub const fn variants() -> [ExtendFootprintTtlResultCode; 4] { + pub const fn variants() -> [ExtendFootprintTtlResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -46366,18 +49611,36 @@ pub enum RestoreFootprintResultCode { } impl RestoreFootprintResultCode { - pub const VARIANTS: [RestoreFootprintResultCode; 4] = [ + const _VARIANTS: &[RestoreFootprintResultCode] = &[ RestoreFootprintResultCode::Success, RestoreFootprintResultCode::Malformed, RestoreFootprintResultCode::ResourceLimitExceeded, RestoreFootprintResultCode::InsufficientRefundableFee, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [RestoreFootprintResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "ResourceLimitExceeded", "InsufficientRefundableFee", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -46390,7 +49653,7 @@ impl RestoreFootprintResultCode { } #[must_use] - pub const fn variants() -> [RestoreFootprintResultCode; 4] { + pub const fn variants() -> [RestoreFootprintResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -46501,18 +49764,36 @@ impl Default for RestoreFootprintResult { } impl RestoreFootprintResult { - pub const VARIANTS: [RestoreFootprintResultCode; 4] = [ + const _VARIANTS: &[RestoreFootprintResultCode] = &[ RestoreFootprintResultCode::Success, RestoreFootprintResultCode::Malformed, RestoreFootprintResultCode::ResourceLimitExceeded, RestoreFootprintResultCode::InsufficientRefundableFee, ]; - pub const VARIANTS_STR: [&'static str; 4] = [ + pub const VARIANTS: [RestoreFootprintResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Success", "Malformed", "ResourceLimitExceeded", "InsufficientRefundableFee", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -46538,7 +49819,7 @@ impl RestoreFootprintResult { } #[must_use] - pub const fn variants() -> [RestoreFootprintResultCode; 4] { + pub const fn variants() -> [RestoreFootprintResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -46643,7 +49924,7 @@ pub enum OperationResultCode { } impl OperationResultCode { - pub const VARIANTS: [OperationResultCode; 7] = [ + const _VARIANTS: &[OperationResultCode] = &[ OperationResultCode::OpInner, OperationResultCode::OpBadAuth, OperationResultCode::OpNoAccount, @@ -46652,7 +49933,16 @@ impl OperationResultCode { OperationResultCode::OpExceededWorkLimit, OperationResultCode::OpTooManySponsoring, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [OperationResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "OpInner", "OpBadAuth", "OpNoAccount", @@ -46661,6 +49951,15 @@ impl OperationResultCode { "OpExceededWorkLimit", "OpTooManySponsoring", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -46676,7 +49975,7 @@ impl OperationResultCode { } #[must_use] - pub const fn variants() -> [OperationResultCode; 7] { + pub const fn variants() -> [OperationResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -46861,7 +50160,7 @@ impl Default for OperationResultTr { } impl OperationResultTr { - pub const VARIANTS: [OperationType; 27] = [ + const _VARIANTS: &[OperationType] = &[ OperationType::CreateAccount, OperationType::Payment, OperationType::PathPaymentStrictReceive, @@ -46890,7 +50189,16 @@ impl OperationResultTr { OperationType::ExtendFootprintTtl, OperationType::RestoreFootprint, ]; - pub const VARIANTS_STR: [&'static str; 27] = [ + pub const VARIANTS: [OperationType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "CreateAccount", "Payment", "PathPaymentStrictReceive", @@ -46919,6 +50227,15 @@ impl OperationResultTr { "ExtendFootprintTtl", "RestoreFootprint", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -46988,7 +50305,7 @@ impl OperationResultTr { } #[must_use] - pub const fn variants() -> [OperationType; 27] { + pub const fn variants() -> [OperationType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -47239,7 +50556,7 @@ impl Default for OperationResult { } impl OperationResult { - pub const VARIANTS: [OperationResultCode; 7] = [ + const _VARIANTS: &[OperationResultCode] = &[ OperationResultCode::OpInner, OperationResultCode::OpBadAuth, OperationResultCode::OpNoAccount, @@ -47248,7 +50565,16 @@ impl OperationResult { OperationResultCode::OpExceededWorkLimit, OperationResultCode::OpTooManySponsoring, ]; - pub const VARIANTS_STR: [&'static str; 7] = [ + pub const VARIANTS: [OperationResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "OpInner", "OpBadAuth", "OpNoAccount", @@ -47257,6 +50583,15 @@ impl OperationResult { "OpExceededWorkLimit", "OpTooManySponsoring", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -47286,7 +50621,7 @@ impl OperationResult { } #[must_use] - pub const fn variants() -> [OperationResultCode; 7] { + pub const fn variants() -> [OperationResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -47423,7 +50758,7 @@ pub enum TransactionResultCode { } impl TransactionResultCode { - pub const VARIANTS: [TransactionResultCode; 20] = [ + const _VARIANTS: &[TransactionResultCode] = &[ TransactionResultCode::TxFeeBumpInnerSuccess, TransactionResultCode::TxSuccess, TransactionResultCode::TxFailed, @@ -47445,7 +50780,16 @@ impl TransactionResultCode { TransactionResultCode::TxSorobanInvalid, TransactionResultCode::TxFrozenKeyAccessed, ]; - pub const VARIANTS_STR: [&'static str; 20] = [ + pub const VARIANTS: [TransactionResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "TxFeeBumpInnerSuccess", "TxSuccess", "TxFailed", @@ -47467,6 +50811,15 @@ impl TransactionResultCode { "TxSorobanInvalid", "TxFrozenKeyAccessed", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -47495,7 +50848,7 @@ impl TransactionResultCode { } #[must_use] - pub const fn variants() -> [TransactionResultCode; 20] { + pub const fn variants() -> [TransactionResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -47652,7 +51005,7 @@ impl Default for InnerTransactionResultResult { } impl InnerTransactionResultResult { - pub const VARIANTS: [TransactionResultCode; 18] = [ + const _VARIANTS: &[TransactionResultCode] = &[ TransactionResultCode::TxSuccess, TransactionResultCode::TxFailed, TransactionResultCode::TxTooEarly, @@ -47672,7 +51025,16 @@ impl InnerTransactionResultResult { TransactionResultCode::TxSorobanInvalid, TransactionResultCode::TxFrozenKeyAccessed, ]; - pub const VARIANTS_STR: [&'static str; 18] = [ + pub const VARIANTS: [TransactionResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "TxSuccess", "TxFailed", "TxTooEarly", @@ -47692,6 +51054,15 @@ impl InnerTransactionResultResult { "TxSorobanInvalid", "TxFrozenKeyAccessed", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -47743,7 +51114,7 @@ impl InnerTransactionResultResult { } #[must_use] - pub const fn variants() -> [TransactionResultCode; 18] { + pub const fn variants() -> [TransactionResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -47872,8 +51243,26 @@ impl Default for InnerTransactionResultExt { } impl InnerTransactionResultExt { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -47891,7 +51280,7 @@ impl InnerTransactionResultExt { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -48163,7 +51552,7 @@ impl Default for TransactionResultResult { } impl TransactionResultResult { - pub const VARIANTS: [TransactionResultCode; 20] = [ + const _VARIANTS: &[TransactionResultCode] = &[ TransactionResultCode::TxFeeBumpInnerSuccess, TransactionResultCode::TxFeeBumpInnerFailed, TransactionResultCode::TxSuccess, @@ -48185,7 +51574,16 @@ impl TransactionResultResult { TransactionResultCode::TxSorobanInvalid, TransactionResultCode::TxFrozenKeyAccessed, ]; - pub const VARIANTS_STR: [&'static str; 20] = [ + pub const VARIANTS: [TransactionResultCode; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "TxFeeBumpInnerSuccess", "TxFeeBumpInnerFailed", "TxSuccess", @@ -48207,6 +51605,15 @@ impl TransactionResultResult { "TxSorobanInvalid", "TxFrozenKeyAccessed", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -48262,7 +51669,7 @@ impl TransactionResultResult { } #[must_use] - pub const fn variants() -> [TransactionResultCode; 20] { + pub const fn variants() -> [TransactionResultCode; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -48399,8 +51806,26 @@ impl Default for TransactionResultExt { } impl TransactionResultExt { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -48418,7 +51843,7 @@ impl TransactionResultExt { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -49069,8 +52494,26 @@ impl Default for ExtensionPoint { } impl ExtensionPoint { - pub const VARIANTS: [i32; 1] = [0]; - pub const VARIANTS_STR: [&'static str; 1] = ["V0"]; + const _VARIANTS: &[i32] = &[0]; + pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["V0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -49088,7 +52531,7 @@ impl ExtensionPoint { } #[must_use] - pub const fn variants() -> [i32; 1] { + pub const fn variants() -> [i32; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -49181,20 +52624,38 @@ pub enum CryptoKeyType { } impl CryptoKeyType { - pub const VARIANTS: [CryptoKeyType; 5] = [ + const _VARIANTS: &[CryptoKeyType] = &[ CryptoKeyType::Ed25519, CryptoKeyType::PreAuthTx, CryptoKeyType::HashX, CryptoKeyType::Ed25519SignedPayload, CryptoKeyType::MuxedEd25519, ]; - pub const VARIANTS_STR: [&'static str; 5] = [ + pub const VARIANTS: [CryptoKeyType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ "Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload", "MuxedEd25519", ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -49208,7 +52669,7 @@ impl CryptoKeyType { } #[must_use] - pub const fn variants() -> [CryptoKeyType; 5] { + pub const fn variants() -> [CryptoKeyType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -49305,8 +52766,26 @@ pub enum PublicKeyType { } impl PublicKeyType { - pub const VARIANTS: [PublicKeyType; 1] = [PublicKeyType::PublicKeyTypeEd25519]; - pub const VARIANTS_STR: [&'static str; 1] = ["PublicKeyTypeEd25519"]; + const _VARIANTS: &[PublicKeyType] = &[PublicKeyType::PublicKeyTypeEd25519]; + pub const VARIANTS: [PublicKeyType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["PublicKeyTypeEd25519"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -49316,7 +52795,7 @@ impl PublicKeyType { } #[must_use] - pub const fn variants() -> [PublicKeyType; 1] { + pub const fn variants() -> [PublicKeyType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -49415,14 +52894,31 @@ pub enum SignerKeyType { } impl SignerKeyType { - pub const VARIANTS: [SignerKeyType; 4] = [ + const _VARIANTS: &[SignerKeyType] = &[ SignerKeyType::Ed25519, SignerKeyType::PreAuthTx, SignerKeyType::HashX, SignerKeyType::Ed25519SignedPayload, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload"]; + pub const VARIANTS: [SignerKeyType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -49435,7 +52931,7 @@ impl SignerKeyType { } #[must_use] - pub const fn variants() -> [SignerKeyType; 4] { + pub const fn variants() -> [SignerKeyType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -49536,8 +53032,26 @@ impl Default for PublicKey { } impl PublicKey { - pub const VARIANTS: [PublicKeyType; 1] = [PublicKeyType::PublicKeyTypeEd25519]; - pub const VARIANTS_STR: [&'static str; 1] = ["PublicKeyTypeEd25519"]; + const _VARIANTS: &[PublicKeyType] = &[PublicKeyType::PublicKeyTypeEd25519]; + pub const VARIANTS: [PublicKeyType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["PublicKeyTypeEd25519"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -49555,7 +53069,7 @@ impl PublicKey { } #[must_use] - pub const fn variants() -> [PublicKeyType; 1] { + pub const fn variants() -> [PublicKeyType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -49742,14 +53256,31 @@ impl Default for SignerKey { } impl SignerKey { - pub const VARIANTS: [SignerKeyType; 4] = [ + const _VARIANTS: &[SignerKeyType] = &[ SignerKeyType::Ed25519, SignerKeyType::PreAuthTx, SignerKeyType::HashX, SignerKeyType::Ed25519SignedPayload, ]; - pub const VARIANTS_STR: [&'static str; 4] = - ["Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload"]; + pub const VARIANTS: [SignerKeyType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -49773,7 +53304,7 @@ impl SignerKey { } #[must_use] - pub const fn variants() -> [SignerKeyType; 4] { + pub const fn variants() -> [SignerKeyType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -50521,12 +54052,30 @@ pub enum BinaryFuseFilterType { } impl BinaryFuseFilterType { - pub const VARIANTS: [BinaryFuseFilterType; 3] = [ + const _VARIANTS: &[BinaryFuseFilterType] = &[ BinaryFuseFilterType::B8Bit, BinaryFuseFilterType::B16Bit, BinaryFuseFilterType::B32Bit, ]; - pub const VARIANTS_STR: [&'static str; 3] = ["B8Bit", "B16Bit", "B32Bit"]; + pub const VARIANTS: [BinaryFuseFilterType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["B8Bit", "B16Bit", "B32Bit"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -50538,7 +54087,7 @@ impl BinaryFuseFilterType { } #[must_use] - pub const fn variants() -> [BinaryFuseFilterType; 3] { + pub const fn variants() -> [BinaryFuseFilterType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -50772,9 +54321,27 @@ pub enum ClaimableBalanceIdType { } impl ClaimableBalanceIdType { - pub const VARIANTS: [ClaimableBalanceIdType; 1] = - [ClaimableBalanceIdType::ClaimableBalanceIdTypeV0]; - pub const VARIANTS_STR: [&'static str; 1] = ["ClaimableBalanceIdTypeV0"]; + const _VARIANTS: &[ClaimableBalanceIdType] = + &[ClaimableBalanceIdType::ClaimableBalanceIdTypeV0]; + pub const VARIANTS: [ClaimableBalanceIdType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ClaimableBalanceIdTypeV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -50784,7 +54351,7 @@ impl ClaimableBalanceIdType { } #[must_use] - pub const fn variants() -> [ClaimableBalanceIdType; 1] { + pub const fn variants() -> [ClaimableBalanceIdType; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -50882,9 +54449,27 @@ impl Default for ClaimableBalanceId { } impl ClaimableBalanceId { - pub const VARIANTS: [ClaimableBalanceIdType; 1] = - [ClaimableBalanceIdType::ClaimableBalanceIdTypeV0]; - pub const VARIANTS_STR: [&'static str; 1] = ["ClaimableBalanceIdTypeV0"]; + const _VARIANTS: &[ClaimableBalanceIdType] = + &[ClaimableBalanceIdType::ClaimableBalanceIdTypeV0]; + pub const VARIANTS: [ClaimableBalanceIdType; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &["ClaimableBalanceIdTypeV0"]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { @@ -50902,7 +54487,7 @@ impl ClaimableBalanceId { } #[must_use] - pub const fn variants() -> [ClaimableBalanceIdType; 1] { + pub const fn variants() -> [ClaimableBalanceIdType; Self::_VARIANTS.len()] { Self::VARIANTS } } diff --git a/xdr-generator-rust/generator/src/generator.rs b/xdr-generator-rust/generator/src/generator.rs index a5dc6a4a..3147f9e2 100644 --- a/xdr-generator-rust/generator/src/generator.rs +++ b/xdr-generator-rust/generator/src/generator.rs @@ -153,6 +153,7 @@ impl RustGenerator { name: type_name(&m.stripped_name), value: m.value, is_first: i == 0, + cfg: m.cfg.as_ref().map(|c| c.render()), }) .collect(); @@ -325,6 +326,7 @@ impl RustGenerator { type_ref: resolved.as_ref().map(|r| r.type_ref.clone()), turbofish_type: resolved.as_ref().map(|r| r.turbofish_type.clone()), serde_as_type: resolved.and_then(|r| r.serde_as_type), + cfg: arm.cfg.as_ref().map(|c| c.render()), } }) .collect() diff --git a/xdr-generator-rust/generator/src/output.rs b/xdr-generator-rust/generator/src/output.rs index 1e7f4841..d9ceea90 100644 --- a/xdr-generator-rust/generator/src/output.rs +++ b/xdr-generator-rust/generator/src/output.rs @@ -48,6 +48,7 @@ pub struct EnumStructMemberOutput { pub name: String, pub value: i32, pub is_first: bool, + pub cfg: Option, } pub struct UnionOutput { @@ -67,6 +68,7 @@ pub struct UnionArmOutput { pub type_ref: Option, pub turbofish_type: Option, pub serde_as_type: Option, + pub cfg: Option, } pub struct TypedefAliasOutput { diff --git a/xdr-generator-rust/generator/templates/enum.rs.jinja b/xdr-generator-rust/generator/templates/enum.rs.jinja index efb2fefb..9a5f804a 100644 --- a/xdr-generator-rust/generator/templates/enum.rs.jinja +++ b/xdr-generator-rust/generator/templates/enum.rs.jinja @@ -24,6 +24,9 @@ #[repr(i32)] pub enum {{ e.name }} { {%- for m in e.members %} +{%- if let Some(cfg) = m.cfg %} + #[cfg({{ cfg }})] +{%- endif %} {%- if m.is_first %} #[cfg_attr(feature = "alloc", default)] {%- endif %} @@ -35,24 +38,55 @@ pub enum {{ e.name }} { #[cfg({{ cfg }})] {% endif -%} impl {{ e.name }} { - pub const VARIANTS: [{{ e.name }}; {{ e.members.len() }}] = [ + const _VARIANTS: &[{{ e.name }}] = &[ {%- for m in e.members %} +{%- if let Some(cfg) = m.cfg %} + #[cfg({{ cfg }})] +{%- endif %} {{ e.name }}::{{ m.name }}, {%- endfor %} ]; - pub const VARIANTS_STR: [&'static str; {{ e.members.len() }}] = [{% for m in e.members %}"{{ m.name }}", {% endfor %}]; + pub const VARIANTS: [{{ e.name }}; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ +{%- for m in e.members %} +{%- if let Some(cfg) = m.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + "{{ m.name }}", +{%- endfor %} + ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { match self { {%- for m in e.members %} +{%- if let Some(cfg) = m.cfg %} + #[cfg({{ cfg }})] +{%- endif %} Self::{{ m.name }} => "{{ m.name }}", {%- endfor %} } } #[must_use] - pub const fn variants() -> [{{ e.name }}; {{ e.members.len() }}] { + pub const fn variants() -> [{{ e.name }}; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -99,6 +133,9 @@ impl TryFrom for {{ e.name }} { fn try_from(i: i32) -> Result { let e = match i { {%- for m in e.members %} +{%- if let Some(cfg) = m.cfg %} + #[cfg({{ cfg }})] +{%- endif %} {{ m.value }} => {{ e.name }}::{{ m.name }}, {%- endfor %} #[allow(unreachable_patterns)] diff --git a/xdr-generator-rust/generator/templates/union.rs.jinja b/xdr-generator-rust/generator/templates/union.rs.jinja index 4951ce6a..15e38230 100644 --- a/xdr-generator-rust/generator/templates/union.rs.jinja +++ b/xdr-generator-rust/generator/templates/union.rs.jinja @@ -23,6 +23,9 @@ #[allow(clippy::large_enum_variant)] pub enum {{ u.name }} { {%- for arm in u.arms %} +{%- if let Some(cfg) = arm.cfg %} + #[cfg({{ cfg }})] +{%- endif %} {%- if arm.is_void %} {{ arm.case_name }}, {%- else %} @@ -59,17 +62,48 @@ impl Default for {{ u.name }} { #[cfg({{ cfg }})] {% endif -%} impl {{ u.name }} { - pub const VARIANTS: [{{ u.discriminant_type }}; {{ u.arms.len() }}] = [ + const _VARIANTS: &[{{ u.discriminant_type }}] = &[ {%- for arm in u.arms %} +{%- if let Some(cfg) = arm.cfg %} + #[cfg({{ cfg }})] +{%- endif %} {{ arm.case_value }}, {%- endfor %} ]; - pub const VARIANTS_STR: [&'static str; {{ u.arms.len() }}] = [{% for arm in u.arms %}"{{ arm.case_name }}", {% endfor %}]; + pub const VARIANTS: [{{ u.discriminant_type }}; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ +{%- for arm in u.arms %} +{%- if let Some(cfg) = arm.cfg %} + #[cfg({{ cfg }})] +{%- endif %} + "{{ arm.case_name }}", +{%- endfor %} + ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; #[must_use] pub const fn name(&self) -> &'static str { match self { {%- for arm in u.arms %} +{%- if let Some(cfg) = arm.cfg %} + #[cfg({{ cfg }})] +{%- endif %} {%- if arm.is_void %} Self::{{ arm.case_name }} => "{{ arm.case_name }}", {%- else %} @@ -84,6 +118,9 @@ impl {{ u.name }} { #[allow(clippy::match_same_arms)] match self { {%- for arm in u.arms %} +{%- if let Some(cfg) = arm.cfg %} + #[cfg({{ cfg }})] +{%- endif %} {%- if arm.is_void %} Self::{{ arm.case_name }} => {{ arm.case_value }}, {%- else %} @@ -94,7 +131,7 @@ impl {{ u.name }} { } #[must_use] - pub const fn variants() -> [{{ u.discriminant_type }}; {{ u.arms.len() }}] { + pub const fn variants() -> [{{ u.discriminant_type }}; Self::_VARIANTS.len()] { Self::VARIANTS } } @@ -144,6 +181,9 @@ impl ReadXdr for {{ u.name }} { #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] let v = match dv { {%- for arm in u.arms %} +{%- if let Some(cfg) = arm.cfg %} + #[cfg({{ cfg }})] +{%- endif %} {%- if arm.is_void %} {{ arm.case_value }} => Self::{{ arm.case_name }}, {%- else %} @@ -169,6 +209,9 @@ impl WriteXdr for {{ u.name }} { #[allow(clippy::match_same_arms)] match self { {%- for arm in u.arms %} +{%- if let Some(cfg) = arm.cfg %} + #[cfg({{ cfg }})] +{%- endif %} {%- if arm.is_void %} Self::{{ arm.case_name }} => ().write_xdr(w)?, {%- else %} diff --git a/xdr-generator-rust/xdr-parser/src/ast.rs b/xdr-generator-rust/xdr-parser/src/ast.rs index 74ef1932..7cca23b1 100644 --- a/xdr-generator-rust/xdr-parser/src/ast.rs +++ b/xdr-generator-rust/xdr-parser/src/ast.rs @@ -259,15 +259,16 @@ pub struct Enum { impl Enum { /// Create a new Enum, computing stripped member names from the common prefix. - pub fn new(name: String, members: Vec<(String, i32)>, source: String) -> Self { - let names: Vec<&str> = members.iter().map(|(n, _)| n.as_str()).collect(); + pub fn new(name: String, members: Vec<(String, i32, Option)>, source: String) -> Self { + let names: Vec<&str> = members.iter().map(|(n, _, _)| n.as_str()).collect(); let member_prefix = find_common_prefix(&names).to_string(); let members = members .into_iter() - .map(|(name, value)| EnumMember { + .map(|(name, value, cfg)| EnumMember { stripped_name: strip_prefix(&name, &member_prefix), name, value, + cfg, }) .collect(); Self { @@ -377,6 +378,7 @@ pub struct EnumMember { /// The member name with the common enum prefix stripped. pub stripped_name: String, pub value: i32, + pub cfg: Option, } /// The discriminant of a union. @@ -392,6 +394,7 @@ pub struct UnionArm { pub cases: Vec, /// The type for this arm. None means `void`. pub type_: Option, + pub cfg: Option, } /// A case in a union. diff --git a/xdr-generator-rust/xdr-parser/src/parser.rs b/xdr-generator-rust/xdr-parser/src/parser.rs index c4510615..cb386854 100644 --- a/xdr-generator-rust/xdr-parser/src/parser.rs +++ b/xdr-generator-rust/xdr-parser/src/parser.rs @@ -80,6 +80,10 @@ struct Parser { file_index: usize, /// Stack of cfg conditions from enclosing `#ifdef`/`#ifndef`/`#elif`/`#else` blocks. cfg_stack: Vec, + /// Stack tracking seen conditions for each active `#ifdef`/`#ifndef` block, + /// used by `parse_ifdef_enter`/`parse_ifdef_branch`/`parse_ifdef_exit` for + /// inline ifdef handling inside enum/union bodies. + ifdef_seen_stack: Vec>, } impl Parser { @@ -96,6 +100,7 @@ impl Parser { global_values, file_index: 0, cfg_stack: Vec::new(), + ifdef_seen_stack: Vec::new(), }) } @@ -238,6 +243,72 @@ impl Parser { Ok(()) } + /// Enter an `#ifdef`/`#ifndef` block inline (inside an enum or union body). + /// Pushes the initial condition onto `cfg_stack` and records it in + /// `ifdef_seen_stack` so that `parse_ifdef_branch` and `parse_ifdef_exit` + /// can manage `#elif`/`#else`/`#endif` later. + fn parse_ifdef_enter(&mut self) -> Result<(), ParseError> { + let first_cfg = match self.peek().clone() { + Token::IfDef(name) => { + self.advance(); + CfgExpr::Feature(name) + } + Token::IfNDef(name) => { + self.advance(); + CfgExpr::Not(Box::new(CfgExpr::Feature(name))) + } + _ => unreachable!(), + }; + self.ifdef_seen_stack.push(vec![first_cfg.clone()]); + self.cfg_stack.push(first_cfg); + Ok(()) + } + + /// Handle an `#elif` or `#else` token inside an inline ifdef block. + /// Pops the current branch's cfg and pushes the new branch's cfg. + fn parse_ifdef_branch(&mut self) -> Result<(), ParseError> { + if self.ifdef_seen_stack.is_empty() { + return Err(self.make_unexpected_directive_error()); + } + self.cfg_stack.pop(); + let tok = self.peek().clone(); + self.advance(); + let seen = self.ifdef_seen_stack.last_mut().unwrap(); + match tok { + Token::Elif(elif_name) => { + let elif_feature = CfgExpr::Feature(elif_name); + let mut parts: Vec = seen.iter().map(|c| c.clone().negate()).collect(); + parts.push(elif_feature.clone()); + let elif_cfg = CfgExpr::All(parts); + seen.push(elif_feature); + self.cfg_stack.push(elif_cfg); + } + Token::Else => { + let else_cfg = if seen.len() == 1 { + seen[0].clone().negate() + } else { + let negated: Vec = seen.iter().map(|c| c.clone().negate()).collect(); + CfgExpr::All(negated) + }; + self.cfg_stack.push(else_cfg); + } + _ => unreachable!(), + } + Ok(()) + } + + /// Handle an `#endif` token inside an inline ifdef block. + /// Pops the current branch's cfg and the seen_conditions entry. + fn parse_ifdef_exit(&mut self) -> Result<(), ParseError> { + if self.ifdef_seen_stack.is_empty() { + return Err(self.make_unexpected_directive_error()); + } + self.cfg_stack.pop(); + self.ifdef_seen_stack.pop(); + self.advance(); // consume EndIf + Ok(()) + } + /// Compute the current cfg expression from the cfg_stack. fn current_cfg(&self) -> Option { match self.cfg_stack.len() { @@ -367,8 +438,26 @@ impl Parser { let name = self.expect_ident()?; self.expect(Token::LBrace)?; - let mut members: Vec<(String, i32)> = Vec::new(); + let mut members: Vec<(String, i32, Option)> = Vec::new(); loop { + // Handle #ifdef/#ifndef/#else/#elif/#endif inside enum body + match self.peek().clone() { + Token::IfDef(_) | Token::IfNDef(_) => { + self.parse_ifdef_enter()?; + continue; + } + Token::Elif(_) | Token::Else => { + self.parse_ifdef_branch()?; + continue; + } + Token::EndIf => { + self.parse_ifdef_exit()?; + continue; + } + Token::RBrace => break, + _ => {} + } + let member_name = self.expect_ident()?; self.expect(Token::Eq)?; @@ -389,16 +478,19 @@ impl Parser { } }; - members.push((member_name, value)); + members.push((member_name, value, self.current_cfg())); match self.peek() { Token::Comma => { self.advance(); + // After comma, skip to } or next member (could be #ifdef or #endif) if *self.peek() == Token::RBrace { break; } } Token::RBrace => break, + // Allow #else/#endif directly after a member without a comma + Token::EndIf | Token::Else | Token::Elif(_) => {} other => { return Err(self.unexpected_token_error(", or }".to_string(), other.clone())) } @@ -411,7 +503,7 @@ impl Parser { let source = self.extract_definition_source(); // Add all members to global_values for cross-enum resolution - for (name, value) in &members { + for (name, value, _) in &members { self.global_values.insert(name.clone(), *value as i64); } @@ -531,7 +623,26 @@ impl Parser { let mut arms = Vec::new(); while *self.peek() != Token::RBrace { - let arm = self.parse_union_arm()?; + // Handle #ifdef/#ifndef/#else/#elif/#endif inside union body + match self.peek().clone() { + Token::IfDef(_) | Token::IfNDef(_) => { + self.parse_ifdef_enter()?; + continue; + } + Token::Elif(_) | Token::Else => { + self.parse_ifdef_branch()?; + continue; + } + Token::EndIf => { + self.parse_ifdef_exit()?; + continue; + } + _ => {} + } + + let cfg = self.current_cfg(); + let mut arm = self.parse_union_arm()?; + arm.cfg = cfg; if arm.cases.is_empty() { let (line, col) = self.current_position(); return Err(ParseError::UnsupportedDefaultArm { line, col }); @@ -620,7 +731,11 @@ impl Parser { Some(type_) }; - Ok(UnionArm { cases, type_ }) + Ok(UnionArm { + cases, + type_, + cfg: None, + }) } /// Parse an inline struct definition inside a union arm and extract it as a @@ -1104,9 +1219,13 @@ impl Parser { /// Resolve an enum value reference, searching the current enum members /// and then previously parsed enums/consts. - fn resolve_enum_value(&self, name: &str, members: &[(String, i32)]) -> Result { + fn resolve_enum_value( + &self, + name: &str, + members: &[(String, i32, Option)], + ) -> Result { // First check if it's in the current enum being parsed - for (member_name, value) in members { + for (member_name, value, _) in members { if member_name == name { return Ok(*value); } diff --git a/xdr/curr b/xdr/curr index cff714a5..a4e769e3 160000 --- a/xdr/curr +++ b/xdr/curr @@ -1 +1 @@ -Subproject commit cff714a5ebaaaf2dac343b3546c2df73f0b7a36e +Subproject commit a4e769e3042613140812209c65cc6e0cc22804ce From ab7948a14ddd572cadd1b9bb5ea08c20e0247df3 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 18 Mar 2026 11:50:13 +1000 Subject: [PATCH 06/28] add ifdef xdr types with lowercase feature names --- Cargo.toml | 5 + src/curr/generated.rs | 2196 ++++++++++++++++- xdr-generator-rust/generator/src/generator.rs | 12 +- xdr-generator-rust/xdr-parser/src/ast.rs | 5 +- 4 files changed, 2192 insertions(+), 26 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 81205950..1952c2f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,6 +45,11 @@ std = ["alloc", "dep:sha2"] alloc = ["dep:hex", "dep:stellar-strkey", "escape-bytes/alloc", "dep:ethnum"] curr = [] next = [] +disable_nonce_types = [] +enable_extra_types = [] +sparse_map = [] +variant_a = [] +variant_b = [] # Features dependent on optional dependencies. base64 = ["std", "dep:base64"] diff --git a/src/curr/generated.rs b/src/curr/generated.rs index 76f3195a..104dad73 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -67,7 +67,7 @@ pub const XDR_FILES_SHA256: [(&str, &str); 13] = [ ), ( "xdr/curr/Stellar-types.x", - "4d7a1d1f1fa0034ddbff27d8a533e59b6154bef295306c6256066def77a5a999", + "a6bd5e7b2e0d84ac0cd5dd5db73d1618f04c69455d93a8190e040cfb28d8e08c", ), ]; @@ -10430,11 +10430,11 @@ pub enum ScValType { Address = 18, ContractInstance = 19, LedgerKeyContractInstance = 20, - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] LedgerKeyNonce = 21, - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] SparseMap = 22, - #[cfg(not(feature = "SPARSE_MAP"))] + #[cfg(not(feature = "sparse_map"))] LedgerKeyNonce = 21, } @@ -10461,11 +10461,11 @@ impl ScValType { ScValType::Address, ScValType::ContractInstance, ScValType::LedgerKeyContractInstance, - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] ScValType::LedgerKeyNonce, - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] ScValType::SparseMap, - #[cfg(not(feature = "SPARSE_MAP"))] + #[cfg(not(feature = "sparse_map"))] ScValType::LedgerKeyNonce, ]; pub const VARIANTS: [ScValType; Self::_VARIANTS.len()] = { @@ -10499,11 +10499,11 @@ impl ScValType { "Address", "ContractInstance", "LedgerKeyContractInstance", - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] "LedgerKeyNonce", - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] "SparseMap", - #[cfg(not(feature = "SPARSE_MAP"))] + #[cfg(not(feature = "sparse_map"))] "LedgerKeyNonce", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { @@ -10540,11 +10540,11 @@ impl ScValType { Self::Address => "Address", Self::ContractInstance => "ContractInstance", Self::LedgerKeyContractInstance => "LedgerKeyContractInstance", - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] Self::LedgerKeyNonce => "LedgerKeyNonce", - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] Self::SparseMap => "SparseMap", - #[cfg(not(feature = "SPARSE_MAP"))] + #[cfg(not(feature = "sparse_map"))] Self::LedgerKeyNonce => "LedgerKeyNonce", } } @@ -10602,11 +10602,11 @@ impl TryFrom for ScValType { 18 => ScValType::Address, 19 => ScValType::ContractInstance, 20 => ScValType::LedgerKeyContractInstance, - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] 21 => ScValType::LedgerKeyNonce, - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] 22 => ScValType::SparseMap, - #[cfg(not(feature = "SPARSE_MAP"))] + #[cfg(not(feature = "sparse_map"))] 21 => ScValType::LedgerKeyNonce, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), @@ -12937,7 +12937,7 @@ pub enum ScVal { ContractInstance(ScContractInstance), LedgerKeyContractInstance, LedgerKeyNonce(ScNonceKey), - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] SparseMap(Option), } @@ -12972,7 +12972,7 @@ impl ScVal { ScValType::ContractInstance, ScValType::LedgerKeyContractInstance, ScValType::LedgerKeyNonce, - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] ScValType::SparseMap, ]; pub const VARIANTS: [ScValType; Self::_VARIANTS.len()] = { @@ -13007,7 +13007,7 @@ impl ScVal { "ContractInstance", "LedgerKeyContractInstance", "LedgerKeyNonce", - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] "SparseMap", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { @@ -13045,7 +13045,7 @@ impl ScVal { Self::ContractInstance(_) => "ContractInstance", Self::LedgerKeyContractInstance => "LedgerKeyContractInstance", Self::LedgerKeyNonce(_) => "LedgerKeyNonce", - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] Self::SparseMap(_) => "SparseMap", } } @@ -13076,7 +13076,7 @@ impl ScVal { Self::ContractInstance(_) => ScValType::ContractInstance, Self::LedgerKeyContractInstance => ScValType::LedgerKeyContractInstance, Self::LedgerKeyNonce(_) => ScValType::LedgerKeyNonce, - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] Self::SparseMap(_) => ScValType::SparseMap, } } @@ -13140,7 +13140,7 @@ impl ReadXdr for ScVal { } ScValType::LedgerKeyContractInstance => Self::LedgerKeyContractInstance, ScValType::LedgerKeyNonce => Self::LedgerKeyNonce(ScNonceKey::read_xdr(r)?), - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] ScValType::SparseMap => Self::SparseMap(Option::::read_xdr(r)?), #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), @@ -13179,7 +13179,7 @@ impl WriteXdr for ScVal { Self::ContractInstance(v) => v.write_xdr(w)?, Self::LedgerKeyContractInstance => ().write_xdr(w)?, Self::LedgerKeyNonce(v) => v.write_xdr(w)?, - #[cfg(feature = "SPARSE_MAP")] + #[cfg(feature = "sparse_map")] Self::SparseMap(v) => v.write_xdr(w)?, }; Ok(()) @@ -54161,6 +54161,1509 @@ impl WriteXdr for ClaimableBalanceId { } } +/// ExtraUint64 is an XDR Typedef defined as: +/// +/// ```text +/// typedef uint64 ExtraUint64; +/// ``` +/// +#[cfg(feature = "enable_extra_types")] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +#[derive(Debug)] +pub struct ExtraUint64( + #[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_as(as = "NumberOrString") + )] + pub u64, +); + +#[cfg(feature = "enable_extra_types")] +impl From for u64 { + #[must_use] + fn from(x: ExtraUint64) -> Self { + x.0 + } +} + +#[cfg(feature = "enable_extra_types")] +impl From for ExtraUint64 { + #[must_use] + fn from(x: u64) -> Self { + ExtraUint64(x) + } +} + +#[cfg(feature = "enable_extra_types")] +impl AsRef for ExtraUint64 { + #[must_use] + fn as_ref(&self) -> &u64 { + &self.0 + } +} + +#[cfg(feature = "enable_extra_types")] +impl ReadXdr for ExtraUint64 { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + let i = u64::read_xdr(r)?; + let v = ExtraUint64(i); + Ok(v) + }) + } +} + +#[cfg(feature = "enable_extra_types")] +impl WriteXdr for ExtraUint64 { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| self.0.write_xdr(w)) + } +} + +/// NonceUint64 is an XDR Typedef defined as: +/// +/// ```text +/// typedef uint64 NonceUint64; +/// ``` +/// +#[cfg(not(feature = "disable_nonce_types"))] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +#[derive(Debug)] +pub struct NonceUint64( + #[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_as(as = "NumberOrString") + )] + pub u64, +); + +#[cfg(not(feature = "disable_nonce_types"))] +impl From for u64 { + #[must_use] + fn from(x: NonceUint64) -> Self { + x.0 + } +} + +#[cfg(not(feature = "disable_nonce_types"))] +impl From for NonceUint64 { + #[must_use] + fn from(x: u64) -> Self { + NonceUint64(x) + } +} + +#[cfg(not(feature = "disable_nonce_types"))] +impl AsRef for NonceUint64 { + #[must_use] + fn as_ref(&self) -> &u64 { + &self.0 + } +} + +#[cfg(not(feature = "disable_nonce_types"))] +impl ReadXdr for NonceUint64 { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + let i = u64::read_xdr(r)?; + let v = NonceUint64(i); + Ok(v) + }) + } +} + +#[cfg(not(feature = "disable_nonce_types"))] +impl WriteXdr for NonceUint64 { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| self.0.write_xdr(w)) + } +} + +/// ExtraStruct is an XDR Struct defined as: +/// +/// ```text +/// struct ExtraStruct +/// { +/// uint32 code; +/// uint64 amount; +/// }; +/// ``` +/// +#[cfg(feature = "enable_extra_types")] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub struct ExtraStruct { + pub code: u32, + #[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_as(as = "NumberOrString") + )] + pub amount: u64, +} + +#[cfg(feature = "enable_extra_types")] +impl ReadXdr for ExtraStruct { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + Ok(Self { + code: u32::read_xdr(r)?, + amount: u64::read_xdr(r)?, + }) + }) + } +} + +#[cfg(feature = "enable_extra_types")] +impl WriteXdr for ExtraStruct { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| { + self.code.write_xdr(w)?; + self.amount.write_xdr(w)?; + Ok(()) + }) + } +} + +/// ExtraMaxSize is an XDR Const defined as: +/// +/// ```text +/// const EXTRA_MAX_SIZE = 100; +/// ``` +/// +#[cfg(feature = "enable_extra_types")] +pub const EXTRA_MAX_SIZE: u64 = 100; + +/// ConditionalTypedef is an XDR Typedef defined as: +/// +/// ```text +/// typedef uint64 ConditionalTypedef; +/// ``` +/// +#[cfg(feature = "enable_extra_types")] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +#[derive(Debug)] +pub struct ConditionalTypedef( + #[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_as(as = "NumberOrString") + )] + pub u64, +); + +#[cfg(feature = "enable_extra_types")] +impl From for u64 { + #[must_use] + fn from(x: ConditionalTypedef) -> Self { + x.0 + } +} + +#[cfg(feature = "enable_extra_types")] +impl From for ConditionalTypedef { + #[must_use] + fn from(x: u64) -> Self { + ConditionalTypedef(x) + } +} + +#[cfg(feature = "enable_extra_types")] +impl AsRef for ConditionalTypedef { + #[must_use] + fn as_ref(&self) -> &u64 { + &self.0 + } +} + +#[cfg(feature = "enable_extra_types")] +impl ReadXdr for ConditionalTypedef { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + let i = u64::read_xdr(r)?; + let v = ConditionalTypedef(i); + Ok(v) + }) + } +} + +#[cfg(feature = "enable_extra_types")] +impl WriteXdr for ConditionalTypedef { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| self.0.write_xdr(w)) + } +} + +/// ConditionalTypedef is an XDR Typedef defined as: +/// +/// ```text +/// typedef uint32 ConditionalTypedef; +/// ``` +/// +#[cfg(not(feature = "enable_extra_types"))] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +#[derive(Debug)] +pub struct ConditionalTypedef(pub u32); + +#[cfg(not(feature = "enable_extra_types"))] +impl From for u32 { + #[must_use] + fn from(x: ConditionalTypedef) -> Self { + x.0 + } +} + +#[cfg(not(feature = "enable_extra_types"))] +impl From for ConditionalTypedef { + #[must_use] + fn from(x: u32) -> Self { + ConditionalTypedef(x) + } +} + +#[cfg(not(feature = "enable_extra_types"))] +impl AsRef for ConditionalTypedef { + #[must_use] + fn as_ref(&self) -> &u32 { + &self.0 + } +} + +#[cfg(not(feature = "enable_extra_types"))] +impl ReadXdr for ConditionalTypedef { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + let i = u32::read_xdr(r)?; + let v = ConditionalTypedef(i); + Ok(v) + }) + } +} + +#[cfg(not(feature = "enable_extra_types"))] +impl WriteXdr for ConditionalTypedef { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| self.0.write_xdr(w)) + } +} + +/// VariantValue is an XDR Const defined as: +/// +/// ```text +/// const VARIANT_VALUE = 1; +/// ``` +/// +#[cfg(feature = "variant_a")] +pub const VARIANT_VALUE: u64 = 1; + +/// VariantValue is an XDR Const defined as: +/// +/// ```text +/// const VARIANT_VALUE = 2; +/// ``` +/// +#[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] +pub const VARIANT_VALUE: u64 = 2; + +/// VariantValue is an XDR Const defined as: +/// +/// ```text +/// const VARIANT_VALUE = 3; +/// ``` +/// +#[cfg(all(not(feature = "variant_a"), not(feature = "variant_b")))] +pub const VARIANT_VALUE: u64 = 3; + +/// NonceMax is an XDR Const defined as: +/// +/// ```text +/// const NONCE_MAX = 1000; +/// ``` +/// +#[cfg(not(feature = "disable_nonce_types"))] +pub const NONCE_MAX: u64 = 1000; + +/// NonceMax is an XDR Const defined as: +/// +/// ```text +/// const NONCE_MAX = 0; +/// ``` +/// +#[cfg(feature = "disable_nonce_types")] +pub const NONCE_MAX: u64 = 0; + +/// TestEnumWithIfdef is an XDR Enum defined as: +/// +/// ```text +/// enum TestEnumWithIfdef +/// { +/// TESTENUM_A = 0, +/// TESTENUM_B = 1, +/// #ifdef ENABLE_EXTRA_TYPES +/// TESTENUM_C = 2, +/// TESTENUM_D = 3 +/// #else +/// TESTENUM_C = 2 +/// #endif +/// }; +/// ``` +/// +// enum +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +#[repr(i32)] +pub enum TestEnumWithIfdef { + #[cfg_attr(feature = "alloc", default)] + A = 0, + B = 1, + #[cfg(feature = "enable_extra_types")] + C = 2, + #[cfg(feature = "enable_extra_types")] + D = 3, + #[cfg(not(feature = "enable_extra_types"))] + C = 2, +} + +impl TestEnumWithIfdef { + const _VARIANTS: &[TestEnumWithIfdef] = &[ + TestEnumWithIfdef::A, + TestEnumWithIfdef::B, + #[cfg(feature = "enable_extra_types")] + TestEnumWithIfdef::C, + #[cfg(feature = "enable_extra_types")] + TestEnumWithIfdef::D, + #[cfg(not(feature = "enable_extra_types"))] + TestEnumWithIfdef::C, + ]; + pub const VARIANTS: [TestEnumWithIfdef; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ + "A", + "B", + #[cfg(feature = "enable_extra_types")] + "C", + #[cfg(feature = "enable_extra_types")] + "D", + #[cfg(not(feature = "enable_extra_types"))] + "C", + ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; + + #[must_use] + pub const fn name(&self) -> &'static str { + match self { + Self::A => "A", + Self::B => "B", + #[cfg(feature = "enable_extra_types")] + Self::C => "C", + #[cfg(feature = "enable_extra_types")] + Self::D => "D", + #[cfg(not(feature = "enable_extra_types"))] + Self::C => "C", + } + } + + #[must_use] + pub const fn variants() -> [TestEnumWithIfdef; Self::_VARIANTS.len()] { + Self::VARIANTS + } +} + +impl Name for TestEnumWithIfdef { + #[must_use] + fn name(&self) -> &'static str { + Self::name(self) + } +} + +impl Variants for TestEnumWithIfdef { + fn variants() -> slice::Iter<'static, TestEnumWithIfdef> { + Self::VARIANTS.iter() + } +} + +impl Enum for TestEnumWithIfdef {} + +impl fmt::Display for TestEnumWithIfdef { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str(self.name()) + } +} + +impl TryFrom for TestEnumWithIfdef { + type Error = Error; + + fn try_from(i: i32) -> Result { + let e = match i { + 0 => TestEnumWithIfdef::A, + 1 => TestEnumWithIfdef::B, + #[cfg(feature = "enable_extra_types")] + 2 => TestEnumWithIfdef::C, + #[cfg(feature = "enable_extra_types")] + 3 => TestEnumWithIfdef::D, + #[cfg(not(feature = "enable_extra_types"))] + 2 => TestEnumWithIfdef::C, + #[allow(unreachable_patterns)] + _ => return Err(Error::Invalid), + }; + Ok(e) + } +} + +impl From for i32 { + #[must_use] + fn from(e: TestEnumWithIfdef) -> Self { + e as Self + } +} + +impl ReadXdr for TestEnumWithIfdef { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + let e = i32::read_xdr(r)?; + let v: Self = e.try_into()?; + Ok(v) + }) + } +} + +impl WriteXdr for TestEnumWithIfdef { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| { + let i: i32 = (*self).into(); + i.write_xdr(w) + }) + } +} + +/// TestEnumWithIfndef is an XDR Enum defined as: +/// +/// ```text +/// enum TestEnumWithIfndef +/// { +/// TEWNIF_ALPHA = 0, +/// #ifndef DISABLE_NONCE_TYPES +/// TEWNIF_BETA = 1, +/// TEWNIF_GAMMA = 2 +/// #else +/// TEWNIF_BETA = 1 +/// #endif +/// }; +/// ``` +/// +// enum +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +#[repr(i32)] +pub enum TestEnumWithIfndef { + #[cfg_attr(feature = "alloc", default)] + Alpha = 0, + #[cfg(not(feature = "disable_nonce_types"))] + Beta = 1, + #[cfg(not(feature = "disable_nonce_types"))] + Gamma = 2, + #[cfg(feature = "disable_nonce_types")] + Beta = 1, +} + +impl TestEnumWithIfndef { + const _VARIANTS: &[TestEnumWithIfndef] = &[ + TestEnumWithIfndef::Alpha, + #[cfg(not(feature = "disable_nonce_types"))] + TestEnumWithIfndef::Beta, + #[cfg(not(feature = "disable_nonce_types"))] + TestEnumWithIfndef::Gamma, + #[cfg(feature = "disable_nonce_types")] + TestEnumWithIfndef::Beta, + ]; + pub const VARIANTS: [TestEnumWithIfndef; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ + "Alpha", + #[cfg(not(feature = "disable_nonce_types"))] + "Beta", + #[cfg(not(feature = "disable_nonce_types"))] + "Gamma", + #[cfg(feature = "disable_nonce_types")] + "Beta", + ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; + + #[must_use] + pub const fn name(&self) -> &'static str { + match self { + Self::Alpha => "Alpha", + #[cfg(not(feature = "disable_nonce_types"))] + Self::Beta => "Beta", + #[cfg(not(feature = "disable_nonce_types"))] + Self::Gamma => "Gamma", + #[cfg(feature = "disable_nonce_types")] + Self::Beta => "Beta", + } + } + + #[must_use] + pub const fn variants() -> [TestEnumWithIfndef; Self::_VARIANTS.len()] { + Self::VARIANTS + } +} + +impl Name for TestEnumWithIfndef { + #[must_use] + fn name(&self) -> &'static str { + Self::name(self) + } +} + +impl Variants for TestEnumWithIfndef { + fn variants() -> slice::Iter<'static, TestEnumWithIfndef> { + Self::VARIANTS.iter() + } +} + +impl Enum for TestEnumWithIfndef {} + +impl fmt::Display for TestEnumWithIfndef { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str(self.name()) + } +} + +impl TryFrom for TestEnumWithIfndef { + type Error = Error; + + fn try_from(i: i32) -> Result { + let e = match i { + 0 => TestEnumWithIfndef::Alpha, + #[cfg(not(feature = "disable_nonce_types"))] + 1 => TestEnumWithIfndef::Beta, + #[cfg(not(feature = "disable_nonce_types"))] + 2 => TestEnumWithIfndef::Gamma, + #[cfg(feature = "disable_nonce_types")] + 1 => TestEnumWithIfndef::Beta, + #[allow(unreachable_patterns)] + _ => return Err(Error::Invalid), + }; + Ok(e) + } +} + +impl From for i32 { + #[must_use] + fn from(e: TestEnumWithIfndef) -> Self { + e as Self + } +} + +impl ReadXdr for TestEnumWithIfndef { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + let e = i32::read_xdr(r)?; + let v: Self = e.try_into()?; + Ok(v) + }) + } +} + +impl WriteXdr for TestEnumWithIfndef { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| { + let i: i32 = (*self).into(); + i.write_xdr(w) + }) + } +} + +/// TestEnumWithElif is an XDR Enum defined as: +/// +/// ```text +/// enum TestEnumWithElif +/// { +/// TWEELIF_ONE = 0, +/// #ifdef VARIANT_A +/// TWEELIF_TWO = 1, +/// TWEELIF_THREE = 2 +/// #elif VARIANT_B +/// TWEELIF_TWO = 1, +/// TWEELIF_THREE = 2, +/// TWEELIF_FOUR = 3 +/// #else +/// TWEELIF_TWO = 1 +/// #endif +/// }; +/// ``` +/// +// enum +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +#[repr(i32)] +pub enum TestEnumWithElif { + #[cfg_attr(feature = "alloc", default)] + One = 0, + #[cfg(feature = "variant_a")] + Two = 1, + #[cfg(feature = "variant_a")] + Three = 2, + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + Two = 1, + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + Three = 2, + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + Four = 3, + #[cfg(all(not(feature = "variant_a"), not(feature = "variant_b")))] + Two = 1, +} + +impl TestEnumWithElif { + const _VARIANTS: &[TestEnumWithElif] = &[ + TestEnumWithElif::One, + #[cfg(feature = "variant_a")] + TestEnumWithElif::Two, + #[cfg(feature = "variant_a")] + TestEnumWithElif::Three, + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + TestEnumWithElif::Two, + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + TestEnumWithElif::Three, + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + TestEnumWithElif::Four, + #[cfg(all(not(feature = "variant_a"), not(feature = "variant_b")))] + TestEnumWithElif::Two, + ]; + pub const VARIANTS: [TestEnumWithElif; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ + "One", + #[cfg(feature = "variant_a")] + "Two", + #[cfg(feature = "variant_a")] + "Three", + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + "Two", + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + "Three", + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + "Four", + #[cfg(all(not(feature = "variant_a"), not(feature = "variant_b")))] + "Two", + ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; + + #[must_use] + pub const fn name(&self) -> &'static str { + match self { + Self::One => "One", + #[cfg(feature = "variant_a")] + Self::Two => "Two", + #[cfg(feature = "variant_a")] + Self::Three => "Three", + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + Self::Two => "Two", + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + Self::Three => "Three", + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + Self::Four => "Four", + #[cfg(all(not(feature = "variant_a"), not(feature = "variant_b")))] + Self::Two => "Two", + } + } + + #[must_use] + pub const fn variants() -> [TestEnumWithElif; Self::_VARIANTS.len()] { + Self::VARIANTS + } +} + +impl Name for TestEnumWithElif { + #[must_use] + fn name(&self) -> &'static str { + Self::name(self) + } +} + +impl Variants for TestEnumWithElif { + fn variants() -> slice::Iter<'static, TestEnumWithElif> { + Self::VARIANTS.iter() + } +} + +impl Enum for TestEnumWithElif {} + +impl fmt::Display for TestEnumWithElif { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str(self.name()) + } +} + +impl TryFrom for TestEnumWithElif { + type Error = Error; + + fn try_from(i: i32) -> Result { + let e = match i { + 0 => TestEnumWithElif::One, + #[cfg(feature = "variant_a")] + 1 => TestEnumWithElif::Two, + #[cfg(feature = "variant_a")] + 2 => TestEnumWithElif::Three, + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + 1 => TestEnumWithElif::Two, + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + 2 => TestEnumWithElif::Three, + #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] + 3 => TestEnumWithElif::Four, + #[cfg(all(not(feature = "variant_a"), not(feature = "variant_b")))] + 1 => TestEnumWithElif::Two, + #[allow(unreachable_patterns)] + _ => return Err(Error::Invalid), + }; + Ok(e) + } +} + +impl From for i32 { + #[must_use] + fn from(e: TestEnumWithElif) -> Self { + e as Self + } +} + +impl ReadXdr for TestEnumWithElif { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + let e = i32::read_xdr(r)?; + let v: Self = e.try_into()?; + Ok(v) + }) + } +} + +impl WriteXdr for TestEnumWithElif { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| { + let i: i32 = (*self).into(); + i.write_xdr(w) + }) + } +} + +/// TestUnionWithIfdef is an XDR Union defined as: +/// +/// ```text +/// union TestUnionWithIfdef switch (TestEnumWithIfdef type) +/// { +/// case TESTENUM_A: +/// uint32 aVal; +/// case TESTENUM_B: +/// uint64 bVal; +/// #ifdef ENABLE_EXTRA_TYPES +/// case TESTENUM_C: +/// uint32 cVal; +/// case TESTENUM_D: +/// void; +/// #else +/// case TESTENUM_C: +/// void; +/// #endif +/// }; +/// ``` +/// +// union with discriminant TestEnumWithIfdef +#[cfg_eval::cfg_eval] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +#[allow(clippy::large_enum_variant)] +pub enum TestUnionWithIfdef { + A(u32), + B( + #[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_as(as = "NumberOrString") + )] + u64, + ), + #[cfg(feature = "enable_extra_types")] + C(u32), + #[cfg(feature = "enable_extra_types")] + D, + #[cfg(not(feature = "enable_extra_types"))] + C, +} + +#[cfg(feature = "alloc")] +impl Default for TestUnionWithIfdef { + fn default() -> Self { + Self::A(u32::default()) + } +} + +impl TestUnionWithIfdef { + const _VARIANTS: &[TestEnumWithIfdef] = &[ + TestEnumWithIfdef::A, + TestEnumWithIfdef::B, + #[cfg(feature = "enable_extra_types")] + TestEnumWithIfdef::C, + #[cfg(feature = "enable_extra_types")] + TestEnumWithIfdef::D, + #[cfg(not(feature = "enable_extra_types"))] + TestEnumWithIfdef::C, + ]; + pub const VARIANTS: [TestEnumWithIfdef; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ + "A", + "B", + #[cfg(feature = "enable_extra_types")] + "C", + #[cfg(feature = "enable_extra_types")] + "D", + #[cfg(not(feature = "enable_extra_types"))] + "C", + ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; + + #[must_use] + pub const fn name(&self) -> &'static str { + match self { + Self::A(_) => "A", + Self::B(_) => "B", + #[cfg(feature = "enable_extra_types")] + Self::C(_) => "C", + #[cfg(feature = "enable_extra_types")] + Self::D => "D", + #[cfg(not(feature = "enable_extra_types"))] + Self::C => "C", + } + } + + #[must_use] + pub const fn discriminant(&self) -> TestEnumWithIfdef { + #[allow(clippy::match_same_arms)] + match self { + Self::A(_) => TestEnumWithIfdef::A, + Self::B(_) => TestEnumWithIfdef::B, + #[cfg(feature = "enable_extra_types")] + Self::C(_) => TestEnumWithIfdef::C, + #[cfg(feature = "enable_extra_types")] + Self::D => TestEnumWithIfdef::D, + #[cfg(not(feature = "enable_extra_types"))] + Self::C => TestEnumWithIfdef::C, + } + } + + #[must_use] + pub const fn variants() -> [TestEnumWithIfdef; Self::_VARIANTS.len()] { + Self::VARIANTS + } +} + +impl Name for TestUnionWithIfdef { + #[must_use] + fn name(&self) -> &'static str { + Self::name(self) + } +} + +impl Discriminant for TestUnionWithIfdef { + #[must_use] + fn discriminant(&self) -> TestEnumWithIfdef { + Self::discriminant(self) + } +} + +impl Variants for TestUnionWithIfdef { + fn variants() -> slice::Iter<'static, TestEnumWithIfdef> { + Self::VARIANTS.iter() + } +} + +impl Union for TestUnionWithIfdef {} + +impl ReadXdr for TestUnionWithIfdef { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + let dv: TestEnumWithIfdef = ::read_xdr(r)?; + #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] + let v = match dv { + TestEnumWithIfdef::A => Self::A(u32::read_xdr(r)?), + TestEnumWithIfdef::B => Self::B(u64::read_xdr(r)?), + #[cfg(feature = "enable_extra_types")] + TestEnumWithIfdef::C => Self::C(u32::read_xdr(r)?), + #[cfg(feature = "enable_extra_types")] + TestEnumWithIfdef::D => Self::D, + #[cfg(not(feature = "enable_extra_types"))] + TestEnumWithIfdef::C => Self::C, + #[allow(unreachable_patterns)] + _ => return Err(Error::Invalid), + }; + Ok(v) + }) + } +} + +impl WriteXdr for TestUnionWithIfdef { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| { + self.discriminant().write_xdr(w)?; + #[allow(clippy::match_same_arms)] + match self { + Self::A(v) => v.write_xdr(w)?, + Self::B(v) => v.write_xdr(w)?, + #[cfg(feature = "enable_extra_types")] + Self::C(v) => v.write_xdr(w)?, + #[cfg(feature = "enable_extra_types")] + Self::D => ().write_xdr(w)?, + #[cfg(not(feature = "enable_extra_types"))] + Self::C => ().write_xdr(w)?, + }; + Ok(()) + }) + } +} + +/// TestUnionWithIfndef is an XDR Union defined as: +/// +/// ```text +/// union TestUnionWithIfndef switch (TestEnumWithIfndef type) +/// { +/// case TEWNIF_ALPHA: +/// uint32 alphaVal; +/// case TEWNIF_BETA: +/// uint64 betaVal; +/// #ifndef DISABLE_NONCE_TYPES +/// case TEWNIF_GAMMA: +/// Hash gammaVal; +/// #endif +/// }; +/// ``` +/// +// union with discriminant TestEnumWithIfndef +#[cfg_eval::cfg_eval] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +#[allow(clippy::large_enum_variant)] +pub enum TestUnionWithIfndef { + Alpha(u32), + Beta( + #[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_as(as = "NumberOrString") + )] + u64, + ), + #[cfg(not(feature = "disable_nonce_types"))] + Gamma(Hash), +} + +#[cfg(feature = "alloc")] +impl Default for TestUnionWithIfndef { + fn default() -> Self { + Self::Alpha(u32::default()) + } +} + +impl TestUnionWithIfndef { + const _VARIANTS: &[TestEnumWithIfndef] = &[ + TestEnumWithIfndef::Alpha, + TestEnumWithIfndef::Beta, + #[cfg(not(feature = "disable_nonce_types"))] + TestEnumWithIfndef::Gamma, + ]; + pub const VARIANTS: [TestEnumWithIfndef; Self::_VARIANTS.len()] = { + let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; + let mut i = 1; + while i < Self::_VARIANTS.len() { + arr[i] = Self::_VARIANTS[i]; + i += 1; + } + arr + }; + const _VARIANTS_STR: &[&str] = &[ + "Alpha", + "Beta", + #[cfg(not(feature = "disable_nonce_types"))] + "Gamma", + ]; + pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { + let mut arr = [""; Self::_VARIANTS_STR.len()]; + let mut i = 0; + while i < Self::_VARIANTS_STR.len() { + arr[i] = Self::_VARIANTS_STR[i]; + i += 1; + } + arr + }; + + #[must_use] + pub const fn name(&self) -> &'static str { + match self { + Self::Alpha(_) => "Alpha", + Self::Beta(_) => "Beta", + #[cfg(not(feature = "disable_nonce_types"))] + Self::Gamma(_) => "Gamma", + } + } + + #[must_use] + pub const fn discriminant(&self) -> TestEnumWithIfndef { + #[allow(clippy::match_same_arms)] + match self { + Self::Alpha(_) => TestEnumWithIfndef::Alpha, + Self::Beta(_) => TestEnumWithIfndef::Beta, + #[cfg(not(feature = "disable_nonce_types"))] + Self::Gamma(_) => TestEnumWithIfndef::Gamma, + } + } + + #[must_use] + pub const fn variants() -> [TestEnumWithIfndef; Self::_VARIANTS.len()] { + Self::VARIANTS + } +} + +impl Name for TestUnionWithIfndef { + #[must_use] + fn name(&self) -> &'static str { + Self::name(self) + } +} + +impl Discriminant for TestUnionWithIfndef { + #[must_use] + fn discriminant(&self) -> TestEnumWithIfndef { + Self::discriminant(self) + } +} + +impl Variants for TestUnionWithIfndef { + fn variants() -> slice::Iter<'static, TestEnumWithIfndef> { + Self::VARIANTS.iter() + } +} + +impl Union for TestUnionWithIfndef {} + +impl ReadXdr for TestUnionWithIfndef { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + let dv: TestEnumWithIfndef = ::read_xdr(r)?; + #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] + let v = match dv { + TestEnumWithIfndef::Alpha => Self::Alpha(u32::read_xdr(r)?), + TestEnumWithIfndef::Beta => Self::Beta(u64::read_xdr(r)?), + #[cfg(not(feature = "disable_nonce_types"))] + TestEnumWithIfndef::Gamma => Self::Gamma(Hash::read_xdr(r)?), + #[allow(unreachable_patterns)] + _ => return Err(Error::Invalid), + }; + Ok(v) + }) + } +} + +impl WriteXdr for TestUnionWithIfndef { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| { + self.discriminant().write_xdr(w)?; + #[allow(clippy::match_same_arms)] + match self { + Self::Alpha(v) => v.write_xdr(w)?, + Self::Beta(v) => v.write_xdr(w)?, + #[cfg(not(feature = "disable_nonce_types"))] + Self::Gamma(v) => v.write_xdr(w)?, + }; + Ok(()) + }) + } +} + +/// ExtraBundle is an XDR Struct defined as: +/// +/// ```text +/// struct ExtraBundle +/// { +/// uint32 x; +/// uint32 y; +/// }; +/// ``` +/// +#[cfg(feature = "enable_extra_types")] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub struct ExtraBundle { + pub x: u32, + pub y: u32, +} + +#[cfg(feature = "enable_extra_types")] +impl ReadXdr for ExtraBundle { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + Ok(Self { + x: u32::read_xdr(r)?, + y: u32::read_xdr(r)?, + }) + }) + } +} + +#[cfg(feature = "enable_extra_types")] +impl WriteXdr for ExtraBundle { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| { + self.x.write_xdr(w)?; + self.y.write_xdr(w)?; + Ok(()) + }) + } +} + +/// ExtraBundleAlias is an XDR Typedef defined as: +/// +/// ```text +/// typedef ExtraBundle ExtraBundleAlias; +/// ``` +/// +#[cfg(feature = "enable_extra_types")] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +#[derive(Debug)] +pub struct ExtraBundleAlias(pub ExtraBundle); + +#[cfg(feature = "enable_extra_types")] +impl From for ExtraBundle { + #[must_use] + fn from(x: ExtraBundleAlias) -> Self { + x.0 + } +} + +#[cfg(feature = "enable_extra_types")] +impl From for ExtraBundleAlias { + #[must_use] + fn from(x: ExtraBundle) -> Self { + ExtraBundleAlias(x) + } +} + +#[cfg(feature = "enable_extra_types")] +impl AsRef for ExtraBundleAlias { + #[must_use] + fn as_ref(&self) -> &ExtraBundle { + &self.0 + } +} + +#[cfg(feature = "enable_extra_types")] +impl ReadXdr for ExtraBundleAlias { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + let i = ExtraBundle::read_xdr(r)?; + let v = ExtraBundleAlias(i); + Ok(v) + }) + } +} + +#[cfg(feature = "enable_extra_types")] +impl WriteXdr for ExtraBundleAlias { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| self.0.write_xdr(w)) + } +} + +/// ExtraBundleVersion is an XDR Const defined as: +/// +/// ```text +/// const EXTRA_BUNDLE_VERSION = 1; +/// ``` +/// +#[cfg(feature = "enable_extra_types")] +pub const EXTRA_BUNDLE_VERSION: u64 = 1; + +/// OuterGuarded is an XDR Struct defined as: +/// +/// ```text +/// struct OuterGuarded +/// { +/// uint32 outerField; +/// }; +/// ``` +/// +#[cfg(feature = "enable_extra_types")] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub struct OuterGuarded { + pub outer_field: u32, +} + +#[cfg(feature = "enable_extra_types")] +impl ReadXdr for OuterGuarded { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + Ok(Self { + outer_field: u32::read_xdr(r)?, + }) + }) + } +} + +#[cfg(feature = "enable_extra_types")] +impl WriteXdr for OuterGuarded { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| { + self.outer_field.write_xdr(w)?; + Ok(()) + }) + } +} + +/// InnerGuarded is an XDR Struct defined as: +/// +/// ```text +/// struct InnerGuarded +/// { +/// uint64 innerField; +/// }; +/// ``` +/// +#[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub struct InnerGuarded { + #[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_as(as = "NumberOrString") + )] + pub inner_field: u64, +} + +#[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] +impl ReadXdr for InnerGuarded { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + Ok(Self { + inner_field: u64::read_xdr(r)?, + }) + }) + } +} + +#[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] +impl WriteXdr for InnerGuarded { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| { + self.inner_field.write_xdr(w)?; + Ok(()) + }) + } +} + #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] #[cfg_attr( all(feature = "serde", feature = "alloc"), @@ -54632,6 +56135,26 @@ pub enum TypeVariant { PoolId, ClaimableBalanceIdType, ClaimableBalanceId, + #[cfg(feature = "enable_extra_types")] + ExtraUint64, + #[cfg(not(feature = "disable_nonce_types"))] + NonceUint64, + #[cfg(feature = "enable_extra_types")] + ExtraStruct, + ConditionalTypedef, + TestEnumWithIfdef, + TestEnumWithIfndef, + TestEnumWithElif, + TestUnionWithIfdef, + TestUnionWithIfndef, + #[cfg(feature = "enable_extra_types")] + ExtraBundle, + #[cfg(feature = "enable_extra_types")] + ExtraBundleAlias, + #[cfg(feature = "enable_extra_types")] + OuterGuarded, + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + InnerGuarded, } impl TypeVariant { @@ -55101,6 +56624,26 @@ impl TypeVariant { TypeVariant::PoolId, TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraUint64, + #[cfg(not(feature = "disable_nonce_types"))] + TypeVariant::NonceUint64, + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraStruct, + TypeVariant::ConditionalTypedef, + TypeVariant::TestEnumWithIfdef, + TypeVariant::TestEnumWithIfndef, + TypeVariant::TestEnumWithElif, + TypeVariant::TestUnionWithIfdef, + TypeVariant::TestUnionWithIfndef, + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundle, + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundleAlias, + #[cfg(feature = "enable_extra_types")] + TypeVariant::OuterGuarded, + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + TypeVariant::InnerGuarded, ]; pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -55575,6 +57118,26 @@ impl TypeVariant { "PoolId", "ClaimableBalanceIdType", "ClaimableBalanceId", + #[cfg(feature = "enable_extra_types")] + "ExtraUint64", + #[cfg(not(feature = "disable_nonce_types"))] + "NonceUint64", + #[cfg(feature = "enable_extra_types")] + "ExtraStruct", + "ConditionalTypedef", + "TestEnumWithIfdef", + "TestEnumWithIfndef", + "TestEnumWithElif", + "TestUnionWithIfdef", + "TestUnionWithIfndef", + #[cfg(feature = "enable_extra_types")] + "ExtraBundle", + #[cfg(feature = "enable_extra_types")] + "ExtraBundleAlias", + #[cfg(feature = "enable_extra_types")] + "OuterGuarded", + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + "InnerGuarded", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -56067,6 +57630,26 @@ impl TypeVariant { Self::PoolId => "PoolId", Self::ClaimableBalanceIdType => "ClaimableBalanceIdType", Self::ClaimableBalanceId => "ClaimableBalanceId", + #[cfg(feature = "enable_extra_types")] + Self::ExtraUint64 => "ExtraUint64", + #[cfg(not(feature = "disable_nonce_types"))] + Self::NonceUint64 => "NonceUint64", + #[cfg(feature = "enable_extra_types")] + Self::ExtraStruct => "ExtraStruct", + Self::ConditionalTypedef => "ConditionalTypedef", + Self::TestEnumWithIfdef => "TestEnumWithIfdef", + Self::TestEnumWithIfndef => "TestEnumWithIfndef", + Self::TestEnumWithElif => "TestEnumWithElif", + Self::TestUnionWithIfdef => "TestUnionWithIfdef", + Self::TestUnionWithIfndef => "TestUnionWithIfndef", + #[cfg(feature = "enable_extra_types")] + Self::ExtraBundle => "ExtraBundle", + #[cfg(feature = "enable_extra_types")] + Self::ExtraBundleAlias => "ExtraBundleAlias", + #[cfg(feature = "enable_extra_types")] + Self::OuterGuarded => "OuterGuarded", + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + Self::InnerGuarded => "InnerGuarded", } } @@ -56760,6 +58343,26 @@ impl TypeVariant { Self::PoolId => gen.into_root_schema_for::(), Self::ClaimableBalanceIdType => gen.into_root_schema_for::(), Self::ClaimableBalanceId => gen.into_root_schema_for::(), + #[cfg(feature = "enable_extra_types")] + Self::ExtraUint64 => gen.into_root_schema_for::(), + #[cfg(not(feature = "disable_nonce_types"))] + Self::NonceUint64 => gen.into_root_schema_for::(), + #[cfg(feature = "enable_extra_types")] + Self::ExtraStruct => gen.into_root_schema_for::(), + Self::ConditionalTypedef => gen.into_root_schema_for::(), + Self::TestEnumWithIfdef => gen.into_root_schema_for::(), + Self::TestEnumWithIfndef => gen.into_root_schema_for::(), + Self::TestEnumWithElif => gen.into_root_schema_for::(), + Self::TestUnionWithIfdef => gen.into_root_schema_for::(), + Self::TestUnionWithIfndef => gen.into_root_schema_for::(), + #[cfg(feature = "enable_extra_types")] + Self::ExtraBundle => gen.into_root_schema_for::(), + #[cfg(feature = "enable_extra_types")] + Self::ExtraBundleAlias => gen.into_root_schema_for::(), + #[cfg(feature = "enable_extra_types")] + Self::OuterGuarded => gen.into_root_schema_for::(), + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + Self::InnerGuarded => gen.into_root_schema_for::(), } } } @@ -57275,6 +58878,26 @@ impl core::str::FromStr for TypeVariant { "PoolId" => Ok(Self::PoolId), "ClaimableBalanceIdType" => Ok(Self::ClaimableBalanceIdType), "ClaimableBalanceId" => Ok(Self::ClaimableBalanceId), + #[cfg(feature = "enable_extra_types")] + "ExtraUint64" => Ok(Self::ExtraUint64), + #[cfg(not(feature = "disable_nonce_types"))] + "NonceUint64" => Ok(Self::NonceUint64), + #[cfg(feature = "enable_extra_types")] + "ExtraStruct" => Ok(Self::ExtraStruct), + "ConditionalTypedef" => Ok(Self::ConditionalTypedef), + "TestEnumWithIfdef" => Ok(Self::TestEnumWithIfdef), + "TestEnumWithIfndef" => Ok(Self::TestEnumWithIfndef), + "TestEnumWithElif" => Ok(Self::TestEnumWithElif), + "TestUnionWithIfdef" => Ok(Self::TestUnionWithIfdef), + "TestUnionWithIfndef" => Ok(Self::TestUnionWithIfndef), + #[cfg(feature = "enable_extra_types")] + "ExtraBundle" => Ok(Self::ExtraBundle), + #[cfg(feature = "enable_extra_types")] + "ExtraBundleAlias" => Ok(Self::ExtraBundleAlias), + #[cfg(feature = "enable_extra_types")] + "OuterGuarded" => Ok(Self::OuterGuarded), + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + "InnerGuarded" => Ok(Self::InnerGuarded), _ => Err(Error::Invalid), } } @@ -57752,6 +59375,26 @@ pub enum Type { PoolId(Box), ClaimableBalanceIdType(Box), ClaimableBalanceId(Box), + #[cfg(feature = "enable_extra_types")] + ExtraUint64(Box), + #[cfg(not(feature = "disable_nonce_types"))] + NonceUint64(Box), + #[cfg(feature = "enable_extra_types")] + ExtraStruct(Box), + ConditionalTypedef(Box), + TestEnumWithIfdef(Box), + TestEnumWithIfndef(Box), + TestEnumWithElif(Box), + TestUnionWithIfdef(Box), + TestUnionWithIfndef(Box), + #[cfg(feature = "enable_extra_types")] + ExtraBundle(Box), + #[cfg(feature = "enable_extra_types")] + ExtraBundleAlias(Box), + #[cfg(feature = "enable_extra_types")] + OuterGuarded(Box), + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + InnerGuarded(Box), } impl Type { @@ -58221,6 +59864,26 @@ impl Type { TypeVariant::PoolId, TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraUint64, + #[cfg(not(feature = "disable_nonce_types"))] + TypeVariant::NonceUint64, + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraStruct, + TypeVariant::ConditionalTypedef, + TypeVariant::TestEnumWithIfdef, + TypeVariant::TestEnumWithIfndef, + TypeVariant::TestEnumWithElif, + TypeVariant::TestUnionWithIfdef, + TypeVariant::TestUnionWithIfndef, + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundle, + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundleAlias, + #[cfg(feature = "enable_extra_types")] + TypeVariant::OuterGuarded, + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + TypeVariant::InnerGuarded, ]; pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -58695,6 +60358,26 @@ impl Type { "PoolId", "ClaimableBalanceIdType", "ClaimableBalanceId", + #[cfg(feature = "enable_extra_types")] + "ExtraUint64", + #[cfg(not(feature = "disable_nonce_types"))] + "NonceUint64", + #[cfg(feature = "enable_extra_types")] + "ExtraStruct", + "ConditionalTypedef", + "TestEnumWithIfdef", + "TestEnumWithIfndef", + "TestEnumWithElif", + "TestUnionWithIfdef", + "TestUnionWithIfndef", + #[cfg(feature = "enable_extra_types")] + "ExtraBundle", + #[cfg(feature = "enable_extra_types")] + "ExtraBundleAlias", + #[cfg(feature = "enable_extra_types")] + "OuterGuarded", + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + "InnerGuarded", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -60729,6 +62412,66 @@ impl Type { ClaimableBalanceId::read_xdr(r)?, ))) }), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraUint64 => { + r.with_limited_depth(|r| Ok(Self::ExtraUint64(Box::new(ExtraUint64::read_xdr(r)?)))) + } + #[cfg(not(feature = "disable_nonce_types"))] + TypeVariant::NonceUint64 => { + r.with_limited_depth(|r| Ok(Self::NonceUint64(Box::new(NonceUint64::read_xdr(r)?)))) + } + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraStruct => { + r.with_limited_depth(|r| Ok(Self::ExtraStruct(Box::new(ExtraStruct::read_xdr(r)?)))) + } + TypeVariant::ConditionalTypedef => r.with_limited_depth(|r| { + Ok(Self::ConditionalTypedef(Box::new( + ConditionalTypedef::read_xdr(r)?, + ))) + }), + TypeVariant::TestEnumWithIfdef => r.with_limited_depth(|r| { + Ok(Self::TestEnumWithIfdef(Box::new( + TestEnumWithIfdef::read_xdr(r)?, + ))) + }), + TypeVariant::TestEnumWithIfndef => r.with_limited_depth(|r| { + Ok(Self::TestEnumWithIfndef(Box::new( + TestEnumWithIfndef::read_xdr(r)?, + ))) + }), + TypeVariant::TestEnumWithElif => r.with_limited_depth(|r| { + Ok(Self::TestEnumWithElif(Box::new( + TestEnumWithElif::read_xdr(r)?, + ))) + }), + TypeVariant::TestUnionWithIfdef => r.with_limited_depth(|r| { + Ok(Self::TestUnionWithIfdef(Box::new( + TestUnionWithIfdef::read_xdr(r)?, + ))) + }), + TypeVariant::TestUnionWithIfndef => r.with_limited_depth(|r| { + Ok(Self::TestUnionWithIfndef(Box::new( + TestUnionWithIfndef::read_xdr(r)?, + ))) + }), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundle => { + r.with_limited_depth(|r| Ok(Self::ExtraBundle(Box::new(ExtraBundle::read_xdr(r)?)))) + } + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundleAlias => r.with_limited_depth(|r| { + Ok(Self::ExtraBundleAlias(Box::new( + ExtraBundleAlias::read_xdr(r)?, + ))) + }), + #[cfg(feature = "enable_extra_types")] + TypeVariant::OuterGuarded => r.with_limited_depth(|r| { + Ok(Self::OuterGuarded(Box::new(OuterGuarded::read_xdr(r)?))) + }), + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + TypeVariant::InnerGuarded => r.with_limited_depth(|r| { + Ok(Self::InnerGuarded(Box::new(InnerGuarded::read_xdr(r)?))) + }), } } @@ -62777,6 +64520,65 @@ impl Type { ReadXdrIter::<_, ClaimableBalanceId>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ClaimableBalanceId(Box::new(t)))), ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraUint64 => Box::new( + ReadXdrIter::<_, ExtraUint64>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ExtraUint64(Box::new(t)))), + ), + #[cfg(not(feature = "disable_nonce_types"))] + TypeVariant::NonceUint64 => Box::new( + ReadXdrIter::<_, NonceUint64>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::NonceUint64(Box::new(t)))), + ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraStruct => Box::new( + ReadXdrIter::<_, ExtraStruct>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ExtraStruct(Box::new(t)))), + ), + TypeVariant::ConditionalTypedef => Box::new( + ReadXdrIter::<_, ConditionalTypedef>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ConditionalTypedef(Box::new(t)))), + ), + TypeVariant::TestEnumWithIfdef => Box::new( + ReadXdrIter::<_, TestEnumWithIfdef>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::TestEnumWithIfdef(Box::new(t)))), + ), + TypeVariant::TestEnumWithIfndef => Box::new( + ReadXdrIter::<_, TestEnumWithIfndef>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::TestEnumWithIfndef(Box::new(t)))), + ), + TypeVariant::TestEnumWithElif => Box::new( + ReadXdrIter::<_, TestEnumWithElif>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::TestEnumWithElif(Box::new(t)))), + ), + TypeVariant::TestUnionWithIfdef => Box::new( + ReadXdrIter::<_, TestUnionWithIfdef>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::TestUnionWithIfdef(Box::new(t)))), + ), + TypeVariant::TestUnionWithIfndef => Box::new( + ReadXdrIter::<_, TestUnionWithIfndef>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::TestUnionWithIfndef(Box::new(t)))), + ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundle => Box::new( + ReadXdrIter::<_, ExtraBundle>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ExtraBundle(Box::new(t)))), + ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundleAlias => Box::new( + ReadXdrIter::<_, ExtraBundleAlias>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ExtraBundleAlias(Box::new(t)))), + ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::OuterGuarded => Box::new( + ReadXdrIter::<_, OuterGuarded>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::OuterGuarded(Box::new(t)))), + ), + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + TypeVariant::InnerGuarded => Box::new( + ReadXdrIter::<_, InnerGuarded>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::InnerGuarded(Box::new(t)))), + ), } } @@ -65086,6 +66888,65 @@ impl Type { ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ClaimableBalanceId(Box::new(t.0)))), ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraUint64 => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ExtraUint64(Box::new(t.0)))), + ), + #[cfg(not(feature = "disable_nonce_types"))] + TypeVariant::NonceUint64 => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::NonceUint64(Box::new(t.0)))), + ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraStruct => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ExtraStruct(Box::new(t.0)))), + ), + TypeVariant::ConditionalTypedef => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ConditionalTypedef(Box::new(t.0)))), + ), + TypeVariant::TestEnumWithIfdef => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::TestEnumWithIfdef(Box::new(t.0)))), + ), + TypeVariant::TestEnumWithIfndef => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::TestEnumWithIfndef(Box::new(t.0)))), + ), + TypeVariant::TestEnumWithElif => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::TestEnumWithElif(Box::new(t.0)))), + ), + TypeVariant::TestUnionWithIfdef => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::TestUnionWithIfdef(Box::new(t.0)))), + ), + TypeVariant::TestUnionWithIfndef => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::TestUnionWithIfndef(Box::new(t.0)))), + ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundle => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ExtraBundle(Box::new(t.0)))), + ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundleAlias => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::ExtraBundleAlias(Box::new(t.0)))), + ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::OuterGuarded => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::OuterGuarded(Box::new(t.0)))), + ), + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + TypeVariant::InnerGuarded => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::InnerGuarded(Box::new(t.0)))), + ), } } @@ -66977,6 +68838,65 @@ impl Type { ReadXdrIter::<_, ClaimableBalanceId>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::ClaimableBalanceId(Box::new(t)))), ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraUint64 => Box::new( + ReadXdrIter::<_, ExtraUint64>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::ExtraUint64(Box::new(t)))), + ), + #[cfg(not(feature = "disable_nonce_types"))] + TypeVariant::NonceUint64 => Box::new( + ReadXdrIter::<_, NonceUint64>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::NonceUint64(Box::new(t)))), + ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraStruct => Box::new( + ReadXdrIter::<_, ExtraStruct>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::ExtraStruct(Box::new(t)))), + ), + TypeVariant::ConditionalTypedef => Box::new( + ReadXdrIter::<_, ConditionalTypedef>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::ConditionalTypedef(Box::new(t)))), + ), + TypeVariant::TestEnumWithIfdef => Box::new( + ReadXdrIter::<_, TestEnumWithIfdef>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::TestEnumWithIfdef(Box::new(t)))), + ), + TypeVariant::TestEnumWithIfndef => Box::new( + ReadXdrIter::<_, TestEnumWithIfndef>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::TestEnumWithIfndef(Box::new(t)))), + ), + TypeVariant::TestEnumWithElif => Box::new( + ReadXdrIter::<_, TestEnumWithElif>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::TestEnumWithElif(Box::new(t)))), + ), + TypeVariant::TestUnionWithIfdef => Box::new( + ReadXdrIter::<_, TestUnionWithIfdef>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::TestUnionWithIfdef(Box::new(t)))), + ), + TypeVariant::TestUnionWithIfndef => Box::new( + ReadXdrIter::<_, TestUnionWithIfndef>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::TestUnionWithIfndef(Box::new(t)))), + ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundle => Box::new( + ReadXdrIter::<_, ExtraBundle>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::ExtraBundle(Box::new(t)))), + ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundleAlias => Box::new( + ReadXdrIter::<_, ExtraBundleAlias>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::ExtraBundleAlias(Box::new(t)))), + ), + #[cfg(feature = "enable_extra_types")] + TypeVariant::OuterGuarded => Box::new( + ReadXdrIter::<_, OuterGuarded>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::OuterGuarded(Box::new(t)))), + ), + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + TypeVariant::InnerGuarded => Box::new( + ReadXdrIter::<_, InnerGuarded>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::InnerGuarded(Box::new(t)))), + ), } } @@ -68285,6 +70205,52 @@ impl Type { TypeVariant::ClaimableBalanceId => Ok(Self::ClaimableBalanceId(Box::new( serde_json::from_reader(r)?, ))), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraUint64 => { + Ok(Self::ExtraUint64(Box::new(serde_json::from_reader(r)?))) + } + #[cfg(not(feature = "disable_nonce_types"))] + TypeVariant::NonceUint64 => { + Ok(Self::NonceUint64(Box::new(serde_json::from_reader(r)?))) + } + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraStruct => { + Ok(Self::ExtraStruct(Box::new(serde_json::from_reader(r)?))) + } + TypeVariant::ConditionalTypedef => Ok(Self::ConditionalTypedef(Box::new( + serde_json::from_reader(r)?, + ))), + TypeVariant::TestEnumWithIfdef => Ok(Self::TestEnumWithIfdef(Box::new( + serde_json::from_reader(r)?, + ))), + TypeVariant::TestEnumWithIfndef => Ok(Self::TestEnumWithIfndef(Box::new( + serde_json::from_reader(r)?, + ))), + TypeVariant::TestEnumWithElif => Ok(Self::TestEnumWithElif(Box::new( + serde_json::from_reader(r)?, + ))), + TypeVariant::TestUnionWithIfdef => Ok(Self::TestUnionWithIfdef(Box::new( + serde_json::from_reader(r)?, + ))), + TypeVariant::TestUnionWithIfndef => Ok(Self::TestUnionWithIfndef(Box::new( + serde_json::from_reader(r)?, + ))), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundle => { + Ok(Self::ExtraBundle(Box::new(serde_json::from_reader(r)?))) + } + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundleAlias => Ok(Self::ExtraBundleAlias(Box::new( + serde_json::from_reader(r)?, + ))), + #[cfg(feature = "enable_extra_types")] + TypeVariant::OuterGuarded => { + Ok(Self::OuterGuarded(Box::new(serde_json::from_reader(r)?))) + } + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + TypeVariant::InnerGuarded => { + Ok(Self::InnerGuarded(Box::new(serde_json::from_reader(r)?))) + } } } @@ -69766,6 +71732,52 @@ impl Type { TypeVariant::ClaimableBalanceId => Ok(Self::ClaimableBalanceId(Box::new( serde::de::Deserialize::deserialize(r)?, ))), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraUint64 => Ok(Self::ExtraUint64(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + #[cfg(not(feature = "disable_nonce_types"))] + TypeVariant::NonceUint64 => Ok(Self::NonceUint64(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraStruct => Ok(Self::ExtraStruct(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + TypeVariant::ConditionalTypedef => Ok(Self::ConditionalTypedef(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + TypeVariant::TestEnumWithIfdef => Ok(Self::TestEnumWithIfdef(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + TypeVariant::TestEnumWithIfndef => Ok(Self::TestEnumWithIfndef(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + TypeVariant::TestEnumWithElif => Ok(Self::TestEnumWithElif(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + TypeVariant::TestUnionWithIfdef => Ok(Self::TestUnionWithIfdef(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + TypeVariant::TestUnionWithIfndef => Ok(Self::TestUnionWithIfndef(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundle => Ok(Self::ExtraBundle(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundleAlias => Ok(Self::ExtraBundleAlias(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + #[cfg(feature = "enable_extra_types")] + TypeVariant::OuterGuarded => Ok(Self::OuterGuarded(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + TypeVariant::InnerGuarded => Ok(Self::InnerGuarded(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), } } @@ -71080,6 +73092,44 @@ impl Type { TypeVariant::ClaimableBalanceId => Ok(Self::ClaimableBalanceId(Box::new( ClaimableBalanceId::arbitrary(u)?, ))), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraUint64 => Ok(Self::ExtraUint64(Box::new(ExtraUint64::arbitrary(u)?))), + #[cfg(not(feature = "disable_nonce_types"))] + TypeVariant::NonceUint64 => Ok(Self::NonceUint64(Box::new(NonceUint64::arbitrary(u)?))), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraStruct => Ok(Self::ExtraStruct(Box::new(ExtraStruct::arbitrary(u)?))), + TypeVariant::ConditionalTypedef => Ok(Self::ConditionalTypedef(Box::new( + ConditionalTypedef::arbitrary(u)?, + ))), + TypeVariant::TestEnumWithIfdef => Ok(Self::TestEnumWithIfdef(Box::new( + TestEnumWithIfdef::arbitrary(u)?, + ))), + TypeVariant::TestEnumWithIfndef => Ok(Self::TestEnumWithIfndef(Box::new( + TestEnumWithIfndef::arbitrary(u)?, + ))), + TypeVariant::TestEnumWithElif => Ok(Self::TestEnumWithElif(Box::new( + TestEnumWithElif::arbitrary(u)?, + ))), + TypeVariant::TestUnionWithIfdef => Ok(Self::TestUnionWithIfdef(Box::new( + TestUnionWithIfdef::arbitrary(u)?, + ))), + TypeVariant::TestUnionWithIfndef => Ok(Self::TestUnionWithIfndef(Box::new( + TestUnionWithIfndef::arbitrary(u)?, + ))), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundle => Ok(Self::ExtraBundle(Box::new(ExtraBundle::arbitrary(u)?))), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundleAlias => Ok(Self::ExtraBundleAlias(Box::new( + ExtraBundleAlias::arbitrary(u)?, + ))), + #[cfg(feature = "enable_extra_types")] + TypeVariant::OuterGuarded => { + Ok(Self::OuterGuarded(Box::new(OuterGuarded::arbitrary(u)?))) + } + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + TypeVariant::InnerGuarded => { + Ok(Self::InnerGuarded(Box::new(InnerGuarded::arbitrary(u)?))) + } } } @@ -71737,6 +73787,26 @@ impl Type { TypeVariant::PoolId => Self::PoolId(Box::default()), TypeVariant::ClaimableBalanceIdType => Self::ClaimableBalanceIdType(Box::default()), TypeVariant::ClaimableBalanceId => Self::ClaimableBalanceId(Box::default()), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraUint64 => Self::ExtraUint64(Box::default()), + #[cfg(not(feature = "disable_nonce_types"))] + TypeVariant::NonceUint64 => Self::NonceUint64(Box::default()), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraStruct => Self::ExtraStruct(Box::default()), + TypeVariant::ConditionalTypedef => Self::ConditionalTypedef(Box::default()), + TypeVariant::TestEnumWithIfdef => Self::TestEnumWithIfdef(Box::default()), + TypeVariant::TestEnumWithIfndef => Self::TestEnumWithIfndef(Box::default()), + TypeVariant::TestEnumWithElif => Self::TestEnumWithElif(Box::default()), + TypeVariant::TestUnionWithIfdef => Self::TestUnionWithIfdef(Box::default()), + TypeVariant::TestUnionWithIfndef => Self::TestUnionWithIfndef(Box::default()), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundle => Self::ExtraBundle(Box::default()), + #[cfg(feature = "enable_extra_types")] + TypeVariant::ExtraBundleAlias => Self::ExtraBundleAlias(Box::default()), + #[cfg(feature = "enable_extra_types")] + TypeVariant::OuterGuarded => Self::OuterGuarded(Box::default()), + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + TypeVariant::InnerGuarded => Self::InnerGuarded(Box::default()), } } @@ -72209,6 +74279,26 @@ impl Type { Self::PoolId(ref v) => v.as_ref(), Self::ClaimableBalanceIdType(ref v) => v.as_ref(), Self::ClaimableBalanceId(ref v) => v.as_ref(), + #[cfg(feature = "enable_extra_types")] + Self::ExtraUint64(ref v) => v.as_ref(), + #[cfg(not(feature = "disable_nonce_types"))] + Self::NonceUint64(ref v) => v.as_ref(), + #[cfg(feature = "enable_extra_types")] + Self::ExtraStruct(ref v) => v.as_ref(), + Self::ConditionalTypedef(ref v) => v.as_ref(), + Self::TestEnumWithIfdef(ref v) => v.as_ref(), + Self::TestEnumWithIfndef(ref v) => v.as_ref(), + Self::TestEnumWithElif(ref v) => v.as_ref(), + Self::TestUnionWithIfdef(ref v) => v.as_ref(), + Self::TestUnionWithIfndef(ref v) => v.as_ref(), + #[cfg(feature = "enable_extra_types")] + Self::ExtraBundle(ref v) => v.as_ref(), + #[cfg(feature = "enable_extra_types")] + Self::ExtraBundleAlias(ref v) => v.as_ref(), + #[cfg(feature = "enable_extra_types")] + Self::OuterGuarded(ref v) => v.as_ref(), + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + Self::InnerGuarded(ref v) => v.as_ref(), } } @@ -72705,6 +74795,26 @@ impl Type { Self::PoolId(_) => "PoolId", Self::ClaimableBalanceIdType(_) => "ClaimableBalanceIdType", Self::ClaimableBalanceId(_) => "ClaimableBalanceId", + #[cfg(feature = "enable_extra_types")] + Self::ExtraUint64(_) => "ExtraUint64", + #[cfg(not(feature = "disable_nonce_types"))] + Self::NonceUint64(_) => "NonceUint64", + #[cfg(feature = "enable_extra_types")] + Self::ExtraStruct(_) => "ExtraStruct", + Self::ConditionalTypedef(_) => "ConditionalTypedef", + Self::TestEnumWithIfdef(_) => "TestEnumWithIfdef", + Self::TestEnumWithIfndef(_) => "TestEnumWithIfndef", + Self::TestEnumWithElif(_) => "TestEnumWithElif", + Self::TestUnionWithIfdef(_) => "TestUnionWithIfdef", + Self::TestUnionWithIfndef(_) => "TestUnionWithIfndef", + #[cfg(feature = "enable_extra_types")] + Self::ExtraBundle(_) => "ExtraBundle", + #[cfg(feature = "enable_extra_types")] + Self::ExtraBundleAlias(_) => "ExtraBundleAlias", + #[cfg(feature = "enable_extra_types")] + Self::OuterGuarded(_) => "OuterGuarded", + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + Self::InnerGuarded(_) => "InnerGuarded", } } @@ -73251,6 +75361,26 @@ impl Type { Self::PoolId(_) => TypeVariant::PoolId, Self::ClaimableBalanceIdType(_) => TypeVariant::ClaimableBalanceIdType, Self::ClaimableBalanceId(_) => TypeVariant::ClaimableBalanceId, + #[cfg(feature = "enable_extra_types")] + Self::ExtraUint64(_) => TypeVariant::ExtraUint64, + #[cfg(not(feature = "disable_nonce_types"))] + Self::NonceUint64(_) => TypeVariant::NonceUint64, + #[cfg(feature = "enable_extra_types")] + Self::ExtraStruct(_) => TypeVariant::ExtraStruct, + Self::ConditionalTypedef(_) => TypeVariant::ConditionalTypedef, + Self::TestEnumWithIfdef(_) => TypeVariant::TestEnumWithIfdef, + Self::TestEnumWithIfndef(_) => TypeVariant::TestEnumWithIfndef, + Self::TestEnumWithElif(_) => TypeVariant::TestEnumWithElif, + Self::TestUnionWithIfdef(_) => TypeVariant::TestUnionWithIfdef, + Self::TestUnionWithIfndef(_) => TypeVariant::TestUnionWithIfndef, + #[cfg(feature = "enable_extra_types")] + Self::ExtraBundle(_) => TypeVariant::ExtraBundle, + #[cfg(feature = "enable_extra_types")] + Self::ExtraBundleAlias(_) => TypeVariant::ExtraBundleAlias, + #[cfg(feature = "enable_extra_types")] + Self::OuterGuarded(_) => TypeVariant::OuterGuarded, + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + Self::InnerGuarded(_) => TypeVariant::InnerGuarded, } } } @@ -73736,6 +75866,26 @@ impl WriteXdr for Type { Self::PoolId(v) => v.write_xdr(w), Self::ClaimableBalanceIdType(v) => v.write_xdr(w), Self::ClaimableBalanceId(v) => v.write_xdr(w), + #[cfg(feature = "enable_extra_types")] + Self::ExtraUint64(v) => v.write_xdr(w), + #[cfg(not(feature = "disable_nonce_types"))] + Self::NonceUint64(v) => v.write_xdr(w), + #[cfg(feature = "enable_extra_types")] + Self::ExtraStruct(v) => v.write_xdr(w), + Self::ConditionalTypedef(v) => v.write_xdr(w), + Self::TestEnumWithIfdef(v) => v.write_xdr(w), + Self::TestEnumWithIfndef(v) => v.write_xdr(w), + Self::TestEnumWithElif(v) => v.write_xdr(w), + Self::TestUnionWithIfdef(v) => v.write_xdr(w), + Self::TestUnionWithIfndef(v) => v.write_xdr(w), + #[cfg(feature = "enable_extra_types")] + Self::ExtraBundle(v) => v.write_xdr(w), + #[cfg(feature = "enable_extra_types")] + Self::ExtraBundleAlias(v) => v.write_xdr(w), + #[cfg(feature = "enable_extra_types")] + Self::OuterGuarded(v) => v.write_xdr(w), + #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] + Self::InnerGuarded(v) => v.write_xdr(w), } } } diff --git a/xdr-generator-rust/generator/src/generator.rs b/xdr-generator-rust/generator/src/generator.rs index 3147f9e2..f9e1e0c0 100644 --- a/xdr-generator-rust/generator/src/generator.rs +++ b/xdr-generator-rust/generator/src/generator.rs @@ -62,8 +62,16 @@ impl RustGenerator { { let name = type_name(d.name()); let cfg = self.resolve_cfg(d); - let prev = cfg_by_name.insert(name.clone(), cfg); - debug_assert!(prev.is_none(), "duplicate Rust type name: {name}"); + match cfg_by_name.entry(name) { + std::collections::hash_map::Entry::Vacant(e) => { + e.insert(cfg); + } + std::collections::hash_map::Entry::Occupied(mut e) => { + // Same name in multiple cfg branches (e.g. #ifdef/#else) + // means the type is always present, so clear the cfg. + e.insert(None); + } + } } let types: Vec = spec diff --git a/xdr-generator-rust/xdr-parser/src/ast.rs b/xdr-generator-rust/xdr-parser/src/ast.rs index 7cca23b1..85317908 100644 --- a/xdr-generator-rust/xdr-parser/src/ast.rs +++ b/xdr-generator-rust/xdr-parser/src/ast.rs @@ -139,7 +139,10 @@ impl CfgExpr { /// Render as a Rust `#[cfg(...)]` attribute string (without the outer `#[cfg()]`). pub fn render(&self) -> String { match self { - CfgExpr::Feature(name) => format!("feature = \"{name}\""), + CfgExpr::Feature(name) => { + let lower = name.to_lowercase(); + format!("feature = \"{lower}\"") + } CfgExpr::Not(inner) => format!("not({})", inner.render()), CfgExpr::All(exprs) => { let parts: Vec = exprs.iter().map(|e| e.render()).collect(); From ead1e64f8da996f8f67b5fa4c7b2fd876e732bff Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 18 Mar 2026 12:19:12 +1000 Subject: [PATCH 07/28] remove `#ifndef` and `#elif` preprocessor directive support --- xdr-generator-rust/xdr-parser/src/ast.rs | 12 +- xdr-generator-rust/xdr-parser/src/lexer.rs | 6 +- xdr-generator-rust/xdr-parser/src/parser.rs | 111 ++-------- .../xdr-parser/src/tests/lexer.rs | 24 --- .../xdr-parser/src/tests/parser.rs | 202 +----------------- 5 files changed, 36 insertions(+), 319 deletions(-) diff --git a/xdr-generator-rust/xdr-parser/src/ast.rs b/xdr-generator-rust/xdr-parser/src/ast.rs index 85317908..4f4d9801 100644 --- a/xdr-generator-rust/xdr-parser/src/ast.rs +++ b/xdr-generator-rust/xdr-parser/src/ast.rs @@ -94,7 +94,7 @@ pub struct Namespace { pub namespaces: Vec, } -/// A conditional compilation expression, mapping XDR `#ifdef`/`#ifndef`/`#elif` +/// A conditional compilation expression, mapping XDR `#ifdef`/`#else`/`#endif` /// directives to Rust `#[cfg(feature = "...")]` attributes. #[derive(Debug, Clone, PartialEq, Eq)] pub enum CfgExpr { @@ -241,7 +241,7 @@ pub struct Struct { pub parent: Option, /// Index into `XdrSpec::files` for the file this was parsed from. pub file_index: usize, - /// Conditional compilation expression from `#ifdef`/`#ifndef`. + /// Conditional compilation expression from `#ifdef`/`#else`/`#endif`. pub cfg: Option, } @@ -256,7 +256,7 @@ pub struct Enum { pub source: String, /// Index into `XdrSpec::files` for the file this was parsed from. pub file_index: usize, - /// Conditional compilation expression from `#ifdef`/`#ifndef`. + /// Conditional compilation expression from `#ifdef`/`#else`/`#endif`. pub cfg: Option, } @@ -299,7 +299,7 @@ pub struct Union { pub parent: Option, /// Index into `XdrSpec::files` for the file this was parsed from. pub file_index: usize, - /// Conditional compilation expression from `#ifdef`/`#ifndef`. + /// Conditional compilation expression from `#ifdef`/`#else`/`#endif`. pub cfg: Option, } @@ -312,7 +312,7 @@ pub struct Typedef { pub source: String, /// Index into `XdrSpec::files` for the file this was parsed from. pub file_index: usize, - /// Conditional compilation expression from `#ifdef`/`#ifndef`. + /// Conditional compilation expression from `#ifdef`/`#else`/`#endif`. pub cfg: Option, } @@ -327,7 +327,7 @@ pub struct Const { pub source: String, /// Index into `XdrSpec::files` for the file this was parsed from. pub file_index: usize, - /// Conditional compilation expression from `#ifdef`/`#ifndef`. + /// Conditional compilation expression from `#ifdef`/`#else`/`#endif`. pub cfg: Option, } diff --git a/xdr-generator-rust/xdr-parser/src/lexer.rs b/xdr-generator-rust/xdr-parser/src/lexer.rs index fba34a31..92209766 100644 --- a/xdr-generator-rust/xdr-parser/src/lexer.rs +++ b/xdr-generator-rust/xdr-parser/src/lexer.rs @@ -88,10 +88,6 @@ pub enum Token { // Preprocessor conditionals #[regex(r"#ifdef[ \t]+([a-zA-Z_][a-zA-Z0-9_]*)", parse_directive_ident)] IfDef(std::string::String), - #[regex(r"#ifndef[ \t]+([a-zA-Z_][a-zA-Z0-9_]*)", parse_directive_ident)] - IfNDef(std::string::String), - #[regex(r"#elif[ \t]+([a-zA-Z_][a-zA-Z0-9_]*)", parse_directive_ident)] - Elif(std::string::String), #[regex(r"#else")] Else, #[regex(r"#endif")] @@ -109,7 +105,7 @@ pub enum IntBase { } fn parse_directive_ident(lex: &logos::Lexer) -> Option { - // The regex captures "#ifdef IDENT", "#ifndef IDENT", or "#elif IDENT". + // The regex captures "#ifdef IDENT". // Extract the identifier (last whitespace-separated token). let slice = lex.slice(); let ident = slice.rsplit(|c: char| c.is_ascii_whitespace()).next()?; diff --git a/xdr-generator-rust/xdr-parser/src/parser.rs b/xdr-generator-rust/xdr-parser/src/parser.rs index cb386854..4e6c815c 100644 --- a/xdr-generator-rust/xdr-parser/src/parser.rs +++ b/xdr-generator-rust/xdr-parser/src/parser.rs @@ -78,9 +78,9 @@ struct Parser { global_values: HashMap, /// Index of the file currently being parsed file_index: usize, - /// Stack of cfg conditions from enclosing `#ifdef`/`#ifndef`/`#elif`/`#else` blocks. + /// Stack of cfg conditions from enclosing `#ifdef`/`#else` blocks. cfg_stack: Vec, - /// Stack tracking seen conditions for each active `#ifdef`/`#ifndef` block, + /// Stack tracking seen conditions for each active `#ifdef` block, /// used by `parse_ifdef_enter`/`parse_ifdef_branch`/`parse_ifdef_exit` for /// inline ifdef handling inside enum/union bodies. ifdef_seen_stack: Vec>, @@ -121,7 +121,7 @@ impl Parser { } /// Parse definitions until `stop` returns true. - /// Handles `#ifdef`/`#ifndef`/`#elif`/`#else`/`#endif` blocks. + /// Handles `#ifdef`/`#else`/`#endif` blocks. fn parse_definitions_until( &mut self, definitions: &mut Vec, @@ -141,15 +141,12 @@ impl Parser { let ns = self.parse_namespace()?; namespaces.push(ns); } - Token::IfDef(_) | Token::IfNDef(_) => { + Token::IfDef(_) => { self.parse_ifdef_block(definitions, namespaces)?; } Token::Else | Token::EndIf => { return Err(self.make_unexpected_directive_error()); } - Token::Elif(_) => { - return Err(self.make_unexpected_directive_error()); - } _ => { self.parse_definition_into(definitions)?; } @@ -158,73 +155,33 @@ impl Parser { Ok(()) } - /// Parse an `#ifdef`/`#ifndef` block including `#elif`/`#else`/`#endif`. + /// Parse an `#ifdef` block including `#else`/`#endif`. fn parse_ifdef_block( &mut self, definitions: &mut Vec, namespaces: &mut Vec, ) -> Result<(), ParseError> { - // Parse the initial #ifdef/#ifndef + // Parse the initial #ifdef let first_cfg = match self.peek().clone() { Token::IfDef(name) => { self.advance(); CfgExpr::Feature(name) } - Token::IfNDef(name) => { - self.advance(); - CfgExpr::Not(Box::new(CfgExpr::Feature(name))) - } _ => unreachable!(), }; - // Track the actual condition for each branch (for #elif/#else negation) - let mut seen_conditions = vec![first_cfg.clone()]; - // Parse the #ifdef body - self.cfg_stack.push(first_cfg); + self.cfg_stack.push(first_cfg.clone()); self.parse_definitions_until(definitions, namespaces, |tok| { - matches!( - tok, - Token::Elif(_) | Token::Else | Token::EndIf | Token::Eof - ) + matches!(tok, Token::Else | Token::EndIf | Token::Eof) })?; self.cfg_stack.pop(); - // Handle #elif branches - while let Token::Elif(elif_name) = self.peek().clone() { - self.advance(); - - // #elif FOO means: none of the previous branches matched AND feature = "FOO" - let elif_feature = CfgExpr::Feature(elif_name); - let mut parts: Vec = - seen_conditions.iter().map(|c| c.clone().negate()).collect(); - parts.push(elif_feature.clone()); - let elif_cfg = CfgExpr::All(parts); - - seen_conditions.push(elif_feature); - - self.cfg_stack.push(elif_cfg); - self.parse_definitions_until(definitions, namespaces, |tok| { - matches!( - tok, - Token::Elif(_) | Token::Else | Token::EndIf | Token::Eof - ) - })?; - self.cfg_stack.pop(); - } - // Handle #else if *self.peek() == Token::Else { self.advance(); - // #else means: none of the previous conditions were true - let else_cfg = if seen_conditions.len() == 1 { - seen_conditions.into_iter().next().unwrap().negate() - } else { - let negated: Vec = - seen_conditions.into_iter().map(|c| c.negate()).collect(); - CfgExpr::All(negated) - }; + let else_cfg = first_cfg.negate(); self.cfg_stack.push(else_cfg); self.parse_definitions_until(definitions, namespaces, |tok| { @@ -243,20 +200,16 @@ impl Parser { Ok(()) } - /// Enter an `#ifdef`/`#ifndef` block inline (inside an enum or union body). + /// Enter an `#ifdef` block inline (inside an enum or union body). /// Pushes the initial condition onto `cfg_stack` and records it in /// `ifdef_seen_stack` so that `parse_ifdef_branch` and `parse_ifdef_exit` - /// can manage `#elif`/`#else`/`#endif` later. + /// can manage `#else`/`#endif` later. fn parse_ifdef_enter(&mut self) -> Result<(), ParseError> { let first_cfg = match self.peek().clone() { Token::IfDef(name) => { self.advance(); CfgExpr::Feature(name) } - Token::IfNDef(name) => { - self.advance(); - CfgExpr::Not(Box::new(CfgExpr::Feature(name))) - } _ => unreachable!(), }; self.ifdef_seen_stack.push(vec![first_cfg.clone()]); @@ -264,36 +217,17 @@ impl Parser { Ok(()) } - /// Handle an `#elif` or `#else` token inside an inline ifdef block. + /// Handle an `#else` token inside an inline ifdef block. /// Pops the current branch's cfg and pushes the new branch's cfg. fn parse_ifdef_branch(&mut self) -> Result<(), ParseError> { if self.ifdef_seen_stack.is_empty() { return Err(self.make_unexpected_directive_error()); } self.cfg_stack.pop(); - let tok = self.peek().clone(); - self.advance(); + self.advance(); // consume #else let seen = self.ifdef_seen_stack.last_mut().unwrap(); - match tok { - Token::Elif(elif_name) => { - let elif_feature = CfgExpr::Feature(elif_name); - let mut parts: Vec = seen.iter().map(|c| c.clone().negate()).collect(); - parts.push(elif_feature.clone()); - let elif_cfg = CfgExpr::All(parts); - seen.push(elif_feature); - self.cfg_stack.push(elif_cfg); - } - Token::Else => { - let else_cfg = if seen.len() == 1 { - seen[0].clone().negate() - } else { - let negated: Vec = seen.iter().map(|c| c.clone().negate()).collect(); - CfgExpr::All(negated) - }; - self.cfg_stack.push(else_cfg); - } - _ => unreachable!(), - } + let else_cfg = seen[0].clone().negate(); + self.cfg_stack.push(else_cfg); Ok(()) } @@ -440,13 +374,13 @@ impl Parser { let mut members: Vec<(String, i32, Option)> = Vec::new(); loop { - // Handle #ifdef/#ifndef/#else/#elif/#endif inside enum body + // Handle #ifdef/#else/#endif inside enum body match self.peek().clone() { - Token::IfDef(_) | Token::IfNDef(_) => { + Token::IfDef(_) => { self.parse_ifdef_enter()?; continue; } - Token::Elif(_) | Token::Else => { + Token::Else => { self.parse_ifdef_branch()?; continue; } @@ -490,7 +424,7 @@ impl Parser { } Token::RBrace => break, // Allow #else/#endif directly after a member without a comma - Token::EndIf | Token::Else | Token::Elif(_) => {} + Token::EndIf | Token::Else => {} other => { return Err(self.unexpected_token_error(", or }".to_string(), other.clone())) } @@ -623,13 +557,13 @@ impl Parser { let mut arms = Vec::new(); while *self.peek() != Token::RBrace { - // Handle #ifdef/#ifndef/#else/#elif/#endif inside union body + // Handle #ifdef/#else/#endif inside union body match self.peek().clone() { - Token::IfDef(_) | Token::IfNDef(_) => { + Token::IfDef(_) => { self.parse_ifdef_enter()?; continue; } - Token::Elif(_) | Token::Else => { + Token::Else => { self.parse_ifdef_branch()?; continue; } @@ -1102,7 +1036,6 @@ impl Parser { let directive = match self.peek() { Token::Else => "else", Token::EndIf => "endif", - Token::Elif(_) => "elif", _ => "unknown", }; let (line, col) = self.current_position(); diff --git a/xdr-generator-rust/xdr-parser/src/tests/lexer.rs b/xdr-generator-rust/xdr-parser/src/tests/lexer.rs index 39e5207a..72c4ea00 100644 --- a/xdr-generator-rust/xdr-parser/src/tests/lexer.rs +++ b/xdr-generator-rust/xdr-parser/src/tests/lexer.rs @@ -21,30 +21,6 @@ fn test_ifdef_tokens() { ); } -#[test] -fn test_ifndef_token() { - let input = "#ifndef MY_FEATURE"; - let lexer = Lexer::new(input); - let (spanned_tokens, _) = lexer.tokenize_with_spans().unwrap(); - let tokens: Vec = spanned_tokens.into_iter().map(|st| st.token).collect(); - assert_eq!( - tokens, - vec![Token::IfNDef("MY_FEATURE".into()), Token::Eof,] - ); -} - -#[test] -fn test_elif_token() { - let input = "#elif OTHER_FEATURE"; - let lexer = Lexer::new(input); - let (spanned_tokens, _) = lexer.tokenize_with_spans().unwrap(); - let tokens: Vec = spanned_tokens.into_iter().map(|st| st.token).collect(); - assert_eq!( - tokens, - vec![Token::Elif("OTHER_FEATURE".into()), Token::Eof,] - ); -} - #[test] fn test_else_endif_tokens() { let input = "#else\n#endif"; diff --git a/xdr-generator-rust/xdr-parser/src/tests/parser.rs b/xdr-generator-rust/xdr-parser/src/tests/parser.rs index ddfb52c3..8303d901 100644 --- a/xdr-generator-rust/xdr-parser/src/tests/parser.rs +++ b/xdr-generator-rust/xdr-parser/src/tests/parser.rs @@ -43,16 +43,19 @@ fn test_parse_enum() { name: "RED".to_string(), stripped_name: "RED".to_string(), value: 0, + cfg: None, }, EnumMember { name: "GREEN".to_string(), stripped_name: "GREEN".to_string(), value: 1, + cfg: None, }, EnumMember { name: "BLUE".to_string(), stripped_name: "BLUE".to_string(), value: 2, + cfg: None, }, ], member_prefix: String::new(), @@ -125,7 +128,7 @@ fn test_deeply_nested_parents_assigned_during_parse() { } // ============================================================================= -// #ifdef / #ifndef / #elif / #else / #endif tests +// #ifdef / #else / #endif tests // ============================================================================= #[test] @@ -144,23 +147,6 @@ fn test_ifdef_simple() { ); } -#[test] -fn test_ifndef_simple() { - let input = r#" - #ifndef FEATURE_X - struct Foo { int x; }; - #endif - "#; - let spec = parse(input).unwrap(); - assert_eq!(spec.definitions.len(), 1); - assert_eq!( - spec.definitions[0].cfg(), - Some(&CfgExpr::Not(Box::new(CfgExpr::Feature( - "FEATURE_X".to_string() - )))) - ); -} - #[test] fn test_ifdef_else() { let input = r#" @@ -188,102 +174,6 @@ fn test_ifdef_else() { ); } -#[test] -fn test_ifndef_else() { - let input = r#" - #ifndef FEATURE_X - struct Foo { int x; }; - #else - struct Bar { int y; }; - #endif - "#; - let spec = parse(input).unwrap(); - assert_eq!(spec.definitions.len(), 2); - - // #ifndef FEATURE_X => not(feature = "FEATURE_X") - assert_eq!(spec.definitions[0].name(), "Foo"); - assert_eq!( - spec.definitions[0].cfg(), - Some(&CfgExpr::Not(Box::new(CfgExpr::Feature( - "FEATURE_X".to_string() - )))) - ); - - // #else of #ifndef => feature = "FEATURE_X" - assert_eq!(spec.definitions[1].name(), "Bar"); - assert_eq!( - spec.definitions[1].cfg(), - Some(&CfgExpr::Feature("FEATURE_X".to_string())) - ); -} - -#[test] -fn test_ifdef_elif() { - let input = r#" - #ifdef FEATURE_A - struct Foo { int x; }; - #elif FEATURE_B - struct Bar { int y; }; - #endif - "#; - let spec = parse(input).unwrap(); - assert_eq!(spec.definitions.len(), 2); - - assert_eq!(spec.definitions[0].name(), "Foo"); - assert_eq!( - spec.definitions[0].cfg(), - Some(&CfgExpr::Feature("FEATURE_A".to_string())) - ); - - assert_eq!(spec.definitions[1].name(), "Bar"); - assert_eq!( - spec.definitions[1].cfg(), - Some(&CfgExpr::All(vec![ - CfgExpr::Not(Box::new(CfgExpr::Feature("FEATURE_A".to_string()))), - CfgExpr::Feature("FEATURE_B".to_string()), - ])) - ); -} - -#[test] -fn test_ifdef_elif_else() { - let input = r#" - #ifdef FEATURE_A - struct Foo { int x; }; - #elif FEATURE_B - struct Bar { int y; }; - #else - struct Baz { int z; }; - #endif - "#; - let spec = parse(input).unwrap(); - assert_eq!(spec.definitions.len(), 3); - - assert_eq!(spec.definitions[0].name(), "Foo"); - assert_eq!( - spec.definitions[0].cfg(), - Some(&CfgExpr::Feature("FEATURE_A".to_string())) - ); - - assert_eq!(spec.definitions[1].name(), "Bar"); - assert_eq!( - spec.definitions[1].cfg(), - Some(&CfgExpr::All(vec![ - CfgExpr::Not(Box::new(CfgExpr::Feature("FEATURE_A".to_string()))), - CfgExpr::Feature("FEATURE_B".to_string()), - ])) - ); - - assert_eq!(spec.definitions[2].name(), "Baz"); - assert_eq!( - spec.definitions[2].cfg(), - Some(&CfgExpr::All(vec![ - CfgExpr::Not(Box::new(CfgExpr::Feature("FEATURE_A".to_string()))), - CfgExpr::Not(Box::new(CfgExpr::Feature("FEATURE_B".to_string()))), - ])) - ); -} - #[test] fn test_ifdef_multiple_definitions() { let input = r#" @@ -426,84 +316,6 @@ fn test_ifdef_empty_block() { assert_eq!(spec.definitions[0].cfg(), None); } -#[test] -fn test_ifndef_elif() { - let input = r#" - #ifndef FEATURE_A - struct Foo { int x; }; - #elif FEATURE_B - struct Bar { int y; }; - #endif - "#; - let spec = parse(input).unwrap(); - assert_eq!(spec.definitions.len(), 2); - - // #ifndef FEATURE_A => not(feature = "FEATURE_A") - assert_eq!(spec.definitions[0].name(), "Foo"); - assert_eq!( - spec.definitions[0].cfg(), - Some(&CfgExpr::Not(Box::new(CfgExpr::Feature( - "FEATURE_A".to_string() - )))) - ); - - // #elif FEATURE_B after #ifndef FEATURE_A => - // all(feature = "FEATURE_A", feature = "FEATURE_B") - // (negation of not(feature = "A") simplifies to feature = "A") - assert_eq!(spec.definitions[1].name(), "Bar"); - assert_eq!( - spec.definitions[1].cfg(), - Some(&CfgExpr::All(vec![ - CfgExpr::Feature("FEATURE_A".to_string()), - CfgExpr::Feature("FEATURE_B".to_string()), - ])) - ); -} - -#[test] -fn test_ifndef_elif_else() { - let input = r#" - #ifndef FEATURE_A - struct Foo { int x; }; - #elif FEATURE_B - struct Bar { int y; }; - #else - struct Baz { int z; }; - #endif - "#; - let spec = parse(input).unwrap(); - assert_eq!(spec.definitions.len(), 3); - - // #ifndef FEATURE_A => not(feature = "FEATURE_A") - assert_eq!(spec.definitions[0].name(), "Foo"); - assert_eq!( - spec.definitions[0].cfg(), - Some(&CfgExpr::Not(Box::new(CfgExpr::Feature( - "FEATURE_A".to_string() - )))) - ); - - // #elif FEATURE_B => all(feature = "FEATURE_A", feature = "FEATURE_B") - assert_eq!(spec.definitions[1].name(), "Bar"); - assert_eq!( - spec.definitions[1].cfg(), - Some(&CfgExpr::All(vec![ - CfgExpr::Feature("FEATURE_A".to_string()), - CfgExpr::Feature("FEATURE_B".to_string()), - ])) - ); - - // #else => all(feature = "FEATURE_A", not(feature = "FEATURE_B")) - assert_eq!(spec.definitions[2].name(), "Baz"); - assert_eq!( - spec.definitions[2].cfg(), - Some(&CfgExpr::All(vec![ - CfgExpr::Feature("FEATURE_A".to_string()), - CfgExpr::Not(Box::new(CfgExpr::Feature("FEATURE_B".to_string()))), - ])) - ); -} - #[test] fn test_ifdef_nested_types_inherit_cfg() { let input = r#" @@ -592,13 +404,13 @@ fn test_cfg_expr_and() { #[test] fn test_cfg_expr_render_feature() { let expr = CfgExpr::Feature("FEATURE_X".to_string()); - assert_eq!(expr.render(), r#"feature = "FEATURE_X""#); + assert_eq!(expr.render(), r#"feature = "feature_x""#); } #[test] fn test_cfg_expr_render_not() { let expr = CfgExpr::Not(Box::new(CfgExpr::Feature("FEATURE_X".to_string()))); - assert_eq!(expr.render(), r#"not(feature = "FEATURE_X")"#); + assert_eq!(expr.render(), r#"not(feature = "feature_x")"#); } #[test] @@ -607,5 +419,5 @@ fn test_cfg_expr_render_all() { CfgExpr::Feature("A".to_string()), CfgExpr::Not(Box::new(CfgExpr::Feature("B".to_string()))), ]); - assert_eq!(expr.render(), r#"all(feature = "A", not(feature = "B"))"#); + assert_eq!(expr.render(), r#"all(feature = "a", not(feature = "b"))"#); } From b3e3c1911dad568ec2759b4085ec2c6ce7e6e689 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 18 Mar 2026 12:44:32 +1000 Subject: [PATCH 08/28] remove `#ifndef`, `#elif` xdr types and related features --- Cargo.toml | 3 - src/curr/generated.rs | 818 +------------------- xdr-generator-rust/xdr-parser/src/parser.rs | 15 +- 3 files changed, 8 insertions(+), 828 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1952c2f4..1831ed81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,11 +45,8 @@ std = ["alloc", "dep:sha2"] alloc = ["dep:hex", "dep:stellar-strkey", "escape-bytes/alloc", "dep:ethnum"] curr = [] next = [] -disable_nonce_types = [] enable_extra_types = [] -sparse_map = [] variant_a = [] -variant_b = [] # Features dependent on optional dependencies. base64 = ["std", "dep:base64"] diff --git a/src/curr/generated.rs b/src/curr/generated.rs index 104dad73..1c678924 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -67,7 +67,7 @@ pub const XDR_FILES_SHA256: [(&str, &str); 13] = [ ), ( "xdr/curr/Stellar-types.x", - "a6bd5e7b2e0d84ac0cd5dd5db73d1618f04c69455d93a8190e040cfb28d8e08c", + "a0e9cb40db74385dc71561c8d7a62b17605a416ff816f1ca0f9487a6b2213ecd", ), ]; @@ -54232,77 +54232,6 @@ impl WriteXdr for ExtraUint64 { } } -/// NonceUint64 is an XDR Typedef defined as: -/// -/// ```text -/// typedef uint64 NonceUint64; -/// ``` -/// -#[cfg(not(feature = "disable_nonce_types"))] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct NonceUint64( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub u64, -); - -#[cfg(not(feature = "disable_nonce_types"))] -impl From for u64 { - #[must_use] - fn from(x: NonceUint64) -> Self { - x.0 - } -} - -#[cfg(not(feature = "disable_nonce_types"))] -impl From for NonceUint64 { - #[must_use] - fn from(x: u64) -> Self { - NonceUint64(x) - } -} - -#[cfg(not(feature = "disable_nonce_types"))] -impl AsRef for NonceUint64 { - #[must_use] - fn as_ref(&self) -> &u64 { - &self.0 - } -} - -#[cfg(not(feature = "disable_nonce_types"))] -impl ReadXdr for NonceUint64 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = u64::read_xdr(r)?; - let v = NonceUint64(i); - Ok(v) - }) - } -} - -#[cfg(not(feature = "disable_nonce_types"))] -impl WriteXdr for NonceUint64 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - /// ExtraStruct is an XDR Struct defined as: /// /// ```text @@ -54504,51 +54433,6 @@ impl WriteXdr for ConditionalTypedef { } } -/// VariantValue is an XDR Const defined as: -/// -/// ```text -/// const VARIANT_VALUE = 1; -/// ``` -/// -#[cfg(feature = "variant_a")] -pub const VARIANT_VALUE: u64 = 1; - -/// VariantValue is an XDR Const defined as: -/// -/// ```text -/// const VARIANT_VALUE = 2; -/// ``` -/// -#[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] -pub const VARIANT_VALUE: u64 = 2; - -/// VariantValue is an XDR Const defined as: -/// -/// ```text -/// const VARIANT_VALUE = 3; -/// ``` -/// -#[cfg(all(not(feature = "variant_a"), not(feature = "variant_b")))] -pub const VARIANT_VALUE: u64 = 3; - -/// NonceMax is an XDR Const defined as: -/// -/// ```text -/// const NONCE_MAX = 1000; -/// ``` -/// -#[cfg(not(feature = "disable_nonce_types"))] -pub const NONCE_MAX: u64 = 1000; - -/// NonceMax is an XDR Const defined as: -/// -/// ```text -/// const NONCE_MAX = 0; -/// ``` -/// -#[cfg(feature = "disable_nonce_types")] -pub const NONCE_MAX: u64 = 0; - /// TestEnumWithIfdef is an XDR Enum defined as: /// /// ```text @@ -54717,364 +54601,6 @@ impl WriteXdr for TestEnumWithIfdef { } } -/// TestEnumWithIfndef is an XDR Enum defined as: -/// -/// ```text -/// enum TestEnumWithIfndef -/// { -/// TEWNIF_ALPHA = 0, -/// #ifndef DISABLE_NONCE_TYPES -/// TEWNIF_BETA = 1, -/// TEWNIF_GAMMA = 2 -/// #else -/// TEWNIF_BETA = 1 -/// #endif -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum TestEnumWithIfndef { - #[cfg_attr(feature = "alloc", default)] - Alpha = 0, - #[cfg(not(feature = "disable_nonce_types"))] - Beta = 1, - #[cfg(not(feature = "disable_nonce_types"))] - Gamma = 2, - #[cfg(feature = "disable_nonce_types")] - Beta = 1, -} - -impl TestEnumWithIfndef { - const _VARIANTS: &[TestEnumWithIfndef] = &[ - TestEnumWithIfndef::Alpha, - #[cfg(not(feature = "disable_nonce_types"))] - TestEnumWithIfndef::Beta, - #[cfg(not(feature = "disable_nonce_types"))] - TestEnumWithIfndef::Gamma, - #[cfg(feature = "disable_nonce_types")] - TestEnumWithIfndef::Beta, - ]; - pub const VARIANTS: [TestEnumWithIfndef; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Alpha", - #[cfg(not(feature = "disable_nonce_types"))] - "Beta", - #[cfg(not(feature = "disable_nonce_types"))] - "Gamma", - #[cfg(feature = "disable_nonce_types")] - "Beta", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Alpha => "Alpha", - #[cfg(not(feature = "disable_nonce_types"))] - Self::Beta => "Beta", - #[cfg(not(feature = "disable_nonce_types"))] - Self::Gamma => "Gamma", - #[cfg(feature = "disable_nonce_types")] - Self::Beta => "Beta", - } - } - - #[must_use] - pub const fn variants() -> [TestEnumWithIfndef; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TestEnumWithIfndef { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for TestEnumWithIfndef { - fn variants() -> slice::Iter<'static, TestEnumWithIfndef> { - Self::VARIANTS.iter() - } -} - -impl Enum for TestEnumWithIfndef {} - -impl fmt::Display for TestEnumWithIfndef { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for TestEnumWithIfndef { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => TestEnumWithIfndef::Alpha, - #[cfg(not(feature = "disable_nonce_types"))] - 1 => TestEnumWithIfndef::Beta, - #[cfg(not(feature = "disable_nonce_types"))] - 2 => TestEnumWithIfndef::Gamma, - #[cfg(feature = "disable_nonce_types")] - 1 => TestEnumWithIfndef::Beta, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: TestEnumWithIfndef) -> Self { - e as Self - } -} - -impl ReadXdr for TestEnumWithIfndef { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for TestEnumWithIfndef { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// TestEnumWithElif is an XDR Enum defined as: -/// -/// ```text -/// enum TestEnumWithElif -/// { -/// TWEELIF_ONE = 0, -/// #ifdef VARIANT_A -/// TWEELIF_TWO = 1, -/// TWEELIF_THREE = 2 -/// #elif VARIANT_B -/// TWEELIF_TWO = 1, -/// TWEELIF_THREE = 2, -/// TWEELIF_FOUR = 3 -/// #else -/// TWEELIF_TWO = 1 -/// #endif -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum TestEnumWithElif { - #[cfg_attr(feature = "alloc", default)] - One = 0, - #[cfg(feature = "variant_a")] - Two = 1, - #[cfg(feature = "variant_a")] - Three = 2, - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - Two = 1, - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - Three = 2, - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - Four = 3, - #[cfg(all(not(feature = "variant_a"), not(feature = "variant_b")))] - Two = 1, -} - -impl TestEnumWithElif { - const _VARIANTS: &[TestEnumWithElif] = &[ - TestEnumWithElif::One, - #[cfg(feature = "variant_a")] - TestEnumWithElif::Two, - #[cfg(feature = "variant_a")] - TestEnumWithElif::Three, - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - TestEnumWithElif::Two, - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - TestEnumWithElif::Three, - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - TestEnumWithElif::Four, - #[cfg(all(not(feature = "variant_a"), not(feature = "variant_b")))] - TestEnumWithElif::Two, - ]; - pub const VARIANTS: [TestEnumWithElif; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "One", - #[cfg(feature = "variant_a")] - "Two", - #[cfg(feature = "variant_a")] - "Three", - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - "Two", - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - "Three", - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - "Four", - #[cfg(all(not(feature = "variant_a"), not(feature = "variant_b")))] - "Two", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::One => "One", - #[cfg(feature = "variant_a")] - Self::Two => "Two", - #[cfg(feature = "variant_a")] - Self::Three => "Three", - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - Self::Two => "Two", - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - Self::Three => "Three", - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - Self::Four => "Four", - #[cfg(all(not(feature = "variant_a"), not(feature = "variant_b")))] - Self::Two => "Two", - } - } - - #[must_use] - pub const fn variants() -> [TestEnumWithElif; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TestEnumWithElif { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for TestEnumWithElif { - fn variants() -> slice::Iter<'static, TestEnumWithElif> { - Self::VARIANTS.iter() - } -} - -impl Enum for TestEnumWithElif {} - -impl fmt::Display for TestEnumWithElif { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for TestEnumWithElif { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => TestEnumWithElif::One, - #[cfg(feature = "variant_a")] - 1 => TestEnumWithElif::Two, - #[cfg(feature = "variant_a")] - 2 => TestEnumWithElif::Three, - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - 1 => TestEnumWithElif::Two, - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - 2 => TestEnumWithElif::Three, - #[cfg(all(not(feature = "variant_a"), feature = "variant_b"))] - 3 => TestEnumWithElif::Four, - #[cfg(all(not(feature = "variant_a"), not(feature = "variant_b")))] - 1 => TestEnumWithElif::Two, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: TestEnumWithElif) -> Self { - e as Self - } -} - -impl ReadXdr for TestEnumWithElif { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for TestEnumWithElif { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - /// TestUnionWithIfdef is an XDR Union defined as: /// /// ```text @@ -55273,171 +54799,6 @@ impl WriteXdr for TestUnionWithIfdef { } } -/// TestUnionWithIfndef is an XDR Union defined as: -/// -/// ```text -/// union TestUnionWithIfndef switch (TestEnumWithIfndef type) -/// { -/// case TEWNIF_ALPHA: -/// uint32 alphaVal; -/// case TEWNIF_BETA: -/// uint64 betaVal; -/// #ifndef DISABLE_NONCE_TYPES -/// case TEWNIF_GAMMA: -/// Hash gammaVal; -/// #endif -/// }; -/// ``` -/// -// union with discriminant TestEnumWithIfndef -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TestUnionWithIfndef { - Alpha(u32), - Beta( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - u64, - ), - #[cfg(not(feature = "disable_nonce_types"))] - Gamma(Hash), -} - -#[cfg(feature = "alloc")] -impl Default for TestUnionWithIfndef { - fn default() -> Self { - Self::Alpha(u32::default()) - } -} - -impl TestUnionWithIfndef { - const _VARIANTS: &[TestEnumWithIfndef] = &[ - TestEnumWithIfndef::Alpha, - TestEnumWithIfndef::Beta, - #[cfg(not(feature = "disable_nonce_types"))] - TestEnumWithIfndef::Gamma, - ]; - pub const VARIANTS: [TestEnumWithIfndef; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Alpha", - "Beta", - #[cfg(not(feature = "disable_nonce_types"))] - "Gamma", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Alpha(_) => "Alpha", - Self::Beta(_) => "Beta", - #[cfg(not(feature = "disable_nonce_types"))] - Self::Gamma(_) => "Gamma", - } - } - - #[must_use] - pub const fn discriminant(&self) -> TestEnumWithIfndef { - #[allow(clippy::match_same_arms)] - match self { - Self::Alpha(_) => TestEnumWithIfndef::Alpha, - Self::Beta(_) => TestEnumWithIfndef::Beta, - #[cfg(not(feature = "disable_nonce_types"))] - Self::Gamma(_) => TestEnumWithIfndef::Gamma, - } - } - - #[must_use] - pub const fn variants() -> [TestEnumWithIfndef; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TestUnionWithIfndef { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TestUnionWithIfndef { - #[must_use] - fn discriminant(&self) -> TestEnumWithIfndef { - Self::discriminant(self) - } -} - -impl Variants for TestUnionWithIfndef { - fn variants() -> slice::Iter<'static, TestEnumWithIfndef> { - Self::VARIANTS.iter() - } -} - -impl Union for TestUnionWithIfndef {} - -impl ReadXdr for TestUnionWithIfndef { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: TestEnumWithIfndef = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - TestEnumWithIfndef::Alpha => Self::Alpha(u32::read_xdr(r)?), - TestEnumWithIfndef::Beta => Self::Beta(u64::read_xdr(r)?), - #[cfg(not(feature = "disable_nonce_types"))] - TestEnumWithIfndef::Gamma => Self::Gamma(Hash::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TestUnionWithIfndef { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Alpha(v) => v.write_xdr(w)?, - Self::Beta(v) => v.write_xdr(w)?, - #[cfg(not(feature = "disable_nonce_types"))] - Self::Gamma(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - /// ExtraBundle is an XDR Struct defined as: /// /// ```text @@ -56137,16 +55498,11 @@ pub enum TypeVariant { ClaimableBalanceId, #[cfg(feature = "enable_extra_types")] ExtraUint64, - #[cfg(not(feature = "disable_nonce_types"))] - NonceUint64, #[cfg(feature = "enable_extra_types")] ExtraStruct, ConditionalTypedef, TestEnumWithIfdef, - TestEnumWithIfndef, - TestEnumWithElif, TestUnionWithIfdef, - TestUnionWithIfndef, #[cfg(feature = "enable_extra_types")] ExtraBundle, #[cfg(feature = "enable_extra_types")] @@ -56626,16 +55982,11 @@ impl TypeVariant { TypeVariant::ClaimableBalanceId, #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraUint64, - #[cfg(not(feature = "disable_nonce_types"))] - TypeVariant::NonceUint64, #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraStruct, TypeVariant::ConditionalTypedef, TypeVariant::TestEnumWithIfdef, - TypeVariant::TestEnumWithIfndef, - TypeVariant::TestEnumWithElif, TypeVariant::TestUnionWithIfdef, - TypeVariant::TestUnionWithIfndef, #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraBundle, #[cfg(feature = "enable_extra_types")] @@ -57120,16 +56471,11 @@ impl TypeVariant { "ClaimableBalanceId", #[cfg(feature = "enable_extra_types")] "ExtraUint64", - #[cfg(not(feature = "disable_nonce_types"))] - "NonceUint64", #[cfg(feature = "enable_extra_types")] "ExtraStruct", "ConditionalTypedef", "TestEnumWithIfdef", - "TestEnumWithIfndef", - "TestEnumWithElif", "TestUnionWithIfdef", - "TestUnionWithIfndef", #[cfg(feature = "enable_extra_types")] "ExtraBundle", #[cfg(feature = "enable_extra_types")] @@ -57632,16 +56978,11 @@ impl TypeVariant { Self::ClaimableBalanceId => "ClaimableBalanceId", #[cfg(feature = "enable_extra_types")] Self::ExtraUint64 => "ExtraUint64", - #[cfg(not(feature = "disable_nonce_types"))] - Self::NonceUint64 => "NonceUint64", #[cfg(feature = "enable_extra_types")] Self::ExtraStruct => "ExtraStruct", Self::ConditionalTypedef => "ConditionalTypedef", Self::TestEnumWithIfdef => "TestEnumWithIfdef", - Self::TestEnumWithIfndef => "TestEnumWithIfndef", - Self::TestEnumWithElif => "TestEnumWithElif", Self::TestUnionWithIfdef => "TestUnionWithIfdef", - Self::TestUnionWithIfndef => "TestUnionWithIfndef", #[cfg(feature = "enable_extra_types")] Self::ExtraBundle => "ExtraBundle", #[cfg(feature = "enable_extra_types")] @@ -58345,16 +57686,11 @@ impl TypeVariant { Self::ClaimableBalanceId => gen.into_root_schema_for::(), #[cfg(feature = "enable_extra_types")] Self::ExtraUint64 => gen.into_root_schema_for::(), - #[cfg(not(feature = "disable_nonce_types"))] - Self::NonceUint64 => gen.into_root_schema_for::(), #[cfg(feature = "enable_extra_types")] Self::ExtraStruct => gen.into_root_schema_for::(), Self::ConditionalTypedef => gen.into_root_schema_for::(), Self::TestEnumWithIfdef => gen.into_root_schema_for::(), - Self::TestEnumWithIfndef => gen.into_root_schema_for::(), - Self::TestEnumWithElif => gen.into_root_schema_for::(), Self::TestUnionWithIfdef => gen.into_root_schema_for::(), - Self::TestUnionWithIfndef => gen.into_root_schema_for::(), #[cfg(feature = "enable_extra_types")] Self::ExtraBundle => gen.into_root_schema_for::(), #[cfg(feature = "enable_extra_types")] @@ -58880,16 +58216,11 @@ impl core::str::FromStr for TypeVariant { "ClaimableBalanceId" => Ok(Self::ClaimableBalanceId), #[cfg(feature = "enable_extra_types")] "ExtraUint64" => Ok(Self::ExtraUint64), - #[cfg(not(feature = "disable_nonce_types"))] - "NonceUint64" => Ok(Self::NonceUint64), #[cfg(feature = "enable_extra_types")] "ExtraStruct" => Ok(Self::ExtraStruct), "ConditionalTypedef" => Ok(Self::ConditionalTypedef), "TestEnumWithIfdef" => Ok(Self::TestEnumWithIfdef), - "TestEnumWithIfndef" => Ok(Self::TestEnumWithIfndef), - "TestEnumWithElif" => Ok(Self::TestEnumWithElif), "TestUnionWithIfdef" => Ok(Self::TestUnionWithIfdef), - "TestUnionWithIfndef" => Ok(Self::TestUnionWithIfndef), #[cfg(feature = "enable_extra_types")] "ExtraBundle" => Ok(Self::ExtraBundle), #[cfg(feature = "enable_extra_types")] @@ -59377,16 +58708,11 @@ pub enum Type { ClaimableBalanceId(Box), #[cfg(feature = "enable_extra_types")] ExtraUint64(Box), - #[cfg(not(feature = "disable_nonce_types"))] - NonceUint64(Box), #[cfg(feature = "enable_extra_types")] ExtraStruct(Box), ConditionalTypedef(Box), TestEnumWithIfdef(Box), - TestEnumWithIfndef(Box), - TestEnumWithElif(Box), TestUnionWithIfdef(Box), - TestUnionWithIfndef(Box), #[cfg(feature = "enable_extra_types")] ExtraBundle(Box), #[cfg(feature = "enable_extra_types")] @@ -59866,16 +59192,11 @@ impl Type { TypeVariant::ClaimableBalanceId, #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraUint64, - #[cfg(not(feature = "disable_nonce_types"))] - TypeVariant::NonceUint64, #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraStruct, TypeVariant::ConditionalTypedef, TypeVariant::TestEnumWithIfdef, - TypeVariant::TestEnumWithIfndef, - TypeVariant::TestEnumWithElif, TypeVariant::TestUnionWithIfdef, - TypeVariant::TestUnionWithIfndef, #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraBundle, #[cfg(feature = "enable_extra_types")] @@ -60360,16 +59681,11 @@ impl Type { "ClaimableBalanceId", #[cfg(feature = "enable_extra_types")] "ExtraUint64", - #[cfg(not(feature = "disable_nonce_types"))] - "NonceUint64", #[cfg(feature = "enable_extra_types")] "ExtraStruct", "ConditionalTypedef", "TestEnumWithIfdef", - "TestEnumWithIfndef", - "TestEnumWithElif", "TestUnionWithIfdef", - "TestUnionWithIfndef", #[cfg(feature = "enable_extra_types")] "ExtraBundle", #[cfg(feature = "enable_extra_types")] @@ -62416,10 +61732,6 @@ impl Type { TypeVariant::ExtraUint64 => { r.with_limited_depth(|r| Ok(Self::ExtraUint64(Box::new(ExtraUint64::read_xdr(r)?)))) } - #[cfg(not(feature = "disable_nonce_types"))] - TypeVariant::NonceUint64 => { - r.with_limited_depth(|r| Ok(Self::NonceUint64(Box::new(NonceUint64::read_xdr(r)?)))) - } #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraStruct => { r.with_limited_depth(|r| Ok(Self::ExtraStruct(Box::new(ExtraStruct::read_xdr(r)?)))) @@ -62434,26 +61746,11 @@ impl Type { TestEnumWithIfdef::read_xdr(r)?, ))) }), - TypeVariant::TestEnumWithIfndef => r.with_limited_depth(|r| { - Ok(Self::TestEnumWithIfndef(Box::new( - TestEnumWithIfndef::read_xdr(r)?, - ))) - }), - TypeVariant::TestEnumWithElif => r.with_limited_depth(|r| { - Ok(Self::TestEnumWithElif(Box::new( - TestEnumWithElif::read_xdr(r)?, - ))) - }), TypeVariant::TestUnionWithIfdef => r.with_limited_depth(|r| { Ok(Self::TestUnionWithIfdef(Box::new( TestUnionWithIfdef::read_xdr(r)?, ))) }), - TypeVariant::TestUnionWithIfndef => r.with_limited_depth(|r| { - Ok(Self::TestUnionWithIfndef(Box::new( - TestUnionWithIfndef::read_xdr(r)?, - ))) - }), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraBundle => { r.with_limited_depth(|r| Ok(Self::ExtraBundle(Box::new(ExtraBundle::read_xdr(r)?)))) @@ -64525,11 +63822,6 @@ impl Type { ReadXdrIter::<_, ExtraUint64>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ExtraUint64(Box::new(t)))), ), - #[cfg(not(feature = "disable_nonce_types"))] - TypeVariant::NonceUint64 => Box::new( - ReadXdrIter::<_, NonceUint64>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::NonceUint64(Box::new(t)))), - ), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraStruct => Box::new( ReadXdrIter::<_, ExtraStruct>::new(&mut r.inner, r.limits.clone()) @@ -64543,22 +63835,10 @@ impl Type { ReadXdrIter::<_, TestEnumWithIfdef>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::TestEnumWithIfdef(Box::new(t)))), ), - TypeVariant::TestEnumWithIfndef => Box::new( - ReadXdrIter::<_, TestEnumWithIfndef>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TestEnumWithIfndef(Box::new(t)))), - ), - TypeVariant::TestEnumWithElif => Box::new( - ReadXdrIter::<_, TestEnumWithElif>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TestEnumWithElif(Box::new(t)))), - ), TypeVariant::TestUnionWithIfdef => Box::new( ReadXdrIter::<_, TestUnionWithIfdef>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::TestUnionWithIfdef(Box::new(t)))), ), - TypeVariant::TestUnionWithIfndef => Box::new( - ReadXdrIter::<_, TestUnionWithIfndef>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TestUnionWithIfndef(Box::new(t)))), - ), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraBundle => Box::new( ReadXdrIter::<_, ExtraBundle>::new(&mut r.inner, r.limits.clone()) @@ -66893,11 +66173,6 @@ impl Type { ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ExtraUint64(Box::new(t.0)))), ), - #[cfg(not(feature = "disable_nonce_types"))] - TypeVariant::NonceUint64 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::NonceUint64(Box::new(t.0)))), - ), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraStruct => Box::new( ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) @@ -66911,22 +66186,10 @@ impl Type { ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::TestEnumWithIfdef(Box::new(t.0)))), ), - TypeVariant::TestEnumWithIfndef => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TestEnumWithIfndef(Box::new(t.0)))), - ), - TypeVariant::TestEnumWithElif => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TestEnumWithElif(Box::new(t.0)))), - ), TypeVariant::TestUnionWithIfdef => Box::new( ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::TestUnionWithIfdef(Box::new(t.0)))), ), - TypeVariant::TestUnionWithIfndef => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TestUnionWithIfndef(Box::new(t.0)))), - ), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraBundle => Box::new( ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) @@ -68843,11 +68106,6 @@ impl Type { ReadXdrIter::<_, ExtraUint64>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::ExtraUint64(Box::new(t)))), ), - #[cfg(not(feature = "disable_nonce_types"))] - TypeVariant::NonceUint64 => Box::new( - ReadXdrIter::<_, NonceUint64>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::NonceUint64(Box::new(t)))), - ), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraStruct => Box::new( ReadXdrIter::<_, ExtraStruct>::new(dec, r.limits.clone()) @@ -68861,22 +68119,10 @@ impl Type { ReadXdrIter::<_, TestEnumWithIfdef>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::TestEnumWithIfdef(Box::new(t)))), ), - TypeVariant::TestEnumWithIfndef => Box::new( - ReadXdrIter::<_, TestEnumWithIfndef>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TestEnumWithIfndef(Box::new(t)))), - ), - TypeVariant::TestEnumWithElif => Box::new( - ReadXdrIter::<_, TestEnumWithElif>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TestEnumWithElif(Box::new(t)))), - ), TypeVariant::TestUnionWithIfdef => Box::new( ReadXdrIter::<_, TestUnionWithIfdef>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::TestUnionWithIfdef(Box::new(t)))), ), - TypeVariant::TestUnionWithIfndef => Box::new( - ReadXdrIter::<_, TestUnionWithIfndef>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TestUnionWithIfndef(Box::new(t)))), - ), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraBundle => Box::new( ReadXdrIter::<_, ExtraBundle>::new(dec, r.limits.clone()) @@ -70209,10 +69455,6 @@ impl Type { TypeVariant::ExtraUint64 => { Ok(Self::ExtraUint64(Box::new(serde_json::from_reader(r)?))) } - #[cfg(not(feature = "disable_nonce_types"))] - TypeVariant::NonceUint64 => { - Ok(Self::NonceUint64(Box::new(serde_json::from_reader(r)?))) - } #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraStruct => { Ok(Self::ExtraStruct(Box::new(serde_json::from_reader(r)?))) @@ -70223,18 +69465,9 @@ impl Type { TypeVariant::TestEnumWithIfdef => Ok(Self::TestEnumWithIfdef(Box::new( serde_json::from_reader(r)?, ))), - TypeVariant::TestEnumWithIfndef => Ok(Self::TestEnumWithIfndef(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TestEnumWithElif => Ok(Self::TestEnumWithElif(Box::new( - serde_json::from_reader(r)?, - ))), TypeVariant::TestUnionWithIfdef => Ok(Self::TestUnionWithIfdef(Box::new( serde_json::from_reader(r)?, ))), - TypeVariant::TestUnionWithIfndef => Ok(Self::TestUnionWithIfndef(Box::new( - serde_json::from_reader(r)?, - ))), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraBundle => { Ok(Self::ExtraBundle(Box::new(serde_json::from_reader(r)?))) @@ -71736,10 +70969,6 @@ impl Type { TypeVariant::ExtraUint64 => Ok(Self::ExtraUint64(Box::new( serde::de::Deserialize::deserialize(r)?, ))), - #[cfg(not(feature = "disable_nonce_types"))] - TypeVariant::NonceUint64 => Ok(Self::NonceUint64(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraStruct => Ok(Self::ExtraStruct(Box::new( serde::de::Deserialize::deserialize(r)?, @@ -71750,18 +70979,9 @@ impl Type { TypeVariant::TestEnumWithIfdef => Ok(Self::TestEnumWithIfdef(Box::new( serde::de::Deserialize::deserialize(r)?, ))), - TypeVariant::TestEnumWithIfndef => Ok(Self::TestEnumWithIfndef(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TestEnumWithElif => Ok(Self::TestEnumWithElif(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), TypeVariant::TestUnionWithIfdef => Ok(Self::TestUnionWithIfdef(Box::new( serde::de::Deserialize::deserialize(r)?, ))), - TypeVariant::TestUnionWithIfndef => Ok(Self::TestUnionWithIfndef(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraBundle => Ok(Self::ExtraBundle(Box::new( serde::de::Deserialize::deserialize(r)?, @@ -73094,8 +72314,6 @@ impl Type { ))), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraUint64 => Ok(Self::ExtraUint64(Box::new(ExtraUint64::arbitrary(u)?))), - #[cfg(not(feature = "disable_nonce_types"))] - TypeVariant::NonceUint64 => Ok(Self::NonceUint64(Box::new(NonceUint64::arbitrary(u)?))), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraStruct => Ok(Self::ExtraStruct(Box::new(ExtraStruct::arbitrary(u)?))), TypeVariant::ConditionalTypedef => Ok(Self::ConditionalTypedef(Box::new( @@ -73104,18 +72322,9 @@ impl Type { TypeVariant::TestEnumWithIfdef => Ok(Self::TestEnumWithIfdef(Box::new( TestEnumWithIfdef::arbitrary(u)?, ))), - TypeVariant::TestEnumWithIfndef => Ok(Self::TestEnumWithIfndef(Box::new( - TestEnumWithIfndef::arbitrary(u)?, - ))), - TypeVariant::TestEnumWithElif => Ok(Self::TestEnumWithElif(Box::new( - TestEnumWithElif::arbitrary(u)?, - ))), TypeVariant::TestUnionWithIfdef => Ok(Self::TestUnionWithIfdef(Box::new( TestUnionWithIfdef::arbitrary(u)?, ))), - TypeVariant::TestUnionWithIfndef => Ok(Self::TestUnionWithIfndef(Box::new( - TestUnionWithIfndef::arbitrary(u)?, - ))), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraBundle => Ok(Self::ExtraBundle(Box::new(ExtraBundle::arbitrary(u)?))), #[cfg(feature = "enable_extra_types")] @@ -73789,16 +72998,11 @@ impl Type { TypeVariant::ClaimableBalanceId => Self::ClaimableBalanceId(Box::default()), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraUint64 => Self::ExtraUint64(Box::default()), - #[cfg(not(feature = "disable_nonce_types"))] - TypeVariant::NonceUint64 => Self::NonceUint64(Box::default()), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraStruct => Self::ExtraStruct(Box::default()), TypeVariant::ConditionalTypedef => Self::ConditionalTypedef(Box::default()), TypeVariant::TestEnumWithIfdef => Self::TestEnumWithIfdef(Box::default()), - TypeVariant::TestEnumWithIfndef => Self::TestEnumWithIfndef(Box::default()), - TypeVariant::TestEnumWithElif => Self::TestEnumWithElif(Box::default()), TypeVariant::TestUnionWithIfdef => Self::TestUnionWithIfdef(Box::default()), - TypeVariant::TestUnionWithIfndef => Self::TestUnionWithIfndef(Box::default()), #[cfg(feature = "enable_extra_types")] TypeVariant::ExtraBundle => Self::ExtraBundle(Box::default()), #[cfg(feature = "enable_extra_types")] @@ -74281,16 +73485,11 @@ impl Type { Self::ClaimableBalanceId(ref v) => v.as_ref(), #[cfg(feature = "enable_extra_types")] Self::ExtraUint64(ref v) => v.as_ref(), - #[cfg(not(feature = "disable_nonce_types"))] - Self::NonceUint64(ref v) => v.as_ref(), #[cfg(feature = "enable_extra_types")] Self::ExtraStruct(ref v) => v.as_ref(), Self::ConditionalTypedef(ref v) => v.as_ref(), Self::TestEnumWithIfdef(ref v) => v.as_ref(), - Self::TestEnumWithIfndef(ref v) => v.as_ref(), - Self::TestEnumWithElif(ref v) => v.as_ref(), Self::TestUnionWithIfdef(ref v) => v.as_ref(), - Self::TestUnionWithIfndef(ref v) => v.as_ref(), #[cfg(feature = "enable_extra_types")] Self::ExtraBundle(ref v) => v.as_ref(), #[cfg(feature = "enable_extra_types")] @@ -74797,16 +73996,11 @@ impl Type { Self::ClaimableBalanceId(_) => "ClaimableBalanceId", #[cfg(feature = "enable_extra_types")] Self::ExtraUint64(_) => "ExtraUint64", - #[cfg(not(feature = "disable_nonce_types"))] - Self::NonceUint64(_) => "NonceUint64", #[cfg(feature = "enable_extra_types")] Self::ExtraStruct(_) => "ExtraStruct", Self::ConditionalTypedef(_) => "ConditionalTypedef", Self::TestEnumWithIfdef(_) => "TestEnumWithIfdef", - Self::TestEnumWithIfndef(_) => "TestEnumWithIfndef", - Self::TestEnumWithElif(_) => "TestEnumWithElif", Self::TestUnionWithIfdef(_) => "TestUnionWithIfdef", - Self::TestUnionWithIfndef(_) => "TestUnionWithIfndef", #[cfg(feature = "enable_extra_types")] Self::ExtraBundle(_) => "ExtraBundle", #[cfg(feature = "enable_extra_types")] @@ -75363,16 +74557,11 @@ impl Type { Self::ClaimableBalanceId(_) => TypeVariant::ClaimableBalanceId, #[cfg(feature = "enable_extra_types")] Self::ExtraUint64(_) => TypeVariant::ExtraUint64, - #[cfg(not(feature = "disable_nonce_types"))] - Self::NonceUint64(_) => TypeVariant::NonceUint64, #[cfg(feature = "enable_extra_types")] Self::ExtraStruct(_) => TypeVariant::ExtraStruct, Self::ConditionalTypedef(_) => TypeVariant::ConditionalTypedef, Self::TestEnumWithIfdef(_) => TypeVariant::TestEnumWithIfdef, - Self::TestEnumWithIfndef(_) => TypeVariant::TestEnumWithIfndef, - Self::TestEnumWithElif(_) => TypeVariant::TestEnumWithElif, Self::TestUnionWithIfdef(_) => TypeVariant::TestUnionWithIfdef, - Self::TestUnionWithIfndef(_) => TypeVariant::TestUnionWithIfndef, #[cfg(feature = "enable_extra_types")] Self::ExtraBundle(_) => TypeVariant::ExtraBundle, #[cfg(feature = "enable_extra_types")] @@ -75868,16 +75057,11 @@ impl WriteXdr for Type { Self::ClaimableBalanceId(v) => v.write_xdr(w), #[cfg(feature = "enable_extra_types")] Self::ExtraUint64(v) => v.write_xdr(w), - #[cfg(not(feature = "disable_nonce_types"))] - Self::NonceUint64(v) => v.write_xdr(w), #[cfg(feature = "enable_extra_types")] Self::ExtraStruct(v) => v.write_xdr(w), Self::ConditionalTypedef(v) => v.write_xdr(w), Self::TestEnumWithIfdef(v) => v.write_xdr(w), - Self::TestEnumWithIfndef(v) => v.write_xdr(w), - Self::TestEnumWithElif(v) => v.write_xdr(w), Self::TestUnionWithIfdef(v) => v.write_xdr(w), - Self::TestUnionWithIfndef(v) => v.write_xdr(w), #[cfg(feature = "enable_extra_types")] Self::ExtraBundle(v) => v.write_xdr(w), #[cfg(feature = "enable_extra_types")] diff --git a/xdr-generator-rust/xdr-parser/src/parser.rs b/xdr-generator-rust/xdr-parser/src/parser.rs index 4e6c815c..aea89dcb 100644 --- a/xdr-generator-rust/xdr-parser/src/parser.rs +++ b/xdr-generator-rust/xdr-parser/src/parser.rs @@ -80,10 +80,10 @@ struct Parser { file_index: usize, /// Stack of cfg conditions from enclosing `#ifdef`/`#else` blocks. cfg_stack: Vec, - /// Stack tracking seen conditions for each active `#ifdef` block, - /// used by `parse_ifdef_enter`/`parse_ifdef_branch`/`parse_ifdef_exit` for - /// inline ifdef handling inside enum/union bodies. - ifdef_seen_stack: Vec>, + /// Stack tracking the initial condition for each active inline `#ifdef` + /// block (inside enum/union bodies), so that `parse_ifdef_branch` can + /// compute the `#else` condition and `parse_ifdef_exit` can clean up. + ifdef_seen_stack: Vec, } impl Parser { @@ -212,21 +212,20 @@ impl Parser { } _ => unreachable!(), }; - self.ifdef_seen_stack.push(vec![first_cfg.clone()]); + self.ifdef_seen_stack.push(first_cfg.clone()); self.cfg_stack.push(first_cfg); Ok(()) } /// Handle an `#else` token inside an inline ifdef block. - /// Pops the current branch's cfg and pushes the new branch's cfg. + /// Pops the current branch's cfg and pushes the negated cfg. fn parse_ifdef_branch(&mut self) -> Result<(), ParseError> { if self.ifdef_seen_stack.is_empty() { return Err(self.make_unexpected_directive_error()); } self.cfg_stack.pop(); self.advance(); // consume #else - let seen = self.ifdef_seen_stack.last_mut().unwrap(); - let else_cfg = seen[0].clone().negate(); + let else_cfg = self.ifdef_seen_stack.last().unwrap().clone().negate(); self.cfg_stack.push(else_cfg); Ok(()) } From 232cb1458f216c45c0e4278a5b93df1d1e0287f4 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 18 Mar 2026 13:47:38 +1000 Subject: [PATCH 09/28] update curr submodule --- xdr/curr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xdr/curr b/xdr/curr index a4e769e3..cff714a5 160000 --- a/xdr/curr +++ b/xdr/curr @@ -1 +1 @@ -Subproject commit a4e769e3042613140812209c65cc6e0cc22804ce +Subproject commit cff714a5ebaaaf2dac343b3546c2df73f0b7a36e From fbe493eae928ba615d991deb7f02f5b2d581f7b3 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 18 Mar 2026 14:54:49 +1000 Subject: [PATCH 10/28] regenerate curr xdr types from updated submodule --- src/curr/generated.rs | 701 +++++++++++++++++++++++--- xdr-json/curr/ConditionalTypedef.json | 8 + xdr-json/curr/TestEnumWithIfdef.json | 11 + xdr-json/curr/TestUnionWithIfdef.json | 43 ++ 4 files changed, 705 insertions(+), 58 deletions(-) create mode 100644 xdr-json/curr/ConditionalTypedef.json create mode 100644 xdr-json/curr/TestEnumWithIfdef.json create mode 100644 xdr-json/curr/TestUnionWithIfdef.json diff --git a/src/curr/generated.rs b/src/curr/generated.rs index 1c678924..04e9155e 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -23,7 +23,7 @@ pub const XDR_FILES_SHA256: [(&str, &str); 13] = [ ), ( "xdr/curr/Stellar-contract-config-setting.x", - "26c2c761d5e175c8b2f373611c942ef4484a6cd33f142f69638b2df82be85313", + "a034a3eb4d8b94f5c4c573fe14a1afc548aa316e1e897aa70e5a1688aada3c77", ), ( "xdr/curr/Stellar-contract-env-meta.x", @@ -39,7 +39,7 @@ pub const XDR_FILES_SHA256: [(&str, &str); 13] = [ ), ( "xdr/curr/Stellar-contract.x", - "caa002cf7e0b961b0f1f5be429c1a1b1478b49be494c9d547fc3c4b2fa6b38f0", + "dce61df115c93fef5bb352beac1b504a518cb11dcb8ee029b1bb1b5f8fe52982", ), ( "xdr/curr/Stellar-exporter.x", @@ -63,7 +63,7 @@ pub const XDR_FILES_SHA256: [(&str, &str); 13] = [ ), ( "xdr/curr/Stellar-transaction.x", - "7c4c951f233ad7cdabedd740abd9697626ec5bc03ce97bf60cbaeee1481a48d1", + "30d03669fb29ca48fdda1c84258473fe6d798f3b881c0224b34df1a1f9e21e80", ), ( "xdr/curr/Stellar-types.x", @@ -4991,6 +4991,113 @@ impl WriteXdr for ScpQuorumSet { } } +/// EncodedLedgerKey is an XDR Typedef defined as: +/// +/// ```text +/// typedef opaque EncodedLedgerKey<>; +/// ``` +/// +#[cfg_eval::cfg_eval] +#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +#[derive(Debug)] +pub struct EncodedLedgerKey(pub BytesM); + +impl From for BytesM { + #[must_use] + fn from(x: EncodedLedgerKey) -> Self { + x.0 + } +} + +impl From for EncodedLedgerKey { + #[must_use] + fn from(x: BytesM) -> Self { + EncodedLedgerKey(x) + } +} + +impl AsRef for EncodedLedgerKey { + #[must_use] + fn as_ref(&self) -> &BytesM { + &self.0 + } +} + +impl ReadXdr for EncodedLedgerKey { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + let i = BytesM::read_xdr(r)?; + let v = EncodedLedgerKey(i); + Ok(v) + }) + } +} + +impl WriteXdr for EncodedLedgerKey { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| self.0.write_xdr(w)) + } +} + +impl Deref for EncodedLedgerKey { + type Target = BytesM; + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl From for Vec { + #[must_use] + fn from(x: EncodedLedgerKey) -> Self { + x.0 .0 + } +} + +impl TryFrom> for EncodedLedgerKey { + type Error = Error; + fn try_from(x: Vec) -> Result { + Ok(EncodedLedgerKey(x.try_into()?)) + } +} + +#[cfg(feature = "alloc")] +impl TryFrom<&Vec> for EncodedLedgerKey { + type Error = Error; + fn try_from(x: &Vec) -> Result { + Ok(EncodedLedgerKey(x.try_into()?)) + } +} + +impl AsRef> for EncodedLedgerKey { + #[must_use] + fn as_ref(&self) -> &Vec { + &self.0 .0 + } +} + +impl AsRef<[u8]> for EncodedLedgerKey { + #[cfg(feature = "alloc")] + #[must_use] + fn as_ref(&self) -> &[u8] { + &self.0 .0 + } + #[cfg(not(feature = "alloc"))] + #[must_use] + fn as_ref(&self) -> &[u8] { + self.0 .0 + } +} + /// ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as: /// /// ```text @@ -5709,7 +5816,9 @@ impl WriteXdr for ConfigSettingContractBandwidthV0 { /// // Cost of performing BN254 scalar element exponentiation /// Bn254FrPow = 83, /// // Cost of performing BN254 scalar element inversion -/// Bn254FrInv = 84 +/// Bn254FrInv = 84, +/// // Cost of performing BN254 G1 multi-scalar multiplication (MSM) +/// Bn254G1Msm = 85 /// }; /// ``` /// @@ -5811,6 +5920,7 @@ pub enum ContractCostType { Bn254FrMul = 82, Bn254FrPow = 83, Bn254FrInv = 84, + Bn254G1Msm = 85, } impl ContractCostType { @@ -5900,6 +6010,7 @@ impl ContractCostType { ContractCostType::Bn254FrMul, ContractCostType::Bn254FrPow, ContractCostType::Bn254FrInv, + ContractCostType::Bn254G1Msm, ]; pub const VARIANTS: [ContractCostType; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -5996,6 +6107,7 @@ impl ContractCostType { "Bn254FrMul", "Bn254FrPow", "Bn254FrInv", + "Bn254G1Msm", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -6095,6 +6207,7 @@ impl ContractCostType { Self::Bn254FrMul => "Bn254FrMul", Self::Bn254FrPow => "Bn254FrPow", Self::Bn254FrInv => "Bn254FrInv", + Self::Bn254G1Msm => "Bn254G1Msm", } } @@ -6215,6 +6328,7 @@ impl TryFrom for ContractCostType { 82 => ContractCostType::Bn254FrMul, 83 => ContractCostType::Bn254FrPow, 84 => ContractCostType::Bn254FrInv, + 85 => ContractCostType::Bn254G1Msm, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -6531,6 +6645,190 @@ impl WriteXdr for ConfigSettingScpTiming { } } +/// FrozenLedgerKeys is an XDR Struct defined as: +/// +/// ```text +/// struct FrozenLedgerKeys { +/// EncodedLedgerKey keys<>; +/// }; +/// ``` +/// +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub struct FrozenLedgerKeys { + pub keys: VecM, +} + +impl ReadXdr for FrozenLedgerKeys { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + Ok(Self { + keys: VecM::::read_xdr(r)?, + }) + }) + } +} + +impl WriteXdr for FrozenLedgerKeys { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| { + self.keys.write_xdr(w)?; + Ok(()) + }) + } +} + +/// FrozenLedgerKeysDelta is an XDR Struct defined as: +/// +/// ```text +/// struct FrozenLedgerKeysDelta { +/// EncodedLedgerKey keysToFreeze<>; +/// EncodedLedgerKey keysToUnfreeze<>; +/// }; +/// ``` +/// +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub struct FrozenLedgerKeysDelta { + pub keys_to_freeze: VecM, + pub keys_to_unfreeze: VecM, +} + +impl ReadXdr for FrozenLedgerKeysDelta { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + Ok(Self { + keys_to_freeze: VecM::::read_xdr(r)?, + keys_to_unfreeze: VecM::::read_xdr(r)?, + }) + }) + } +} + +impl WriteXdr for FrozenLedgerKeysDelta { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| { + self.keys_to_freeze.write_xdr(w)?; + self.keys_to_unfreeze.write_xdr(w)?; + Ok(()) + }) + } +} + +/// FreezeBypassTxs is an XDR Struct defined as: +/// +/// ```text +/// struct FreezeBypassTxs { +/// Hash txHashes<>; +/// }; +/// ``` +/// +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub struct FreezeBypassTxs { + pub tx_hashes: VecM, +} + +impl ReadXdr for FreezeBypassTxs { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + Ok(Self { + tx_hashes: VecM::::read_xdr(r)?, + }) + }) + } +} + +impl WriteXdr for FreezeBypassTxs { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| { + self.tx_hashes.write_xdr(w)?; + Ok(()) + }) + } +} + +/// FreezeBypassTxsDelta is an XDR Struct defined as: +/// +/// ```text +/// struct FreezeBypassTxsDelta { +/// Hash addTxs<>; +/// Hash removeTxs<>; +/// }; +/// ``` +/// +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub struct FreezeBypassTxsDelta { + pub add_txs: VecM, + pub remove_txs: VecM, +} + +impl ReadXdr for FreezeBypassTxsDelta { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + Ok(Self { + add_txs: VecM::::read_xdr(r)?, + remove_txs: VecM::::read_xdr(r)?, + }) + }) + } +} + +impl WriteXdr for FreezeBypassTxsDelta { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| { + self.add_txs.write_xdr(w)?; + self.remove_txs.write_xdr(w)?; + Ok(()) + }) + } +} + /// ContractCostCountLimit is an XDR Const defined as: /// /// ```text @@ -6667,7 +6965,11 @@ impl AsRef<[ContractCostParamEntry]> for ContractCostParams { /// CONFIG_SETTING_EVICTION_ITERATOR = 13, /// CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, /// CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, -/// CONFIG_SETTING_SCP_TIMING = 16 +/// CONFIG_SETTING_SCP_TIMING = 16, +/// CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, +/// CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, +/// CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, +/// CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 /// }; /// ``` /// @@ -6701,6 +7003,10 @@ pub enum ConfigSettingId { ContractParallelComputeV0 = 14, ContractLedgerCostExtV0 = 15, ScpTiming = 16, + FrozenLedgerKeys = 17, + FrozenLedgerKeysDelta = 18, + FreezeBypassTxs = 19, + FreezeBypassTxsDelta = 20, } impl ConfigSettingId { @@ -6722,6 +7028,10 @@ impl ConfigSettingId { ConfigSettingId::ContractParallelComputeV0, ConfigSettingId::ContractLedgerCostExtV0, ConfigSettingId::ScpTiming, + ConfigSettingId::FrozenLedgerKeys, + ConfigSettingId::FrozenLedgerKeysDelta, + ConfigSettingId::FreezeBypassTxs, + ConfigSettingId::FreezeBypassTxsDelta, ]; pub const VARIANTS: [ConfigSettingId; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -6750,6 +7060,10 @@ impl ConfigSettingId { "ContractParallelComputeV0", "ContractLedgerCostExtV0", "ScpTiming", + "FrozenLedgerKeys", + "FrozenLedgerKeysDelta", + "FreezeBypassTxs", + "FreezeBypassTxsDelta", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -6781,6 +7095,10 @@ impl ConfigSettingId { Self::ContractParallelComputeV0 => "ContractParallelComputeV0", Self::ContractLedgerCostExtV0 => "ContractLedgerCostExtV0", Self::ScpTiming => "ScpTiming", + Self::FrozenLedgerKeys => "FrozenLedgerKeys", + Self::FrozenLedgerKeysDelta => "FrozenLedgerKeysDelta", + Self::FreezeBypassTxs => "FreezeBypassTxs", + Self::FreezeBypassTxsDelta => "FreezeBypassTxsDelta", } } @@ -6833,6 +7151,10 @@ impl TryFrom for ConfigSettingId { 14 => ConfigSettingId::ContractParallelComputeV0, 15 => ConfigSettingId::ContractLedgerCostExtV0, 16 => ConfigSettingId::ScpTiming, + 17 => ConfigSettingId::FrozenLedgerKeys, + 18 => ConfigSettingId::FrozenLedgerKeysDelta, + 19 => ConfigSettingId::FreezeBypassTxs, + 20 => ConfigSettingId::FreezeBypassTxsDelta, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -6907,6 +7229,14 @@ impl WriteXdr for ConfigSettingId { /// ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; /// case CONFIG_SETTING_SCP_TIMING: /// ConfigSettingSCPTiming contractSCPTiming; +/// case CONFIG_SETTING_FROZEN_LEDGER_KEYS: +/// FrozenLedgerKeys frozenLedgerKeys; +/// case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: +/// FrozenLedgerKeysDelta frozenLedgerKeysDelta; +/// case CONFIG_SETTING_FREEZE_BYPASS_TXS: +/// FreezeBypassTxs freezeBypassTxs; +/// case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: +/// FreezeBypassTxsDelta freezeBypassTxsDelta; /// }; /// ``` /// @@ -6946,6 +7276,10 @@ pub enum ConfigSettingEntry { ContractParallelComputeV0(ConfigSettingContractParallelComputeV0), ContractLedgerCostExtV0(ConfigSettingContractLedgerCostExtV0), ScpTiming(ConfigSettingScpTiming), + FrozenLedgerKeys(FrozenLedgerKeys), + FrozenLedgerKeysDelta(FrozenLedgerKeysDelta), + FreezeBypassTxs(FreezeBypassTxs), + FreezeBypassTxsDelta(FreezeBypassTxsDelta), } #[cfg(feature = "alloc")] @@ -6974,6 +7308,10 @@ impl ConfigSettingEntry { ConfigSettingId::ContractParallelComputeV0, ConfigSettingId::ContractLedgerCostExtV0, ConfigSettingId::ScpTiming, + ConfigSettingId::FrozenLedgerKeys, + ConfigSettingId::FrozenLedgerKeysDelta, + ConfigSettingId::FreezeBypassTxs, + ConfigSettingId::FreezeBypassTxsDelta, ]; pub const VARIANTS: [ConfigSettingId; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -7002,6 +7340,10 @@ impl ConfigSettingEntry { "ContractParallelComputeV0", "ContractLedgerCostExtV0", "ScpTiming", + "FrozenLedgerKeys", + "FrozenLedgerKeysDelta", + "FreezeBypassTxs", + "FreezeBypassTxsDelta", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -7033,6 +7375,10 @@ impl ConfigSettingEntry { Self::ContractParallelComputeV0(_) => "ContractParallelComputeV0", Self::ContractLedgerCostExtV0(_) => "ContractLedgerCostExtV0", Self::ScpTiming(_) => "ScpTiming", + Self::FrozenLedgerKeys(_) => "FrozenLedgerKeys", + Self::FrozenLedgerKeysDelta(_) => "FrozenLedgerKeysDelta", + Self::FreezeBypassTxs(_) => "FreezeBypassTxs", + Self::FreezeBypassTxsDelta(_) => "FreezeBypassTxsDelta", } } @@ -7061,6 +7407,10 @@ impl ConfigSettingEntry { Self::ContractParallelComputeV0(_) => ConfigSettingId::ContractParallelComputeV0, Self::ContractLedgerCostExtV0(_) => ConfigSettingId::ContractLedgerCostExtV0, Self::ScpTiming(_) => ConfigSettingId::ScpTiming, + Self::FrozenLedgerKeys(_) => ConfigSettingId::FrozenLedgerKeys, + Self::FrozenLedgerKeysDelta(_) => ConfigSettingId::FrozenLedgerKeysDelta, + Self::FreezeBypassTxs(_) => ConfigSettingId::FreezeBypassTxs, + Self::FreezeBypassTxsDelta(_) => ConfigSettingId::FreezeBypassTxsDelta, } } @@ -7148,6 +7498,18 @@ impl ReadXdr for ConfigSettingEntry { ConfigSettingContractLedgerCostExtV0::read_xdr(r)?, ), ConfigSettingId::ScpTiming => Self::ScpTiming(ConfigSettingScpTiming::read_xdr(r)?), + ConfigSettingId::FrozenLedgerKeys => { + Self::FrozenLedgerKeys(FrozenLedgerKeys::read_xdr(r)?) + } + ConfigSettingId::FrozenLedgerKeysDelta => { + Self::FrozenLedgerKeysDelta(FrozenLedgerKeysDelta::read_xdr(r)?) + } + ConfigSettingId::FreezeBypassTxs => { + Self::FreezeBypassTxs(FreezeBypassTxs::read_xdr(r)?) + } + ConfigSettingId::FreezeBypassTxsDelta => { + Self::FreezeBypassTxsDelta(FreezeBypassTxsDelta::read_xdr(r)?) + } #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -7180,6 +7542,10 @@ impl WriteXdr for ConfigSettingEntry { Self::ContractParallelComputeV0(v) => v.write_xdr(w)?, Self::ContractLedgerCostExtV0(v) => v.write_xdr(w)?, Self::ScpTiming(v) => v.write_xdr(w)?, + Self::FrozenLedgerKeys(v) => v.write_xdr(w)?, + Self::FrozenLedgerKeysDelta(v) => v.write_xdr(w)?, + Self::FreezeBypassTxs(v) => v.write_xdr(w)?, + Self::FreezeBypassTxsDelta(v) => v.write_xdr(w)?, }; Ok(()) }) @@ -10387,12 +10753,7 @@ impl WriteXdr for ScSpecEntry { /// // symbolic SCVals used as the key for ledger entries for a contract's /// // instance and an address' nonce, respectively. /// SCV_LEDGER_KEY_CONTRACT_INSTANCE = 20, -/// #ifdef SPARSE_MAP -/// SCV_LEDGER_KEY_NONCE = 21, -/// SCV_SPARSE_MAP = 22 -/// #else /// SCV_LEDGER_KEY_NONCE = 21 -/// #endif /// }; /// ``` /// @@ -10430,11 +10791,6 @@ pub enum ScValType { Address = 18, ContractInstance = 19, LedgerKeyContractInstance = 20, - #[cfg(feature = "sparse_map")] - LedgerKeyNonce = 21, - #[cfg(feature = "sparse_map")] - SparseMap = 22, - #[cfg(not(feature = "sparse_map"))] LedgerKeyNonce = 21, } @@ -10461,11 +10817,6 @@ impl ScValType { ScValType::Address, ScValType::ContractInstance, ScValType::LedgerKeyContractInstance, - #[cfg(feature = "sparse_map")] - ScValType::LedgerKeyNonce, - #[cfg(feature = "sparse_map")] - ScValType::SparseMap, - #[cfg(not(feature = "sparse_map"))] ScValType::LedgerKeyNonce, ]; pub const VARIANTS: [ScValType; Self::_VARIANTS.len()] = { @@ -10499,11 +10850,6 @@ impl ScValType { "Address", "ContractInstance", "LedgerKeyContractInstance", - #[cfg(feature = "sparse_map")] - "LedgerKeyNonce", - #[cfg(feature = "sparse_map")] - "SparseMap", - #[cfg(not(feature = "sparse_map"))] "LedgerKeyNonce", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { @@ -10540,11 +10886,6 @@ impl ScValType { Self::Address => "Address", Self::ContractInstance => "ContractInstance", Self::LedgerKeyContractInstance => "LedgerKeyContractInstance", - #[cfg(feature = "sparse_map")] - Self::LedgerKeyNonce => "LedgerKeyNonce", - #[cfg(feature = "sparse_map")] - Self::SparseMap => "SparseMap", - #[cfg(not(feature = "sparse_map"))] Self::LedgerKeyNonce => "LedgerKeyNonce", } } @@ -10602,11 +10943,6 @@ impl TryFrom for ScValType { 18 => ScValType::Address, 19 => ScValType::ContractInstance, 20 => ScValType::LedgerKeyContractInstance, - #[cfg(feature = "sparse_map")] - 21 => ScValType::LedgerKeyNonce, - #[cfg(feature = "sparse_map")] - 22 => ScValType::SparseMap, - #[cfg(not(feature = "sparse_map"))] 21 => ScValType::LedgerKeyNonce, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), @@ -12882,11 +13218,6 @@ impl WriteXdr for ScContractInstance { /// void; /// case SCV_LEDGER_KEY_NONCE: /// SCNonceKey nonce_key; -/// -/// #ifdef SPARSE_MAP -/// case SCV_SPARSE_MAP: -/// SCMap *sparseMap; -/// #endif /// }; /// ``` /// @@ -12937,8 +13268,6 @@ pub enum ScVal { ContractInstance(ScContractInstance), LedgerKeyContractInstance, LedgerKeyNonce(ScNonceKey), - #[cfg(feature = "sparse_map")] - SparseMap(Option), } #[cfg(feature = "alloc")] @@ -12972,8 +13301,6 @@ impl ScVal { ScValType::ContractInstance, ScValType::LedgerKeyContractInstance, ScValType::LedgerKeyNonce, - #[cfg(feature = "sparse_map")] - ScValType::SparseMap, ]; pub const VARIANTS: [ScValType; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -13007,8 +13334,6 @@ impl ScVal { "ContractInstance", "LedgerKeyContractInstance", "LedgerKeyNonce", - #[cfg(feature = "sparse_map")] - "SparseMap", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -13045,8 +13370,6 @@ impl ScVal { Self::ContractInstance(_) => "ContractInstance", Self::LedgerKeyContractInstance => "LedgerKeyContractInstance", Self::LedgerKeyNonce(_) => "LedgerKeyNonce", - #[cfg(feature = "sparse_map")] - Self::SparseMap(_) => "SparseMap", } } @@ -13076,8 +13399,6 @@ impl ScVal { Self::ContractInstance(_) => ScValType::ContractInstance, Self::LedgerKeyContractInstance => ScValType::LedgerKeyContractInstance, Self::LedgerKeyNonce(_) => ScValType::LedgerKeyNonce, - #[cfg(feature = "sparse_map")] - Self::SparseMap(_) => ScValType::SparseMap, } } @@ -13140,8 +13461,6 @@ impl ReadXdr for ScVal { } ScValType::LedgerKeyContractInstance => Self::LedgerKeyContractInstance, ScValType::LedgerKeyNonce => Self::LedgerKeyNonce(ScNonceKey::read_xdr(r)?), - #[cfg(feature = "sparse_map")] - ScValType::SparseMap => Self::SparseMap(Option::::read_xdr(r)?), #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -13179,8 +13498,6 @@ impl WriteXdr for ScVal { Self::ContractInstance(v) => v.write_xdr(w)?, Self::LedgerKeyContractInstance => ().write_xdr(w)?, Self::LedgerKeyNonce(v) => v.write_xdr(w)?, - #[cfg(feature = "sparse_map")] - Self::SparseMap(v) => v.write_xdr(w)?, }; Ok(()) }) @@ -45699,7 +46016,8 @@ impl WriteXdr for CreateClaimableBalanceResult { /// CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM = -2, /// CLAIM_CLAIMABLE_BALANCE_LINE_FULL = -3, /// CLAIM_CLAIMABLE_BALANCE_NO_TRUST = -4, -/// CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED = -5 +/// CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED = -5, +/// CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN = -6 /// }; /// ``` /// @@ -45722,6 +46040,7 @@ pub enum ClaimClaimableBalanceResultCode { LineFull = -3, NoTrust = -4, NotAuthorized = -5, + TrustlineFrozen = -6, } impl ClaimClaimableBalanceResultCode { @@ -45732,6 +46051,7 @@ impl ClaimClaimableBalanceResultCode { ClaimClaimableBalanceResultCode::LineFull, ClaimClaimableBalanceResultCode::NoTrust, ClaimClaimableBalanceResultCode::NotAuthorized, + ClaimClaimableBalanceResultCode::TrustlineFrozen, ]; pub const VARIANTS: [ClaimClaimableBalanceResultCode; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -45749,6 +46069,7 @@ impl ClaimClaimableBalanceResultCode { "LineFull", "NoTrust", "NotAuthorized", + "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -45769,6 +46090,7 @@ impl ClaimClaimableBalanceResultCode { Self::LineFull => "LineFull", Self::NoTrust => "NoTrust", Self::NotAuthorized => "NotAuthorized", + Self::TrustlineFrozen => "TrustlineFrozen", } } @@ -45810,6 +46132,7 @@ impl TryFrom for ClaimClaimableBalanceResultCode { -3 => ClaimClaimableBalanceResultCode::LineFull, -4 => ClaimClaimableBalanceResultCode::NoTrust, -5 => ClaimClaimableBalanceResultCode::NotAuthorized, + -6 => ClaimClaimableBalanceResultCode::TrustlineFrozen, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -45857,6 +46180,7 @@ impl WriteXdr for ClaimClaimableBalanceResultCode { /// case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: /// case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: /// case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: +/// case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: /// void; /// }; /// ``` @@ -45880,6 +46204,7 @@ pub enum ClaimClaimableBalanceResult { LineFull, NoTrust, NotAuthorized, + TrustlineFrozen, } #[cfg(feature = "alloc")] @@ -45897,6 +46222,7 @@ impl ClaimClaimableBalanceResult { ClaimClaimableBalanceResultCode::LineFull, ClaimClaimableBalanceResultCode::NoTrust, ClaimClaimableBalanceResultCode::NotAuthorized, + ClaimClaimableBalanceResultCode::TrustlineFrozen, ]; pub const VARIANTS: [ClaimClaimableBalanceResultCode; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -45914,6 +46240,7 @@ impl ClaimClaimableBalanceResult { "LineFull", "NoTrust", "NotAuthorized", + "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -45934,6 +46261,7 @@ impl ClaimClaimableBalanceResult { Self::LineFull => "LineFull", Self::NoTrust => "NoTrust", Self::NotAuthorized => "NotAuthorized", + Self::TrustlineFrozen => "TrustlineFrozen", } } @@ -45947,6 +46275,7 @@ impl ClaimClaimableBalanceResult { Self::LineFull => ClaimClaimableBalanceResultCode::LineFull, Self::NoTrust => ClaimClaimableBalanceResultCode::NoTrust, Self::NotAuthorized => ClaimClaimableBalanceResultCode::NotAuthorized, + Self::TrustlineFrozen => ClaimClaimableBalanceResultCode::TrustlineFrozen, } } @@ -45992,6 +46321,7 @@ impl ReadXdr for ClaimClaimableBalanceResult { ClaimClaimableBalanceResultCode::LineFull => Self::LineFull, ClaimClaimableBalanceResultCode::NoTrust => Self::NoTrust, ClaimClaimableBalanceResultCode::NotAuthorized => Self::NotAuthorized, + ClaimClaimableBalanceResultCode::TrustlineFrozen => Self::TrustlineFrozen, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -46013,6 +46343,7 @@ impl WriteXdr for ClaimClaimableBalanceResult { Self::LineFull => ().write_xdr(w)?, Self::NoTrust => ().write_xdr(w)?, Self::NotAuthorized => ().write_xdr(w)?, + Self::TrustlineFrozen => ().write_xdr(w)?, }; Ok(()) }) @@ -47887,7 +48218,9 @@ impl WriteXdr for SetTrustLineFlagsResult { /// LIQUIDITY_POOL_DEPOSIT_LINE_FULL = -5, // pool share trust line doesn't /// // have sufficient limit /// LIQUIDITY_POOL_DEPOSIT_BAD_PRICE = -6, // deposit price outside bounds -/// LIQUIDITY_POOL_DEPOSIT_POOL_FULL = -7 // pool reserves are full +/// LIQUIDITY_POOL_DEPOSIT_POOL_FULL = -7, // pool reserves are full +/// LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN = -8 // trustline for one of the +/// // assets is frozen /// }; /// ``` /// @@ -47912,6 +48245,7 @@ pub enum LiquidityPoolDepositResultCode { LineFull = -5, BadPrice = -6, PoolFull = -7, + TrustlineFrozen = -8, } impl LiquidityPoolDepositResultCode { @@ -47924,6 +48258,7 @@ impl LiquidityPoolDepositResultCode { LiquidityPoolDepositResultCode::LineFull, LiquidityPoolDepositResultCode::BadPrice, LiquidityPoolDepositResultCode::PoolFull, + LiquidityPoolDepositResultCode::TrustlineFrozen, ]; pub const VARIANTS: [LiquidityPoolDepositResultCode; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -47943,6 +48278,7 @@ impl LiquidityPoolDepositResultCode { "LineFull", "BadPrice", "PoolFull", + "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -47965,6 +48301,7 @@ impl LiquidityPoolDepositResultCode { Self::LineFull => "LineFull", Self::BadPrice => "BadPrice", Self::PoolFull => "PoolFull", + Self::TrustlineFrozen => "TrustlineFrozen", } } @@ -48008,6 +48345,7 @@ impl TryFrom for LiquidityPoolDepositResultCode { -5 => LiquidityPoolDepositResultCode::LineFull, -6 => LiquidityPoolDepositResultCode::BadPrice, -7 => LiquidityPoolDepositResultCode::PoolFull, + -8 => LiquidityPoolDepositResultCode::TrustlineFrozen, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -48057,6 +48395,7 @@ impl WriteXdr for LiquidityPoolDepositResultCode { /// case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: /// case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: /// case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: +/// case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: /// void; /// }; /// ``` @@ -48082,6 +48421,7 @@ pub enum LiquidityPoolDepositResult { LineFull, BadPrice, PoolFull, + TrustlineFrozen, } #[cfg(feature = "alloc")] @@ -48101,6 +48441,7 @@ impl LiquidityPoolDepositResult { LiquidityPoolDepositResultCode::LineFull, LiquidityPoolDepositResultCode::BadPrice, LiquidityPoolDepositResultCode::PoolFull, + LiquidityPoolDepositResultCode::TrustlineFrozen, ]; pub const VARIANTS: [LiquidityPoolDepositResultCode; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -48120,6 +48461,7 @@ impl LiquidityPoolDepositResult { "LineFull", "BadPrice", "PoolFull", + "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -48142,6 +48484,7 @@ impl LiquidityPoolDepositResult { Self::LineFull => "LineFull", Self::BadPrice => "BadPrice", Self::PoolFull => "PoolFull", + Self::TrustlineFrozen => "TrustlineFrozen", } } @@ -48157,6 +48500,7 @@ impl LiquidityPoolDepositResult { Self::LineFull => LiquidityPoolDepositResultCode::LineFull, Self::BadPrice => LiquidityPoolDepositResultCode::BadPrice, Self::PoolFull => LiquidityPoolDepositResultCode::PoolFull, + Self::TrustlineFrozen => LiquidityPoolDepositResultCode::TrustlineFrozen, } } @@ -48204,6 +48548,7 @@ impl ReadXdr for LiquidityPoolDepositResult { LiquidityPoolDepositResultCode::LineFull => Self::LineFull, LiquidityPoolDepositResultCode::BadPrice => Self::BadPrice, LiquidityPoolDepositResultCode::PoolFull => Self::PoolFull, + LiquidityPoolDepositResultCode::TrustlineFrozen => Self::TrustlineFrozen, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -48227,6 +48572,7 @@ impl WriteXdr for LiquidityPoolDepositResult { Self::LineFull => ().write_xdr(w)?, Self::BadPrice => ().write_xdr(w)?, Self::PoolFull => ().write_xdr(w)?, + Self::TrustlineFrozen => ().write_xdr(w)?, }; Ok(()) }) @@ -48249,7 +48595,9 @@ impl WriteXdr for LiquidityPoolDepositResult { /// // pool share /// LIQUIDITY_POOL_WITHDRAW_LINE_FULL = -4, // would go above limit for one /// // of the assets -/// LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM = -5 // didn't withdraw enough +/// LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM = -5, // didn't withdraw enough +/// LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN = -6 // trustline for one of the +/// // assets is frozen /// }; /// ``` /// @@ -48272,6 +48620,7 @@ pub enum LiquidityPoolWithdrawResultCode { Underfunded = -3, LineFull = -4, UnderMinimum = -5, + TrustlineFrozen = -6, } impl LiquidityPoolWithdrawResultCode { @@ -48282,6 +48631,7 @@ impl LiquidityPoolWithdrawResultCode { LiquidityPoolWithdrawResultCode::Underfunded, LiquidityPoolWithdrawResultCode::LineFull, LiquidityPoolWithdrawResultCode::UnderMinimum, + LiquidityPoolWithdrawResultCode::TrustlineFrozen, ]; pub const VARIANTS: [LiquidityPoolWithdrawResultCode; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -48299,6 +48649,7 @@ impl LiquidityPoolWithdrawResultCode { "Underfunded", "LineFull", "UnderMinimum", + "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -48319,6 +48670,7 @@ impl LiquidityPoolWithdrawResultCode { Self::Underfunded => "Underfunded", Self::LineFull => "LineFull", Self::UnderMinimum => "UnderMinimum", + Self::TrustlineFrozen => "TrustlineFrozen", } } @@ -48360,6 +48712,7 @@ impl TryFrom for LiquidityPoolWithdrawResultCode { -3 => LiquidityPoolWithdrawResultCode::Underfunded, -4 => LiquidityPoolWithdrawResultCode::LineFull, -5 => LiquidityPoolWithdrawResultCode::UnderMinimum, + -6 => LiquidityPoolWithdrawResultCode::TrustlineFrozen, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -48407,6 +48760,7 @@ impl WriteXdr for LiquidityPoolWithdrawResultCode { /// case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: /// case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: /// case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: +/// case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: /// void; /// }; /// ``` @@ -48430,6 +48784,7 @@ pub enum LiquidityPoolWithdrawResult { Underfunded, LineFull, UnderMinimum, + TrustlineFrozen, } #[cfg(feature = "alloc")] @@ -48447,6 +48802,7 @@ impl LiquidityPoolWithdrawResult { LiquidityPoolWithdrawResultCode::Underfunded, LiquidityPoolWithdrawResultCode::LineFull, LiquidityPoolWithdrawResultCode::UnderMinimum, + LiquidityPoolWithdrawResultCode::TrustlineFrozen, ]; pub const VARIANTS: [LiquidityPoolWithdrawResultCode; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -48464,6 +48820,7 @@ impl LiquidityPoolWithdrawResult { "Underfunded", "LineFull", "UnderMinimum", + "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -48484,6 +48841,7 @@ impl LiquidityPoolWithdrawResult { Self::Underfunded => "Underfunded", Self::LineFull => "LineFull", Self::UnderMinimum => "UnderMinimum", + Self::TrustlineFrozen => "TrustlineFrozen", } } @@ -48497,6 +48855,7 @@ impl LiquidityPoolWithdrawResult { Self::Underfunded => LiquidityPoolWithdrawResultCode::Underfunded, Self::LineFull => LiquidityPoolWithdrawResultCode::LineFull, Self::UnderMinimum => LiquidityPoolWithdrawResultCode::UnderMinimum, + Self::TrustlineFrozen => LiquidityPoolWithdrawResultCode::TrustlineFrozen, } } @@ -48542,6 +48901,7 @@ impl ReadXdr for LiquidityPoolWithdrawResult { LiquidityPoolWithdrawResultCode::Underfunded => Self::Underfunded, LiquidityPoolWithdrawResultCode::LineFull => Self::LineFull, LiquidityPoolWithdrawResultCode::UnderMinimum => Self::UnderMinimum, + LiquidityPoolWithdrawResultCode::TrustlineFrozen => Self::TrustlineFrozen, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -48563,6 +48923,7 @@ impl WriteXdr for LiquidityPoolWithdrawResult { Self::Underfunded => ().write_xdr(w)?, Self::LineFull => ().write_xdr(w)?, Self::UnderMinimum => ().write_xdr(w)?, + Self::TrustlineFrozen => ().write_xdr(w)?, }; Ok(()) }) @@ -50356,7 +50717,8 @@ impl WriteXdr for OperationResult { /// txBAD_SPONSORSHIP = -14, // sponsorship not confirmed /// txBAD_MIN_SEQ_AGE_OR_GAP = -15, // minSeqAge or minSeqLedgerGap conditions not met /// txMALFORMED = -16, // precondition is invalid -/// txSOROBAN_INVALID = -17 // soroban-specific preconditions were not met +/// txSOROBAN_INVALID = -17, // soroban-specific preconditions were not met +/// txFROZEN_KEY_ACCESSED = -18 // a 'frozen' ledger key is accessed by any operation /// }; /// ``` /// @@ -50392,6 +50754,7 @@ pub enum TransactionResultCode { TxBadMinSeqAgeOrGap = -15, TxMalformed = -16, TxSorobanInvalid = -17, + TxFrozenKeyAccessed = -18, } impl TransactionResultCode { @@ -50415,6 +50778,7 @@ impl TransactionResultCode { TransactionResultCode::TxBadMinSeqAgeOrGap, TransactionResultCode::TxMalformed, TransactionResultCode::TxSorobanInvalid, + TransactionResultCode::TxFrozenKeyAccessed, ]; pub const VARIANTS: [TransactionResultCode; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -50445,6 +50809,7 @@ impl TransactionResultCode { "TxBadMinSeqAgeOrGap", "TxMalformed", "TxSorobanInvalid", + "TxFrozenKeyAccessed", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -50478,6 +50843,7 @@ impl TransactionResultCode { Self::TxBadMinSeqAgeOrGap => "TxBadMinSeqAgeOrGap", Self::TxMalformed => "TxMalformed", Self::TxSorobanInvalid => "TxSorobanInvalid", + Self::TxFrozenKeyAccessed => "TxFrozenKeyAccessed", } } @@ -50532,6 +50898,7 @@ impl TryFrom for TransactionResultCode { -15 => TransactionResultCode::TxBadMinSeqAgeOrGap, -16 => TransactionResultCode::TxMalformed, -17 => TransactionResultCode::TxSorobanInvalid, + -18 => TransactionResultCode::TxFrozenKeyAccessed, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -50592,6 +50959,7 @@ impl WriteXdr for TransactionResultCode { /// case txBAD_MIN_SEQ_AGE_OR_GAP: /// case txMALFORMED: /// case txSOROBAN_INVALID: +/// case txFROZEN_KEY_ACCESSED: /// void; /// } /// ``` @@ -50626,6 +50994,7 @@ pub enum InnerTransactionResultResult { TxBadMinSeqAgeOrGap, TxMalformed, TxSorobanInvalid, + TxFrozenKeyAccessed, } #[cfg(feature = "alloc")] @@ -50654,6 +51023,7 @@ impl InnerTransactionResultResult { TransactionResultCode::TxBadMinSeqAgeOrGap, TransactionResultCode::TxMalformed, TransactionResultCode::TxSorobanInvalid, + TransactionResultCode::TxFrozenKeyAccessed, ]; pub const VARIANTS: [TransactionResultCode; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -50682,6 +51052,7 @@ impl InnerTransactionResultResult { "TxBadMinSeqAgeOrGap", "TxMalformed", "TxSorobanInvalid", + "TxFrozenKeyAccessed", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -50713,6 +51084,7 @@ impl InnerTransactionResultResult { Self::TxBadMinSeqAgeOrGap => "TxBadMinSeqAgeOrGap", Self::TxMalformed => "TxMalformed", Self::TxSorobanInvalid => "TxSorobanInvalid", + Self::TxFrozenKeyAccessed => "TxFrozenKeyAccessed", } } @@ -50737,6 +51109,7 @@ impl InnerTransactionResultResult { Self::TxBadMinSeqAgeOrGap => TransactionResultCode::TxBadMinSeqAgeOrGap, Self::TxMalformed => TransactionResultCode::TxMalformed, Self::TxSorobanInvalid => TransactionResultCode::TxSorobanInvalid, + Self::TxFrozenKeyAccessed => TransactionResultCode::TxFrozenKeyAccessed, } } @@ -50796,6 +51169,7 @@ impl ReadXdr for InnerTransactionResultResult { TransactionResultCode::TxBadMinSeqAgeOrGap => Self::TxBadMinSeqAgeOrGap, TransactionResultCode::TxMalformed => Self::TxMalformed, TransactionResultCode::TxSorobanInvalid => Self::TxSorobanInvalid, + TransactionResultCode::TxFrozenKeyAccessed => Self::TxFrozenKeyAccessed, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -50828,6 +51202,7 @@ impl WriteXdr for InnerTransactionResultResult { Self::TxBadMinSeqAgeOrGap => ().write_xdr(w)?, Self::TxMalformed => ().write_xdr(w)?, Self::TxSorobanInvalid => ().write_xdr(w)?, + Self::TxFrozenKeyAccessed => ().write_xdr(w)?, }; Ok(()) }) @@ -50992,6 +51367,7 @@ impl WriteXdr for InnerTransactionResultExt { /// case txBAD_MIN_SEQ_AGE_OR_GAP: /// case txMALFORMED: /// case txSOROBAN_INVALID: +/// case txFROZEN_KEY_ACCESSED: /// void; /// } /// result; @@ -51128,6 +51504,7 @@ impl WriteXdr for InnerTransactionResultPair { /// case txBAD_MIN_SEQ_AGE_OR_GAP: /// case txMALFORMED: /// case txSOROBAN_INVALID: +/// case txFROZEN_KEY_ACCESSED: /// void; /// } /// ``` @@ -51164,6 +51541,7 @@ pub enum TransactionResultResult { TxBadMinSeqAgeOrGap, TxMalformed, TxSorobanInvalid, + TxFrozenKeyAccessed, } #[cfg(feature = "alloc")] @@ -51194,6 +51572,7 @@ impl TransactionResultResult { TransactionResultCode::TxBadMinSeqAgeOrGap, TransactionResultCode::TxMalformed, TransactionResultCode::TxSorobanInvalid, + TransactionResultCode::TxFrozenKeyAccessed, ]; pub const VARIANTS: [TransactionResultCode; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -51224,6 +51603,7 @@ impl TransactionResultResult { "TxBadMinSeqAgeOrGap", "TxMalformed", "TxSorobanInvalid", + "TxFrozenKeyAccessed", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -51257,6 +51637,7 @@ impl TransactionResultResult { Self::TxBadMinSeqAgeOrGap => "TxBadMinSeqAgeOrGap", Self::TxMalformed => "TxMalformed", Self::TxSorobanInvalid => "TxSorobanInvalid", + Self::TxFrozenKeyAccessed => "TxFrozenKeyAccessed", } } @@ -51283,6 +51664,7 @@ impl TransactionResultResult { Self::TxBadMinSeqAgeOrGap => TransactionResultCode::TxBadMinSeqAgeOrGap, Self::TxMalformed => TransactionResultCode::TxMalformed, Self::TxSorobanInvalid => TransactionResultCode::TxSorobanInvalid, + Self::TxFrozenKeyAccessed => TransactionResultCode::TxFrozenKeyAccessed, } } @@ -51348,6 +51730,7 @@ impl ReadXdr for TransactionResultResult { TransactionResultCode::TxBadMinSeqAgeOrGap => Self::TxBadMinSeqAgeOrGap, TransactionResultCode::TxMalformed => Self::TxMalformed, TransactionResultCode::TxSorobanInvalid => Self::TxSorobanInvalid, + TransactionResultCode::TxFrozenKeyAccessed => Self::TxFrozenKeyAccessed, #[allow(unreachable_patterns)] _ => return Err(Error::Invalid), }; @@ -51382,6 +51765,7 @@ impl WriteXdr for TransactionResultResult { Self::TxBadMinSeqAgeOrGap => ().write_xdr(w)?, Self::TxMalformed => ().write_xdr(w)?, Self::TxSorobanInvalid => ().write_xdr(w)?, + Self::TxFrozenKeyAccessed => ().write_xdr(w)?, }; Ok(()) }) @@ -51547,6 +51931,7 @@ impl WriteXdr for TransactionResultExt { /// case txBAD_MIN_SEQ_AGE_OR_GAP: /// case txMALFORMED: /// case txSOROBAN_INVALID: +/// case txFROZEN_KEY_ACCESSED: /// void; /// } /// result; @@ -55044,6 +55429,7 @@ pub enum TypeVariant { ScpStatementExternalize, ScpEnvelope, ScpQuorumSet, + EncodedLedgerKey, ConfigSettingContractExecutionLanesV0, ConfigSettingContractComputeV0, ConfigSettingContractParallelComputeV0, @@ -55057,6 +55443,10 @@ pub enum TypeVariant { StateArchivalSettings, EvictionIterator, ConfigSettingScpTiming, + FrozenLedgerKeys, + FrozenLedgerKeysDelta, + FreezeBypassTxs, + FreezeBypassTxsDelta, ContractCostParams, ConfigSettingId, ConfigSettingEntry, @@ -55528,6 +55918,7 @@ impl TypeVariant { TypeVariant::ScpStatementExternalize, TypeVariant::ScpEnvelope, TypeVariant::ScpQuorumSet, + TypeVariant::EncodedLedgerKey, TypeVariant::ConfigSettingContractExecutionLanesV0, TypeVariant::ConfigSettingContractComputeV0, TypeVariant::ConfigSettingContractParallelComputeV0, @@ -55541,6 +55932,10 @@ impl TypeVariant { TypeVariant::StateArchivalSettings, TypeVariant::EvictionIterator, TypeVariant::ConfigSettingScpTiming, + TypeVariant::FrozenLedgerKeys, + TypeVariant::FrozenLedgerKeysDelta, + TypeVariant::FreezeBypassTxs, + TypeVariant::FreezeBypassTxsDelta, TypeVariant::ContractCostParams, TypeVariant::ConfigSettingId, TypeVariant::ConfigSettingEntry, @@ -56017,6 +56412,7 @@ impl TypeVariant { "ScpStatementExternalize", "ScpEnvelope", "ScpQuorumSet", + "EncodedLedgerKey", "ConfigSettingContractExecutionLanesV0", "ConfigSettingContractComputeV0", "ConfigSettingContractParallelComputeV0", @@ -56030,6 +56426,10 @@ impl TypeVariant { "StateArchivalSettings", "EvictionIterator", "ConfigSettingScpTiming", + "FrozenLedgerKeys", + "FrozenLedgerKeysDelta", + "FreezeBypassTxs", + "FreezeBypassTxsDelta", "ContractCostParams", "ConfigSettingId", "ConfigSettingEntry", @@ -56510,6 +56910,7 @@ impl TypeVariant { Self::ScpStatementExternalize => "ScpStatementExternalize", Self::ScpEnvelope => "ScpEnvelope", Self::ScpQuorumSet => "ScpQuorumSet", + Self::EncodedLedgerKey => "EncodedLedgerKey", Self::ConfigSettingContractExecutionLanesV0 => "ConfigSettingContractExecutionLanesV0", Self::ConfigSettingContractComputeV0 => "ConfigSettingContractComputeV0", Self::ConfigSettingContractParallelComputeV0 => { @@ -56525,6 +56926,10 @@ impl TypeVariant { Self::StateArchivalSettings => "StateArchivalSettings", Self::EvictionIterator => "EvictionIterator", Self::ConfigSettingScpTiming => "ConfigSettingScpTiming", + Self::FrozenLedgerKeys => "FrozenLedgerKeys", + Self::FrozenLedgerKeysDelta => "FrozenLedgerKeysDelta", + Self::FreezeBypassTxs => "FreezeBypassTxs", + Self::FreezeBypassTxsDelta => "FreezeBypassTxsDelta", Self::ContractCostParams => "ContractCostParams", Self::ConfigSettingId => "ConfigSettingId", Self::ConfigSettingEntry => "ConfigSettingEntry", @@ -57016,6 +57421,7 @@ impl TypeVariant { Self::ScpStatementExternalize => gen.into_root_schema_for::(), Self::ScpEnvelope => gen.into_root_schema_for::(), Self::ScpQuorumSet => gen.into_root_schema_for::(), + Self::EncodedLedgerKey => gen.into_root_schema_for::(), Self::ConfigSettingContractExecutionLanesV0 => { gen.into_root_schema_for::() } @@ -57045,6 +57451,10 @@ impl TypeVariant { Self::StateArchivalSettings => gen.into_root_schema_for::(), Self::EvictionIterator => gen.into_root_schema_for::(), Self::ConfigSettingScpTiming => gen.into_root_schema_for::(), + Self::FrozenLedgerKeys => gen.into_root_schema_for::(), + Self::FrozenLedgerKeysDelta => gen.into_root_schema_for::(), + Self::FreezeBypassTxs => gen.into_root_schema_for::(), + Self::FreezeBypassTxsDelta => gen.into_root_schema_for::(), Self::ContractCostParams => gen.into_root_schema_for::(), Self::ConfigSettingId => gen.into_root_schema_for::(), Self::ConfigSettingEntry => gen.into_root_schema_for::(), @@ -57732,6 +58142,7 @@ impl core::str::FromStr for TypeVariant { "ScpStatementExternalize" => Ok(Self::ScpStatementExternalize), "ScpEnvelope" => Ok(Self::ScpEnvelope), "ScpQuorumSet" => Ok(Self::ScpQuorumSet), + "EncodedLedgerKey" => Ok(Self::EncodedLedgerKey), "ConfigSettingContractExecutionLanesV0" => { Ok(Self::ConfigSettingContractExecutionLanesV0) } @@ -57753,6 +58164,10 @@ impl core::str::FromStr for TypeVariant { "StateArchivalSettings" => Ok(Self::StateArchivalSettings), "EvictionIterator" => Ok(Self::EvictionIterator), "ConfigSettingScpTiming" => Ok(Self::ConfigSettingScpTiming), + "FrozenLedgerKeys" => Ok(Self::FrozenLedgerKeys), + "FrozenLedgerKeysDelta" => Ok(Self::FrozenLedgerKeysDelta), + "FreezeBypassTxs" => Ok(Self::FreezeBypassTxs), + "FreezeBypassTxsDelta" => Ok(Self::FreezeBypassTxsDelta), "ContractCostParams" => Ok(Self::ContractCostParams), "ConfigSettingId" => Ok(Self::ConfigSettingId), "ConfigSettingEntry" => Ok(Self::ConfigSettingEntry), @@ -58254,6 +58669,7 @@ pub enum Type { ScpStatementExternalize(Box), ScpEnvelope(Box), ScpQuorumSet(Box), + EncodedLedgerKey(Box), ConfigSettingContractExecutionLanesV0(Box), ConfigSettingContractComputeV0(Box), ConfigSettingContractParallelComputeV0(Box), @@ -58267,6 +58683,10 @@ pub enum Type { StateArchivalSettings(Box), EvictionIterator(Box), ConfigSettingScpTiming(Box), + FrozenLedgerKeys(Box), + FrozenLedgerKeysDelta(Box), + FreezeBypassTxs(Box), + FreezeBypassTxsDelta(Box), ContractCostParams(Box), ConfigSettingId(Box), ConfigSettingEntry(Box), @@ -58738,6 +59158,7 @@ impl Type { TypeVariant::ScpStatementExternalize, TypeVariant::ScpEnvelope, TypeVariant::ScpQuorumSet, + TypeVariant::EncodedLedgerKey, TypeVariant::ConfigSettingContractExecutionLanesV0, TypeVariant::ConfigSettingContractComputeV0, TypeVariant::ConfigSettingContractParallelComputeV0, @@ -58751,6 +59172,10 @@ impl Type { TypeVariant::StateArchivalSettings, TypeVariant::EvictionIterator, TypeVariant::ConfigSettingScpTiming, + TypeVariant::FrozenLedgerKeys, + TypeVariant::FrozenLedgerKeysDelta, + TypeVariant::FreezeBypassTxs, + TypeVariant::FreezeBypassTxsDelta, TypeVariant::ContractCostParams, TypeVariant::ConfigSettingId, TypeVariant::ConfigSettingEntry, @@ -59227,6 +59652,7 @@ impl Type { "ScpStatementExternalize", "ScpEnvelope", "ScpQuorumSet", + "EncodedLedgerKey", "ConfigSettingContractExecutionLanesV0", "ConfigSettingContractComputeV0", "ConfigSettingContractParallelComputeV0", @@ -59240,6 +59666,10 @@ impl Type { "StateArchivalSettings", "EvictionIterator", "ConfigSettingScpTiming", + "FrozenLedgerKeys", + "FrozenLedgerKeysDelta", + "FreezeBypassTxs", + "FreezeBypassTxsDelta", "ContractCostParams", "ConfigSettingId", "ConfigSettingEntry", @@ -59752,6 +60182,11 @@ impl Type { TypeVariant::ScpQuorumSet => r.with_limited_depth(|r| { Ok(Self::ScpQuorumSet(Box::new(ScpQuorumSet::read_xdr(r)?))) }), + TypeVariant::EncodedLedgerKey => r.with_limited_depth(|r| { + Ok(Self::EncodedLedgerKey(Box::new( + EncodedLedgerKey::read_xdr(r)?, + ))) + }), TypeVariant::ConfigSettingContractExecutionLanesV0 => r.with_limited_depth(|r| { Ok(Self::ConfigSettingContractExecutionLanesV0(Box::new( ConfigSettingContractExecutionLanesV0::read_xdr(r)?, @@ -59817,6 +60252,26 @@ impl Type { ConfigSettingScpTiming::read_xdr(r)?, ))) }), + TypeVariant::FrozenLedgerKeys => r.with_limited_depth(|r| { + Ok(Self::FrozenLedgerKeys(Box::new( + FrozenLedgerKeys::read_xdr(r)?, + ))) + }), + TypeVariant::FrozenLedgerKeysDelta => r.with_limited_depth(|r| { + Ok(Self::FrozenLedgerKeysDelta(Box::new( + FrozenLedgerKeysDelta::read_xdr(r)?, + ))) + }), + TypeVariant::FreezeBypassTxs => r.with_limited_depth(|r| { + Ok(Self::FreezeBypassTxs(Box::new(FreezeBypassTxs::read_xdr( + r, + )?))) + }), + TypeVariant::FreezeBypassTxsDelta => r.with_limited_depth(|r| { + Ok(Self::FreezeBypassTxsDelta(Box::new( + FreezeBypassTxsDelta::read_xdr(r)?, + ))) + }), TypeVariant::ContractCostParams => r.with_limited_depth(|r| { Ok(Self::ContractCostParams(Box::new( ContractCostParams::read_xdr(r)?, @@ -61864,6 +62319,10 @@ impl Type { ReadXdrIter::<_, ScpQuorumSet>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ScpQuorumSet(Box::new(t)))), ), + TypeVariant::EncodedLedgerKey => Box::new( + ReadXdrIter::<_, EncodedLedgerKey>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::EncodedLedgerKey(Box::new(t)))), + ), TypeVariant::ConfigSettingContractExecutionLanesV0 => Box::new( ReadXdrIter::<_, ConfigSettingContractExecutionLanesV0>::new( &mut r.inner, @@ -61940,6 +62399,22 @@ impl Type { ReadXdrIter::<_, ConfigSettingScpTiming>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ConfigSettingScpTiming(Box::new(t)))), ), + TypeVariant::FrozenLedgerKeys => Box::new( + ReadXdrIter::<_, FrozenLedgerKeys>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::FrozenLedgerKeys(Box::new(t)))), + ), + TypeVariant::FrozenLedgerKeysDelta => Box::new( + ReadXdrIter::<_, FrozenLedgerKeysDelta>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::FrozenLedgerKeysDelta(Box::new(t)))), + ), + TypeVariant::FreezeBypassTxs => Box::new( + ReadXdrIter::<_, FreezeBypassTxs>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::FreezeBypassTxs(Box::new(t)))), + ), + TypeVariant::FreezeBypassTxsDelta => Box::new( + ReadXdrIter::<_, FreezeBypassTxsDelta>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::FreezeBypassTxsDelta(Box::new(t)))), + ), TypeVariant::ContractCostParams => Box::new( ReadXdrIter::<_, ContractCostParams>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ContractCostParams(Box::new(t)))), @@ -63916,6 +64391,10 @@ impl Type { ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ScpQuorumSet(Box::new(t.0)))), ), + TypeVariant::EncodedLedgerKey => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::EncodedLedgerKey(Box::new(t.0)))), + ), TypeVariant::ConfigSettingContractExecutionLanesV0 => Box::new( ReadXdrIter::<_, Frame>::new( &mut r.inner, @@ -63998,6 +64477,22 @@ impl Type { ) .map(|r| r.map(|t| Self::ConfigSettingScpTiming(Box::new(t.0)))), ), + TypeVariant::FrozenLedgerKeys => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::FrozenLedgerKeys(Box::new(t.0)))), + ), + TypeVariant::FrozenLedgerKeysDelta => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::FrozenLedgerKeysDelta(Box::new(t.0)))), + ), + TypeVariant::FreezeBypassTxs => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::FreezeBypassTxs(Box::new(t.0)))), + ), + TypeVariant::FreezeBypassTxsDelta => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::FreezeBypassTxsDelta(Box::new(t.0)))), + ), TypeVariant::ContractCostParams => Box::new( ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ContractCostParams(Box::new(t.0)))), @@ -66268,6 +66763,10 @@ impl Type { ReadXdrIter::<_, ScpQuorumSet>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::ScpQuorumSet(Box::new(t)))), ), + TypeVariant::EncodedLedgerKey => Box::new( + ReadXdrIter::<_, EncodedLedgerKey>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::EncodedLedgerKey(Box::new(t)))), + ), TypeVariant::ConfigSettingContractExecutionLanesV0 => Box::new( ReadXdrIter::<_, ConfigSettingContractExecutionLanesV0>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::ConfigSettingContractExecutionLanesV0(Box::new(t)))), @@ -66323,6 +66822,22 @@ impl Type { ReadXdrIter::<_, ConfigSettingScpTiming>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::ConfigSettingScpTiming(Box::new(t)))), ), + TypeVariant::FrozenLedgerKeys => Box::new( + ReadXdrIter::<_, FrozenLedgerKeys>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::FrozenLedgerKeys(Box::new(t)))), + ), + TypeVariant::FrozenLedgerKeysDelta => Box::new( + ReadXdrIter::<_, FrozenLedgerKeysDelta>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::FrozenLedgerKeysDelta(Box::new(t)))), + ), + TypeVariant::FreezeBypassTxs => Box::new( + ReadXdrIter::<_, FreezeBypassTxs>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::FreezeBypassTxs(Box::new(t)))), + ), + TypeVariant::FreezeBypassTxsDelta => Box::new( + ReadXdrIter::<_, FreezeBypassTxsDelta>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::FreezeBypassTxsDelta(Box::new(t)))), + ), TypeVariant::ContractCostParams => Box::new( ReadXdrIter::<_, ContractCostParams>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::ContractCostParams(Box::new(t)))), @@ -68213,6 +68728,9 @@ impl Type { TypeVariant::ScpQuorumSet => { Ok(Self::ScpQuorumSet(Box::new(serde_json::from_reader(r)?))) } + TypeVariant::EncodedLedgerKey => Ok(Self::EncodedLedgerKey(Box::new( + serde_json::from_reader(r)?, + ))), TypeVariant::ConfigSettingContractExecutionLanesV0 => Ok( Self::ConfigSettingContractExecutionLanesV0(Box::new(serde_json::from_reader(r)?)), ), @@ -68252,6 +68770,18 @@ impl Type { TypeVariant::ConfigSettingScpTiming => Ok(Self::ConfigSettingScpTiming(Box::new( serde_json::from_reader(r)?, ))), + TypeVariant::FrozenLedgerKeys => Ok(Self::FrozenLedgerKeys(Box::new( + serde_json::from_reader(r)?, + ))), + TypeVariant::FrozenLedgerKeysDelta => Ok(Self::FrozenLedgerKeysDelta(Box::new( + serde_json::from_reader(r)?, + ))), + TypeVariant::FreezeBypassTxs => { + Ok(Self::FreezeBypassTxs(Box::new(serde_json::from_reader(r)?))) + } + TypeVariant::FreezeBypassTxsDelta => Ok(Self::FreezeBypassTxsDelta(Box::new( + serde_json::from_reader(r)?, + ))), TypeVariant::ContractCostParams => Ok(Self::ContractCostParams(Box::new( serde_json::from_reader(r)?, ))), @@ -69527,6 +70057,9 @@ impl Type { TypeVariant::ScpQuorumSet => Ok(Self::ScpQuorumSet(Box::new( serde::de::Deserialize::deserialize(r)?, ))), + TypeVariant::EncodedLedgerKey => Ok(Self::EncodedLedgerKey(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), TypeVariant::ConfigSettingContractExecutionLanesV0 => { Ok(Self::ConfigSettingContractExecutionLanesV0(Box::new( serde::de::Deserialize::deserialize(r)?, @@ -69580,6 +70113,18 @@ impl Type { TypeVariant::ConfigSettingScpTiming => Ok(Self::ConfigSettingScpTiming(Box::new( serde::de::Deserialize::deserialize(r)?, ))), + TypeVariant::FrozenLedgerKeys => Ok(Self::FrozenLedgerKeys(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + TypeVariant::FrozenLedgerKeysDelta => Ok(Self::FrozenLedgerKeysDelta(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + TypeVariant::FreezeBypassTxs => Ok(Self::FreezeBypassTxs(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), + TypeVariant::FreezeBypassTxsDelta => Ok(Self::FreezeBypassTxsDelta(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), TypeVariant::ContractCostParams => Ok(Self::ContractCostParams(Box::new( serde::de::Deserialize::deserialize(r)?, ))), @@ -71032,6 +71577,9 @@ impl Type { TypeVariant::ScpQuorumSet => { Ok(Self::ScpQuorumSet(Box::new(ScpQuorumSet::arbitrary(u)?))) } + TypeVariant::EncodedLedgerKey => Ok(Self::EncodedLedgerKey(Box::new( + EncodedLedgerKey::arbitrary(u)?, + ))), TypeVariant::ConfigSettingContractExecutionLanesV0 => { Ok(Self::ConfigSettingContractExecutionLanesV0(Box::new( ConfigSettingContractExecutionLanesV0::arbitrary(u)?, @@ -71085,6 +71633,18 @@ impl Type { TypeVariant::ConfigSettingScpTiming => Ok(Self::ConfigSettingScpTiming(Box::new( ConfigSettingScpTiming::arbitrary(u)?, ))), + TypeVariant::FrozenLedgerKeys => Ok(Self::FrozenLedgerKeys(Box::new( + FrozenLedgerKeys::arbitrary(u)?, + ))), + TypeVariant::FrozenLedgerKeysDelta => Ok(Self::FrozenLedgerKeysDelta(Box::new( + FrozenLedgerKeysDelta::arbitrary(u)?, + ))), + TypeVariant::FreezeBypassTxs => Ok(Self::FreezeBypassTxs(Box::new( + FreezeBypassTxs::arbitrary(u)?, + ))), + TypeVariant::FreezeBypassTxsDelta => Ok(Self::FreezeBypassTxsDelta(Box::new( + FreezeBypassTxsDelta::arbitrary(u)?, + ))), TypeVariant::ContractCostParams => Ok(Self::ContractCostParams(Box::new( ContractCostParams::arbitrary(u)?, ))), @@ -72358,6 +72918,7 @@ impl Type { TypeVariant::ScpStatementExternalize => Self::ScpStatementExternalize(Box::default()), TypeVariant::ScpEnvelope => Self::ScpEnvelope(Box::default()), TypeVariant::ScpQuorumSet => Self::ScpQuorumSet(Box::default()), + TypeVariant::EncodedLedgerKey => Self::EncodedLedgerKey(Box::default()), TypeVariant::ConfigSettingContractExecutionLanesV0 => { Self::ConfigSettingContractExecutionLanesV0(Box::default()) } @@ -72387,6 +72948,10 @@ impl Type { TypeVariant::StateArchivalSettings => Self::StateArchivalSettings(Box::default()), TypeVariant::EvictionIterator => Self::EvictionIterator(Box::default()), TypeVariant::ConfigSettingScpTiming => Self::ConfigSettingScpTiming(Box::default()), + TypeVariant::FrozenLedgerKeys => Self::FrozenLedgerKeys(Box::default()), + TypeVariant::FrozenLedgerKeysDelta => Self::FrozenLedgerKeysDelta(Box::default()), + TypeVariant::FreezeBypassTxs => Self::FreezeBypassTxs(Box::default()), + TypeVariant::FreezeBypassTxsDelta => Self::FreezeBypassTxsDelta(Box::default()), TypeVariant::ContractCostParams => Self::ContractCostParams(Box::default()), TypeVariant::ConfigSettingId => Self::ConfigSettingId(Box::default()), TypeVariant::ConfigSettingEntry => Self::ConfigSettingEntry(Box::default()), @@ -73031,6 +73596,7 @@ impl Type { Self::ScpStatementExternalize(ref v) => v.as_ref(), Self::ScpEnvelope(ref v) => v.as_ref(), Self::ScpQuorumSet(ref v) => v.as_ref(), + Self::EncodedLedgerKey(ref v) => v.as_ref(), Self::ConfigSettingContractExecutionLanesV0(ref v) => v.as_ref(), Self::ConfigSettingContractComputeV0(ref v) => v.as_ref(), Self::ConfigSettingContractParallelComputeV0(ref v) => v.as_ref(), @@ -73044,6 +73610,10 @@ impl Type { Self::StateArchivalSettings(ref v) => v.as_ref(), Self::EvictionIterator(ref v) => v.as_ref(), Self::ConfigSettingScpTiming(ref v) => v.as_ref(), + Self::FrozenLedgerKeys(ref v) => v.as_ref(), + Self::FrozenLedgerKeysDelta(ref v) => v.as_ref(), + Self::FreezeBypassTxs(ref v) => v.as_ref(), + Self::FreezeBypassTxsDelta(ref v) => v.as_ref(), Self::ContractCostParams(ref v) => v.as_ref(), Self::ConfigSettingId(ref v) => v.as_ref(), Self::ConfigSettingEntry(ref v) => v.as_ref(), @@ -73516,6 +74086,7 @@ impl Type { Self::ScpStatementExternalize(_) => "ScpStatementExternalize", Self::ScpEnvelope(_) => "ScpEnvelope", Self::ScpQuorumSet(_) => "ScpQuorumSet", + Self::EncodedLedgerKey(_) => "EncodedLedgerKey", Self::ConfigSettingContractExecutionLanesV0(_) => { "ConfigSettingContractExecutionLanesV0" } @@ -73535,6 +74106,10 @@ impl Type { Self::StateArchivalSettings(_) => "StateArchivalSettings", Self::EvictionIterator(_) => "EvictionIterator", Self::ConfigSettingScpTiming(_) => "ConfigSettingScpTiming", + Self::FrozenLedgerKeys(_) => "FrozenLedgerKeys", + Self::FrozenLedgerKeysDelta(_) => "FrozenLedgerKeysDelta", + Self::FreezeBypassTxs(_) => "FreezeBypassTxs", + Self::FreezeBypassTxsDelta(_) => "FreezeBypassTxsDelta", Self::ContractCostParams(_) => "ContractCostParams", Self::ConfigSettingId(_) => "ConfigSettingId", Self::ConfigSettingEntry(_) => "ConfigSettingEntry", @@ -74033,6 +74608,7 @@ impl Type { Self::ScpStatementExternalize(_) => TypeVariant::ScpStatementExternalize, Self::ScpEnvelope(_) => TypeVariant::ScpEnvelope, Self::ScpQuorumSet(_) => TypeVariant::ScpQuorumSet, + Self::EncodedLedgerKey(_) => TypeVariant::EncodedLedgerKey, Self::ConfigSettingContractExecutionLanesV0(_) => { TypeVariant::ConfigSettingContractExecutionLanesV0 } @@ -74058,6 +74634,10 @@ impl Type { Self::StateArchivalSettings(_) => TypeVariant::StateArchivalSettings, Self::EvictionIterator(_) => TypeVariant::EvictionIterator, Self::ConfigSettingScpTiming(_) => TypeVariant::ConfigSettingScpTiming, + Self::FrozenLedgerKeys(_) => TypeVariant::FrozenLedgerKeys, + Self::FrozenLedgerKeysDelta(_) => TypeVariant::FrozenLedgerKeysDelta, + Self::FreezeBypassTxs(_) => TypeVariant::FreezeBypassTxs, + Self::FreezeBypassTxsDelta(_) => TypeVariant::FreezeBypassTxsDelta, Self::ContractCostParams(_) => TypeVariant::ContractCostParams, Self::ConfigSettingId(_) => TypeVariant::ConfigSettingId, Self::ConfigSettingEntry(_) => TypeVariant::ConfigSettingEntry, @@ -74603,6 +75183,7 @@ impl WriteXdr for Type { Self::ScpStatementExternalize(v) => v.write_xdr(w), Self::ScpEnvelope(v) => v.write_xdr(w), Self::ScpQuorumSet(v) => v.write_xdr(w), + Self::EncodedLedgerKey(v) => v.write_xdr(w), Self::ConfigSettingContractExecutionLanesV0(v) => v.write_xdr(w), Self::ConfigSettingContractComputeV0(v) => v.write_xdr(w), Self::ConfigSettingContractParallelComputeV0(v) => v.write_xdr(w), @@ -74616,6 +75197,10 @@ impl WriteXdr for Type { Self::StateArchivalSettings(v) => v.write_xdr(w), Self::EvictionIterator(v) => v.write_xdr(w), Self::ConfigSettingScpTiming(v) => v.write_xdr(w), + Self::FrozenLedgerKeys(v) => v.write_xdr(w), + Self::FrozenLedgerKeysDelta(v) => v.write_xdr(w), + Self::FreezeBypassTxs(v) => v.write_xdr(w), + Self::FreezeBypassTxsDelta(v) => v.write_xdr(w), Self::ContractCostParams(v) => v.write_xdr(w), Self::ConfigSettingId(v) => v.write_xdr(w), Self::ConfigSettingEntry(v) => v.write_xdr(w), diff --git a/xdr-json/curr/ConditionalTypedef.json b/xdr-json/curr/ConditionalTypedef.json new file mode 100644 index 00000000..773a8494 --- /dev/null +++ b/xdr-json/curr/ConditionalTypedef.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "ConditionalTypedef", + "description": "ConditionalTypedef is an XDR Typedef defined as:\n\n```text typedef uint32 ConditionalTypedef; ```", + "type": "integer", + "format": "uint32", + "minimum": 0.0 +} \ No newline at end of file diff --git a/xdr-json/curr/TestEnumWithIfdef.json b/xdr-json/curr/TestEnumWithIfdef.json new file mode 100644 index 00000000..199b2613 --- /dev/null +++ b/xdr-json/curr/TestEnumWithIfdef.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TestEnumWithIfdef", + "description": "TestEnumWithIfdef is an XDR Enum defined as:\n\n```text enum TestEnumWithIfdef { TESTENUM_A = 0, TESTENUM_B = 1, #ifdef ENABLE_EXTRA_TYPES TESTENUM_C = 2, TESTENUM_D = 3 #else TESTENUM_C = 2 #endif }; ```", + "type": "string", + "enum": [ + "a", + "b", + "c" + ] +} \ No newline at end of file diff --git a/xdr-json/curr/TestUnionWithIfdef.json b/xdr-json/curr/TestUnionWithIfdef.json new file mode 100644 index 00000000..420ab388 --- /dev/null +++ b/xdr-json/curr/TestUnionWithIfdef.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "TestUnionWithIfdef", + "description": "TestUnionWithIfdef is an XDR Union defined as:\n\n```text union TestUnionWithIfdef switch (TestEnumWithIfdef type) { case TESTENUM_A: uint32 aVal; case TESTENUM_B: uint64 bVal; #ifdef ENABLE_EXTRA_TYPES case TESTENUM_C: uint32 cVal; case TESTENUM_D: void; #else case TESTENUM_C: void; #endif }; ```", + "oneOf": [ + { + "type": "string", + "enum": [ + "c" + ] + }, + { + "type": "object", + "required": [ + "a" + ], + "properties": { + "a": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + }, + { + "type": "object", + "required": [ + "b" + ], + "properties": { + "b": { + "type": "string" + } + } + } + ], + "properties": { + "$schema": { + "type": "string" + } + }, + "unevaluatedProperties": false +} \ No newline at end of file From 867e966b27d02c91c48cb93c057a8eaced022933 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 20 Mar 2026 10:11:44 +1000 Subject: [PATCH 11/28] remove comments from `_VARIANTS` const slices --- src/curr/generated.rs | 4 ---- src/next/generated.rs | 4 ---- xdr-generator-rust/generator/templates/type_enum.rs.jinja | 4 ---- 3 files changed, 12 deletions(-) diff --git a/src/curr/generated.rs b/src/curr/generated.rs index 04e9155e..5392ff2b 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -55904,8 +55904,6 @@ pub enum TypeVariant { } impl TypeVariant { - // Private const slice used to compute the variant count, supporting - // cfg-gated entries whose presence varies by enabled features. const _VARIANTS: &[TypeVariant] = &[ TypeVariant::Value, TypeVariant::ScpBallot, @@ -59144,8 +59142,6 @@ pub enum Type { } impl Type { - // Private const slices used to compute the variant count, supporting - // cfg-gated entries whose presence varies by enabled features. const _VARIANTS: &[TypeVariant] = &[ TypeVariant::Value, TypeVariant::ScpBallot, diff --git a/src/next/generated.rs b/src/next/generated.rs index 8ae28846..f6d73424 100644 --- a/src/next/generated.rs +++ b/src/next/generated.rs @@ -55025,8 +55025,6 @@ pub enum TypeVariant { } impl TypeVariant { - // Private const slice used to compute the variant count, supporting - // cfg-gated entries whose presence varies by enabled features. const _VARIANTS: &[TypeVariant] = &[ TypeVariant::Value, TypeVariant::ScpBallot, @@ -58175,8 +58173,6 @@ pub enum Type { } impl Type { - // Private const slices used to compute the variant count, supporting - // cfg-gated entries whose presence varies by enabled features. const _VARIANTS: &[TypeVariant] = &[ TypeVariant::Value, TypeVariant::ScpBallot, diff --git a/xdr-generator-rust/generator/templates/type_enum.rs.jinja b/xdr-generator-rust/generator/templates/type_enum.rs.jinja index b596cc48..39d586e7 100644 --- a/xdr-generator-rust/generator/templates/type_enum.rs.jinja +++ b/xdr-generator-rust/generator/templates/type_enum.rs.jinja @@ -15,8 +15,6 @@ pub enum TypeVariant { } impl TypeVariant { - // Private const slice used to compute the variant count, supporting - // cfg-gated entries whose presence varies by enabled features. const _VARIANTS: &[TypeVariant] = &[ {%- for t in type_variant_enum.types %} {%- if let Some(cfg) = t.cfg %} @@ -133,8 +131,6 @@ pub enum Type { } impl Type { - // Private const slices used to compute the variant count, supporting - // cfg-gated entries whose presence varies by enabled features. const _VARIANTS: &[TypeVariant] = &[ {%- for t in type_variant_enum.types %} {%- if let Some(cfg) = t.cfg %} From 1ee5ae76cafa07b6628f10833c07ca40739a1d93 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 20 Mar 2026 13:08:28 +1000 Subject: [PATCH 12/28] remove test ifdef types and related generated code --- src/curr/generated.rs | 1336 +------------------------ xdr-json/curr/ConditionalTypedef.json | 8 - xdr-json/curr/TestEnumWithIfdef.json | 11 - xdr-json/curr/TestUnionWithIfdef.json | 43 - 4 files changed, 1 insertion(+), 1397 deletions(-) delete mode 100644 xdr-json/curr/ConditionalTypedef.json delete mode 100644 xdr-json/curr/TestEnumWithIfdef.json delete mode 100644 xdr-json/curr/TestUnionWithIfdef.json diff --git a/src/curr/generated.rs b/src/curr/generated.rs index 5392ff2b..bbb4b45e 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -67,7 +67,7 @@ pub const XDR_FILES_SHA256: [(&str, &str); 13] = [ ), ( "xdr/curr/Stellar-types.x", - "a0e9cb40db74385dc71561c8d7a62b17605a416ff816f1ca0f9487a6b2213ecd", + "4d7a1d1f1fa0034ddbff27d8a533e59b6154bef295306c6256066def77a5a999", ), ]; @@ -54546,870 +54546,6 @@ impl WriteXdr for ClaimableBalanceId { } } -/// ExtraUint64 is an XDR Typedef defined as: -/// -/// ```text -/// typedef uint64 ExtraUint64; -/// ``` -/// -#[cfg(feature = "enable_extra_types")] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct ExtraUint64( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub u64, -); - -#[cfg(feature = "enable_extra_types")] -impl From for u64 { - #[must_use] - fn from(x: ExtraUint64) -> Self { - x.0 - } -} - -#[cfg(feature = "enable_extra_types")] -impl From for ExtraUint64 { - #[must_use] - fn from(x: u64) -> Self { - ExtraUint64(x) - } -} - -#[cfg(feature = "enable_extra_types")] -impl AsRef for ExtraUint64 { - #[must_use] - fn as_ref(&self) -> &u64 { - &self.0 - } -} - -#[cfg(feature = "enable_extra_types")] -impl ReadXdr for ExtraUint64 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = u64::read_xdr(r)?; - let v = ExtraUint64(i); - Ok(v) - }) - } -} - -#[cfg(feature = "enable_extra_types")] -impl WriteXdr for ExtraUint64 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -/// ExtraStruct is an XDR Struct defined as: -/// -/// ```text -/// struct ExtraStruct -/// { -/// uint32 code; -/// uint64 amount; -/// }; -/// ``` -/// -#[cfg(feature = "enable_extra_types")] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ExtraStruct { - pub code: u32, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount: u64, -} - -#[cfg(feature = "enable_extra_types")] -impl ReadXdr for ExtraStruct { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - code: u32::read_xdr(r)?, - amount: u64::read_xdr(r)?, - }) - }) - } -} - -#[cfg(feature = "enable_extra_types")] -impl WriteXdr for ExtraStruct { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.code.write_xdr(w)?; - self.amount.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ExtraMaxSize is an XDR Const defined as: -/// -/// ```text -/// const EXTRA_MAX_SIZE = 100; -/// ``` -/// -#[cfg(feature = "enable_extra_types")] -pub const EXTRA_MAX_SIZE: u64 = 100; - -/// ConditionalTypedef is an XDR Typedef defined as: -/// -/// ```text -/// typedef uint64 ConditionalTypedef; -/// ``` -/// -#[cfg(feature = "enable_extra_types")] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct ConditionalTypedef( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub u64, -); - -#[cfg(feature = "enable_extra_types")] -impl From for u64 { - #[must_use] - fn from(x: ConditionalTypedef) -> Self { - x.0 - } -} - -#[cfg(feature = "enable_extra_types")] -impl From for ConditionalTypedef { - #[must_use] - fn from(x: u64) -> Self { - ConditionalTypedef(x) - } -} - -#[cfg(feature = "enable_extra_types")] -impl AsRef for ConditionalTypedef { - #[must_use] - fn as_ref(&self) -> &u64 { - &self.0 - } -} - -#[cfg(feature = "enable_extra_types")] -impl ReadXdr for ConditionalTypedef { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = u64::read_xdr(r)?; - let v = ConditionalTypedef(i); - Ok(v) - }) - } -} - -#[cfg(feature = "enable_extra_types")] -impl WriteXdr for ConditionalTypedef { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -/// ConditionalTypedef is an XDR Typedef defined as: -/// -/// ```text -/// typedef uint32 ConditionalTypedef; -/// ``` -/// -#[cfg(not(feature = "enable_extra_types"))] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct ConditionalTypedef(pub u32); - -#[cfg(not(feature = "enable_extra_types"))] -impl From for u32 { - #[must_use] - fn from(x: ConditionalTypedef) -> Self { - x.0 - } -} - -#[cfg(not(feature = "enable_extra_types"))] -impl From for ConditionalTypedef { - #[must_use] - fn from(x: u32) -> Self { - ConditionalTypedef(x) - } -} - -#[cfg(not(feature = "enable_extra_types"))] -impl AsRef for ConditionalTypedef { - #[must_use] - fn as_ref(&self) -> &u32 { - &self.0 - } -} - -#[cfg(not(feature = "enable_extra_types"))] -impl ReadXdr for ConditionalTypedef { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = u32::read_xdr(r)?; - let v = ConditionalTypedef(i); - Ok(v) - }) - } -} - -#[cfg(not(feature = "enable_extra_types"))] -impl WriteXdr for ConditionalTypedef { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -/// TestEnumWithIfdef is an XDR Enum defined as: -/// -/// ```text -/// enum TestEnumWithIfdef -/// { -/// TESTENUM_A = 0, -/// TESTENUM_B = 1, -/// #ifdef ENABLE_EXTRA_TYPES -/// TESTENUM_C = 2, -/// TESTENUM_D = 3 -/// #else -/// TESTENUM_C = 2 -/// #endif -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum TestEnumWithIfdef { - #[cfg_attr(feature = "alloc", default)] - A = 0, - B = 1, - #[cfg(feature = "enable_extra_types")] - C = 2, - #[cfg(feature = "enable_extra_types")] - D = 3, - #[cfg(not(feature = "enable_extra_types"))] - C = 2, -} - -impl TestEnumWithIfdef { - const _VARIANTS: &[TestEnumWithIfdef] = &[ - TestEnumWithIfdef::A, - TestEnumWithIfdef::B, - #[cfg(feature = "enable_extra_types")] - TestEnumWithIfdef::C, - #[cfg(feature = "enable_extra_types")] - TestEnumWithIfdef::D, - #[cfg(not(feature = "enable_extra_types"))] - TestEnumWithIfdef::C, - ]; - pub const VARIANTS: [TestEnumWithIfdef; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "A", - "B", - #[cfg(feature = "enable_extra_types")] - "C", - #[cfg(feature = "enable_extra_types")] - "D", - #[cfg(not(feature = "enable_extra_types"))] - "C", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::A => "A", - Self::B => "B", - #[cfg(feature = "enable_extra_types")] - Self::C => "C", - #[cfg(feature = "enable_extra_types")] - Self::D => "D", - #[cfg(not(feature = "enable_extra_types"))] - Self::C => "C", - } - } - - #[must_use] - pub const fn variants() -> [TestEnumWithIfdef; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TestEnumWithIfdef { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for TestEnumWithIfdef { - fn variants() -> slice::Iter<'static, TestEnumWithIfdef> { - Self::VARIANTS.iter() - } -} - -impl Enum for TestEnumWithIfdef {} - -impl fmt::Display for TestEnumWithIfdef { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for TestEnumWithIfdef { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => TestEnumWithIfdef::A, - 1 => TestEnumWithIfdef::B, - #[cfg(feature = "enable_extra_types")] - 2 => TestEnumWithIfdef::C, - #[cfg(feature = "enable_extra_types")] - 3 => TestEnumWithIfdef::D, - #[cfg(not(feature = "enable_extra_types"))] - 2 => TestEnumWithIfdef::C, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: TestEnumWithIfdef) -> Self { - e as Self - } -} - -impl ReadXdr for TestEnumWithIfdef { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for TestEnumWithIfdef { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// TestUnionWithIfdef is an XDR Union defined as: -/// -/// ```text -/// union TestUnionWithIfdef switch (TestEnumWithIfdef type) -/// { -/// case TESTENUM_A: -/// uint32 aVal; -/// case TESTENUM_B: -/// uint64 bVal; -/// #ifdef ENABLE_EXTRA_TYPES -/// case TESTENUM_C: -/// uint32 cVal; -/// case TESTENUM_D: -/// void; -/// #else -/// case TESTENUM_C: -/// void; -/// #endif -/// }; -/// ``` -/// -// union with discriminant TestEnumWithIfdef -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TestUnionWithIfdef { - A(u32), - B( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - u64, - ), - #[cfg(feature = "enable_extra_types")] - C(u32), - #[cfg(feature = "enable_extra_types")] - D, - #[cfg(not(feature = "enable_extra_types"))] - C, -} - -#[cfg(feature = "alloc")] -impl Default for TestUnionWithIfdef { - fn default() -> Self { - Self::A(u32::default()) - } -} - -impl TestUnionWithIfdef { - const _VARIANTS: &[TestEnumWithIfdef] = &[ - TestEnumWithIfdef::A, - TestEnumWithIfdef::B, - #[cfg(feature = "enable_extra_types")] - TestEnumWithIfdef::C, - #[cfg(feature = "enable_extra_types")] - TestEnumWithIfdef::D, - #[cfg(not(feature = "enable_extra_types"))] - TestEnumWithIfdef::C, - ]; - pub const VARIANTS: [TestEnumWithIfdef; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "A", - "B", - #[cfg(feature = "enable_extra_types")] - "C", - #[cfg(feature = "enable_extra_types")] - "D", - #[cfg(not(feature = "enable_extra_types"))] - "C", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::A(_) => "A", - Self::B(_) => "B", - #[cfg(feature = "enable_extra_types")] - Self::C(_) => "C", - #[cfg(feature = "enable_extra_types")] - Self::D => "D", - #[cfg(not(feature = "enable_extra_types"))] - Self::C => "C", - } - } - - #[must_use] - pub const fn discriminant(&self) -> TestEnumWithIfdef { - #[allow(clippy::match_same_arms)] - match self { - Self::A(_) => TestEnumWithIfdef::A, - Self::B(_) => TestEnumWithIfdef::B, - #[cfg(feature = "enable_extra_types")] - Self::C(_) => TestEnumWithIfdef::C, - #[cfg(feature = "enable_extra_types")] - Self::D => TestEnumWithIfdef::D, - #[cfg(not(feature = "enable_extra_types"))] - Self::C => TestEnumWithIfdef::C, - } - } - - #[must_use] - pub const fn variants() -> [TestEnumWithIfdef; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TestUnionWithIfdef { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TestUnionWithIfdef { - #[must_use] - fn discriminant(&self) -> TestEnumWithIfdef { - Self::discriminant(self) - } -} - -impl Variants for TestUnionWithIfdef { - fn variants() -> slice::Iter<'static, TestEnumWithIfdef> { - Self::VARIANTS.iter() - } -} - -impl Union for TestUnionWithIfdef {} - -impl ReadXdr for TestUnionWithIfdef { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: TestEnumWithIfdef = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - TestEnumWithIfdef::A => Self::A(u32::read_xdr(r)?), - TestEnumWithIfdef::B => Self::B(u64::read_xdr(r)?), - #[cfg(feature = "enable_extra_types")] - TestEnumWithIfdef::C => Self::C(u32::read_xdr(r)?), - #[cfg(feature = "enable_extra_types")] - TestEnumWithIfdef::D => Self::D, - #[cfg(not(feature = "enable_extra_types"))] - TestEnumWithIfdef::C => Self::C, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TestUnionWithIfdef { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::A(v) => v.write_xdr(w)?, - Self::B(v) => v.write_xdr(w)?, - #[cfg(feature = "enable_extra_types")] - Self::C(v) => v.write_xdr(w)?, - #[cfg(feature = "enable_extra_types")] - Self::D => ().write_xdr(w)?, - #[cfg(not(feature = "enable_extra_types"))] - Self::C => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ExtraBundle is an XDR Struct defined as: -/// -/// ```text -/// struct ExtraBundle -/// { -/// uint32 x; -/// uint32 y; -/// }; -/// ``` -/// -#[cfg(feature = "enable_extra_types")] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ExtraBundle { - pub x: u32, - pub y: u32, -} - -#[cfg(feature = "enable_extra_types")] -impl ReadXdr for ExtraBundle { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - x: u32::read_xdr(r)?, - y: u32::read_xdr(r)?, - }) - }) - } -} - -#[cfg(feature = "enable_extra_types")] -impl WriteXdr for ExtraBundle { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.x.write_xdr(w)?; - self.y.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ExtraBundleAlias is an XDR Typedef defined as: -/// -/// ```text -/// typedef ExtraBundle ExtraBundleAlias; -/// ``` -/// -#[cfg(feature = "enable_extra_types")] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct ExtraBundleAlias(pub ExtraBundle); - -#[cfg(feature = "enable_extra_types")] -impl From for ExtraBundle { - #[must_use] - fn from(x: ExtraBundleAlias) -> Self { - x.0 - } -} - -#[cfg(feature = "enable_extra_types")] -impl From for ExtraBundleAlias { - #[must_use] - fn from(x: ExtraBundle) -> Self { - ExtraBundleAlias(x) - } -} - -#[cfg(feature = "enable_extra_types")] -impl AsRef for ExtraBundleAlias { - #[must_use] - fn as_ref(&self) -> &ExtraBundle { - &self.0 - } -} - -#[cfg(feature = "enable_extra_types")] -impl ReadXdr for ExtraBundleAlias { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = ExtraBundle::read_xdr(r)?; - let v = ExtraBundleAlias(i); - Ok(v) - }) - } -} - -#[cfg(feature = "enable_extra_types")] -impl WriteXdr for ExtraBundleAlias { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -/// ExtraBundleVersion is an XDR Const defined as: -/// -/// ```text -/// const EXTRA_BUNDLE_VERSION = 1; -/// ``` -/// -#[cfg(feature = "enable_extra_types")] -pub const EXTRA_BUNDLE_VERSION: u64 = 1; - -/// OuterGuarded is an XDR Struct defined as: -/// -/// ```text -/// struct OuterGuarded -/// { -/// uint32 outerField; -/// }; -/// ``` -/// -#[cfg(feature = "enable_extra_types")] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct OuterGuarded { - pub outer_field: u32, -} - -#[cfg(feature = "enable_extra_types")] -impl ReadXdr for OuterGuarded { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - outer_field: u32::read_xdr(r)?, - }) - }) - } -} - -#[cfg(feature = "enable_extra_types")] -impl WriteXdr for OuterGuarded { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.outer_field.write_xdr(w)?; - Ok(()) - }) - } -} - -/// InnerGuarded is an XDR Struct defined as: -/// -/// ```text -/// struct InnerGuarded -/// { -/// uint64 innerField; -/// }; -/// ``` -/// -#[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct InnerGuarded { - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub inner_field: u64, -} - -#[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] -impl ReadXdr for InnerGuarded { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - inner_field: u64::read_xdr(r)?, - }) - }) - } -} - -#[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] -impl WriteXdr for InnerGuarded { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.inner_field.write_xdr(w)?; - Ok(()) - }) - } -} - #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] #[cfg_attr( all(feature = "serde", feature = "alloc"), @@ -55886,21 +55022,6 @@ pub enum TypeVariant { PoolId, ClaimableBalanceIdType, ClaimableBalanceId, - #[cfg(feature = "enable_extra_types")] - ExtraUint64, - #[cfg(feature = "enable_extra_types")] - ExtraStruct, - ConditionalTypedef, - TestEnumWithIfdef, - TestUnionWithIfdef, - #[cfg(feature = "enable_extra_types")] - ExtraBundle, - #[cfg(feature = "enable_extra_types")] - ExtraBundleAlias, - #[cfg(feature = "enable_extra_types")] - OuterGuarded, - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - InnerGuarded, } impl TypeVariant { @@ -56373,21 +55494,6 @@ impl TypeVariant { TypeVariant::PoolId, TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraUint64, - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraStruct, - TypeVariant::ConditionalTypedef, - TypeVariant::TestEnumWithIfdef, - TypeVariant::TestUnionWithIfdef, - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundle, - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundleAlias, - #[cfg(feature = "enable_extra_types")] - TypeVariant::OuterGuarded, - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - TypeVariant::InnerGuarded, ]; pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -56867,21 +55973,6 @@ impl TypeVariant { "PoolId", "ClaimableBalanceIdType", "ClaimableBalanceId", - #[cfg(feature = "enable_extra_types")] - "ExtraUint64", - #[cfg(feature = "enable_extra_types")] - "ExtraStruct", - "ConditionalTypedef", - "TestEnumWithIfdef", - "TestUnionWithIfdef", - #[cfg(feature = "enable_extra_types")] - "ExtraBundle", - #[cfg(feature = "enable_extra_types")] - "ExtraBundleAlias", - #[cfg(feature = "enable_extra_types")] - "OuterGuarded", - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - "InnerGuarded", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -57379,21 +56470,6 @@ impl TypeVariant { Self::PoolId => "PoolId", Self::ClaimableBalanceIdType => "ClaimableBalanceIdType", Self::ClaimableBalanceId => "ClaimableBalanceId", - #[cfg(feature = "enable_extra_types")] - Self::ExtraUint64 => "ExtraUint64", - #[cfg(feature = "enable_extra_types")] - Self::ExtraStruct => "ExtraStruct", - Self::ConditionalTypedef => "ConditionalTypedef", - Self::TestEnumWithIfdef => "TestEnumWithIfdef", - Self::TestUnionWithIfdef => "TestUnionWithIfdef", - #[cfg(feature = "enable_extra_types")] - Self::ExtraBundle => "ExtraBundle", - #[cfg(feature = "enable_extra_types")] - Self::ExtraBundleAlias => "ExtraBundleAlias", - #[cfg(feature = "enable_extra_types")] - Self::OuterGuarded => "OuterGuarded", - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - Self::InnerGuarded => "InnerGuarded", } } @@ -58092,21 +57168,6 @@ impl TypeVariant { Self::PoolId => gen.into_root_schema_for::(), Self::ClaimableBalanceIdType => gen.into_root_schema_for::(), Self::ClaimableBalanceId => gen.into_root_schema_for::(), - #[cfg(feature = "enable_extra_types")] - Self::ExtraUint64 => gen.into_root_schema_for::(), - #[cfg(feature = "enable_extra_types")] - Self::ExtraStruct => gen.into_root_schema_for::(), - Self::ConditionalTypedef => gen.into_root_schema_for::(), - Self::TestEnumWithIfdef => gen.into_root_schema_for::(), - Self::TestUnionWithIfdef => gen.into_root_schema_for::(), - #[cfg(feature = "enable_extra_types")] - Self::ExtraBundle => gen.into_root_schema_for::(), - #[cfg(feature = "enable_extra_types")] - Self::ExtraBundleAlias => gen.into_root_schema_for::(), - #[cfg(feature = "enable_extra_types")] - Self::OuterGuarded => gen.into_root_schema_for::(), - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - Self::InnerGuarded => gen.into_root_schema_for::(), } } } @@ -58627,21 +57688,6 @@ impl core::str::FromStr for TypeVariant { "PoolId" => Ok(Self::PoolId), "ClaimableBalanceIdType" => Ok(Self::ClaimableBalanceIdType), "ClaimableBalanceId" => Ok(Self::ClaimableBalanceId), - #[cfg(feature = "enable_extra_types")] - "ExtraUint64" => Ok(Self::ExtraUint64), - #[cfg(feature = "enable_extra_types")] - "ExtraStruct" => Ok(Self::ExtraStruct), - "ConditionalTypedef" => Ok(Self::ConditionalTypedef), - "TestEnumWithIfdef" => Ok(Self::TestEnumWithIfdef), - "TestUnionWithIfdef" => Ok(Self::TestUnionWithIfdef), - #[cfg(feature = "enable_extra_types")] - "ExtraBundle" => Ok(Self::ExtraBundle), - #[cfg(feature = "enable_extra_types")] - "ExtraBundleAlias" => Ok(Self::ExtraBundleAlias), - #[cfg(feature = "enable_extra_types")] - "OuterGuarded" => Ok(Self::OuterGuarded), - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - "InnerGuarded" => Ok(Self::InnerGuarded), _ => Err(Error::Invalid), } } @@ -59124,21 +58170,6 @@ pub enum Type { PoolId(Box), ClaimableBalanceIdType(Box), ClaimableBalanceId(Box), - #[cfg(feature = "enable_extra_types")] - ExtraUint64(Box), - #[cfg(feature = "enable_extra_types")] - ExtraStruct(Box), - ConditionalTypedef(Box), - TestEnumWithIfdef(Box), - TestUnionWithIfdef(Box), - #[cfg(feature = "enable_extra_types")] - ExtraBundle(Box), - #[cfg(feature = "enable_extra_types")] - ExtraBundleAlias(Box), - #[cfg(feature = "enable_extra_types")] - OuterGuarded(Box), - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - InnerGuarded(Box), } impl Type { @@ -59611,21 +58642,6 @@ impl Type { TypeVariant::PoolId, TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraUint64, - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraStruct, - TypeVariant::ConditionalTypedef, - TypeVariant::TestEnumWithIfdef, - TypeVariant::TestUnionWithIfdef, - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundle, - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundleAlias, - #[cfg(feature = "enable_extra_types")] - TypeVariant::OuterGuarded, - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - TypeVariant::InnerGuarded, ]; pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -60105,21 +59121,6 @@ impl Type { "PoolId", "ClaimableBalanceIdType", "ClaimableBalanceId", - #[cfg(feature = "enable_extra_types")] - "ExtraUint64", - #[cfg(feature = "enable_extra_types")] - "ExtraStruct", - "ConditionalTypedef", - "TestEnumWithIfdef", - "TestUnionWithIfdef", - #[cfg(feature = "enable_extra_types")] - "ExtraBundle", - #[cfg(feature = "enable_extra_types")] - "ExtraBundleAlias", - #[cfg(feature = "enable_extra_types")] - "OuterGuarded", - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - "InnerGuarded", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [""; Self::_VARIANTS_STR.len()]; @@ -62179,47 +61180,6 @@ impl Type { ClaimableBalanceId::read_xdr(r)?, ))) }), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraUint64 => { - r.with_limited_depth(|r| Ok(Self::ExtraUint64(Box::new(ExtraUint64::read_xdr(r)?)))) - } - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraStruct => { - r.with_limited_depth(|r| Ok(Self::ExtraStruct(Box::new(ExtraStruct::read_xdr(r)?)))) - } - TypeVariant::ConditionalTypedef => r.with_limited_depth(|r| { - Ok(Self::ConditionalTypedef(Box::new( - ConditionalTypedef::read_xdr(r)?, - ))) - }), - TypeVariant::TestEnumWithIfdef => r.with_limited_depth(|r| { - Ok(Self::TestEnumWithIfdef(Box::new( - TestEnumWithIfdef::read_xdr(r)?, - ))) - }), - TypeVariant::TestUnionWithIfdef => r.with_limited_depth(|r| { - Ok(Self::TestUnionWithIfdef(Box::new( - TestUnionWithIfdef::read_xdr(r)?, - ))) - }), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundle => { - r.with_limited_depth(|r| Ok(Self::ExtraBundle(Box::new(ExtraBundle::read_xdr(r)?)))) - } - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundleAlias => r.with_limited_depth(|r| { - Ok(Self::ExtraBundleAlias(Box::new( - ExtraBundleAlias::read_xdr(r)?, - ))) - }), - #[cfg(feature = "enable_extra_types")] - TypeVariant::OuterGuarded => r.with_limited_depth(|r| { - Ok(Self::OuterGuarded(Box::new(OuterGuarded::read_xdr(r)?))) - }), - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - TypeVariant::InnerGuarded => r.with_limited_depth(|r| { - Ok(Self::InnerGuarded(Box::new(InnerGuarded::read_xdr(r)?))) - }), } } @@ -64288,48 +63248,6 @@ impl Type { ReadXdrIter::<_, ClaimableBalanceId>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ClaimableBalanceId(Box::new(t)))), ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraUint64 => Box::new( - ReadXdrIter::<_, ExtraUint64>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtraUint64(Box::new(t)))), - ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraStruct => Box::new( - ReadXdrIter::<_, ExtraStruct>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtraStruct(Box::new(t)))), - ), - TypeVariant::ConditionalTypedef => Box::new( - ReadXdrIter::<_, ConditionalTypedef>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ConditionalTypedef(Box::new(t)))), - ), - TypeVariant::TestEnumWithIfdef => Box::new( - ReadXdrIter::<_, TestEnumWithIfdef>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TestEnumWithIfdef(Box::new(t)))), - ), - TypeVariant::TestUnionWithIfdef => Box::new( - ReadXdrIter::<_, TestUnionWithIfdef>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TestUnionWithIfdef(Box::new(t)))), - ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundle => Box::new( - ReadXdrIter::<_, ExtraBundle>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtraBundle(Box::new(t)))), - ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundleAlias => Box::new( - ReadXdrIter::<_, ExtraBundleAlias>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtraBundleAlias(Box::new(t)))), - ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::OuterGuarded => Box::new( - ReadXdrIter::<_, OuterGuarded>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OuterGuarded(Box::new(t)))), - ), - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - TypeVariant::InnerGuarded => Box::new( - ReadXdrIter::<_, InnerGuarded>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InnerGuarded(Box::new(t)))), - ), } } @@ -66659,48 +65577,6 @@ impl Type { ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ClaimableBalanceId(Box::new(t.0)))), ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraUint64 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtraUint64(Box::new(t.0)))), - ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraStruct => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtraStruct(Box::new(t.0)))), - ), - TypeVariant::ConditionalTypedef => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ConditionalTypedef(Box::new(t.0)))), - ), - TypeVariant::TestEnumWithIfdef => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TestEnumWithIfdef(Box::new(t.0)))), - ), - TypeVariant::TestUnionWithIfdef => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TestUnionWithIfdef(Box::new(t.0)))), - ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundle => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtraBundle(Box::new(t.0)))), - ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundleAlias => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtraBundleAlias(Box::new(t.0)))), - ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::OuterGuarded => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OuterGuarded(Box::new(t.0)))), - ), - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - TypeVariant::InnerGuarded => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InnerGuarded(Box::new(t.0)))), - ), } } @@ -68612,48 +67488,6 @@ impl Type { ReadXdrIter::<_, ClaimableBalanceId>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::ClaimableBalanceId(Box::new(t)))), ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraUint64 => Box::new( - ReadXdrIter::<_, ExtraUint64>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtraUint64(Box::new(t)))), - ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraStruct => Box::new( - ReadXdrIter::<_, ExtraStruct>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtraStruct(Box::new(t)))), - ), - TypeVariant::ConditionalTypedef => Box::new( - ReadXdrIter::<_, ConditionalTypedef>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ConditionalTypedef(Box::new(t)))), - ), - TypeVariant::TestEnumWithIfdef => Box::new( - ReadXdrIter::<_, TestEnumWithIfdef>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TestEnumWithIfdef(Box::new(t)))), - ), - TypeVariant::TestUnionWithIfdef => Box::new( - ReadXdrIter::<_, TestUnionWithIfdef>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TestUnionWithIfdef(Box::new(t)))), - ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundle => Box::new( - ReadXdrIter::<_, ExtraBundle>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtraBundle(Box::new(t)))), - ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundleAlias => Box::new( - ReadXdrIter::<_, ExtraBundleAlias>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtraBundleAlias(Box::new(t)))), - ), - #[cfg(feature = "enable_extra_types")] - TypeVariant::OuterGuarded => Box::new( - ReadXdrIter::<_, OuterGuarded>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::OuterGuarded(Box::new(t)))), - ), - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - TypeVariant::InnerGuarded => Box::new( - ReadXdrIter::<_, InnerGuarded>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::InnerGuarded(Box::new(t)))), - ), } } @@ -69977,39 +68811,6 @@ impl Type { TypeVariant::ClaimableBalanceId => Ok(Self::ClaimableBalanceId(Box::new( serde_json::from_reader(r)?, ))), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraUint64 => { - Ok(Self::ExtraUint64(Box::new(serde_json::from_reader(r)?))) - } - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraStruct => { - Ok(Self::ExtraStruct(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ConditionalTypedef => Ok(Self::ConditionalTypedef(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TestEnumWithIfdef => Ok(Self::TestEnumWithIfdef(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TestUnionWithIfdef => Ok(Self::TestUnionWithIfdef(Box::new( - serde_json::from_reader(r)?, - ))), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundle => { - Ok(Self::ExtraBundle(Box::new(serde_json::from_reader(r)?))) - } - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundleAlias => Ok(Self::ExtraBundleAlias(Box::new( - serde_json::from_reader(r)?, - ))), - #[cfg(feature = "enable_extra_types")] - TypeVariant::OuterGuarded => { - Ok(Self::OuterGuarded(Box::new(serde_json::from_reader(r)?))) - } - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - TypeVariant::InnerGuarded => { - Ok(Self::InnerGuarded(Box::new(serde_json::from_reader(r)?))) - } } } @@ -71506,39 +70307,6 @@ impl Type { TypeVariant::ClaimableBalanceId => Ok(Self::ClaimableBalanceId(Box::new( serde::de::Deserialize::deserialize(r)?, ))), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraUint64 => Ok(Self::ExtraUint64(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraStruct => Ok(Self::ExtraStruct(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ConditionalTypedef => Ok(Self::ConditionalTypedef(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TestEnumWithIfdef => Ok(Self::TestEnumWithIfdef(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TestUnionWithIfdef => Ok(Self::TestUnionWithIfdef(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundle => Ok(Self::ExtraBundle(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundleAlias => Ok(Self::ExtraBundleAlias(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - #[cfg(feature = "enable_extra_types")] - TypeVariant::OuterGuarded => Ok(Self::OuterGuarded(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - TypeVariant::InnerGuarded => Ok(Self::InnerGuarded(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), } } @@ -72868,33 +71636,6 @@ impl Type { TypeVariant::ClaimableBalanceId => Ok(Self::ClaimableBalanceId(Box::new( ClaimableBalanceId::arbitrary(u)?, ))), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraUint64 => Ok(Self::ExtraUint64(Box::new(ExtraUint64::arbitrary(u)?))), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraStruct => Ok(Self::ExtraStruct(Box::new(ExtraStruct::arbitrary(u)?))), - TypeVariant::ConditionalTypedef => Ok(Self::ConditionalTypedef(Box::new( - ConditionalTypedef::arbitrary(u)?, - ))), - TypeVariant::TestEnumWithIfdef => Ok(Self::TestEnumWithIfdef(Box::new( - TestEnumWithIfdef::arbitrary(u)?, - ))), - TypeVariant::TestUnionWithIfdef => Ok(Self::TestUnionWithIfdef(Box::new( - TestUnionWithIfdef::arbitrary(u)?, - ))), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundle => Ok(Self::ExtraBundle(Box::new(ExtraBundle::arbitrary(u)?))), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundleAlias => Ok(Self::ExtraBundleAlias(Box::new( - ExtraBundleAlias::arbitrary(u)?, - ))), - #[cfg(feature = "enable_extra_types")] - TypeVariant::OuterGuarded => { - Ok(Self::OuterGuarded(Box::new(OuterGuarded::arbitrary(u)?))) - } - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - TypeVariant::InnerGuarded => { - Ok(Self::InnerGuarded(Box::new(InnerGuarded::arbitrary(u)?))) - } } } @@ -73557,21 +72298,6 @@ impl Type { TypeVariant::PoolId => Self::PoolId(Box::default()), TypeVariant::ClaimableBalanceIdType => Self::ClaimableBalanceIdType(Box::default()), TypeVariant::ClaimableBalanceId => Self::ClaimableBalanceId(Box::default()), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraUint64 => Self::ExtraUint64(Box::default()), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraStruct => Self::ExtraStruct(Box::default()), - TypeVariant::ConditionalTypedef => Self::ConditionalTypedef(Box::default()), - TypeVariant::TestEnumWithIfdef => Self::TestEnumWithIfdef(Box::default()), - TypeVariant::TestUnionWithIfdef => Self::TestUnionWithIfdef(Box::default()), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundle => Self::ExtraBundle(Box::default()), - #[cfg(feature = "enable_extra_types")] - TypeVariant::ExtraBundleAlias => Self::ExtraBundleAlias(Box::default()), - #[cfg(feature = "enable_extra_types")] - TypeVariant::OuterGuarded => Self::OuterGuarded(Box::default()), - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - TypeVariant::InnerGuarded => Self::InnerGuarded(Box::default()), } } @@ -74049,21 +72775,6 @@ impl Type { Self::PoolId(ref v) => v.as_ref(), Self::ClaimableBalanceIdType(ref v) => v.as_ref(), Self::ClaimableBalanceId(ref v) => v.as_ref(), - #[cfg(feature = "enable_extra_types")] - Self::ExtraUint64(ref v) => v.as_ref(), - #[cfg(feature = "enable_extra_types")] - Self::ExtraStruct(ref v) => v.as_ref(), - Self::ConditionalTypedef(ref v) => v.as_ref(), - Self::TestEnumWithIfdef(ref v) => v.as_ref(), - Self::TestUnionWithIfdef(ref v) => v.as_ref(), - #[cfg(feature = "enable_extra_types")] - Self::ExtraBundle(ref v) => v.as_ref(), - #[cfg(feature = "enable_extra_types")] - Self::ExtraBundleAlias(ref v) => v.as_ref(), - #[cfg(feature = "enable_extra_types")] - Self::OuterGuarded(ref v) => v.as_ref(), - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - Self::InnerGuarded(ref v) => v.as_ref(), } } @@ -74565,21 +73276,6 @@ impl Type { Self::PoolId(_) => "PoolId", Self::ClaimableBalanceIdType(_) => "ClaimableBalanceIdType", Self::ClaimableBalanceId(_) => "ClaimableBalanceId", - #[cfg(feature = "enable_extra_types")] - Self::ExtraUint64(_) => "ExtraUint64", - #[cfg(feature = "enable_extra_types")] - Self::ExtraStruct(_) => "ExtraStruct", - Self::ConditionalTypedef(_) => "ConditionalTypedef", - Self::TestEnumWithIfdef(_) => "TestEnumWithIfdef", - Self::TestUnionWithIfdef(_) => "TestUnionWithIfdef", - #[cfg(feature = "enable_extra_types")] - Self::ExtraBundle(_) => "ExtraBundle", - #[cfg(feature = "enable_extra_types")] - Self::ExtraBundleAlias(_) => "ExtraBundleAlias", - #[cfg(feature = "enable_extra_types")] - Self::OuterGuarded(_) => "OuterGuarded", - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - Self::InnerGuarded(_) => "InnerGuarded", } } @@ -75131,21 +73827,6 @@ impl Type { Self::PoolId(_) => TypeVariant::PoolId, Self::ClaimableBalanceIdType(_) => TypeVariant::ClaimableBalanceIdType, Self::ClaimableBalanceId(_) => TypeVariant::ClaimableBalanceId, - #[cfg(feature = "enable_extra_types")] - Self::ExtraUint64(_) => TypeVariant::ExtraUint64, - #[cfg(feature = "enable_extra_types")] - Self::ExtraStruct(_) => TypeVariant::ExtraStruct, - Self::ConditionalTypedef(_) => TypeVariant::ConditionalTypedef, - Self::TestEnumWithIfdef(_) => TypeVariant::TestEnumWithIfdef, - Self::TestUnionWithIfdef(_) => TypeVariant::TestUnionWithIfdef, - #[cfg(feature = "enable_extra_types")] - Self::ExtraBundle(_) => TypeVariant::ExtraBundle, - #[cfg(feature = "enable_extra_types")] - Self::ExtraBundleAlias(_) => TypeVariant::ExtraBundleAlias, - #[cfg(feature = "enable_extra_types")] - Self::OuterGuarded(_) => TypeVariant::OuterGuarded, - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - Self::InnerGuarded(_) => TypeVariant::InnerGuarded, } } } @@ -75636,21 +74317,6 @@ impl WriteXdr for Type { Self::PoolId(v) => v.write_xdr(w), Self::ClaimableBalanceIdType(v) => v.write_xdr(w), Self::ClaimableBalanceId(v) => v.write_xdr(w), - #[cfg(feature = "enable_extra_types")] - Self::ExtraUint64(v) => v.write_xdr(w), - #[cfg(feature = "enable_extra_types")] - Self::ExtraStruct(v) => v.write_xdr(w), - Self::ConditionalTypedef(v) => v.write_xdr(w), - Self::TestEnumWithIfdef(v) => v.write_xdr(w), - Self::TestUnionWithIfdef(v) => v.write_xdr(w), - #[cfg(feature = "enable_extra_types")] - Self::ExtraBundle(v) => v.write_xdr(w), - #[cfg(feature = "enable_extra_types")] - Self::ExtraBundleAlias(v) => v.write_xdr(w), - #[cfg(feature = "enable_extra_types")] - Self::OuterGuarded(v) => v.write_xdr(w), - #[cfg(all(feature = "enable_extra_types", feature = "variant_a"))] - Self::InnerGuarded(v) => v.write_xdr(w), } } } diff --git a/xdr-json/curr/ConditionalTypedef.json b/xdr-json/curr/ConditionalTypedef.json deleted file mode 100644 index 773a8494..00000000 --- a/xdr-json/curr/ConditionalTypedef.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ConditionalTypedef", - "description": "ConditionalTypedef is an XDR Typedef defined as:\n\n```text typedef uint32 ConditionalTypedef; ```", - "type": "integer", - "format": "uint32", - "minimum": 0.0 -} \ No newline at end of file diff --git a/xdr-json/curr/TestEnumWithIfdef.json b/xdr-json/curr/TestEnumWithIfdef.json deleted file mode 100644 index 199b2613..00000000 --- a/xdr-json/curr/TestEnumWithIfdef.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TestEnumWithIfdef", - "description": "TestEnumWithIfdef is an XDR Enum defined as:\n\n```text enum TestEnumWithIfdef { TESTENUM_A = 0, TESTENUM_B = 1, #ifdef ENABLE_EXTRA_TYPES TESTENUM_C = 2, TESTENUM_D = 3 #else TESTENUM_C = 2 #endif }; ```", - "type": "string", - "enum": [ - "a", - "b", - "c" - ] -} \ No newline at end of file diff --git a/xdr-json/curr/TestUnionWithIfdef.json b/xdr-json/curr/TestUnionWithIfdef.json deleted file mode 100644 index 420ab388..00000000 --- a/xdr-json/curr/TestUnionWithIfdef.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TestUnionWithIfdef", - "description": "TestUnionWithIfdef is an XDR Union defined as:\n\n```text union TestUnionWithIfdef switch (TestEnumWithIfdef type) { case TESTENUM_A: uint32 aVal; case TESTENUM_B: uint64 bVal; #ifdef ENABLE_EXTRA_TYPES case TESTENUM_C: uint32 cVal; case TESTENUM_D: void; #else case TESTENUM_C: void; #endif }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "c" - ] - }, - { - "type": "object", - "required": [ - "a" - ], - "properties": { - "a": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "b" - ], - "properties": { - "b": { - "type": "string" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false -} \ No newline at end of file From 2a74ddf190afc36160c2d82e49385f7c1ce696a8 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 20 Mar 2026 13:09:50 +1000 Subject: [PATCH 13/28] remove enable_extra_types and variant_a features --- Cargo.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1831ed81..81205950 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,8 +45,6 @@ std = ["alloc", "dep:sha2"] alloc = ["dep:hex", "dep:stellar-strkey", "escape-bytes/alloc", "dep:ethnum"] curr = [] next = [] -enable_extra_types = [] -variant_a = [] # Features dependent on optional dependencies. base64 = ["std", "dep:base64"] From ff3c1453b670cba1dd1eebb67500101f34c507d3 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 20 Mar 2026 03:39:15 +0000 Subject: [PATCH 14/28] detect unclosed #ifdef in enum/union bodies --- xdr-generator-rust/xdr-parser/src/parser.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xdr-generator-rust/xdr-parser/src/parser.rs b/xdr-generator-rust/xdr-parser/src/parser.rs index aea89dcb..1f801397 100644 --- a/xdr-generator-rust/xdr-parser/src/parser.rs +++ b/xdr-generator-rust/xdr-parser/src/parser.rs @@ -371,6 +371,7 @@ impl Parser { let name = self.expect_ident()?; self.expect(Token::LBrace)?; + let ifdef_depth_before = self.ifdef_seen_stack.len(); let mut members: Vec<(String, i32, Option)> = Vec::new(); loop { // Handle #ifdef/#else/#endif inside enum body @@ -431,6 +432,11 @@ impl Parser { } self.expect(Token::RBrace)?; + + if self.ifdef_seen_stack.len() != ifdef_depth_before { + return Err(self.unexpected_token_error("#endif".to_string(), Token::RBrace)); + } + self.expect(Token::Semi)?; let source = self.extract_definition_source(); @@ -553,6 +559,7 @@ impl Parser { /// catch-all `_ => Err(Error::Invalid)`. If a default arm is encountered, /// a parse error is returned. fn parse_union_body(&mut self) -> Result, ParseError> { + let ifdef_depth_before = self.ifdef_seen_stack.len(); let mut arms = Vec::new(); while *self.peek() != Token::RBrace { @@ -583,6 +590,10 @@ impl Parser { arms.push(arm); } + if self.ifdef_seen_stack.len() != ifdef_depth_before { + return Err(self.unexpected_token_error("#endif".to_string(), Token::RBrace)); + } + Ok(arms) } From f1ddabd69c92d038a451d90d65794b16ee23f360 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 20 Mar 2026 03:40:09 +0000 Subject: [PATCH 15/28] fix default on cfg-gated first enum/union member --- xdr-generator-rust/generator/src/generator.rs | 8 +++++++- xdr-generator-rust/generator/src/output.rs | 5 ++++- xdr-generator-rust/generator/templates/enum.rs.jinja | 2 +- xdr-generator-rust/generator/templates/union.rs.jinja | 3 +++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/xdr-generator-rust/generator/src/generator.rs b/xdr-generator-rust/generator/src/generator.rs index f9e1e0c0..ad5eb99a 100644 --- a/xdr-generator-rust/generator/src/generator.rs +++ b/xdr-generator-rust/generator/src/generator.rs @@ -153,6 +153,7 @@ impl RustGenerator { let custom_default = self.options.custom_default_impl.contains(&name); let custom_str = self.options.custom_str_impl.contains(&name); + let first_uncfg_index = e.members.iter().position(|m| m.cfg.is_none()).unwrap_or(0); let members: Vec = e .members .iter() @@ -160,7 +161,7 @@ impl RustGenerator { .map(|(i, m)| EnumStructMemberOutput { name: type_name(&m.stripped_name), value: m.value, - is_first: i == 0, + is_default: i == first_uncfg_index, cfg: m.cfg.as_ref().map(|c| c.render()), }) .collect(); @@ -213,6 +214,10 @@ impl RustGenerator { .collect(); let type_kind = if u.is_nested { "NestedUnion" } else { "Union" }; + let default_arm_cfg = u + .arms + .first() + .and_then(|a| a.cfg.as_ref().map(|c| c.render())); UnionOutput { name, @@ -222,6 +227,7 @@ impl RustGenerator { discriminant_type, arms, cfg, + default_arm_cfg, } } diff --git a/xdr-generator-rust/generator/src/output.rs b/xdr-generator-rust/generator/src/output.rs index d9ceea90..6b547f4c 100644 --- a/xdr-generator-rust/generator/src/output.rs +++ b/xdr-generator-rust/generator/src/output.rs @@ -47,7 +47,7 @@ pub struct EnumOutput { pub struct EnumStructMemberOutput { pub name: String, pub value: i32, - pub is_first: bool, + pub is_default: bool, pub cfg: Option, } @@ -59,6 +59,9 @@ pub struct UnionOutput { pub discriminant_type: String, pub arms: Vec, pub cfg: Option, + /// Cfg for the first arm, used to gate the Default impl when the + /// default variant is behind a cfg. + pub default_arm_cfg: Option, } pub struct UnionArmOutput { diff --git a/xdr-generator-rust/generator/templates/enum.rs.jinja b/xdr-generator-rust/generator/templates/enum.rs.jinja index 9a5f804a..39ac7c80 100644 --- a/xdr-generator-rust/generator/templates/enum.rs.jinja +++ b/xdr-generator-rust/generator/templates/enum.rs.jinja @@ -27,7 +27,7 @@ pub enum {{ e.name }} { {%- if let Some(cfg) = m.cfg %} #[cfg({{ cfg }})] {%- endif %} -{%- if m.is_first %} +{%- if m.is_default %} #[cfg_attr(feature = "alloc", default)] {%- endif %} {{ m.name }} = {{ m.value }}, diff --git a/xdr-generator-rust/generator/templates/union.rs.jinja b/xdr-generator-rust/generator/templates/union.rs.jinja index 15e38230..3f85c0d1 100644 --- a/xdr-generator-rust/generator/templates/union.rs.jinja +++ b/xdr-generator-rust/generator/templates/union.rs.jinja @@ -46,6 +46,9 @@ pub enum {{ u.name }} { {% if let Some(cfg) = u.cfg -%} #[cfg({{ cfg }})] {% endif -%} +{%- if let Some(arm_cfg) = u.default_arm_cfg %} +#[cfg({{ arm_cfg }})] +{%- endif %} #[cfg(feature = "alloc")] impl Default for {{ u.name }} { fn default() -> Self { From ebeb78e32d0e725f5a3a09cd397a254d58e0ca38 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 20 Mar 2026 03:40:42 +0000 Subject: [PATCH 16/28] add tests for inline #ifdef in enum/union bodies --- .../xdr-parser/src/tests/parser.rs | 153 +++++++++++++++++- 1 file changed, 152 insertions(+), 1 deletion(-) diff --git a/xdr-generator-rust/xdr-parser/src/tests/parser.rs b/xdr-generator-rust/xdr-parser/src/tests/parser.rs index 8303d901..feabd418 100644 --- a/xdr-generator-rust/xdr-parser/src/tests/parser.rs +++ b/xdr-generator-rust/xdr-parser/src/tests/parser.rs @@ -1,5 +1,6 @@ use crate::ast::{ - CfgExpr, Definition, Enum, EnumMember, Size, Struct, StructMember, Type, Typedef, + CfgExpr, Definition, Enum, EnumMember, Size, Struct, StructMember, Type, Typedef, Union, + UnionArm, UnionCase, UnionCaseValue, UnionDiscriminant, }; use crate::parser::parse; @@ -358,6 +359,156 @@ fn test_stray_endif_error() { assert!(err.contains("endif"), "error should mention #endif: {err}"); } +// ============================================================================= +// Inline #ifdef inside enum/union body tests +// ============================================================================= + +#[test] +fn test_ifdef_inline_enum_members() { + let input = r#" + enum Color { + RED = 0, + #ifdef FEATURE_X + GREEN = 1, + #else + BLUE = 2, + #endif + YELLOW = 3 + }; + "#; + let spec = parse(input).unwrap(); + let Definition::Enum(e) = &spec.definitions[0] else { + panic!("expected enum"); + }; + assert_eq!(e.members.len(), 4); + + assert_eq!(e.members[0].stripped_name, "RED"); + assert_eq!(e.members[0].cfg, None); + + assert_eq!(e.members[1].stripped_name, "GREEN"); + assert_eq!( + e.members[1].cfg, + Some(CfgExpr::Feature("FEATURE_X".to_string())) + ); + + assert_eq!(e.members[2].stripped_name, "BLUE"); + assert_eq!( + e.members[2].cfg, + Some(CfgExpr::Not(Box::new(CfgExpr::Feature( + "FEATURE_X".to_string() + )))) + ); + + assert_eq!(e.members[3].stripped_name, "YELLOW"); + assert_eq!(e.members[3].cfg, None); +} + +#[test] +fn test_ifdef_inline_enum_no_else() { + let input = r#" + enum Foo { + A = 0, + #ifdef FEATURE_X + B = 1 + #endif + }; + "#; + let spec = parse(input).unwrap(); + let Definition::Enum(e) = &spec.definitions[0] else { + panic!("expected enum"); + }; + assert_eq!(e.members.len(), 2); + assert_eq!(e.members[0].cfg, None); + assert_eq!( + e.members[1].cfg, + Some(CfgExpr::Feature("FEATURE_X".to_string())) + ); +} + +#[test] +fn test_ifdef_inline_enum_nested() { + let input = r#" + enum Foo { + #ifdef A + #ifdef B + X = 0 + #endif + #endif + }; + "#; + let spec = parse(input).unwrap(); + let Definition::Enum(e) = &spec.definitions[0] else { + panic!("expected enum"); + }; + assert_eq!(e.members.len(), 1); + assert_eq!( + e.members[0].cfg, + Some(CfgExpr::All(vec![ + CfgExpr::Feature("A".to_string()), + CfgExpr::Feature("B".to_string()), + ])) + ); +} + +#[test] +fn test_ifdef_inline_union_arms() { + let input = r#" + enum MsgType { A = 0, B = 1, C = 2 }; + union Msg switch (MsgType t) { + case A: + int x; + #ifdef FEATURE_X + case B: + int y; + #else + case C: + void; + #endif + }; + "#; + let spec = parse(input).unwrap(); + let Definition::Union(u) = &spec.definitions[1] else { + panic!("expected union"); + }; + assert_eq!(u.arms.len(), 3); + assert_eq!(u.arms[0].cfg, None); + assert_eq!( + u.arms[1].cfg, + Some(CfgExpr::Feature("FEATURE_X".to_string())) + ); + assert_eq!( + u.arms[2].cfg, + Some(CfgExpr::Not(Box::new(CfgExpr::Feature( + "FEATURE_X".to_string() + )))) + ); +} + +#[test] +fn test_ifdef_inline_enum_unclosed_error() { + let input = r#" + enum Foo { + A = 0, + #ifdef FEATURE_X + B = 1 + }; + "#; + let result = parse(input); + assert!(result.is_err(), "unclosed #ifdef in enum should error"); +} + +#[test] +fn test_ifdef_inline_union_unclosed_error() { + let input = r#" + union Foo switch (int v) { + #ifdef FEATURE_X + case 0: void; + }; + "#; + let result = parse(input); + assert!(result.is_err(), "unclosed #ifdef in union should error"); +} + #[test] fn test_cfg_expr_negate() { // negate(Feature) => Not(Feature) From b0cfab90dc09fe57e4d17057ff28f66a8d1befee Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 20 Mar 2026 03:41:47 +0000 Subject: [PATCH 17/28] add end-to-end generator tests for #ifdef cfg --- .../generator/src/tests/generator.rs | 119 ++++++++++++++++++ xdr-generator-rust/generator/src/tests/mod.rs | 1 + 2 files changed, 120 insertions(+) create mode 100644 xdr-generator-rust/generator/src/tests/generator.rs diff --git a/xdr-generator-rust/generator/src/tests/generator.rs b/xdr-generator-rust/generator/src/tests/generator.rs new file mode 100644 index 00000000..3449ecfb --- /dev/null +++ b/xdr-generator-rust/generator/src/tests/generator.rs @@ -0,0 +1,119 @@ +use askama::Template; +use std::collections::HashSet; + +use crate::generator::RustGenerator; +use crate::options::RustOptions; + +fn generate_from_xdr(xdr: &str) -> String { + let spec = xdr_parser::parser::parse(xdr).unwrap(); + let options = RustOptions { + custom_default_impl: HashSet::new(), + custom_str_impl: HashSet::new(), + no_display_fromstr: HashSet::new(), + }; + let generator = RustGenerator::new(&spec, options); + let template = generator.generate(&spec, "// header\n"); + template.render().unwrap() +} + +#[test] +fn test_ifdef_generates_cfg_on_struct() { + let output = generate_from_xdr( + r#" + #ifdef FEATURE_X + struct Foo { int x; }; + #endif + "#, + ); + assert!( + output.contains(r#"#[cfg(feature = "feature_x")]"#), + "output should contain #[cfg(feature = \"feature_x\")]\n{output}" + ); + assert!( + output.contains("pub struct Foo"), + "output should contain struct Foo\n{output}" + ); +} + +#[test] +fn test_ifdef_else_generates_both_cfgs() { + let output = generate_from_xdr( + r#" + #ifdef FEATURE_X + struct Foo { int x; }; + #else + struct Bar { int y; }; + #endif + "#, + ); + assert!( + output.contains(r#"#[cfg(feature = "feature_x")]"#), + "output should have feature_x cfg" + ); + assert!( + output.contains(r#"#[cfg(not(feature = "feature_x"))]"#), + "output should have not(feature_x) cfg" + ); +} + +#[test] +fn test_ifdef_same_name_both_branches_no_cfg() { + let output = generate_from_xdr( + r#" + #ifdef FEATURE_X + struct Foo { int x; }; + #else + struct Foo { int y; }; + #endif + "#, + ); + // When same name appears in both branches, cfg is cleared for the type enum + // entry since the type is always present. + assert!( + output.contains("TypeVariant::Foo"), + "type enum should include Foo" + ); +} + +#[test] +fn test_ifdef_inline_enum_member_cfg() { + let output = generate_from_xdr( + r#" + enum Color { + RED = 0, + #ifdef FEATURE_X + GREEN = 1 + #endif + }; + "#, + ); + // The enum itself should not have a top-level cfg + assert!( + output.contains("pub enum Color"), + "output should contain enum Color" + ); + // GREEN variant should be cfg-gated + assert!( + output.contains(r#"#[cfg(feature = "feature_x")]"#), + "output should cfg-gate GREEN" + ); +} + +#[test] +fn test_ifdef_generates_cfg_on_const() { + let output = generate_from_xdr( + r#" + #ifdef FEATURE_X + const MAX_SIZE = 100; + #endif + "#, + ); + assert!( + output.contains(r#"#[cfg(feature = "feature_x")]"#), + "const should be cfg-gated" + ); + assert!( + output.contains("pub const MAX_SIZE: u64 = 100"), + "const should be present" + ); +} diff --git a/xdr-generator-rust/generator/src/tests/mod.rs b/xdr-generator-rust/generator/src/tests/mod.rs index 8df762a2..a0c6f9a9 100644 --- a/xdr-generator-rust/generator/src/tests/mod.rs +++ b/xdr-generator-rust/generator/src/tests/mod.rs @@ -1,2 +1,3 @@ +mod generator; mod naming; mod types; From aa676df984ca1946ff411337f0ae698c10b35e83 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 20 Mar 2026 03:42:23 +0000 Subject: [PATCH 18/28] make VARIANTS and VARIANTS_STR loop patterns consistent --- xdr-generator-rust/generator/templates/enum.rs.jinja | 4 ++-- xdr-generator-rust/generator/templates/type_enum.rs.jinja | 8 ++++---- xdr-generator-rust/generator/templates/union.rs.jinja | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xdr-generator-rust/generator/templates/enum.rs.jinja b/xdr-generator-rust/generator/templates/enum.rs.jinja index 39ac7c80..f88b0f49 100644 --- a/xdr-generator-rust/generator/templates/enum.rs.jinja +++ b/xdr-generator-rust/generator/templates/enum.rs.jinja @@ -64,8 +64,8 @@ impl {{ e.name }} { {%- endfor %} ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; diff --git a/xdr-generator-rust/generator/templates/type_enum.rs.jinja b/xdr-generator-rust/generator/templates/type_enum.rs.jinja index 39d586e7..4c0cc133 100644 --- a/xdr-generator-rust/generator/templates/type_enum.rs.jinja +++ b/xdr-generator-rust/generator/templates/type_enum.rs.jinja @@ -41,8 +41,8 @@ impl TypeVariant { {%- endfor %} ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -157,8 +157,8 @@ impl Type { {%- endfor %} ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; diff --git a/xdr-generator-rust/generator/templates/union.rs.jinja b/xdr-generator-rust/generator/templates/union.rs.jinja index 3f85c0d1..a398aae7 100644 --- a/xdr-generator-rust/generator/templates/union.rs.jinja +++ b/xdr-generator-rust/generator/templates/union.rs.jinja @@ -91,8 +91,8 @@ impl {{ u.name }} { {%- endfor %} ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; From 0908d3c2255cf2365d85e20ebb5b500a56082e5c Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 20 Mar 2026 03:42:33 +0000 Subject: [PATCH 19/28] document feature name lowercasing in CfgExpr::render --- xdr-generator-rust/xdr-parser/src/ast.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xdr-generator-rust/xdr-parser/src/ast.rs b/xdr-generator-rust/xdr-parser/src/ast.rs index 4f4d9801..91daf9b7 100644 --- a/xdr-generator-rust/xdr-parser/src/ast.rs +++ b/xdr-generator-rust/xdr-parser/src/ast.rs @@ -137,6 +137,9 @@ impl CfgExpr { } /// Render as a Rust `#[cfg(...)]` attribute string (without the outer `#[cfg()]`). + /// + /// Feature names are lowercased to follow the Cargo convention that feature + /// names are lowercase (e.g. XDR `FEATURE_X` becomes `feature = "feature_x"`). pub fn render(&self) -> String { match self { CfgExpr::Feature(name) => { From ddbce4171f78bc70b21e7d90fd7daa6d50c58b36 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 20 Mar 2026 03:42:55 +0000 Subject: [PATCH 20/28] compute cfg_by_name in single pass over definitions --- xdr-generator-rust/generator/src/generator.rs | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/xdr-generator-rust/generator/src/generator.rs b/xdr-generator-rust/generator/src/generator.rs index ad5eb99a..17b43570 100644 --- a/xdr-generator-rust/generator/src/generator.rs +++ b/xdr-generator-rust/generator/src/generator.rs @@ -47,31 +47,28 @@ impl RustGenerator { .collect(); let mut definitions: Vec = Vec::new(); - - for def in spec.all_definitions() { - let output = self.generate_definition(def); - definitions.push(output); - } - - // Build type enum entries with cfg from definitions. let mut cfg_by_name: std::collections::HashMap> = std::collections::HashMap::new(); - for d in spec - .all_definitions() - .filter(|d| !matches!(d, Definition::Const(_))) - { - let name = type_name(d.name()); - let cfg = self.resolve_cfg(d); - match cfg_by_name.entry(name) { - std::collections::hash_map::Entry::Vacant(e) => { - e.insert(cfg); - } - std::collections::hash_map::Entry::Occupied(mut e) => { - // Same name in multiple cfg branches (e.g. #ifdef/#else) - // means the type is always present, so clear the cfg. - e.insert(None); + + for def in spec.all_definitions() { + // Build cfg_by_name for type enum entries in the same pass. + if !matches!(def, Definition::Const(_)) { + let name = type_name(def.name()); + let cfg = self.resolve_cfg(def); + match cfg_by_name.entry(name) { + std::collections::hash_map::Entry::Vacant(e) => { + e.insert(cfg); + } + std::collections::hash_map::Entry::Occupied(mut e) => { + // Same name in multiple cfg branches (e.g. #ifdef/#else) + // means the type is always present, so clear the cfg. + e.insert(None); + } } } + + let output = self.generate_definition(def); + definitions.push(output); } let types: Vec = spec From 388af1413954ac8f53dbf9a85d88df6757846925 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 20 Mar 2026 03:43:23 +0000 Subject: [PATCH 21/28] use HashMap import instead of fully-qualified paths --- xdr-generator-rust/generator/src/generator.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xdr-generator-rust/generator/src/generator.rs b/xdr-generator-rust/generator/src/generator.rs index 17b43570..f67d24a7 100644 --- a/xdr-generator-rust/generator/src/generator.rs +++ b/xdr-generator-rust/generator/src/generator.rs @@ -1,3 +1,6 @@ +use std::collections::hash_map::Entry; +use std::collections::HashMap; + use askama::Template; use xdr_parser::ast::{ Const, Definition, Enum, Struct, StructMember, Typedef, Union, UnionArm, XdrSpec, @@ -47,8 +50,7 @@ impl RustGenerator { .collect(); let mut definitions: Vec = Vec::new(); - let mut cfg_by_name: std::collections::HashMap> = - std::collections::HashMap::new(); + let mut cfg_by_name: HashMap> = HashMap::new(); for def in spec.all_definitions() { // Build cfg_by_name for type enum entries in the same pass. @@ -56,10 +58,10 @@ impl RustGenerator { let name = type_name(def.name()); let cfg = self.resolve_cfg(def); match cfg_by_name.entry(name) { - std::collections::hash_map::Entry::Vacant(e) => { + Entry::Vacant(e) => { e.insert(cfg); } - std::collections::hash_map::Entry::Occupied(mut e) => { + Entry::Occupied(mut e) => { // Same name in multiple cfg branches (e.g. #ifdef/#else) // means the type is always present, so clear the cfg. e.insert(None); From acf952d39d9ceea9766de59736c4efbe09b2a40c Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 20 Mar 2026 03:43:58 +0000 Subject: [PATCH 22/28] regenerate curr and next xdr types --- src/curr/generated.rs | 808 +++++++++++++++++++++--------------------- src/next/generated.rs | 808 +++++++++++++++++++++--------------------- 2 files changed, 808 insertions(+), 808 deletions(-) diff --git a/src/curr/generated.rs b/src/curr/generated.rs index bbb4b45e..fe930757 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -4302,8 +4302,8 @@ impl ScpStatementType { }; const _VARIANTS_STR: &[&str] = &["Prepare", "Confirm", "Externalize", "Nominate"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -4704,8 +4704,8 @@ impl ScpStatementPledges { }; const _VARIANTS_STR: &[&str] = &["Prepare", "Confirm", "Externalize", "Nominate"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -6110,8 +6110,8 @@ impl ContractCostType { "Bn254G1Msm", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -7066,8 +7066,8 @@ impl ConfigSettingId { "FreezeBypassTxsDelta", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -7346,8 +7346,8 @@ impl ConfigSettingEntry { "FreezeBypassTxsDelta", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -7590,8 +7590,8 @@ impl ScEnvMetaKind { }; const _VARIANTS_STR: &[&str] = &["ScEnvMetaKindInterfaceVersion"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -7771,8 +7771,8 @@ impl ScEnvMetaEntry { }; const _VARIANTS_STR: &[&str] = &["ScEnvMetaKindInterfaceVersion"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -7944,8 +7944,8 @@ impl ScMetaKind { }; const _VARIANTS_STR: &[&str] = &["ScMetaV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -8074,8 +8074,8 @@ impl ScMetaEntry { }; const _VARIANTS_STR: &[&str] = &["ScMetaV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -8312,8 +8312,8 @@ impl ScSpecType { "Udt", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -8926,8 +8926,8 @@ impl ScSpecTypeDef { "Udt", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -9363,8 +9363,8 @@ impl ScSpecUdtUnionCaseV0Kind { }; const _VARIANTS_STR: &[&str] = &["VoidV0", "TupleV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -9501,8 +9501,8 @@ impl ScSpecUdtUnionCaseV0 { }; const _VARIANTS_STR: &[&str] = &["VoidV0", "TupleV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -10021,8 +10021,8 @@ impl ScSpecEventParamLocationV0 { }; const _VARIANTS_STR: &[&str] = &["Data", "TopicList"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -10210,8 +10210,8 @@ impl ScSpecEventDataFormat { }; const _VARIANTS_STR: &[&str] = &["SingleValue", "Vec", "Map"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -10425,8 +10425,8 @@ impl ScSpecEntryKind { "EventV0", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -10594,8 +10594,8 @@ impl ScSpecEntry { "EventV0", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -10853,8 +10853,8 @@ impl ScValType { "LedgerKeyNonce", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -11049,8 +11049,8 @@ impl ScErrorType { "Value", "Auth", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -11229,8 +11229,8 @@ impl ScErrorCode { "UnexpectedSize", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -11410,8 +11410,8 @@ impl ScError { "Value", "Auth", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -11899,8 +11899,8 @@ impl ContractExecutableType { }; const _VARIANTS_STR: &[&str] = &["Wasm", "StellarAsset"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -12037,8 +12037,8 @@ impl ContractExecutable { }; const _VARIANTS_STR: &[&str] = &["Wasm", "StellarAsset"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -12181,8 +12181,8 @@ impl ScAddressType { "LiquidityPool", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -12415,8 +12415,8 @@ impl ScAddress { "LiquidityPool", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -13336,8 +13336,8 @@ impl ScVal { "LedgerKeyNonce", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -13660,8 +13660,8 @@ impl StoredTransactionSet { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -13951,8 +13951,8 @@ impl PersistedScpState { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -14831,8 +14831,8 @@ impl AssetType { }; const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -14970,8 +14970,8 @@ impl AssetCode { }; const _VARIANTS_STR: &[&str] = &["CreditAlphanum4", "CreditAlphanum12"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -15214,8 +15214,8 @@ impl Asset { }; const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -15459,8 +15459,8 @@ impl ThresholdIndexes { }; const _VARIANTS_STR: &[&str] = &["MasterWeight", "Low", "Med", "High"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -15627,8 +15627,8 @@ impl LedgerEntryType { "Ttl", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -15842,8 +15842,8 @@ impl AccountFlags { "ClawbackEnabledFlag", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -16123,8 +16123,8 @@ impl AccountEntryExtensionV2Ext { }; const _VARIANTS_STR: &[&str] = &["V0", "V3"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -16323,8 +16323,8 @@ impl AccountEntryExtensionV1Ext { }; const _VARIANTS_STR: &[&str] = &["V0", "V2"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -16515,8 +16515,8 @@ impl AccountEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -16756,8 +16756,8 @@ impl TrustLineFlags { "TrustlineClawbackEnabledFlag", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -16906,8 +16906,8 @@ impl LiquidityPoolType { }; const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -17055,8 +17055,8 @@ impl TrustLineAsset { }; const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -17195,8 +17195,8 @@ impl TrustLineEntryExtensionV2Ext { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -17381,8 +17381,8 @@ impl TrustLineEntryV1Ext { }; const _VARIANTS_STR: &[&str] = &["V0", "V2"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -17585,8 +17585,8 @@ impl TrustLineEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -17807,8 +17807,8 @@ impl OfferEntryFlags { }; const _VARIANTS_STR: &[&str] = &["PassiveFlag"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -17945,8 +17945,8 @@ impl OfferEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -18167,8 +18167,8 @@ impl DataEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -18375,8 +18375,8 @@ impl ClaimPredicateType { "BeforeRelativeTime", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -18557,8 +18557,8 @@ impl ClaimPredicate { "BeforeRelativeTime", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -18701,8 +18701,8 @@ impl ClaimantType { }; const _VARIANTS_STR: &[&str] = &["ClaimantTypeV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -18884,8 +18884,8 @@ impl Claimant { }; const _VARIANTS_STR: &[&str] = &["ClaimantTypeV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -19007,8 +19007,8 @@ impl ClaimableBalanceFlags { }; const _VARIANTS_STR: &[&str] = &["ClaimableBalanceClawbackEnabledFlag"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -19145,8 +19145,8 @@ impl ClaimableBalanceEntryExtensionV1Ext { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -19331,8 +19331,8 @@ impl ClaimableBalanceEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -19685,8 +19685,8 @@ impl LiquidityPoolEntryBody { }; const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -19879,8 +19879,8 @@ impl ContractDataDurability { }; const _VARIANTS_STR: &[&str] = &["Temporary", "Persistent"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -20212,8 +20212,8 @@ impl ContractCodeEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -20456,8 +20456,8 @@ impl LedgerEntryExtensionV1Ext { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -20688,8 +20688,8 @@ impl LedgerEntryData { "Ttl", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -20865,8 +20865,8 @@ impl LedgerEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -21648,8 +21648,8 @@ impl LedgerKey { "Ttl", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -21854,8 +21854,8 @@ impl EnvelopeType { "SorobanAuthorization", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -21996,8 +21996,8 @@ impl BucketListType { }; const _VARIANTS_STR: &[&str] = &["Live", "HotArchive"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -22133,8 +22133,8 @@ impl BucketEntryType { }; const _VARIANTS_STR: &[&str] = &["Metaentry", "Liveentry", "Deadentry", "Initentry"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -22271,8 +22271,8 @@ impl HotArchiveBucketEntryType { }; const _VARIANTS_STR: &[&str] = &["Metaentry", "Archived", "Live"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -22408,8 +22408,8 @@ impl BucketMetadataExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -22613,8 +22613,8 @@ impl BucketEntry { }; const _VARIANTS_STR: &[&str] = &["Liveentry", "Initentry", "Deadentry", "Metaentry"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -22764,8 +22764,8 @@ impl HotArchiveBucketEntry { }; const _VARIANTS_STR: &[&str] = &["Archived", "Live", "Metaentry"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -23004,8 +23004,8 @@ impl StellarValueType { }; const _VARIANTS_STR: &[&str] = &["Basic", "Signed"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -23188,8 +23188,8 @@ impl StellarValueExt { }; const _VARIANTS_STR: &[&str] = &["Basic", "Signed"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -23400,8 +23400,8 @@ impl LedgerHeaderFlags { }; const _VARIANTS_STR: &[&str] = &["TradingFlag", "DepositFlag", "WithdrawalFlag"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -23534,8 +23534,8 @@ impl LedgerHeaderExtensionV1Ext { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -23720,8 +23720,8 @@ impl LedgerHeaderExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -24006,8 +24006,8 @@ impl LedgerUpgradeType { "MaxSorobanTxSetSize", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -24233,8 +24233,8 @@ impl LedgerUpgrade { "MaxSorobanTxSetSize", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -24425,8 +24425,8 @@ impl TxSetComponentType { }; const _VARIANTS_STR: &[&str] = &["TxsetCompTxsMaybeDiscountedFee"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -24882,8 +24882,8 @@ impl TxSetComponent { }; const _VARIANTS_STR: &[&str] = &["TxsetCompTxsMaybeDiscountedFee"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -25019,8 +25019,8 @@ impl TransactionPhase { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -25250,8 +25250,8 @@ impl GeneralizedTransactionSet { }; const _VARIANTS_STR: &[&str] = &["V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -25475,8 +25475,8 @@ impl TransactionHistoryEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -25669,8 +25669,8 @@ impl TransactionHistoryResultEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -25857,8 +25857,8 @@ impl LedgerHeaderHistoryEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -26143,8 +26143,8 @@ impl ScpHistoryEntry { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -26277,8 +26277,8 @@ impl LedgerEntryChangeType { }; const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Removed", "State", "Restored"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -26433,8 +26433,8 @@ impl LedgerEntryChange { }; const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Removed", "State", "Restored"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -26833,8 +26833,8 @@ impl ContractEventType { }; const _VARIANTS_STR: &[&str] = &["System", "Contract", "Diagnostic"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -27020,8 +27020,8 @@ impl ContractEventBody { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -27366,8 +27366,8 @@ impl SorobanTransactionMetaExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -27736,8 +27736,8 @@ impl TransactionEventStage { }; const _VARIANTS_STR: &[&str] = &["BeforeAllTxs", "AfterTx", "AfterAllTxs"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -28053,8 +28053,8 @@ impl TransactionMeta { }; const _VARIANTS_STR: &[&str] = &["V0", "V1", "V2", "V3", "V4"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -28488,8 +28488,8 @@ impl LedgerCloseMetaExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -28816,8 +28816,8 @@ impl LedgerCloseMeta { }; const _VARIANTS_STR: &[&str] = &["V0", "V1", "V2"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -28958,8 +28958,8 @@ impl ErrorCode { }; const _VARIANTS_STR: &[&str] = &["Misc", "Data", "Conf", "Auth", "Load"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -29420,8 +29420,8 @@ impl IpAddrType { }; const _VARIANTS_STR: &[&str] = &["IPv4", "IPv6"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -29555,8 +29555,8 @@ impl PeerAddressIp { }; const _VARIANTS_STR: &[&str] = &["IPv4", "IPv6"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -29837,8 +29837,8 @@ impl MessageType { "TimeSlicedSurveyStopCollecting", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -30049,8 +30049,8 @@ impl SurveyMessageCommandType { }; const _VARIANTS_STR: &[&str] = &["TimeSlicedSurveyTopology"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -30172,8 +30172,8 @@ impl SurveyMessageResponseType { }; const _VARIANTS_STR: &[&str] = &["SurveyTopologyResponseV2"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -31391,8 +31391,8 @@ impl SurveyResponseBody { }; const _VARIANTS_STR: &[&str] = &["SurveyTopologyResponseV2"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -31959,8 +31959,8 @@ impl StellarMessage { "FloodDemand", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -32247,8 +32247,8 @@ impl AuthenticatedMessage { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -32383,8 +32383,8 @@ impl LiquidityPoolParameters { }; const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -32596,8 +32596,8 @@ impl MuxedAccount { }; const _VARIANTS_STR: &[&str] = &["Ed25519", "MuxedEd25519"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -32879,8 +32879,8 @@ impl OperationType { "RestoreFootprint", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -33632,8 +33632,8 @@ impl ChangeTrustAsset { }; const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -34120,8 +34120,8 @@ impl RevokeSponsorshipType { }; const _VARIANTS_STR: &[&str] = &["LedgerEntry", "Signer"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -34311,8 +34311,8 @@ impl RevokeSponsorshipOp { }; const _VARIANTS_STR: &[&str] = &["LedgerEntry", "Signer"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -34759,8 +34759,8 @@ impl HostFunctionType { "CreateContractV2", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -34892,8 +34892,8 @@ impl ContractIdPreimageType { }; const _VARIANTS_STR: &[&str] = &["Address", "Asset"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -35083,8 +35083,8 @@ impl ContractIdPreimage { }; const _VARIANTS_STR: &[&str] = &["Address", "Asset"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -35391,8 +35391,8 @@ impl HostFunction { "CreateContractV2", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -35543,8 +35543,8 @@ impl SorobanAuthorizedFunctionType { "CreateContractV2HostFn", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -35699,8 +35699,8 @@ impl SorobanAuthorizedFunction { "CreateContractV2HostFn", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -35951,8 +35951,8 @@ impl SorobanCredentialsType { }; const _VARIANTS_STR: &[&str] = &["SourceAccount", "Address"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -36089,8 +36089,8 @@ impl SorobanCredentials { }; const _VARIANTS_STR: &[&str] = &["SourceAccount", "Address"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -36658,8 +36658,8 @@ impl OperationBody { "RestoreFootprint", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -37299,8 +37299,8 @@ impl HashIdPreimage { "SorobanAuthorization", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -37451,8 +37451,8 @@ impl MemoType { }; const _VARIANTS_STR: &[&str] = &["None", "Text", "Id", "Hash", "Return"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -37613,8 +37613,8 @@ impl Memo { }; const _VARIANTS_STR: &[&str] = &["None", "Text", "Id", "Hash", "Return"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -37943,8 +37943,8 @@ impl PreconditionType { }; const _VARIANTS_STR: &[&str] = &["None", "Time", "V2"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -38087,8 +38087,8 @@ impl Preconditions { }; const _VARIANTS_STR: &[&str] = &["None", "Time", "V2"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -38385,8 +38385,8 @@ impl SorobanTransactionDataExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -38589,8 +38589,8 @@ impl TransactionV0Ext { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -38845,8 +38845,8 @@ impl TransactionExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -39114,8 +39114,8 @@ impl FeeBumpTransactionInnerTx { }; const _VARIANTS_STR: &[&str] = &["Tx"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -39242,8 +39242,8 @@ impl FeeBumpTransactionExt { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -39495,8 +39495,8 @@ impl TransactionEnvelope { }; const _VARIANTS_STR: &[&str] = &["TxV0", "Tx", "TxFeeBump"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -39637,8 +39637,8 @@ impl TransactionSignaturePayloadTaggedTransaction { }; const _VARIANTS_STR: &[&str] = &["Tx", "TxFeeBump"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -39826,8 +39826,8 @@ impl ClaimAtomType { }; const _VARIANTS_STR: &[&str] = &["V0", "OrderBook", "LiquidityPool"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -40207,8 +40207,8 @@ impl ClaimAtom { }; const _VARIANTS_STR: &[&str] = &["V0", "OrderBook", "LiquidityPool"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -40361,8 +40361,8 @@ impl CreateAccountResultCode { "AlreadyExist", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -40520,8 +40520,8 @@ impl CreateAccountResult { "AlreadyExist", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -40699,8 +40699,8 @@ impl PaymentResultCode { "NoIssuer", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -40888,8 +40888,8 @@ impl PaymentResult { "NoIssuer", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -41108,8 +41108,8 @@ impl PathPaymentStrictReceiveResultCode { "OverSendmax", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -41428,8 +41428,8 @@ impl PathPaymentStrictReceiveResult { "OverSendmax", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -41662,8 +41662,8 @@ impl PathPaymentStrictSendResultCode { "UnderDestmin", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -41924,8 +41924,8 @@ impl PathPaymentStrictSendResult { "UnderDestmin", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -42157,8 +42157,8 @@ impl ManageSellOfferResultCode { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -42311,8 +42311,8 @@ impl ManageOfferEffect { }; const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Deleted"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -42454,8 +42454,8 @@ impl ManageOfferSuccessResultOffer { }; const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Deleted"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -42702,8 +42702,8 @@ impl ManageSellOfferResult { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -42932,8 +42932,8 @@ impl ManageBuyOfferResultCode { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -43139,8 +43139,8 @@ impl ManageBuyOfferResult { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -43356,8 +43356,8 @@ impl SetOptionsResultCode { "AuthRevocableRequired", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -43551,8 +43551,8 @@ impl SetOptionsResult { "AuthRevocableRequired", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -43753,8 +43753,8 @@ impl ChangeTrustResultCode { "NotAuthMaintainLiabilities", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -43936,8 +43936,8 @@ impl ChangeTrustResult { "NotAuthMaintainLiabilities", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -44122,8 +44122,8 @@ impl AllowTrustResultCode { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -44293,8 +44293,8 @@ impl AllowTrustResult { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -44472,8 +44472,8 @@ impl AccountMergeResultCode { "IsSponsor", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -44655,8 +44655,8 @@ impl AccountMergeResult { "IsSponsor", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -44808,8 +44808,8 @@ impl InflationResultCode { }; const _VARIANTS_STR: &[&str] = &["Success", "NotTime"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -44997,8 +44997,8 @@ impl InflationResult { }; const _VARIANTS_STR: &[&str] = &["Success", "NotTime"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -45147,8 +45147,8 @@ impl ManageDataResultCode { "InvalidName", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -45306,8 +45306,8 @@ impl ManageDataResult { "InvalidName", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -45449,8 +45449,8 @@ impl BumpSequenceResultCode { }; const _VARIANTS_STR: &[&str] = &["Success", "BadSeq"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -45587,8 +45587,8 @@ impl BumpSequenceResult { }; const _VARIANTS_STR: &[&str] = &["Success", "BadSeq"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -45735,8 +45735,8 @@ impl CreateClaimableBalanceResultCode { "Underfunded", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -45901,8 +45901,8 @@ impl CreateClaimableBalanceResult { "Underfunded", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -46072,8 +46072,8 @@ impl ClaimClaimableBalanceResultCode { "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -46243,8 +46243,8 @@ impl ClaimClaimableBalanceResult { "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -46402,8 +46402,8 @@ impl BeginSponsoringFutureReservesResultCode { }; const _VARIANTS_STR: &[&str] = &["Success", "Malformed", "AlreadySponsored", "Recursive"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -46551,8 +46551,8 @@ impl BeginSponsoringFutureReservesResult { }; const _VARIANTS_STR: &[&str] = &["Success", "Malformed", "AlreadySponsored", "Recursive"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -46692,8 +46692,8 @@ impl EndSponsoringFutureReservesResultCode { }; const _VARIANTS_STR: &[&str] = &["Success", "NotSponsored"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -46831,8 +46831,8 @@ impl EndSponsoringFutureReservesResult { }; const _VARIANTS_STR: &[&str] = &["Success", "NotSponsored"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -46983,8 +46983,8 @@ impl RevokeSponsorshipResultCode { "Malformed", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -47148,8 +47148,8 @@ impl RevokeSponsorshipResult { "Malformed", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -47312,8 +47312,8 @@ impl ClawbackResultCode { "Underfunded", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -47471,8 +47471,8 @@ impl ClawbackResult { "Underfunded", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -47621,8 +47621,8 @@ impl ClawbackClaimableBalanceResultCode { }; const _VARIANTS_STR: &[&str] = &["Success", "DoesNotExist", "NotIssuer", "NotClawbackEnabled"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -47770,8 +47770,8 @@ impl ClawbackClaimableBalanceResult { }; const _VARIANTS_STR: &[&str] = &["Success", "DoesNotExist", "NotIssuer", "NotClawbackEnabled"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -47931,8 +47931,8 @@ impl SetTrustLineFlagsResultCode { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -48096,8 +48096,8 @@ impl SetTrustLineFlagsResult { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -48281,8 +48281,8 @@ impl LiquidityPoolDepositResultCode { "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -48464,8 +48464,8 @@ impl LiquidityPoolDepositResult { "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -48652,8 +48652,8 @@ impl LiquidityPoolWithdrawResultCode { "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -48823,8 +48823,8 @@ impl LiquidityPoolWithdrawResult { "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -48995,8 +48995,8 @@ impl InvokeHostFunctionResultCode { "InsufficientRefundableFee", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -49160,8 +49160,8 @@ impl InvokeHostFunctionResult { "InsufficientRefundableFee", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -49324,8 +49324,8 @@ impl ExtendFootprintTtlResultCode { "InsufficientRefundableFee", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -49477,8 +49477,8 @@ impl ExtendFootprintTtlResult { "InsufficientRefundableFee", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -49633,8 +49633,8 @@ impl RestoreFootprintResultCode { "InsufficientRefundableFee", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -49786,8 +49786,8 @@ impl RestoreFootprintResult { "InsufficientRefundableFee", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -49952,8 +49952,8 @@ impl OperationResultCode { "OpTooManySponsoring", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -50228,8 +50228,8 @@ impl OperationResultTr { "RestoreFootprint", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -50584,8 +50584,8 @@ impl OperationResult { "OpTooManySponsoring", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -50812,8 +50812,8 @@ impl TransactionResultCode { "TxFrozenKeyAccessed", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -51055,8 +51055,8 @@ impl InnerTransactionResultResult { "TxFrozenKeyAccessed", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -51255,8 +51255,8 @@ impl InnerTransactionResultExt { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -51606,8 +51606,8 @@ impl TransactionResultResult { "TxFrozenKeyAccessed", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -51818,8 +51818,8 @@ impl TransactionResultExt { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -52506,8 +52506,8 @@ impl ExtensionPoint { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -52648,8 +52648,8 @@ impl CryptoKeyType { "MuxedEd25519", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -52778,8 +52778,8 @@ impl PublicKeyType { }; const _VARIANTS_STR: &[&str] = &["PublicKeyTypeEd25519"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -52911,8 +52911,8 @@ impl SignerKeyType { }; const _VARIANTS_STR: &[&str] = &["Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -53044,8 +53044,8 @@ impl PublicKey { }; const _VARIANTS_STR: &[&str] = &["PublicKeyTypeEd25519"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -53273,8 +53273,8 @@ impl SignerKey { }; const _VARIANTS_STR: &[&str] = &["Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -54068,8 +54068,8 @@ impl BinaryFuseFilterType { }; const _VARIANTS_STR: &[&str] = &["B8Bit", "B16Bit", "B32Bit"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -54334,8 +54334,8 @@ impl ClaimableBalanceIdType { }; const _VARIANTS_STR: &[&str] = &["ClaimableBalanceIdTypeV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -54462,8 +54462,8 @@ impl ClaimableBalanceId { }; const _VARIANTS_STR: &[&str] = &["ClaimableBalanceIdTypeV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -55975,8 +55975,8 @@ impl TypeVariant { "ClaimableBalanceId", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -59123,8 +59123,8 @@ impl Type { "ClaimableBalanceId", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; diff --git a/src/next/generated.rs b/src/next/generated.rs index f6d73424..5ba4e97d 100644 --- a/src/next/generated.rs +++ b/src/next/generated.rs @@ -4302,8 +4302,8 @@ impl ScpStatementType { }; const _VARIANTS_STR: &[&str] = &["Prepare", "Confirm", "Externalize", "Nominate"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -4704,8 +4704,8 @@ impl ScpStatementPledges { }; const _VARIANTS_STR: &[&str] = &["Prepare", "Confirm", "Externalize", "Nominate"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -6110,8 +6110,8 @@ impl ContractCostType { "Bn254G1Msm", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -7066,8 +7066,8 @@ impl ConfigSettingId { "FreezeBypassTxsDelta", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -7346,8 +7346,8 @@ impl ConfigSettingEntry { "FreezeBypassTxsDelta", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -7590,8 +7590,8 @@ impl ScEnvMetaKind { }; const _VARIANTS_STR: &[&str] = &["ScEnvMetaKindInterfaceVersion"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -7771,8 +7771,8 @@ impl ScEnvMetaEntry { }; const _VARIANTS_STR: &[&str] = &["ScEnvMetaKindInterfaceVersion"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -7944,8 +7944,8 @@ impl ScMetaKind { }; const _VARIANTS_STR: &[&str] = &["ScMetaV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -8074,8 +8074,8 @@ impl ScMetaEntry { }; const _VARIANTS_STR: &[&str] = &["ScMetaV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -8312,8 +8312,8 @@ impl ScSpecType { "Udt", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -8926,8 +8926,8 @@ impl ScSpecTypeDef { "Udt", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -9363,8 +9363,8 @@ impl ScSpecUdtUnionCaseV0Kind { }; const _VARIANTS_STR: &[&str] = &["VoidV0", "TupleV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -9501,8 +9501,8 @@ impl ScSpecUdtUnionCaseV0 { }; const _VARIANTS_STR: &[&str] = &["VoidV0", "TupleV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -10021,8 +10021,8 @@ impl ScSpecEventParamLocationV0 { }; const _VARIANTS_STR: &[&str] = &["Data", "TopicList"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -10210,8 +10210,8 @@ impl ScSpecEventDataFormat { }; const _VARIANTS_STR: &[&str] = &["SingleValue", "Vec", "Map"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -10425,8 +10425,8 @@ impl ScSpecEntryKind { "EventV0", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -10594,8 +10594,8 @@ impl ScSpecEntry { "EventV0", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -10853,8 +10853,8 @@ impl ScValType { "LedgerKeyNonce", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -11049,8 +11049,8 @@ impl ScErrorType { "Value", "Auth", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -11229,8 +11229,8 @@ impl ScErrorCode { "UnexpectedSize", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -11410,8 +11410,8 @@ impl ScError { "Value", "Auth", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -11899,8 +11899,8 @@ impl ContractExecutableType { }; const _VARIANTS_STR: &[&str] = &["Wasm", "StellarAsset"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -12037,8 +12037,8 @@ impl ContractExecutable { }; const _VARIANTS_STR: &[&str] = &["Wasm", "StellarAsset"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -12181,8 +12181,8 @@ impl ScAddressType { "LiquidityPool", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -12415,8 +12415,8 @@ impl ScAddress { "LiquidityPool", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -13336,8 +13336,8 @@ impl ScVal { "LedgerKeyNonce", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -13660,8 +13660,8 @@ impl StoredTransactionSet { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -13951,8 +13951,8 @@ impl PersistedScpState { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -14831,8 +14831,8 @@ impl AssetType { }; const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -14970,8 +14970,8 @@ impl AssetCode { }; const _VARIANTS_STR: &[&str] = &["CreditAlphanum4", "CreditAlphanum12"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -15214,8 +15214,8 @@ impl Asset { }; const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -15459,8 +15459,8 @@ impl ThresholdIndexes { }; const _VARIANTS_STR: &[&str] = &["MasterWeight", "Low", "Med", "High"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -15627,8 +15627,8 @@ impl LedgerEntryType { "Ttl", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -15842,8 +15842,8 @@ impl AccountFlags { "ClawbackEnabledFlag", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -16123,8 +16123,8 @@ impl AccountEntryExtensionV2Ext { }; const _VARIANTS_STR: &[&str] = &["V0", "V3"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -16323,8 +16323,8 @@ impl AccountEntryExtensionV1Ext { }; const _VARIANTS_STR: &[&str] = &["V0", "V2"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -16515,8 +16515,8 @@ impl AccountEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -16756,8 +16756,8 @@ impl TrustLineFlags { "TrustlineClawbackEnabledFlag", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -16906,8 +16906,8 @@ impl LiquidityPoolType { }; const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -17055,8 +17055,8 @@ impl TrustLineAsset { }; const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -17195,8 +17195,8 @@ impl TrustLineEntryExtensionV2Ext { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -17381,8 +17381,8 @@ impl TrustLineEntryV1Ext { }; const _VARIANTS_STR: &[&str] = &["V0", "V2"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -17585,8 +17585,8 @@ impl TrustLineEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -17807,8 +17807,8 @@ impl OfferEntryFlags { }; const _VARIANTS_STR: &[&str] = &["PassiveFlag"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -17945,8 +17945,8 @@ impl OfferEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -18167,8 +18167,8 @@ impl DataEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -18375,8 +18375,8 @@ impl ClaimPredicateType { "BeforeRelativeTime", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -18557,8 +18557,8 @@ impl ClaimPredicate { "BeforeRelativeTime", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -18701,8 +18701,8 @@ impl ClaimantType { }; const _VARIANTS_STR: &[&str] = &["ClaimantTypeV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -18884,8 +18884,8 @@ impl Claimant { }; const _VARIANTS_STR: &[&str] = &["ClaimantTypeV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -19007,8 +19007,8 @@ impl ClaimableBalanceFlags { }; const _VARIANTS_STR: &[&str] = &["ClaimableBalanceClawbackEnabledFlag"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -19145,8 +19145,8 @@ impl ClaimableBalanceEntryExtensionV1Ext { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -19331,8 +19331,8 @@ impl ClaimableBalanceEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -19685,8 +19685,8 @@ impl LiquidityPoolEntryBody { }; const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -19879,8 +19879,8 @@ impl ContractDataDurability { }; const _VARIANTS_STR: &[&str] = &["Temporary", "Persistent"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -20212,8 +20212,8 @@ impl ContractCodeEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -20456,8 +20456,8 @@ impl LedgerEntryExtensionV1Ext { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -20688,8 +20688,8 @@ impl LedgerEntryData { "Ttl", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -20865,8 +20865,8 @@ impl LedgerEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -21648,8 +21648,8 @@ impl LedgerKey { "Ttl", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -21854,8 +21854,8 @@ impl EnvelopeType { "SorobanAuthorization", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -21996,8 +21996,8 @@ impl BucketListType { }; const _VARIANTS_STR: &[&str] = &["Live", "HotArchive"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -22133,8 +22133,8 @@ impl BucketEntryType { }; const _VARIANTS_STR: &[&str] = &["Metaentry", "Liveentry", "Deadentry", "Initentry"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -22271,8 +22271,8 @@ impl HotArchiveBucketEntryType { }; const _VARIANTS_STR: &[&str] = &["Metaentry", "Archived", "Live"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -22408,8 +22408,8 @@ impl BucketMetadataExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -22613,8 +22613,8 @@ impl BucketEntry { }; const _VARIANTS_STR: &[&str] = &["Liveentry", "Initentry", "Deadentry", "Metaentry"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -22764,8 +22764,8 @@ impl HotArchiveBucketEntry { }; const _VARIANTS_STR: &[&str] = &["Archived", "Live", "Metaentry"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -23004,8 +23004,8 @@ impl StellarValueType { }; const _VARIANTS_STR: &[&str] = &["Basic", "Signed"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -23188,8 +23188,8 @@ impl StellarValueExt { }; const _VARIANTS_STR: &[&str] = &["Basic", "Signed"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -23400,8 +23400,8 @@ impl LedgerHeaderFlags { }; const _VARIANTS_STR: &[&str] = &["TradingFlag", "DepositFlag", "WithdrawalFlag"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -23534,8 +23534,8 @@ impl LedgerHeaderExtensionV1Ext { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -23720,8 +23720,8 @@ impl LedgerHeaderExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -24006,8 +24006,8 @@ impl LedgerUpgradeType { "MaxSorobanTxSetSize", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -24233,8 +24233,8 @@ impl LedgerUpgrade { "MaxSorobanTxSetSize", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -24425,8 +24425,8 @@ impl TxSetComponentType { }; const _VARIANTS_STR: &[&str] = &["TxsetCompTxsMaybeDiscountedFee"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -24882,8 +24882,8 @@ impl TxSetComponent { }; const _VARIANTS_STR: &[&str] = &["TxsetCompTxsMaybeDiscountedFee"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -25019,8 +25019,8 @@ impl TransactionPhase { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -25250,8 +25250,8 @@ impl GeneralizedTransactionSet { }; const _VARIANTS_STR: &[&str] = &["V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -25475,8 +25475,8 @@ impl TransactionHistoryEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -25669,8 +25669,8 @@ impl TransactionHistoryResultEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -25857,8 +25857,8 @@ impl LedgerHeaderHistoryEntryExt { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -26143,8 +26143,8 @@ impl ScpHistoryEntry { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -26277,8 +26277,8 @@ impl LedgerEntryChangeType { }; const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Removed", "State", "Restored"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -26433,8 +26433,8 @@ impl LedgerEntryChange { }; const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Removed", "State", "Restored"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -26833,8 +26833,8 @@ impl ContractEventType { }; const _VARIANTS_STR: &[&str] = &["System", "Contract", "Diagnostic"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -27020,8 +27020,8 @@ impl ContractEventBody { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -27366,8 +27366,8 @@ impl SorobanTransactionMetaExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -27736,8 +27736,8 @@ impl TransactionEventStage { }; const _VARIANTS_STR: &[&str] = &["BeforeAllTxs", "AfterTx", "AfterAllTxs"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -28053,8 +28053,8 @@ impl TransactionMeta { }; const _VARIANTS_STR: &[&str] = &["V0", "V1", "V2", "V3", "V4"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -28488,8 +28488,8 @@ impl LedgerCloseMetaExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -28816,8 +28816,8 @@ impl LedgerCloseMeta { }; const _VARIANTS_STR: &[&str] = &["V0", "V1", "V2"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -28958,8 +28958,8 @@ impl ErrorCode { }; const _VARIANTS_STR: &[&str] = &["Misc", "Data", "Conf", "Auth", "Load"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -29420,8 +29420,8 @@ impl IpAddrType { }; const _VARIANTS_STR: &[&str] = &["IPv4", "IPv6"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -29555,8 +29555,8 @@ impl PeerAddressIp { }; const _VARIANTS_STR: &[&str] = &["IPv4", "IPv6"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -29837,8 +29837,8 @@ impl MessageType { "TimeSlicedSurveyStopCollecting", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -30049,8 +30049,8 @@ impl SurveyMessageCommandType { }; const _VARIANTS_STR: &[&str] = &["TimeSlicedSurveyTopology"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -30172,8 +30172,8 @@ impl SurveyMessageResponseType { }; const _VARIANTS_STR: &[&str] = &["SurveyTopologyResponseV2"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -31391,8 +31391,8 @@ impl SurveyResponseBody { }; const _VARIANTS_STR: &[&str] = &["SurveyTopologyResponseV2"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -31959,8 +31959,8 @@ impl StellarMessage { "FloodDemand", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -32247,8 +32247,8 @@ impl AuthenticatedMessage { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -32383,8 +32383,8 @@ impl LiquidityPoolParameters { }; const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -32596,8 +32596,8 @@ impl MuxedAccount { }; const _VARIANTS_STR: &[&str] = &["Ed25519", "MuxedEd25519"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -32879,8 +32879,8 @@ impl OperationType { "RestoreFootprint", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -33632,8 +33632,8 @@ impl ChangeTrustAsset { }; const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -34120,8 +34120,8 @@ impl RevokeSponsorshipType { }; const _VARIANTS_STR: &[&str] = &["LedgerEntry", "Signer"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -34311,8 +34311,8 @@ impl RevokeSponsorshipOp { }; const _VARIANTS_STR: &[&str] = &["LedgerEntry", "Signer"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -34759,8 +34759,8 @@ impl HostFunctionType { "CreateContractV2", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -34892,8 +34892,8 @@ impl ContractIdPreimageType { }; const _VARIANTS_STR: &[&str] = &["Address", "Asset"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -35083,8 +35083,8 @@ impl ContractIdPreimage { }; const _VARIANTS_STR: &[&str] = &["Address", "Asset"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -35391,8 +35391,8 @@ impl HostFunction { "CreateContractV2", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -35543,8 +35543,8 @@ impl SorobanAuthorizedFunctionType { "CreateContractV2HostFn", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -35699,8 +35699,8 @@ impl SorobanAuthorizedFunction { "CreateContractV2HostFn", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -35951,8 +35951,8 @@ impl SorobanCredentialsType { }; const _VARIANTS_STR: &[&str] = &["SourceAccount", "Address"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -36089,8 +36089,8 @@ impl SorobanCredentials { }; const _VARIANTS_STR: &[&str] = &["SourceAccount", "Address"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -36658,8 +36658,8 @@ impl OperationBody { "RestoreFootprint", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -37299,8 +37299,8 @@ impl HashIdPreimage { "SorobanAuthorization", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -37451,8 +37451,8 @@ impl MemoType { }; const _VARIANTS_STR: &[&str] = &["None", "Text", "Id", "Hash", "Return"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -37613,8 +37613,8 @@ impl Memo { }; const _VARIANTS_STR: &[&str] = &["None", "Text", "Id", "Hash", "Return"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -37943,8 +37943,8 @@ impl PreconditionType { }; const _VARIANTS_STR: &[&str] = &["None", "Time", "V2"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -38087,8 +38087,8 @@ impl Preconditions { }; const _VARIANTS_STR: &[&str] = &["None", "Time", "V2"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -38385,8 +38385,8 @@ impl SorobanTransactionDataExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -38589,8 +38589,8 @@ impl TransactionV0Ext { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -38845,8 +38845,8 @@ impl TransactionExt { }; const _VARIANTS_STR: &[&str] = &["V0", "V1"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -39114,8 +39114,8 @@ impl FeeBumpTransactionInnerTx { }; const _VARIANTS_STR: &[&str] = &["Tx"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -39242,8 +39242,8 @@ impl FeeBumpTransactionExt { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -39495,8 +39495,8 @@ impl TransactionEnvelope { }; const _VARIANTS_STR: &[&str] = &["TxV0", "Tx", "TxFeeBump"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -39637,8 +39637,8 @@ impl TransactionSignaturePayloadTaggedTransaction { }; const _VARIANTS_STR: &[&str] = &["Tx", "TxFeeBump"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -39826,8 +39826,8 @@ impl ClaimAtomType { }; const _VARIANTS_STR: &[&str] = &["V0", "OrderBook", "LiquidityPool"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -40207,8 +40207,8 @@ impl ClaimAtom { }; const _VARIANTS_STR: &[&str] = &["V0", "OrderBook", "LiquidityPool"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -40361,8 +40361,8 @@ impl CreateAccountResultCode { "AlreadyExist", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -40520,8 +40520,8 @@ impl CreateAccountResult { "AlreadyExist", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -40699,8 +40699,8 @@ impl PaymentResultCode { "NoIssuer", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -40888,8 +40888,8 @@ impl PaymentResult { "NoIssuer", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -41108,8 +41108,8 @@ impl PathPaymentStrictReceiveResultCode { "OverSendmax", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -41428,8 +41428,8 @@ impl PathPaymentStrictReceiveResult { "OverSendmax", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -41662,8 +41662,8 @@ impl PathPaymentStrictSendResultCode { "UnderDestmin", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -41924,8 +41924,8 @@ impl PathPaymentStrictSendResult { "UnderDestmin", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -42157,8 +42157,8 @@ impl ManageSellOfferResultCode { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -42311,8 +42311,8 @@ impl ManageOfferEffect { }; const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Deleted"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -42454,8 +42454,8 @@ impl ManageOfferSuccessResultOffer { }; const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Deleted"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -42702,8 +42702,8 @@ impl ManageSellOfferResult { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -42932,8 +42932,8 @@ impl ManageBuyOfferResultCode { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -43139,8 +43139,8 @@ impl ManageBuyOfferResult { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -43356,8 +43356,8 @@ impl SetOptionsResultCode { "AuthRevocableRequired", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -43551,8 +43551,8 @@ impl SetOptionsResult { "AuthRevocableRequired", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -43753,8 +43753,8 @@ impl ChangeTrustResultCode { "NotAuthMaintainLiabilities", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -43936,8 +43936,8 @@ impl ChangeTrustResult { "NotAuthMaintainLiabilities", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -44122,8 +44122,8 @@ impl AllowTrustResultCode { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -44293,8 +44293,8 @@ impl AllowTrustResult { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -44472,8 +44472,8 @@ impl AccountMergeResultCode { "IsSponsor", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -44655,8 +44655,8 @@ impl AccountMergeResult { "IsSponsor", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -44808,8 +44808,8 @@ impl InflationResultCode { }; const _VARIANTS_STR: &[&str] = &["Success", "NotTime"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -44997,8 +44997,8 @@ impl InflationResult { }; const _VARIANTS_STR: &[&str] = &["Success", "NotTime"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -45147,8 +45147,8 @@ impl ManageDataResultCode { "InvalidName", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -45306,8 +45306,8 @@ impl ManageDataResult { "InvalidName", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -45449,8 +45449,8 @@ impl BumpSequenceResultCode { }; const _VARIANTS_STR: &[&str] = &["Success", "BadSeq"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -45587,8 +45587,8 @@ impl BumpSequenceResult { }; const _VARIANTS_STR: &[&str] = &["Success", "BadSeq"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -45735,8 +45735,8 @@ impl CreateClaimableBalanceResultCode { "Underfunded", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -45901,8 +45901,8 @@ impl CreateClaimableBalanceResult { "Underfunded", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -46072,8 +46072,8 @@ impl ClaimClaimableBalanceResultCode { "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -46243,8 +46243,8 @@ impl ClaimClaimableBalanceResult { "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -46402,8 +46402,8 @@ impl BeginSponsoringFutureReservesResultCode { }; const _VARIANTS_STR: &[&str] = &["Success", "Malformed", "AlreadySponsored", "Recursive"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -46551,8 +46551,8 @@ impl BeginSponsoringFutureReservesResult { }; const _VARIANTS_STR: &[&str] = &["Success", "Malformed", "AlreadySponsored", "Recursive"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -46692,8 +46692,8 @@ impl EndSponsoringFutureReservesResultCode { }; const _VARIANTS_STR: &[&str] = &["Success", "NotSponsored"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -46831,8 +46831,8 @@ impl EndSponsoringFutureReservesResult { }; const _VARIANTS_STR: &[&str] = &["Success", "NotSponsored"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -46983,8 +46983,8 @@ impl RevokeSponsorshipResultCode { "Malformed", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -47148,8 +47148,8 @@ impl RevokeSponsorshipResult { "Malformed", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -47312,8 +47312,8 @@ impl ClawbackResultCode { "Underfunded", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -47471,8 +47471,8 @@ impl ClawbackResult { "Underfunded", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -47621,8 +47621,8 @@ impl ClawbackClaimableBalanceResultCode { }; const _VARIANTS_STR: &[&str] = &["Success", "DoesNotExist", "NotIssuer", "NotClawbackEnabled"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -47770,8 +47770,8 @@ impl ClawbackClaimableBalanceResult { }; const _VARIANTS_STR: &[&str] = &["Success", "DoesNotExist", "NotIssuer", "NotClawbackEnabled"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -47931,8 +47931,8 @@ impl SetTrustLineFlagsResultCode { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -48096,8 +48096,8 @@ impl SetTrustLineFlagsResult { "LowReserve", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -48281,8 +48281,8 @@ impl LiquidityPoolDepositResultCode { "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -48464,8 +48464,8 @@ impl LiquidityPoolDepositResult { "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -48652,8 +48652,8 @@ impl LiquidityPoolWithdrawResultCode { "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -48823,8 +48823,8 @@ impl LiquidityPoolWithdrawResult { "TrustlineFrozen", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -48995,8 +48995,8 @@ impl InvokeHostFunctionResultCode { "InsufficientRefundableFee", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -49160,8 +49160,8 @@ impl InvokeHostFunctionResult { "InsufficientRefundableFee", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -49324,8 +49324,8 @@ impl ExtendFootprintTtlResultCode { "InsufficientRefundableFee", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -49477,8 +49477,8 @@ impl ExtendFootprintTtlResult { "InsufficientRefundableFee", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -49633,8 +49633,8 @@ impl RestoreFootprintResultCode { "InsufficientRefundableFee", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -49786,8 +49786,8 @@ impl RestoreFootprintResult { "InsufficientRefundableFee", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -49952,8 +49952,8 @@ impl OperationResultCode { "OpTooManySponsoring", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -50228,8 +50228,8 @@ impl OperationResultTr { "RestoreFootprint", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -50584,8 +50584,8 @@ impl OperationResult { "OpTooManySponsoring", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -50812,8 +50812,8 @@ impl TransactionResultCode { "TxFrozenKeyAccessed", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -51055,8 +51055,8 @@ impl InnerTransactionResultResult { "TxFrozenKeyAccessed", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -51255,8 +51255,8 @@ impl InnerTransactionResultExt { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -51606,8 +51606,8 @@ impl TransactionResultResult { "TxFrozenKeyAccessed", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -51818,8 +51818,8 @@ impl TransactionResultExt { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -52506,8 +52506,8 @@ impl ExtensionPoint { }; const _VARIANTS_STR: &[&str] = &["V0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -52648,8 +52648,8 @@ impl CryptoKeyType { "MuxedEd25519", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -52778,8 +52778,8 @@ impl PublicKeyType { }; const _VARIANTS_STR: &[&str] = &["PublicKeyTypeEd25519"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -52911,8 +52911,8 @@ impl SignerKeyType { }; const _VARIANTS_STR: &[&str] = &["Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -53044,8 +53044,8 @@ impl PublicKey { }; const _VARIANTS_STR: &[&str] = &["PublicKeyTypeEd25519"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -53273,8 +53273,8 @@ impl SignerKey { }; const _VARIANTS_STR: &[&str] = &["Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -54068,8 +54068,8 @@ impl BinaryFuseFilterType { }; const _VARIANTS_STR: &[&str] = &["B8Bit", "B16Bit", "B32Bit"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -54334,8 +54334,8 @@ impl ClaimableBalanceIdType { }; const _VARIANTS_STR: &[&str] = &["ClaimableBalanceIdTypeV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -54462,8 +54462,8 @@ impl ClaimableBalanceId { }; const _VARIANTS_STR: &[&str] = &["ClaimableBalanceIdTypeV0"]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -55975,8 +55975,8 @@ impl TypeVariant { "ClaimableBalanceId", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; @@ -59123,8 +59123,8 @@ impl Type { "ClaimableBalanceId", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [""; Self::_VARIANTS_STR.len()]; - let mut i = 0; + let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; + let mut i = 1; while i < Self::_VARIANTS_STR.len() { arr[i] = Self::_VARIANTS_STR[i]; i += 1; From ca899cb0f2144454edc0df6717ee77ac2ed7befc Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 23 Mar 2026 15:42:27 +1000 Subject: [PATCH 23/28] add peek_position and extract position_from_byte_offset --- xdr-generator-rust/xdr-parser/src/parser.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/xdr-generator-rust/xdr-parser/src/parser.rs b/xdr-generator-rust/xdr-parser/src/parser.rs index 1f801397..9dc8520e 100644 --- a/xdr-generator-rust/xdr-parser/src/parser.rs +++ b/xdr-generator-rust/xdr-parser/src/parser.rs @@ -1011,12 +1011,25 @@ impl Parser { } /// Compute the (line, column) for the current token position, both 1-based. + fn peek_position(&self) -> (usize, usize) { + let byte_offset = self + .tokens + .get(self.pos) + .map(|st| st.start) + .unwrap_or(self.source.len()); + self.position_from_byte_offset(byte_offset) + } + fn current_position(&self) -> (usize, usize) { let byte_offset = self .tokens .get(self.pos.saturating_sub(1)) .map(|st| st.start) .unwrap_or(self.source.len()); + self.position_from_byte_offset(byte_offset) + } + + fn position_from_byte_offset(&self, byte_offset: usize) -> (usize, usize) { let prefix = &self.source[..byte_offset.min(self.source.len())]; let line = prefix.chars().filter(|&c| c == '\n').count() + 1; let col = match prefix.rfind('\n') { @@ -1041,14 +1054,14 @@ impl Parser { }) } - /// Create an `UnexpectedToken` error with the current position. + /// Create an `UnexpectedDirective` error for the current (not-yet-consumed) token. fn make_unexpected_directive_error(&self) -> ParseError { let directive = match self.peek() { Token::Else => "else", Token::EndIf => "endif", _ => "unknown", }; - let (line, col) = self.current_position(); + let (line, col) = self.peek_position(); ParseError::UnexpectedDirective { directive: directive.to_string(), line, From d3df314e1bfa2180e27c190bd4521d72ef312a81 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 23 Mar 2026 20:55:02 +1000 Subject: [PATCH 24/28] expand generator tests to assert full output snippets --- .../generator/src/tests/generator.rs | 153 ++++++++++++++---- 1 file changed, 120 insertions(+), 33 deletions(-) diff --git a/xdr-generator-rust/generator/src/tests/generator.rs b/xdr-generator-rust/generator/src/tests/generator.rs index 3449ecfb..fb26ab36 100644 --- a/xdr-generator-rust/generator/src/tests/generator.rs +++ b/xdr-generator-rust/generator/src/tests/generator.rs @@ -16,6 +16,13 @@ fn generate_from_xdr(xdr: &str) -> String { template.render().unwrap() } +fn assert_contains(output: &str, expected: &str) { + assert!( + output.contains(expected), + "expected output to contain:\n{expected}\n\nfull output:\n{output}" + ); +} + #[test] fn test_ifdef_generates_cfg_on_struct() { let output = generate_from_xdr( @@ -25,13 +32,31 @@ fn test_ifdef_generates_cfg_on_struct() { #endif "#, ); - assert!( - output.contains(r#"#[cfg(feature = "feature_x")]"#), - "output should contain #[cfg(feature = \"feature_x\")]\n{output}" + assert_contains( + &output, + r#"#[cfg(feature = "feature_x")] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub struct Foo {"#, ); - assert!( - output.contains("pub struct Foo"), - "output should contain struct Foo\n{output}" + assert_contains( + &output, + r#"#[cfg(feature = "feature_x")] +impl ReadXdr for Foo {"#, + ); + assert_contains( + &output, + r#"#[cfg(feature = "feature_x")] +impl WriteXdr for Foo {"#, ); } @@ -46,18 +71,42 @@ fn test_ifdef_else_generates_both_cfgs() { #endif "#, ); - assert!( - output.contains(r#"#[cfg(feature = "feature_x")]"#), - "output should have feature_x cfg" + assert_contains( + &output, + r#"#[cfg(feature = "feature_x")] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub struct Foo {"#, ); - assert!( - output.contains(r#"#[cfg(not(feature = "feature_x"))]"#), - "output should have not(feature_x) cfg" + assert_contains( + &output, + r#"#[cfg(not(feature = "feature_x"))] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub struct Bar {"#, ); } #[test] -fn test_ifdef_same_name_both_branches_no_cfg() { +fn test_ifdef_same_name_both_branches() { let output = generate_from_xdr( r#" #ifdef FEATURE_X @@ -67,12 +116,44 @@ fn test_ifdef_same_name_both_branches_no_cfg() { #endif "#, ); - // When same name appears in both branches, cfg is cleared for the type enum - // entry since the type is always present. - assert!( - output.contains("TypeVariant::Foo"), - "type enum should include Foo" + assert_contains( + &output, + r#"#[cfg(feature = "feature_x")] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub struct Foo { + pub x: i32, +}"#, ); + assert_contains( + &output, + r#"#[cfg(not(feature = "feature_x"))] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub struct Foo { + pub y: i32, +}"#, + ); + // Same name in both branches: TypeVariant entry has no cfg + assert_contains(&output, "pub enum TypeVariant {\n Foo,\n}"); } #[test] @@ -87,15 +168,24 @@ fn test_ifdef_inline_enum_member_cfg() { }; "#, ); - // The enum itself should not have a top-level cfg - assert!( - output.contains("pub enum Color"), - "output should contain enum Color" + assert_contains( + &output, + r#"pub enum Color { + #[cfg_attr(feature = "alloc", default)] + Red = 0, + #[cfg(feature = "feature_x")] + Green = 1, +}"#, ); - // GREEN variant should be cfg-gated - assert!( - output.contains(r#"#[cfg(feature = "feature_x")]"#), - "output should cfg-gate GREEN" + assert_contains( + &output, + r#"let e = match i { + 0 => Color::Red, + #[cfg(feature = "feature_x")] + 1 => Color::Green, + #[allow(unreachable_patterns)] + _ => return Err(Error::Invalid), + };"#, ); } @@ -108,12 +198,9 @@ fn test_ifdef_generates_cfg_on_const() { #endif "#, ); - assert!( - output.contains(r#"#[cfg(feature = "feature_x")]"#), - "const should be cfg-gated" - ); - assert!( - output.contains("pub const MAX_SIZE: u64 = 100"), - "const should be present" + assert_contains( + &output, + r#"#[cfg(feature = "feature_x")] +pub const MAX_SIZE: u64 = 100;"#, ); } From ddf3dc88c5023fc17509ee315601fcf05d745f49 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 25 Mar 2026 14:41:38 +1000 Subject: [PATCH 25/28] remove curr and next and build off xdr main with features --- .github/workflows/rust.yml | 2 +- .gitmodules | 10 +- CONTRIBUTING.md | 12 +- Cargo.toml | 6 +- Makefile | 42 +- README.md | 17 +- src/{curr => }/account_conversions.rs | 0 src/cli/compare.rs | 41 +- src/cli/decode.rs | 45 +- src/cli/encode.rs | 92 +- src/cli/generate.rs | 8 +- src/cli/generate/arbitrary.rs | 71 +- src/cli/generate/default.rs | 73 +- src/cli/guess.rs | 43 +- src/cli/mod.rs | 33 +- src/cli/types.rs | 10 +- src/cli/types/list.rs | 18 +- src/cli/types/schema.rs | 21 +- src/cli/types/schema_files.rs | 21 +- src/cli/version.rs | 7 +- src/cli/xfile/mod.rs | 4 +- src/curr/mod.rs | 22 - src/curr/scval_validations.rs | 180 - src/{curr => }/default.rs | 0 src/{curr => }/generated.rs | 161 +- src/{curr => }/jsonschema.rs | 0 src/{curr => }/ledgerkey.rs | 0 src/lib.rs | 60 +- src/next/account_conversions.rs | 25 - src/next/default.rs | 10 - src/next/generated.rs | 74339 -------------------- src/next/jsonschema.rs | 36 - src/next/ledgerkey.rs | 187 - src/next/mod.rs | 22 - src/next/scmap.rs | 75 - src/next/scval_conversions.rs | 860 - src/next/str.rs | 520 - src/next/transaction_conversions.rs | 96 - src/next/tx_auths.rs | 168 - src/next/tx_hash.rs | 182 - src/{curr => }/scmap.rs | 0 src/{curr => }/scval_conversions.rs | 0 src/{next => }/scval_validations.rs | 2 +- src/{curr => }/str.rs | 12 +- src/{curr => }/transaction_conversions.rs | 0 src/{curr => }/tx_auths.rs | 0 src/{curr => }/tx_hash.rs | 0 tests/account_conversions.rs | 9 +- tests/arbitrary.rs | 4 +- tests/default.rs | 11 +- tests/ledgerkey_to_key.rs | 9 +- tests/serde.rs | 18 +- tests/serde_ints.rs | 3 +- tests/serde_tx.rs | 4 +- tests/serde_tx_schema.rs | 3 +- tests/str.rs | 3 +- tests/stringm.rs | 9 +- tests/tx_auths.rs | 13 +- tests/tx_base64_skip_whitespace.rs | 9 +- tests/tx_debug_display.rs | 9 +- tests/tx_hash.rs | 12 +- tests/tx_prot18.rs | 9 +- tests/tx_read_edge_cases.rs | 9 +- tests/tx_small.rs | 9 +- tests/vecm.rs | 9 +- xdr | 1 + xdr/curr-version => xdr-version | 0 xdr/curr | 1 - xdr/next | 1 - xdr/next-version | 1 - 70 files changed, 376 insertions(+), 77313 deletions(-) rename src/{curr => }/account_conversions.rs (100%) delete mode 100644 src/curr/mod.rs delete mode 100644 src/curr/scval_validations.rs rename src/{curr => }/default.rs (100%) rename src/{curr => }/generated.rs (99%) rename src/{curr => }/jsonschema.rs (100%) rename src/{curr => }/ledgerkey.rs (100%) delete mode 100644 src/next/account_conversions.rs delete mode 100644 src/next/default.rs delete mode 100644 src/next/generated.rs delete mode 100644 src/next/jsonschema.rs delete mode 100644 src/next/ledgerkey.rs delete mode 100644 src/next/mod.rs delete mode 100644 src/next/scmap.rs delete mode 100644 src/next/scval_conversions.rs delete mode 100644 src/next/str.rs delete mode 100644 src/next/transaction_conversions.rs delete mode 100644 src/next/tx_auths.rs delete mode 100644 src/next/tx_hash.rs rename src/{curr => }/scmap.rs (100%) rename src/{curr => }/scval_conversions.rs (100%) rename src/{next => }/scval_validations.rs (99%) rename src/{curr => }/str.rs (98%) rename src/{curr => }/transaction_conversions.rs (100%) rename src/{curr => }/tx_auths.rs (100%) rename src/{curr => }/tx_hash.rs (100%) create mode 160000 xdr rename xdr/curr-version => xdr-version (100%) delete mode 160000 xdr/curr delete mode 160000 xdr/next delete mode 100644 xdr/next-version diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 714865be..8f23abce 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -91,7 +91,7 @@ jobs: version: 0.5.16 - name: Run minimal clippy checks on wasm32v1-none if: matrix.sys.target == 'wasm32v1-none' - run: cargo clippy --target ${{ matrix.sys.target }} --no-default-features --features curr,next + run: cargo clippy --target ${{ matrix.sys.target }} --no-default-features - name: Run full clippy checks on other targets if: matrix.sys.target != 'wasm32v1-none' run: cargo hack clippy $CARGO_HACK_ARGS --target ${{ matrix.sys.target }} --all-targets diff --git a/.gitmodules b/.gitmodules index 71a02736..bc43f968 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,8 +1,4 @@ -[submodule "xdr/next"] - path = xdr/next +[submodule "xdr"] + path = xdr url = https://github.com/stellar/stellar-xdr - branch = next -[submodule "xdr/curr"] - path = xdr/curr - url = https://github.com/stellar/stellar-xdr - branch = curr + branch = main diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6757c808..051f21d6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## XDR Generator -This repository has an XDR-to-Rust code generator (`xdr-generator-rust/`) that generates Rust types from XDR definitions. It outputs to `src/*/generated.rs`. +This repository has an XDR-to-Rust code generator (`xdr-generator-rust/`) that generates Rust types from XDR definitions. It outputs to `src/generated.rs`. ## How to Regenerate From XDR To regenerate types from XDR definitions: @@ -15,13 +15,7 @@ To regenerate types from XDR definitions: The `--init` flag is only required for the first time setting up the local project. `--remote` flag will make sure to fetch the latest changes from - from the remote-tracking branches `curr` and `next` at [stellar/stellar-xdr]. - - If you have multiple remotes specified in the submodules (e.g. one - *tracking `stellar/stellar-xdr`, the other tracking `your-fork/stellar-xdr`), - make sure the remote that tracks [stellar/stellar-xdr] match with what's - specifies in the `.git/config` or `.gitsubmodules` (with `.git/config` taking - precedence. If neither file specifies it, then `origin` is used). + the remote-tracking branch `main` at [stellar/stellar-xdr]. 2. Recompile and test @@ -29,4 +23,4 @@ To regenerate types from XDR definitions: make clean generate ``` - When the regenerated types are ready to be merged, make sure to commit the regenerated code file `src/curr/generated.rs`, `src/next/generated.rs`, the version string file `xdr/curr-version`, `xdr/next-version`, as well as the submodule files `xdr/curr`, `xdr/next`. + When the regenerated types are ready to be merged, make sure to commit the regenerated code file `src/generated.rs`, the version string file `xdr-version`, as well as the submodule file `xdr`. diff --git a/Cargo.toml b/Cargo.toml index b4241192..6afb3af8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,11 +40,9 @@ serde_json = "1.0.89" bytes-lit = "0.0.5" [features] -default = ["std", "curr"] +default = ["std"] std = ["alloc", "dep:sha2"] alloc = ["dep:hex", "dep:stellar-strkey", "escape-bytes/alloc", "dep:ethnum"] -curr = [] -next = [] # Features dependent on optional dependencies. base64 = ["std", "dep:base64"] @@ -56,7 +54,7 @@ hex = [] rand = ["dep:rand"] # Features for the CLI. -cli = ["std", "curr", "next", "base64", "serde", "serde_json", "schemars", "arbitrary", "rand", "dep:clap", "dep:thiserror", "dep:ethnum"] +cli = ["std", "base64", "serde", "serde_json", "schemars", "arbitrary", "rand", "dep:clap", "dep:thiserror", "dep:ethnum"] [package.metadata.docs.rs] all-features = true diff --git a/Makefile b/Makefile index 4b9aa200..ccba960d 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ test: build: generate cargo hack clippy $(CARGO_HACK_ARGS) --all-targets - cargo clippy --no-default-features --features curr,next --release --target wasm32v1-none + cargo clippy --no-default-features --release --target wasm32v1-none doc: cargo test --doc --all-features @@ -30,48 +30,32 @@ readme: watch: cargo watch --clear --watch-when-idle --shell '$(MAKE)' -generate: generate-files xdr/curr-version xdr/next-version xdr-json/curr xdr-json/next +generate: generate-files xdr-version xdr-json CUSTOM_DEFAULT_IMPL=TransactionEnvelope CUSTOM_STR_IMPL=PublicKey,AccountId,ContractId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId,PoolId,MuxedEd25519Account,Int128Parts,UInt128Parts,Int256Parts,UInt256Parts -generate-files: src/curr/generated.rs src/next/generated.rs +generate-files: src/generated.rs -src/curr/generated.rs: $(sort $(wildcard xdr/curr/*.x)) +src/generated.rs: $(sort $(wildcard xdr/*.x)) cargo run --manifest-path xdr-generator-rust/generator/Cargo.toml -- \ - $(addprefix --input ,$(sort $(wildcard xdr/curr/*.x))) \ + $(addprefix --input ,$(sort $(wildcard xdr/*.x))) \ --output $@ \ --custom-default $(CUSTOM_DEFAULT_IMPL) \ --custom-str $(CUSTOM_STR_IMPL) rustfmt $@ -src/next/generated.rs: $(sort $(wildcard xdr/next/*.x)) - cargo run --manifest-path xdr-generator-rust/generator/Cargo.toml -- \ - $(addprefix --input ,$(sort $(wildcard xdr/next/*.x))) \ - --output $@ \ - --custom-default $(CUSTOM_DEFAULT_IMPL) \ - --custom-str $(CUSTOM_STR_IMPL) - rustfmt $@ - -xdr/curr-version: $(wildcard .git/modules/xdr/curr/**/*) $(wildcard xdr/curr/*.x) - git submodule status -- xdr/curr | sed 's/^ *//g' | cut -f 1 -d " " | tr -d '\n' | tr -d '+' > xdr/curr-version - -xdr/next-version: $(wildcard .git/modules/xdr/next/**/*) $(wildcard xdr/next/*.x) - git submodule status -- xdr/next | sed 's/^ *//g' | cut -f 1 -d " " | tr -d '\n' | tr -d '+' > xdr/next-version - -xdr-json/curr: src/curr/generated.rs - mkdir -p xdr-json/curr - cargo run --features cli -- +curr types schema-files --out-dir xdr-json/curr +xdr-version: $(wildcard .git/modules/xdr/**/*) $(wildcard xdr/*.x) + git submodule status -- xdr | sed 's/^ *//g' | cut -f 1 -d " " | tr -d '\n' | tr -d '+' > xdr-version -xdr-json/next: src/next/generated.rs - mkdir -p xdr-json/next - cargo run --features cli -- +next types schema-files --out-dir xdr-json/next +xdr-json: src/generated.rs + mkdir -p xdr-json + cargo run --features cli -- types schema-files --out-dir xdr-json clean: - rm -f src/*/generated.rs - rm -f xdr/*-version - rm -fr xdr-json/curr - rm -fr xdr-json/next + rm -f src/generated.rs + rm -f xdr-version + rm -fr xdr-json cargo clean --quiet fmt: diff --git a/README.md b/README.md index d6bf10f3..90ebf7de 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,10 @@ stellar-xdr = { version = "...", default-features = true, features = [] } #### Features -The crate has several features, tiers of functionality, ancillary -functionality, and channels of XDR. +The crate has several features, tiers of functionality, and ancillary +functionality. -Default features: `std`, `curr`. +Default features: `std`. Tiers of functionality: @@ -57,15 +57,6 @@ Automatically enabled when serde is enabled. Features marked experimental may disappear at anytime, see breaking changes at anytime, or and may be minimal implementations instead of complete. -Channels of XDR: - -- `curr` – XDR types built from the `stellar/stellar-xdr` `curr` branch. -- `next` – XDR types built from the `stellar/stellar-xdr` `next` branch. - -If a single channel is enabled the types are available at the root of the -crate. If multiple channels are enabled they are available in modules at -the root of the crate. - ### CLI To use the CLI: @@ -85,7 +76,7 @@ AAAAA... Parse a `ScSpecEntry` stream from a contract: ```console -stellar-xdr +next decode --type ScSpecEntry --input stream-base64 --output json-formatted << - +stellar-xdr decode --type ScSpecEntry --input stream-base64 --output json-formatted << - AAAAA... - ``` diff --git a/src/curr/account_conversions.rs b/src/account_conversions.rs similarity index 100% rename from src/curr/account_conversions.rs rename to src/account_conversions.rs diff --git a/src/cli/compare.rs b/src/cli/compare.rs index cc479c98..952d7639 100644 --- a/src/cli/compare.rs +++ b/src/cli/compare.rs @@ -8,16 +8,12 @@ use std::{ use clap::{Args, ValueEnum}; -use crate::cli::Channel; - #[derive(thiserror::Error, Debug)] pub enum Error { #[error("unknown type {0}, choose one of {1:?}")] UnknownType(String, &'static [&'static str]), #[error("error decoding XDR: {0}")] - ReadXdrCurr(#[from] crate::curr::Error), - #[error("error decoding XDR: {0}")] - ReadXdrNext(#[from] crate::next::Error), + ReadXdr(#[from] crate::Error), #[error("error reading file: {0}")] ReadFile(std::io::Error), #[error("error writing output: {0}")] @@ -62,34 +58,36 @@ impl Default for InputFormat { } } +// TODO: Remove run_x macro, it exists only to reduce the diff from when curr/next +// channels existed and each had their own run_curr/run_next invocation. macro_rules! run_x { - ($f:ident, $m:ident) => { + ($f:ident) => { fn $f(&self) -> Result<(), Error> { let f1 = File::open(&self.left).map_err(Error::ReadFile)?; let f2 = File::open(&self.right).map_err(Error::ReadFile)?; - let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) + let r#type = crate::TypeVariant::from_str(&self.r#type).map_err(|_| { + Error::UnknownType(self.r#type.clone(), &crate::TypeVariant::VARIANTS_STR) })?; let (t1, t2) = match self.input { InputFormat::Single => { let t1 = { - let mut l1 = crate::$m::Limited::new(f1, crate::$m::Limits::none()); - crate::$m::Type::read_xdr_to_end(r#type, &mut l1)? + let mut l1 = crate::Limited::new(f1, crate::Limits::none()); + crate::Type::read_xdr_to_end(r#type, &mut l1)? }; let t2 = { - let mut l = crate::$m::Limited::new(f2, crate::$m::Limits::none()); - crate::$m::Type::read_xdr_to_end(r#type, &mut l)? + let mut l = crate::Limited::new(f2, crate::Limits::none()); + crate::Type::read_xdr_to_end(r#type, &mut l)? }; (t1, t2) } InputFormat::SingleBase64 => { let t1 = { - let mut l = crate::$m::Limited::new(f1, crate::$m::Limits::none()); - crate::$m::Type::read_xdr_base64_to_end(r#type, &mut l)? + let mut l = crate::Limited::new(f1, crate::Limits::none()); + crate::Type::read_xdr_base64_to_end(r#type, &mut l)? }; let t2 = { - let mut l = crate::$m::Limited::new(f2, crate::$m::Limits::none()); - crate::$m::Type::read_xdr_base64_to_end(r#type, &mut l)? + let mut l = crate::Limited::new(f2, crate::Limits::none()); + crate::Type::read_xdr_base64_to_end(r#type, &mut l)? }; (t1, t2) } @@ -107,12 +105,8 @@ impl Cmd { /// ## Errors /// /// If the command is configured with state that is invalid. - pub fn run(&self, channel: &Channel) -> Result<(), Error> { - let result = match channel { - Channel::Curr => self.run_curr(), - Channel::Next => self.run_next(), - }; - + pub fn run(&self) -> Result<(), Error> { + let result = self.run_inner(); match result { Ok(()) => Ok(()), Err(Error::WriteOutput(e)) if e.kind() == std::io::ErrorKind::BrokenPipe => Ok(()), @@ -120,6 +114,5 @@ impl Cmd { } } - run_x!(run_curr, curr); - run_x!(run_next, next); + run_x!(run_inner); } diff --git a/src/cli/decode.rs b/src/cli/decode.rs index f13f2ba2..aad5eb58 100644 --- a/src/cli/decode.rs +++ b/src/cli/decode.rs @@ -5,16 +5,14 @@ use std::{fmt::Debug, str::FromStr}; use clap::{Args, ValueEnum}; use serde::Serialize; -use crate::cli::{util, Channel}; +use crate::cli::util; #[derive(thiserror::Error, Debug)] pub enum Error { #[error("unknown type {0}, choose one of {1:?}")] UnknownType(String, &'static [&'static str]), #[error("error decoding XDR: {0}")] - ReadXdrCurr(#[from] crate::curr::Error), - #[error("error decoding XDR: {0}")] - ReadXdrNext(#[from] crate::next::Error), + ReadXdr(#[from] crate::Error), #[error("error reading file: {0}")] ReadFile(std::io::Error), #[error("error writing output: {0}")] @@ -75,40 +73,42 @@ impl Default for OutputFormat { } } +// TODO: Remove run_x macro, it exists only to reduce the diff from when curr/next +// channels existed and each had their own run_curr/run_next invocation. macro_rules! run_x { - ($f:ident, $m:ident) => { + ($f:ident) => { fn $f(&self) -> Result<(), Error> { let mut input = util::parse_input(&self.input).map_err(Error::ReadFile)?; - let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) + let r#type = crate::TypeVariant::from_str(&self.r#type).map_err(|_| { + Error::UnknownType(self.r#type.clone(), &crate::TypeVariant::VARIANTS_STR) })?; for f in &mut input { match self.input_format { InputFormat::Single => { - let mut l = crate::$m::Limited::new(f, crate::$m::Limits::none()); - let t = crate::$m::Type::read_xdr_to_end(r#type, &mut l)?; + let mut l = crate::Limited::new(f, crate::Limits::none()); + let t = crate::Type::read_xdr_to_end(r#type, &mut l)?; self.out(&t)?; } InputFormat::SingleBase64 => { - let mut l = crate::$m::Limited::new(f, crate::$m::Limits::none()); - let t = crate::$m::Type::read_xdr_base64_to_end(r#type, &mut l)?; + let mut l = crate::Limited::new(f, crate::Limits::none()); + let t = crate::Type::read_xdr_base64_to_end(r#type, &mut l)?; self.out(&t)?; } InputFormat::Stream => { - let mut l = crate::$m::Limited::new(f, crate::$m::Limits::none()); - for t in crate::$m::Type::read_xdr_iter(r#type, &mut l) { + let mut l = crate::Limited::new(f, crate::Limits::none()); + for t in crate::Type::read_xdr_iter(r#type, &mut l) { self.out(&t?)?; } } InputFormat::StreamBase64 => { - let mut l = crate::$m::Limited::new(f, crate::$m::Limits::none()); - for t in crate::$m::Type::read_xdr_base64_iter(r#type, &mut l) { + let mut l = crate::Limited::new(f, crate::Limits::none()); + for t in crate::Type::read_xdr_base64_iter(r#type, &mut l) { self.out(&t?)?; } } InputFormat::StreamFramed => { - let mut l = crate::$m::Limited::new(f, crate::$m::Limits::none()); - for t in crate::$m::Type::read_xdr_framed_iter(r#type, &mut l) { + let mut l = crate::Limited::new(f, crate::Limits::none()); + for t in crate::Type::read_xdr_framed_iter(r#type, &mut l) { self.out(&t?)?; } } @@ -125,12 +125,8 @@ impl Cmd { /// ## Errors /// /// If the command is configured with state that is invalid. - pub fn run(&self, channel: &Channel) -> Result<(), Error> { - let result = match channel { - Channel::Curr => self.run_curr(), - Channel::Next => self.run_next(), - }; - + pub fn run(&self) -> Result<(), Error> { + let result = self.run_inner(); match result { Ok(()) => Ok(()), Err(Error::WriteOutput(e)) if e.kind() == std::io::ErrorKind::BrokenPipe => Ok(()), @@ -138,8 +134,7 @@ impl Cmd { } } - run_x!(run_curr, curr); - run_x!(run_next, next); + run_x!(run_inner); fn out(&self, v: &(impl Serialize + Debug)) -> Result<(), Error> { let text = match self.output_format { diff --git a/src/cli/encode.rs b/src/cli/encode.rs index abc968d2..e05c6aee 100644 --- a/src/cli/encode.rs +++ b/src/cli/encode.rs @@ -6,60 +6,37 @@ use std::{ use clap::{Args, ValueEnum}; -use crate::cli::{util, Channel}; +use crate::cli::util; #[derive(thiserror::Error, Debug)] pub enum Error { #[error("unknown type {0}, choose one of {1:?}")] UnknownType(String, &'static [&'static str]), #[error("error decoding JSON: {0}")] - ReadJsonCurr(crate::curr::Error), - #[error("error decoding JSON: {0}")] - ReadJsonNext(crate::next::Error), + ReadJson(crate::Error), #[error("error reading file: {0}")] ReadFile(std::io::Error), #[error("error writing output: {0}")] WriteOutput(std::io::Error), #[error("error generating XDR: {0}")] - WriteXdrCurr(crate::curr::Error), - #[error("error generating XDR: {0}")] - WriteXdrNext(crate::next::Error), -} - -impl From for Error { - fn from(e: crate::curr::Error) -> Self { - match e { - crate::curr::Error::Invalid - | crate::curr::Error::Unsupported - | crate::curr::Error::LengthExceedsMax - | crate::curr::Error::LengthMismatch - | crate::curr::Error::NonZeroPadding - | crate::curr::Error::Utf8Error(_) - | crate::curr::Error::InvalidHex - | crate::curr::Error::Io(_) - | crate::curr::Error::DepthLimitExceeded - | crate::curr::Error::LengthLimitExceeded - | crate::curr::Error::Arbitrary(_) => Error::WriteXdrCurr(e), - crate::curr::Error::Json(_) => Error::ReadJsonCurr(e), - } - } + WriteXdr(crate::Error), } -impl From for Error { - fn from(e: crate::next::Error) -> Self { +impl From for Error { + fn from(e: crate::Error) -> Self { match e { - crate::next::Error::Invalid - | crate::next::Error::Unsupported - | crate::next::Error::LengthExceedsMax - | crate::next::Error::LengthMismatch - | crate::next::Error::NonZeroPadding - | crate::next::Error::Utf8Error(_) - | crate::next::Error::InvalidHex - | crate::next::Error::Io(_) - | crate::next::Error::DepthLimitExceeded - | crate::next::Error::LengthLimitExceeded - | crate::next::Error::Arbitrary(_) => Error::WriteXdrNext(e), - crate::next::Error::Json(_) => Error::ReadJsonNext(e), + crate::Error::Invalid + | crate::Error::Unsupported + | crate::Error::LengthExceedsMax + | crate::Error::LengthMismatch + | crate::Error::NonZeroPadding + | crate::Error::Utf8Error(_) + | crate::Error::InvalidHex + | crate::Error::Io(_) + | crate::Error::DepthLimitExceeded + | crate::Error::LengthLimitExceeded + | crate::Error::Arbitrary(_) => Error::WriteXdr(e), + crate::Error::Json(_) => Error::ReadJson(e), } } } @@ -110,27 +87,29 @@ impl Default for OutputFormat { } } +// TODO: Remove run_x macro, it exists only to reduce the diff from when curr/next +// channels existed and each had their own run_curr/run_next invocation. macro_rules! run_x { - ($f:ident, $m:ident) => { + ($f:ident) => { fn $f(&self) -> Result<(), Error> { - use crate::$m::WriteXdr; + use crate::WriteXdr; let mut input = util::parse_input(&self.input).map_err(Error::ReadFile)?; - let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) + let r#type = crate::TypeVariant::from_str(&self.r#type).map_err(|_| { + Error::UnknownType(self.r#type.clone(), &crate::TypeVariant::VARIANTS_STR) })?; for f in &mut input { match self.input_format { InputFormat::Json => match self.output_format { OutputFormat::Single => { - let t = crate::$m::Type::from_json(r#type, f)?; - let l = crate::$m::Limits::none(); + let t = crate::Type::from_json(r#type, f)?; + let l = crate::Limits::none(); stdout() .write_all(&t.to_xdr(l)?) .map_err(Error::WriteOutput)?; } OutputFormat::SingleBase64 => { - let t = crate::$m::Type::from_json(r#type, f)?; - let l = crate::$m::Limits::none(); + let t = crate::Type::from_json(r#type, f)?; + let l = crate::Limits::none(); writeln!(stdout(), "{}", t.to_xdr_base64(l)?) .map_err(Error::WriteOutput)? } @@ -138,14 +117,14 @@ macro_rules! run_x { let mut de = serde_json::Deserializer::new(serde_json::de::IoRead::new(f)); loop { - let t = match crate::$m::Type::deserialize_json(r#type, &mut de) { + let t = match crate::Type::deserialize_json(r#type, &mut de) { Ok(t) => t, - Err(crate::$m::Error::Json(ref inner)) if inner.is_eof() => { + Err(crate::Error::Json(ref inner)) if inner.is_eof() => { break; } Err(e) => Err(e)?, }; - let l = crate::$m::Limits::none(); + let l = crate::Limits::none(); stdout() .write_all(&t.to_xdr(l)?) .map_err(Error::WriteOutput)?; @@ -165,12 +144,8 @@ impl Cmd { /// ## Errors /// /// If the command is configured with state that is invalid. - pub fn run(&self, channel: &Channel) -> Result<(), Error> { - let result = match channel { - Channel::Curr => self.run_curr(), - Channel::Next => self.run_next(), - }; - + pub fn run(&self) -> Result<(), Error> { + let result = self.run_inner(); match result { Ok(()) => Ok(()), Err(Error::WriteOutput(e)) if e.kind() == std::io::ErrorKind::BrokenPipe => Ok(()), @@ -178,6 +153,5 @@ impl Cmd { } } - run_x!(run_curr, curr); - run_x!(run_next, next); + run_x!(run_inner); } diff --git a/src/cli/generate.rs b/src/cli/generate.rs index 6df26c5e..00d76ee7 100644 --- a/src/cli/generate.rs +++ b/src/cli/generate.rs @@ -3,8 +3,6 @@ pub mod default; use clap::{Args, Subcommand}; -use crate::cli::Channel; - #[derive(thiserror::Error, Debug)] pub enum Error { #[error("{0}")] @@ -37,10 +35,10 @@ impl Cmd { /// ## Panics /// /// If the sub-command panics. - pub fn run(&self, channel: &Channel) -> Result<(), Error> { + pub fn run(&self) -> Result<(), Error> { match &self.sub { - Sub::Default(c) => c.run(channel)?, - Sub::Arbitrary(c) => c.run(channel)?, + Sub::Default(c) => c.run()?, + Sub::Arbitrary(c) => c.run()?, } Ok(()) } diff --git a/src/cli/generate/arbitrary.rs b/src/cli/generate/arbitrary.rs index 7061cb47..af29b916 100644 --- a/src/cli/generate/arbitrary.rs +++ b/src/cli/generate/arbitrary.rs @@ -5,7 +5,7 @@ use std::{ str::FromStr, }; -use crate::cli::{util, Channel}; +use crate::cli::util; #[derive(thiserror::Error, Debug)] pub enum Error { @@ -14,9 +14,7 @@ pub enum Error { #[error("error reading file: {0}")] ReadFile(#[from] std::io::Error), #[error("error generating XDR: {0}")] - WriteXdrCurr(crate::curr::Error), - #[error("error generating XDR: {0}")] - WriteXdrNext(crate::next::Error), + WriteXdr(#[from] crate::Error), #[error("error generating JSON: {0}")] GenerateJson(#[from] serde_json::Error), #[error("error generating arbitrary value: {0}")] @@ -25,44 +23,6 @@ pub enum Error { TextUnsupported, } -impl From for Error { - fn from(e: crate::curr::Error) -> Self { - match e { - crate::curr::Error::Invalid - | crate::curr::Error::Unsupported - | crate::curr::Error::LengthExceedsMax - | crate::curr::Error::LengthMismatch - | crate::curr::Error::NonZeroPadding - | crate::curr::Error::Utf8Error(_) - | crate::curr::Error::InvalidHex - | crate::curr::Error::Io(_) - | crate::curr::Error::DepthLimitExceeded - | crate::curr::Error::LengthLimitExceeded - | crate::curr::Error::Arbitrary(_) - | crate::curr::Error::Json(_) => Error::WriteXdrCurr(e), - } - } -} - -impl From for Error { - fn from(e: crate::next::Error) -> Self { - match e { - crate::next::Error::Invalid - | crate::next::Error::Unsupported - | crate::next::Error::LengthExceedsMax - | crate::next::Error::LengthMismatch - | crate::next::Error::NonZeroPadding - | crate::next::Error::Utf8Error(_) - | crate::next::Error::InvalidHex - | crate::next::Error::Io(_) - | crate::next::Error::DepthLimitExceeded - | crate::next::Error::LengthLimitExceeded - | crate::next::Error::Arbitrary(_) - | crate::next::Error::Json(_) => Error::WriteXdrNext(e), - } - } -} - /// Generate arbitrary XDR values #[derive(Args, Debug, Clone)] #[command()] @@ -94,23 +54,25 @@ impl Default for OutputFormat { } } +// TODO: Remove run_x macro, it exists only to reduce the diff from when curr/next +// channels existed and each had their own run_curr/run_next invocation. macro_rules! run_x { - ($f:ident, $m:ident) => { + ($f:ident) => { fn $f(&self) -> Result<(), Error> { - use crate::$m::WriteXdr; - let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) + use crate::WriteXdr; + let r#type = crate::TypeVariant::from_str(&self.r#type).map_err(|_| { + Error::UnknownType(self.r#type.clone(), &crate::TypeVariant::VARIANTS_STR) })?; let r = rand::random::<[u8; 10_240]>(); let mut u = Unstructured::new(&r); - let v = crate::$m::Type::arbitrary(r#type, &mut u)?; + let v = crate::Type::arbitrary(r#type, &mut u)?; match self.output_format { OutputFormat::Single => { - let l = crate::$m::Limits::none(); + let l = crate::Limits::none(); stdout().write_all(&v.to_xdr(l)?)? } OutputFormat::SingleBase64 => { - let l = crate::$m::Limits::none(); + let l = crate::Limits::none(); println!("{}", v.to_xdr_base64(l)?) } OutputFormat::Json => { @@ -136,14 +98,9 @@ impl Cmd { /// ## Errors /// /// If the command is configured with state that is invalid. - pub fn run(&self, channel: &Channel) -> Result<(), Error> { - match channel { - Channel::Curr => self.run_curr()?, - Channel::Next => self.run_next()?, - } - Ok(()) + pub fn run(&self) -> Result<(), Error> { + self.run_inner() } - run_x!(run_curr, curr); - run_x!(run_next, next); + run_x!(run_inner); } diff --git a/src/cli/generate/default.rs b/src/cli/generate/default.rs index 13ed7ee3..8144a045 100644 --- a/src/cli/generate/default.rs +++ b/src/cli/generate/default.rs @@ -4,7 +4,7 @@ use std::{ str::FromStr, }; -use crate::cli::{util, Channel}; +use crate::cli::util; #[derive(thiserror::Error, Debug)] pub enum Error { @@ -13,55 +13,13 @@ pub enum Error { #[error("error reading file: {0}")] ReadFile(#[from] std::io::Error), #[error("error generating XDR: {0}")] - WriteXdrCurr(crate::curr::Error), - #[error("error generating XDR: {0}")] - WriteXdrNext(crate::next::Error), + WriteXdr(#[from] crate::Error), #[error("error generating JSON: {0}")] GenerateJson(#[from] serde_json::Error), - #[error("error generating arbitrary value: {0}")] - Arbitrary(#[from] arbitrary::Error), #[error("type doesn't have a text representation, use 'json' as output")] TextUnsupported, } -impl From for Error { - fn from(e: crate::curr::Error) -> Self { - match e { - crate::curr::Error::Invalid - | crate::curr::Error::Unsupported - | crate::curr::Error::LengthExceedsMax - | crate::curr::Error::LengthMismatch - | crate::curr::Error::NonZeroPadding - | crate::curr::Error::Utf8Error(_) - | crate::curr::Error::InvalidHex - | crate::curr::Error::Io(_) - | crate::curr::Error::DepthLimitExceeded - | crate::curr::Error::LengthLimitExceeded - | crate::curr::Error::Arbitrary(_) - | crate::curr::Error::Json(_) => Error::WriteXdrCurr(e), - } - } -} - -impl From for Error { - fn from(e: crate::next::Error) -> Self { - match e { - crate::next::Error::Invalid - | crate::next::Error::Unsupported - | crate::next::Error::LengthExceedsMax - | crate::next::Error::LengthMismatch - | crate::next::Error::NonZeroPadding - | crate::next::Error::Utf8Error(_) - | crate::next::Error::InvalidHex - | crate::next::Error::Io(_) - | crate::next::Error::DepthLimitExceeded - | crate::next::Error::LengthLimitExceeded - | crate::next::Error::Arbitrary(_) - | crate::next::Error::Json(_) => Error::WriteXdrNext(e), - } - } -} - /// Generate default XDR values #[derive(Args, Debug, Clone)] #[command()] @@ -93,21 +51,23 @@ impl Default for OutputFormat { } } +// TODO: Remove run_x macro, it exists only to reduce the diff from when curr/next +// channels existed and each had their own run_curr/run_next invocation. macro_rules! run_x { - ($f:ident, $m:ident) => { + ($f:ident) => { fn $f(&self) -> Result<(), Error> { - use crate::$m::WriteXdr; - let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) + use crate::WriteXdr; + let r#type = crate::TypeVariant::from_str(&self.r#type).map_err(|_| { + Error::UnknownType(self.r#type.clone(), &crate::TypeVariant::VARIANTS_STR) })?; - let v = crate::$m::Type::default(r#type); + let v = crate::Type::default(r#type); match self.output_format { OutputFormat::Single => { - let l = crate::$m::Limits::none(); + let l = crate::Limits::none(); stdout().write_all(&v.to_xdr(l)?)? } OutputFormat::SingleBase64 => { - let l = crate::$m::Limits::none(); + let l = crate::Limits::none(); println!("{}", v.to_xdr_base64(l)?) } OutputFormat::Json => { @@ -133,14 +93,9 @@ impl Cmd { /// ## Errors /// /// If the command is configured with state that is invalid. - pub fn run(&self, channel: &Channel) -> Result<(), Error> { - match channel { - Channel::Curr => self.run_curr()?, - Channel::Next => self.run_next()?, - } - Ok(()) + pub fn run(&self) -> Result<(), Error> { + self.run_inner() } - run_x!(run_curr, curr); - run_x!(run_next, next); + run_x!(run_inner); } diff --git a/src/cli/guess.rs b/src/cli/guess.rs index 3f987e81..c0f0fa21 100644 --- a/src/cli/guess.rs +++ b/src/cli/guess.rs @@ -5,15 +5,11 @@ use std::fs::File; use std::io::{self, stdin, stdout, Cursor, Read, Write}; use std::path::Path; -use crate::cli::Channel; - #[derive(thiserror::Error, Debug)] #[allow(clippy::enum_variant_names)] pub enum Error { #[error("error decoding XDR: {0}")] - ReadXdrCurr(#[from] crate::curr::Error), - #[error("error decoding XDR: {0}")] - ReadXdrNext(#[from] crate::next::Error), + ReadXdr(#[from] crate::Error), #[error("error reading file: {0}")] ReadFile(std::io::Error), #[error("error writing output: {0}")] @@ -66,31 +62,33 @@ impl Default for OutputFormat { } } +// TODO: Remove run_x macro, it exists only to reduce the diff from when curr/next +// channels existed and each had their own run_curr/run_next invocation. macro_rules! run_x { - ($f:ident, $m:ident) => { + ($f:ident) => { fn $f(&self) -> Result<(), Error> { let mut rr = ResetRead::new(self.input()?); let mut guessed = false; - 'variants: for v in crate::$m::TypeVariant::VARIANTS { + 'variants: for v in crate::TypeVariant::VARIANTS { rr.reset(); let count: usize = match self.input_format { InputFormat::Single => { - let mut l = crate::$m::Limited::new(&mut rr, crate::$m::Limits::none()); - crate::$m::Type::read_xdr_to_end(v, &mut l) + let mut l = crate::Limited::new(&mut rr, crate::Limits::none()); + crate::Type::read_xdr_to_end(v, &mut l) .ok() .map(|_| 1) .unwrap_or_default() } InputFormat::SingleBase64 => { - let mut l = crate::$m::Limited::new(&mut rr, crate::$m::Limits::none()); - crate::$m::Type::read_xdr_base64_to_end(v, &mut l) + let mut l = crate::Limited::new(&mut rr, crate::Limits::none()); + crate::Type::read_xdr_base64_to_end(v, &mut l) .ok() .map(|_| 1) .unwrap_or_default() } InputFormat::Stream => { - let mut l = crate::$m::Limited::new(&mut rr, crate::$m::Limits::none()); - let iter = crate::$m::Type::read_xdr_iter(v, &mut l); + let mut l = crate::Limited::new(&mut rr, crate::Limits::none()); + let iter = crate::Type::read_xdr_iter(v, &mut l); let iter = iter.take(self.certainty); let mut count = 0; for v in iter { @@ -102,8 +100,8 @@ macro_rules! run_x { count } InputFormat::StreamBase64 => { - let mut l = crate::$m::Limited::new(&mut rr, crate::$m::Limits::none()); - let iter = crate::$m::Type::read_xdr_base64_iter(v, &mut l); + let mut l = crate::Limited::new(&mut rr, crate::Limits::none()); + let iter = crate::Type::read_xdr_base64_iter(v, &mut l); let iter = iter.take(self.certainty); let mut count = 0; for v in iter { @@ -115,8 +113,8 @@ macro_rules! run_x { count } InputFormat::StreamFramed => { - let mut l = crate::$m::Limited::new(&mut rr, crate::$m::Limits::none()); - let iter = crate::$m::Type::read_xdr_framed_iter(v, &mut l); + let mut l = crate::Limited::new(&mut rr, crate::Limits::none()); + let iter = crate::Type::read_xdr_framed_iter(v, &mut l); let iter = iter.take(self.certainty); let mut count = 0; for v in iter { @@ -147,12 +145,8 @@ impl Cmd { /// ## Errors /// /// If the command is configured with state that is invalid. - pub fn run(&self, channel: &Channel) -> Result<(), Error> { - let result = match channel { - Channel::Curr => self.run_curr(), - Channel::Next => self.run_next(), - }; - + pub fn run(&self) -> Result<(), Error> { + let result = self.run_inner(); match result { Ok(()) => Ok(()), Err(Error::WriteOutput(e)) if e.kind() == std::io::ErrorKind::BrokenPipe => Ok(()), @@ -160,8 +154,7 @@ impl Cmd { } } - run_x!(run_curr, curr); - run_x!(run_next, next); + run_x!(run_inner); fn input(&self) -> Result, Error> { if let Some(input) = &self.input { diff --git a/src/cli/mod.rs b/src/cli/mod.rs index 8655987d..6d81d976 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -8,7 +8,7 @@ mod util; mod version; pub mod xfile; -use clap::{Parser, Subcommand, ValueEnum}; +use clap::{Parser, Subcommand}; use std::{ffi::OsString, fmt::Debug}; #[derive(Parser, Debug, Clone)] @@ -23,9 +23,6 @@ use std::{ffi::OsString, fmt::Debug}; infer_subcommands = true, )] pub struct Root { - /// Channel of XDR to operate on - #[arg(value_enum, default_value_t)] - channel: Channel, #[command(subcommand)] cmd: Cmd, } @@ -38,33 +35,19 @@ impl Root { /// If the root command is configured with state that is invalid. pub fn run(&self) -> Result<(), Error> { match &self.cmd { - Cmd::Types(c) => c.run(&self.channel)?, - Cmd::Guess(c) => c.run(&self.channel)?, - Cmd::Decode(c) => c.run(&self.channel)?, - Cmd::Encode(c) => c.run(&self.channel)?, - Cmd::Generate(c) => c.run(&self.channel)?, - Cmd::Compare(c) => c.run(&self.channel)?, - Cmd::Xfile(c) => c.run(&self.channel)?, + Cmd::Types(c) => c.run()?, + Cmd::Guess(c) => c.run()?, + Cmd::Decode(c) => c.run()?, + Cmd::Encode(c) => c.run()?, + Cmd::Generate(c) => c.run()?, + Cmd::Compare(c) => c.run()?, + Cmd::Xfile(c) => c.run()?, Cmd::Version => version::Cmd::run(), } Ok(()) } } -#[derive(ValueEnum, Debug, Clone)] -pub enum Channel { - #[value(name = "+curr")] - Curr, - #[value(name = "+next")] - Next, -} - -impl Default for Channel { - fn default() -> Self { - Self::Curr - } -} - #[derive(Subcommand, Debug, Clone)] pub enum Cmd { /// View information about types diff --git a/src/cli/types.rs b/src/cli/types.rs index a796488d..c9a0a1b9 100644 --- a/src/cli/types.rs +++ b/src/cli/types.rs @@ -7,8 +7,6 @@ pub use crate::schemars as schema_settings; use clap::{Args, Subcommand}; -use crate::cli::Channel; - #[derive(thiserror::Error, Debug)] pub enum Error { #[error("{0}")] @@ -41,11 +39,11 @@ impl Cmd { /// ## Panics /// /// If the sub-command panics. - pub fn run(&self, channel: &Channel) -> Result<(), Error> { + pub fn run(&self) -> Result<(), Error> { match &self.sub { - Sub::List(c) => c.run(channel), - Sub::Schema(c) => c.run(channel)?, - Sub::SchemaFiles(c) => c.run(channel)?, + Sub::List(c) => c.run(), + Sub::Schema(c) => c.run()?, + Sub::SchemaFiles(c) => c.run()?, } Ok(()) } diff --git a/src/cli/types/list.rs b/src/cli/types/list.rs index c235b20d..458abc6a 100644 --- a/src/cli/types/list.rs +++ b/src/cli/types/list.rs @@ -1,7 +1,5 @@ use clap::{Args, ValueEnum}; -use crate::cli::Channel; - #[derive(Args, Debug, Clone)] #[command()] pub struct Cmd { @@ -29,8 +27,10 @@ impl Cmd { /// ## Panics /// /// If the list cannot be rendered as JSON. - pub fn run(&self, channel: &Channel) { - let types = Self::types(channel); + pub fn run(&self) { + let types: &[&str] = &crate::TypeVariant::VARIANTS_STR; + let mut types: Vec<&'static str> = types.to_vec(); + types.sort_unstable(); match self.output { OutputFormat::Plain => { for t in types { @@ -45,14 +45,4 @@ impl Cmd { } } } - - fn types(channel: &Channel) -> Vec<&'static str> { - let types: &[&str] = match channel { - Channel::Curr => &crate::curr::TypeVariant::VARIANTS_STR, - Channel::Next => &crate::next::TypeVariant::VARIANTS_STR, - }; - let mut types: Vec<&'static str> = types.to_vec(); - types.sort_unstable(); - types - } } diff --git a/src/cli/types/schema.rs b/src/cli/types/schema.rs index 67d6a315..107d136b 100644 --- a/src/cli/types/schema.rs +++ b/src/cli/types/schema.rs @@ -1,6 +1,6 @@ use clap::{Args, ValueEnum}; -use crate::{cli::Channel, schemars}; +use crate::schemars; #[derive(thiserror::Error, Debug)] pub enum Error { @@ -33,12 +33,14 @@ impl Default for OutputFormat { } } +// TODO: Remove run_x macro, it exists only to reduce the diff from when curr/next +// channels existed and each had their own run_curr/run_next invocation. macro_rules! run_x { - ($f:ident, $m:ident) => { + ($f:ident) => { fn $f(&self) -> Result<(), Error> { use std::str::FromStr; - let r#type = crate::$m::TypeVariant::from_str(&self.r#type).map_err(|_| { - Error::UnknownType(self.r#type.clone(), &crate::$m::TypeVariant::VARIANTS_STR) + let r#type = crate::TypeVariant::from_str(&self.r#type).map_err(|_| { + Error::UnknownType(self.r#type.clone(), &crate::TypeVariant::VARIANTS_STR) })?; let settings = match self.output { OutputFormat::JsonSchemaDraft201909 => schemars::settings_draft201909(), @@ -54,14 +56,9 @@ macro_rules! run_x { impl Cmd { /// # Errors /// Fails if the type is unknown or if the JSON generation fails. - pub fn run(&self, channel: &Channel) -> Result<(), Error> { - match channel { - Channel::Curr => self.run_curr()?, - Channel::Next => self.run_next()?, - } - Ok(()) + pub fn run(&self) -> Result<(), Error> { + self.run_inner() } - run_x!(run_curr, curr); - run_x!(run_next, next); + run_x!(run_inner); } diff --git a/src/cli/types/schema_files.rs b/src/cli/types/schema_files.rs index 86962920..3fa7e537 100644 --- a/src/cli/types/schema_files.rs +++ b/src/cli/types/schema_files.rs @@ -1,8 +1,8 @@ use clap::{Args, ValueEnum}; - -use crate::{cli::Channel, schemars}; use std::path::PathBuf; +use crate::schemars; + #[derive(thiserror::Error, Debug)] pub enum Error { #[error("error generating JSON: {0}")] @@ -35,10 +35,12 @@ impl Default for OutputFormat { } } +// TODO: Remove run_x macro, it exists only to reduce the diff from when curr/next +// channels existed and each had their own run_curr/run_next invocation. macro_rules! run_x { - ($f:ident, $m:ident) => { + ($f:ident) => { fn $f(&self) -> Result<(), Error> { - for t in crate::$m::TypeVariant::VARIANTS { + for t in crate::TypeVariant::VARIANTS { let settings = match self.output { OutputFormat::JsonSchemaDraft201909 => schemars::settings_draft201909(), }; @@ -55,14 +57,9 @@ macro_rules! run_x { impl Cmd { /// # Errors /// Fails if the JSON generation fails. - pub fn run(&self, channel: &Channel) -> Result<(), Error> { - match channel { - Channel::Curr => self.run_curr()?, - Channel::Next => self.run_next()?, - } - Ok(()) + pub fn run(&self) -> Result<(), Error> { + self.run_inner() } - run_x!(run_curr, curr); - run_x!(run_next, next); + run_x!(run_inner); } diff --git a/src/cli/version.rs b/src/cli/version.rs index 7a18c186..5b556d4c 100644 --- a/src/cli/version.rs +++ b/src/cli/version.rs @@ -9,11 +9,6 @@ pub struct Cmd; impl Cmd { pub fn run() { let v = VERSION; - println!( - "stellar-xdr {} ({}) -xdr (+curr): {} -xdr (+next): {}", - v.pkg, v.rev, v.xdr_curr, v.xdr_next - ); + println!("stellar-xdr {} ({})\nxdr: {}", v.pkg, v.rev, v.xdr); } } diff --git a/src/cli/xfile/mod.rs b/src/cli/xfile/mod.rs index 55321e21..c0d7ed9c 100644 --- a/src/cli/xfile/mod.rs +++ b/src/cli/xfile/mod.rs @@ -2,8 +2,6 @@ pub mod preprocess; use clap::{Args, Subcommand}; -use crate::cli::Channel; - #[derive(thiserror::Error, Debug)] pub enum Error { #[error("{0}")] @@ -29,7 +27,7 @@ impl Cmd { /// ## Errors /// /// If the sub-command is configured with state that is invalid. - pub fn run(&self, _channel: &Channel) -> Result<(), Error> { + pub fn run(&self) -> Result<(), Error> { match &self.sub { Sub::Preprocess(c) => c.run()?, } diff --git a/src/curr/mod.rs b/src/curr/mod.rs deleted file mode 100644 index f59e9780..00000000 --- a/src/curr/mod.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[allow(clippy::empty_line_after_doc_comments)] -mod generated; -mod ledgerkey; -pub use generated::*; - -mod default; -mod jsonschema; -mod str; - -mod scval_conversions; -pub use scval_conversions::*; -mod account_conversions; -mod transaction_conversions; - -mod scval_validations; -pub use scval_validations::*; - -#[cfg(feature = "alloc")] -mod scmap; - -mod tx_auths; -mod tx_hash; diff --git a/src/curr/scval_validations.rs b/src/curr/scval_validations.rs deleted file mode 100644 index 037266ff..00000000 --- a/src/curr/scval_validations.rs +++ /dev/null @@ -1,180 +0,0 @@ -#![allow(clippy::missing_errors_doc)] - -use super::{Error, ScMap, ScVal}; - -pub trait Validate { - type Error; - fn validate(&self) -> Result<(), Self::Error>; -} - -impl Validate for ScVal { - type Error = Error; - - fn validate(&self) -> Result<(), ::Error> { - match self { - ScVal::U32(_) - | ScVal::I32(_) - | ScVal::Error(_) - | ScVal::Bool(_) - | ScVal::Void - | ScVal::U64(_) - | ScVal::I64(_) - | ScVal::Timepoint(_) - | ScVal::Duration(_) - | ScVal::U128(_) - | ScVal::I128(_) - | ScVal::U256(_) - | ScVal::I256(_) - | ScVal::Bytes(_) - | ScVal::String(_) - | ScVal::Address(_) - | ScVal::LedgerKeyContractInstance - | ScVal::LedgerKeyNonce(_) - | ScVal::ContractInstance(_) => Ok(()), - - ScVal::Vec(Some(v)) => { - for e in v.iter() { - e.validate()?; - } - Ok(()) - } - - ScVal::Symbol(s) => { - // Symbol is defined as valid per https://github.com/stellar/rs-stellar-contract-env/blob/94c1717516c8fad4ad65caa148183b9fcbc408db/stellar-contract-env-common/src/symbol.rs#L107-L111. - if s.iter() - .all(|c| matches!(*c as char, '_' | '0'..='9' | 'A'..='Z' | 'a'..='z')) - { - Ok(()) - } else { - Err(Error::Invalid) - } - } - ScVal::Vec(None) | ScVal::Map(None) => Err(Error::Invalid), - ScVal::Map(Some(m)) => m.validate(), - } - } -} - -impl Validate for ScMap { - type Error = Error; - - fn validate(&self) -> Result<(), Self::Error> { - // Check every element for validity itself. - for pair in self.iter() { - pair.key.validate()?; - pair.val.validate()?; - } - // Check the map is sorted by key, and there are no keys that are - // duplicates. - if self.windows(2).all(|w| w[0].key < w[1].key) { - Ok(()) - } else { - Err(Error::Invalid) - } - } -} - -#[cfg(test)] -mod test { - use crate::curr::ScSymbol; - - use super::{Error, ScVal, Validate}; - - #[test] - fn symbol() { - assert_eq!( - ScVal::Symbol(ScSymbol("".try_into().unwrap())).validate(), - Ok(()) - ); - assert_eq!( - ScVal::Symbol(ScSymbol("a0A_".try_into().unwrap())).validate(), - Ok(()) - ); - assert_eq!( - ScVal::Symbol(ScSymbol("]".try_into().unwrap())).validate(), - Err(Error::Invalid) - ); - } - - #[test] - #[cfg(feature = "alloc")] - fn map() { - use super::super::{ScMap, ScMapEntry}; - extern crate alloc; - use alloc::vec; - // Maps should be sorted by key and have no duplicates. The sort order - // is just the "normal" sort order on ScVal emitted by derive(PartialOrd). - assert_eq!( - ScVal::Map(Some(ScMap( - vec![ - ScMapEntry { - key: ScVal::I64(0), - val: ScVal::U32(1), - }, - ScMapEntry { - key: ScVal::I64(1), - val: ScVal::I64(1), - } - ] - .try_into() - .unwrap() - ))) - .validate(), - Ok(()) - ); - assert_eq!( - ScVal::Map(Some(ScMap( - vec![ - ScMapEntry { - key: ScVal::I64(0), - val: ScVal::I64(1), - }, - ScMapEntry { - key: ScVal::I64(1), - val: ScVal::I64(1), - } - ] - .try_into() - .unwrap() - ))) - .validate(), - Ok(()) - ); - assert_eq!( - ScVal::Map(Some(ScMap( - vec![ - ScMapEntry { - key: ScVal::I64(2), - val: ScVal::I64(1), - }, - ScMapEntry { - key: ScVal::I64(1), - val: ScVal::I64(1), - } - ] - .try_into() - .unwrap() - ))) - .validate(), - Err(Error::Invalid) - ); - assert_eq!( - ScVal::Map(Some(ScMap( - vec![ - ScMapEntry { - key: ScVal::I64(2), - val: ScVal::I64(1), - }, - ScMapEntry { - key: ScVal::U32(1), - val: ScVal::I64(1), - }, - ] - .try_into() - .unwrap() - ))) - .validate(), - Err(Error::Invalid) - ); - } -} diff --git a/src/curr/default.rs b/src/default.rs similarity index 100% rename from src/curr/default.rs rename to src/default.rs diff --git a/src/curr/generated.rs b/src/generated.rs similarity index 99% rename from src/curr/generated.rs rename to src/generated.rs index 0b936cdb..aec5b243 100644 --- a/src/curr/generated.rs +++ b/src/generated.rs @@ -1,73 +1,73 @@ // Module is generated from: -// xdr/curr/Stellar-SCP.x -// xdr/curr/Stellar-contract-config-setting.x -// xdr/curr/Stellar-contract-env-meta.x -// xdr/curr/Stellar-contract-meta.x -// xdr/curr/Stellar-contract-spec.x -// xdr/curr/Stellar-contract.x -// xdr/curr/Stellar-exporter.x -// xdr/curr/Stellar-internal.x -// xdr/curr/Stellar-ledger-entries.x -// xdr/curr/Stellar-ledger.x -// xdr/curr/Stellar-overlay.x -// xdr/curr/Stellar-transaction.x -// xdr/curr/Stellar-types.x +// xdr/Stellar-SCP.x +// xdr/Stellar-contract-config-setting.x +// xdr/Stellar-contract-env-meta.x +// xdr/Stellar-contract-meta.x +// xdr/Stellar-contract-spec.x +// xdr/Stellar-contract.x +// xdr/Stellar-exporter.x +// xdr/Stellar-internal.x +// xdr/Stellar-ledger-entries.x +// xdr/Stellar-ledger.x +// xdr/Stellar-overlay.x +// xdr/Stellar-transaction.x +// xdr/Stellar-types.x #![allow(clippy::missing_errors_doc, clippy::unreadable_literal)] /// `XDR_FILES_SHA256` is a list of pairs of source files and their SHA256 hashes. pub const XDR_FILES_SHA256: [(&str, &str); 13] = [ ( - "xdr/curr/Stellar-SCP.x", + "xdr/Stellar-SCP.x", "6aed428fb6c2d000f5bc1eef0ba685d6108f3faa96208ffa588c0e2990813939", ), ( - "xdr/curr/Stellar-contract-config-setting.x", + "xdr/Stellar-contract-config-setting.x", "a034a3eb4d8b94f5c4c573fe14a1afc548aa316e1e897aa70e5a1688aada3c77", ), ( - "xdr/curr/Stellar-contract-env-meta.x", + "xdr/Stellar-contract-env-meta.x", "75a271414d852096fea3283c63b7f2a702f2905f78fc28eb60ec7d7bd366a780", ), ( - "xdr/curr/Stellar-contract-meta.x", + "xdr/Stellar-contract-meta.x", "f01532c11ca044e19d9f9f16fe373e9af64835da473be556b9a807ee3319ae0d", ), ( - "xdr/curr/Stellar-contract-spec.x", + "xdr/Stellar-contract-spec.x", "7d99679155f6ce029f4f2bd8e1bf09524ef2f3e4ca8973265085cfcfdbdae987", ), ( - "xdr/curr/Stellar-contract.x", + "xdr/Stellar-contract.x", "dce61df115c93fef5bb352beac1b504a518cb11dcb8ee029b1bb1b5f8fe52982", ), ( - "xdr/curr/Stellar-exporter.x", + "xdr/Stellar-exporter.x", "a00c83d02e8c8382e06f79a191f1fb5abd097a4bbcab8481c67467e3270e0529", ), ( - "xdr/curr/Stellar-internal.x", + "xdr/Stellar-internal.x", "227835866c1b2122d1eaf28839ba85ea7289d1cb681dda4ca619c2da3d71fe00", ), ( - "xdr/curr/Stellar-ledger-entries.x", + "xdr/Stellar-ledger-entries.x", "5157cad76b008b3606fe5bc2cfe87596827d8e02d16cbec3cedc297bb571aa54", ), ( - "xdr/curr/Stellar-ledger.x", + "xdr/Stellar-ledger.x", "cf936606885dd265082e553aa433c2cf47b720b6d58839b154cf71096b885d1e", ), ( - "xdr/curr/Stellar-overlay.x", + "xdr/Stellar-overlay.x", "8c9b9c13c86fa4672f03d741705b41e7221be0fc48e1ea6eeb1ba07d31ec0723", ), ( - "xdr/curr/Stellar-transaction.x", + "xdr/Stellar-transaction.x", "30d03669fb29ca48fdda1c84258473fe6d798f3b881c0224b34df1a1f9e21e80", ), ( - "xdr/curr/Stellar-types.x", - "4d7a1d1f1fa0034ddbff27d8a533e59b6154bef295306c6256066def77a5a999", + "xdr/Stellar-types.x", + "f3a360cbb07f24637ead188e885a0b4a47b903ca475f9798be5fa12453075e28", ), ]; @@ -54563,6 +54563,54 @@ impl WriteXdr for ClaimableBalanceId { } } +/// TestNextType is an XDR Struct defined as: +/// +/// ```text +/// struct TestNextType +/// { +/// int32 value; +/// }; +/// ``` +/// +#[cfg(feature = "test_feature")] +#[cfg_attr(feature = "alloc", derive(Default))] +#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] +#[cfg_eval::cfg_eval] +#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] +#[cfg_attr( + all(feature = "serde", feature = "alloc"), + serde_with::serde_as, + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "snake_case") +)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +pub struct TestNextType { + pub value: i32, +} + +#[cfg(feature = "test_feature")] +impl ReadXdr for TestNextType { + #[cfg(feature = "std")] + fn read_xdr(r: &mut Limited) -> Result { + r.with_limited_depth(|r| { + Ok(Self { + value: i32::read_xdr(r)?, + }) + }) + } +} + +#[cfg(feature = "test_feature")] +impl WriteXdr for TestNextType { + #[cfg(feature = "std")] + fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { + w.with_limited_depth(|w| { + self.value.write_xdr(w)?; + Ok(()) + }) + } +} + #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] #[cfg_attr( all(feature = "serde", feature = "alloc"), @@ -55039,6 +55087,8 @@ pub enum TypeVariant { PoolId, ClaimableBalanceIdType, ClaimableBalanceId, + #[cfg(feature = "test_feature")] + TestNextType, } impl TypeVariant { @@ -55511,6 +55561,8 @@ impl TypeVariant { TypeVariant::PoolId, TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, + #[cfg(feature = "test_feature")] + TypeVariant::TestNextType, ]; pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -55990,6 +56042,8 @@ impl TypeVariant { "PoolId", "ClaimableBalanceIdType", "ClaimableBalanceId", + #[cfg(feature = "test_feature")] + "TestNextType", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; @@ -56487,6 +56541,8 @@ impl TypeVariant { Self::PoolId => "PoolId", Self::ClaimableBalanceIdType => "ClaimableBalanceIdType", Self::ClaimableBalanceId => "ClaimableBalanceId", + #[cfg(feature = "test_feature")] + Self::TestNextType => "TestNextType", } } @@ -57185,6 +57241,8 @@ impl TypeVariant { Self::PoolId => gen.into_root_schema_for::(), Self::ClaimableBalanceIdType => gen.into_root_schema_for::(), Self::ClaimableBalanceId => gen.into_root_schema_for::(), + #[cfg(feature = "test_feature")] + Self::TestNextType => gen.into_root_schema_for::(), } } } @@ -57705,6 +57763,8 @@ impl core::str::FromStr for TypeVariant { "PoolId" => Ok(Self::PoolId), "ClaimableBalanceIdType" => Ok(Self::ClaimableBalanceIdType), "ClaimableBalanceId" => Ok(Self::ClaimableBalanceId), + #[cfg(feature = "test_feature")] + "TestNextType" => Ok(Self::TestNextType), _ => Err(Error::Invalid), } } @@ -58187,6 +58247,8 @@ pub enum Type { PoolId(Box), ClaimableBalanceIdType(Box), ClaimableBalanceId(Box), + #[cfg(feature = "test_feature")] + TestNextType(Box), } impl Type { @@ -58659,6 +58721,8 @@ impl Type { TypeVariant::PoolId, TypeVariant::ClaimableBalanceIdType, TypeVariant::ClaimableBalanceId, + #[cfg(feature = "test_feature")] + TypeVariant::TestNextType, ]; pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = { let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; @@ -59138,6 +59202,8 @@ impl Type { "PoolId", "ClaimableBalanceIdType", "ClaimableBalanceId", + #[cfg(feature = "test_feature")] + "TestNextType", ]; pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; @@ -61197,6 +61263,10 @@ impl Type { ClaimableBalanceId::read_xdr(r)?, ))) }), + #[cfg(feature = "test_feature")] + TypeVariant::TestNextType => r.with_limited_depth(|r| { + Ok(Self::TestNextType(Box::new(TestNextType::read_xdr(r)?))) + }), } } @@ -63265,6 +63335,11 @@ impl Type { ReadXdrIter::<_, ClaimableBalanceId>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ClaimableBalanceId(Box::new(t)))), ), + #[cfg(feature = "test_feature")] + TypeVariant::TestNextType => Box::new( + ReadXdrIter::<_, TestNextType>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::TestNextType(Box::new(t)))), + ), } } @@ -65594,6 +65669,11 @@ impl Type { ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) .map(|r| r.map(|t| Self::ClaimableBalanceId(Box::new(t.0)))), ), + #[cfg(feature = "test_feature")] + TypeVariant::TestNextType => Box::new( + ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) + .map(|r| r.map(|t| Self::TestNextType(Box::new(t.0)))), + ), } } @@ -67505,6 +67585,11 @@ impl Type { ReadXdrIter::<_, ClaimableBalanceId>::new(dec, r.limits.clone()) .map(|r| r.map(|t| Self::ClaimableBalanceId(Box::new(t)))), ), + #[cfg(feature = "test_feature")] + TypeVariant::TestNextType => Box::new( + ReadXdrIter::<_, TestNextType>::new(dec, r.limits.clone()) + .map(|r| r.map(|t| Self::TestNextType(Box::new(t)))), + ), } } @@ -68828,6 +68913,10 @@ impl Type { TypeVariant::ClaimableBalanceId => Ok(Self::ClaimableBalanceId(Box::new( serde_json::from_reader(r)?, ))), + #[cfg(feature = "test_feature")] + TypeVariant::TestNextType => { + Ok(Self::TestNextType(Box::new(serde_json::from_reader(r)?))) + } } } @@ -70324,6 +70413,10 @@ impl Type { TypeVariant::ClaimableBalanceId => Ok(Self::ClaimableBalanceId(Box::new( serde::de::Deserialize::deserialize(r)?, ))), + #[cfg(feature = "test_feature")] + TypeVariant::TestNextType => Ok(Self::TestNextType(Box::new( + serde::de::Deserialize::deserialize(r)?, + ))), } } @@ -71653,6 +71746,10 @@ impl Type { TypeVariant::ClaimableBalanceId => Ok(Self::ClaimableBalanceId(Box::new( ClaimableBalanceId::arbitrary(u)?, ))), + #[cfg(feature = "test_feature")] + TypeVariant::TestNextType => { + Ok(Self::TestNextType(Box::new(TestNextType::arbitrary(u)?))) + } } } @@ -72315,6 +72412,8 @@ impl Type { TypeVariant::PoolId => Self::PoolId(Box::default()), TypeVariant::ClaimableBalanceIdType => Self::ClaimableBalanceIdType(Box::default()), TypeVariant::ClaimableBalanceId => Self::ClaimableBalanceId(Box::default()), + #[cfg(feature = "test_feature")] + TypeVariant::TestNextType => Self::TestNextType(Box::default()), } } @@ -72792,6 +72891,8 @@ impl Type { Self::PoolId(ref v) => v.as_ref(), Self::ClaimableBalanceIdType(ref v) => v.as_ref(), Self::ClaimableBalanceId(ref v) => v.as_ref(), + #[cfg(feature = "test_feature")] + Self::TestNextType(ref v) => v.as_ref(), } } @@ -73293,6 +73394,8 @@ impl Type { Self::PoolId(_) => "PoolId", Self::ClaimableBalanceIdType(_) => "ClaimableBalanceIdType", Self::ClaimableBalanceId(_) => "ClaimableBalanceId", + #[cfg(feature = "test_feature")] + Self::TestNextType(_) => "TestNextType", } } @@ -73844,6 +73947,8 @@ impl Type { Self::PoolId(_) => TypeVariant::PoolId, Self::ClaimableBalanceIdType(_) => TypeVariant::ClaimableBalanceIdType, Self::ClaimableBalanceId(_) => TypeVariant::ClaimableBalanceId, + #[cfg(feature = "test_feature")] + Self::TestNextType(_) => TypeVariant::TestNextType, } } } @@ -74334,6 +74439,8 @@ impl WriteXdr for Type { Self::PoolId(v) => v.write_xdr(w), Self::ClaimableBalanceIdType(v) => v.write_xdr(w), Self::ClaimableBalanceId(v) => v.write_xdr(w), + #[cfg(feature = "test_feature")] + Self::TestNextType(v) => v.write_xdr(w), } } } diff --git a/src/curr/jsonschema.rs b/src/jsonschema.rs similarity index 100% rename from src/curr/jsonschema.rs rename to src/jsonschema.rs diff --git a/src/curr/ledgerkey.rs b/src/ledgerkey.rs similarity index 100% rename from src/curr/ledgerkey.rs rename to src/ledgerkey.rs diff --git a/src/lib.rs b/src/lib.rs index 5a94ed77..264a7964 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,10 +27,10 @@ //! //! #### Features //! -//! The crate has several features, tiers of functionality, ancillary -//! functionality, and channels of XDR. +//! The crate has several features, tiers of functionality, and ancillary +//! functionality. //! -//! Default features: `std`, `curr`. +//! Default features: `std`. //! //! Tiers of functionality: //! @@ -65,15 +65,6 @@ //! Features marked experimental may disappear at anytime, see breaking changes //! at anytime, or and may be minimal implementations instead of complete. //! -//! Channels of XDR: -//! -//! - `curr` – XDR types built from the `stellar/stellar-xdr` `curr` branch. -//! - `next` – XDR types built from the `stellar/stellar-xdr` `next` branch. -//! -//! If a single channel is enabled the types are available at the root of the -//! crate. If multiple channels are enabled they are available in modules at -//! the root of the crate. -//! //! ### CLI //! //! To use the CLI: @@ -93,7 +84,7 @@ //! //! Parse a `ScSpecEntry` stream from a contract: //! ```console -//! stellar-xdr +next decode --type ScSpecEntry --input stream-base64 --output json-formatted << - +//! stellar-xdr decode --type ScSpecEntry --input stream-base64 --output json-formatted << - //! AAAAA... //! - //! ``` @@ -109,39 +100,44 @@ pub struct Version<'a> { pub pkg: &'a str, pub rev: &'a str, pub xdr: &'a str, - pub xdr_curr: &'a str, - pub xdr_next: &'a str, } pub const VERSION: Version = Version { pkg: env!("CARGO_PKG_VERSION"), rev: env!("GIT_REVISION"), - xdr: if cfg!(all(feature = "curr", feature = "next")) { - "curr,next" - } else if cfg!(feature = "curr") { - "curr" - } else if cfg!(feature = "next") { - "next" - } else { - "" - }, - xdr_curr: include_str!("../xdr/curr-version"), - xdr_next: include_str!("../xdr/next-version"), + xdr: include_str!("../xdr-version"), }; #[cfg(feature = "schemars")] pub mod schemars; -#[cfg(feature = "curr")] -pub mod curr; +#[allow(clippy::empty_line_after_doc_comments)] +mod generated; +mod ledgerkey; +pub use generated::*; + +mod default; +mod jsonschema; +mod str; + +mod scval_conversions; +pub use scval_conversions::*; +mod account_conversions; +mod transaction_conversions; + +mod scval_validations; +pub use scval_validations::*; + +#[cfg(feature = "alloc")] +mod scmap; -#[cfg(feature = "next")] -pub mod next; +mod tx_auths; +mod tx_hash; #[cfg(feature = "cli")] pub mod cli; -#[cfg(all(any(feature = "curr", feature = "next"), feature = "alloc"))] +#[cfg(feature = "alloc")] pub(crate) mod num256; -#[cfg(all(any(feature = "curr", feature = "next"), feature = "alloc"))] +#[cfg(feature = "alloc")] pub(crate) mod num128; diff --git a/src/next/account_conversions.rs b/src/next/account_conversions.rs deleted file mode 100644 index 19378d2b..00000000 --- a/src/next/account_conversions.rs +++ /dev/null @@ -1,25 +0,0 @@ -use super::{AccountId, MuxedAccount, PublicKey}; - -impl From for MuxedAccount { - fn from(account_id: AccountId) -> Self { - account_id.0.into() - } -} - -impl From for MuxedAccount { - fn from(public_key: PublicKey) -> Self { - match public_key { - PublicKey::PublicKeyTypeEd25519(k) => MuxedAccount::Ed25519(k), - } - } -} - -impl MuxedAccount { - #[must_use] - pub fn account_id(self) -> AccountId { - match self { - MuxedAccount::Ed25519(k) => AccountId(PublicKey::PublicKeyTypeEd25519(k)), - MuxedAccount::MuxedEd25519(m) => AccountId(PublicKey::PublicKeyTypeEd25519(m.ed25519)), - } - } -} diff --git a/src/next/default.rs b/src/next/default.rs deleted file mode 100644 index 31165cb3..00000000 --- a/src/next/default.rs +++ /dev/null @@ -1,10 +0,0 @@ -//# Custom default implementations of some types. -#![cfg(feature = "alloc")] - -use super::{TransactionEnvelope, TransactionV1Envelope}; - -impl Default for TransactionEnvelope { - fn default() -> Self { - Self::Tx(TransactionV1Envelope::default()) - } -} diff --git a/src/next/generated.rs b/src/next/generated.rs deleted file mode 100644 index b72c151b..00000000 --- a/src/next/generated.rs +++ /dev/null @@ -1,74339 +0,0 @@ -// Module is generated from: -// xdr/next/Stellar-SCP.x -// xdr/next/Stellar-contract-config-setting.x -// xdr/next/Stellar-contract-env-meta.x -// xdr/next/Stellar-contract-meta.x -// xdr/next/Stellar-contract-spec.x -// xdr/next/Stellar-contract.x -// xdr/next/Stellar-exporter.x -// xdr/next/Stellar-internal.x -// xdr/next/Stellar-ledger-entries.x -// xdr/next/Stellar-ledger.x -// xdr/next/Stellar-overlay.x -// xdr/next/Stellar-transaction.x -// xdr/next/Stellar-types.x - -#![allow(clippy::missing_errors_doc, clippy::unreadable_literal)] - -/// `XDR_FILES_SHA256` is a list of pairs of source files and their SHA256 hashes. -pub const XDR_FILES_SHA256: [(&str, &str); 13] = [ - ( - "xdr/next/Stellar-SCP.x", - "6aed428fb6c2d000f5bc1eef0ba685d6108f3faa96208ffa588c0e2990813939", - ), - ( - "xdr/next/Stellar-contract-config-setting.x", - "a034a3eb4d8b94f5c4c573fe14a1afc548aa316e1e897aa70e5a1688aada3c77", - ), - ( - "xdr/next/Stellar-contract-env-meta.x", - "75a271414d852096fea3283c63b7f2a702f2905f78fc28eb60ec7d7bd366a780", - ), - ( - "xdr/next/Stellar-contract-meta.x", - "f01532c11ca044e19d9f9f16fe373e9af64835da473be556b9a807ee3319ae0d", - ), - ( - "xdr/next/Stellar-contract-spec.x", - "7d99679155f6ce029f4f2bd8e1bf09524ef2f3e4ca8973265085cfcfdbdae987", - ), - ( - "xdr/next/Stellar-contract.x", - "dce61df115c93fef5bb352beac1b504a518cb11dcb8ee029b1bb1b5f8fe52982", - ), - ( - "xdr/next/Stellar-exporter.x", - "a00c83d02e8c8382e06f79a191f1fb5abd097a4bbcab8481c67467e3270e0529", - ), - ( - "xdr/next/Stellar-internal.x", - "227835866c1b2122d1eaf28839ba85ea7289d1cb681dda4ca619c2da3d71fe00", - ), - ( - "xdr/next/Stellar-ledger-entries.x", - "5157cad76b008b3606fe5bc2cfe87596827d8e02d16cbec3cedc297bb571aa54", - ), - ( - "xdr/next/Stellar-ledger.x", - "cf936606885dd265082e553aa433c2cf47b720b6d58839b154cf71096b885d1e", - ), - ( - "xdr/next/Stellar-overlay.x", - "8c9b9c13c86fa4672f03d741705b41e7221be0fc48e1ea6eeb1ba07d31ec0723", - ), - ( - "xdr/next/Stellar-transaction.x", - "30d03669fb29ca48fdda1c84258473fe6d798f3b881c0224b34df1a1f9e21e80", - ), - ( - "xdr/next/Stellar-types.x", - "d37a4b8683d2ddb9f13f6d8a4e5111dfe7de4176516db52bc0517ec46a82c3d4", - ), -]; - -use core::{array::TryFromSliceError, fmt, fmt::Debug, marker::Sized, ops::Deref, slice}; - -#[cfg(feature = "std")] -use core::marker::PhantomData; - -// When feature alloc is turned off use static lifetime Box and Vec types. -#[cfg(not(feature = "alloc"))] -mod noalloc { - pub mod boxed { - pub type Box = &'static T; - } - pub mod vec { - pub type Vec = &'static [T]; - } -} -#[cfg(not(feature = "alloc"))] -use noalloc::{boxed::Box, vec::Vec}; - -// When feature std is turned off, but feature alloc is turned on import the -// alloc crate and use its Box and Vec types. -#[cfg(all(not(feature = "std"), feature = "alloc"))] -extern crate alloc; -#[cfg(all(not(feature = "std"), feature = "alloc"))] -use alloc::{ - borrow::ToOwned, - boxed::Box, - string::{FromUtf8Error, String}, - vec::Vec, -}; -#[cfg(feature = "std")] -use std::string::FromUtf8Error; - -#[cfg(feature = "arbitrary")] -use arbitrary::Arbitrary; - -#[cfg(all(feature = "schemars", feature = "alloc", not(feature = "std")))] -use alloc::borrow::Cow; -#[cfg(all(feature = "schemars", feature = "alloc", feature = "std"))] -use std::borrow::Cow; - -// TODO: Add support for read/write xdr fns when std not available. - -#[cfg(feature = "std")] -use std::{ - error, io, - io::{BufRead, BufReader, Cursor, Read, Write}, -}; - -/// Error contains all errors returned by functions in this crate. It can be -/// compared via `PartialEq`, however any contained IO errors will only be -/// compared on their `ErrorKind`. -#[derive(Debug)] -pub enum Error { - Invalid, - Unsupported, - LengthExceedsMax, - LengthMismatch, - NonZeroPadding, - Utf8Error(core::str::Utf8Error), - #[cfg(feature = "alloc")] - InvalidHex, - #[cfg(feature = "std")] - Io(io::Error), - DepthLimitExceeded, - #[cfg(feature = "serde_json")] - Json(serde_json::Error), - LengthLimitExceeded, - #[cfg(feature = "arbitrary")] - Arbitrary(arbitrary::Error), -} - -impl PartialEq for Error { - fn eq(&self, other: &Self) -> bool { - match (self, other) { - (Self::Invalid, Self::Invalid) - | (Self::Unsupported, Self::Unsupported) - | (Self::LengthExceedsMax, Self::LengthExceedsMax) - | (Self::LengthMismatch, Self::LengthMismatch) - | (Self::NonZeroPadding, Self::NonZeroPadding) => true, - - (Self::Utf8Error(l), Self::Utf8Error(r)) => l == r, - - #[cfg(feature = "alloc")] - (Self::InvalidHex, Self::InvalidHex) => true, - - // IO errors cannot be compared, but in the absence of any more - // meaningful way to compare the errors we compare the kind of error - // and ignore the embedded source error or OS error. The main use - // case for comparing errors outputted by the XDR library is for - // error case testing, and a lack of the ability to compare has a - // detrimental affect on failure testing, so this is a tradeoff. - #[cfg(feature = "std")] - (Self::Io(l), Self::Io(r)) => l.kind() == r.kind(), - - (Self::DepthLimitExceeded, Self::DepthLimitExceeded) => true, - - #[cfg(feature = "serde_json")] - (Self::Json(l), Self::Json(r)) => l.classify() == r.classify(), - - (Self::LengthLimitExceeded, Self::LengthLimitExceeded) => true, - - #[cfg(feature = "arbitrary")] - (Self::Arbitrary(l), Self::Arbitrary(r)) => l == r, - - _ => false, - } - } -} - -#[cfg(feature = "std")] -impl error::Error for Error { - #[must_use] - fn source(&self) -> Option<&(dyn error::Error + 'static)> { - match self { - Error::Invalid - | Error::Unsupported - | Error::LengthExceedsMax - | Error::LengthMismatch - | Error::NonZeroPadding => None, - - Error::Utf8Error(e) => Some(e), - - Self::InvalidHex => None, - - Self::Io(e) => Some(e), - - Self::DepthLimitExceeded => None, - - #[cfg(feature = "serde_json")] - Self::Json(e) => Some(e), - - Self::LengthLimitExceeded => None, - - #[cfg(feature = "arbitrary")] - Self::Arbitrary(e) => Some(e), - } - } -} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match self { - Error::Invalid => write!(f, "xdr value invalid"), - Error::Unsupported => write!(f, "xdr value unsupported"), - Error::LengthExceedsMax => write!(f, "xdr value max length exceeded"), - Error::LengthMismatch => write!(f, "xdr value length does not match"), - Error::NonZeroPadding => write!(f, "xdr padding contains non-zero bytes"), - Error::Utf8Error(e) => write!(f, "{e}"), - - #[cfg(feature = "alloc")] - Error::InvalidHex => write!(f, "hex invalid"), - - #[cfg(feature = "std")] - Error::Io(e) => write!(f, "{e}"), - - Error::DepthLimitExceeded => write!(f, "depth limit exceeded"), - - #[cfg(feature = "serde_json")] - Error::Json(e) => write!(f, "{e}"), - - Error::LengthLimitExceeded => write!(f, "length limit exceeded"), - - #[cfg(feature = "arbitrary")] - Error::Arbitrary(e) => write!(f, "{e}"), - } - } -} - -impl From for Error { - fn from(_: TryFromSliceError) -> Error { - Error::LengthMismatch - } -} - -impl From for Error { - #[must_use] - fn from(e: core::str::Utf8Error) -> Self { - Error::Utf8Error(e) - } -} - -#[cfg(feature = "alloc")] -impl From for Error { - #[must_use] - fn from(e: FromUtf8Error) -> Self { - Error::Utf8Error(e.utf8_error()) - } -} - -#[cfg(feature = "std")] -impl From for Error { - #[must_use] - fn from(e: io::Error) -> Self { - Error::Io(e) - } -} - -#[cfg(feature = "serde_json")] -impl From for Error { - #[must_use] - fn from(e: serde_json::Error) -> Self { - Error::Json(e) - } -} - -#[cfg(feature = "arbitrary")] -impl From for Error { - #[must_use] - fn from(e: arbitrary::Error) -> Self { - Error::Arbitrary(e) - } -} - -impl From for () { - fn from(_: Error) {} -} - -/// Name defines types that assign a static name to their value, such as the -/// name given to an identifier in an XDR enum, or the name given to the case in -/// a union. -pub trait Name { - fn name(&self) -> &'static str; -} - -/// Discriminant defines types that may contain a one-of value determined -/// according to the discriminant, and exposes the value of the discriminant for -/// that type, such as in an XDR union. -pub trait Discriminant { - fn discriminant(&self) -> D; -} - -/// Iter defines types that have variants that can be iterated. -pub trait Variants { - fn variants() -> slice::Iter<'static, V> - where - V: Sized; -} - -// Enum defines a type that is represented as an XDR enumeration when encoded. -pub trait Enum: Name + Variants + Sized {} - -// Union defines a type that is represented as an XDR union when encoded. -pub trait Union: Name + Discriminant + Variants -where - D: Sized, -{ -} - -/// `Limits` contains the limits that a limited reader or writer will be -/// constrained to. -#[cfg(feature = "std")] -#[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -pub struct Limits { - /// Defines the maximum depth for recursive calls in `Read/WriteXdr` to - /// prevent stack overflow. - /// - /// The depth limit is akin to limiting stack depth. Its purpose is to - /// prevent the program from hitting the maximum stack size allowed by Rust, - /// which would result in an unrecoverable `SIGABRT`. For more information - /// about Rust's stack size limit, refer to the [Rust - /// documentation](https://doc.rust-lang.org/std/thread/#stack-size). - pub depth: u32, - - /// Defines the maximum number of bytes that will be read or written. - pub len: usize, -} - -#[cfg(feature = "std")] -impl Limits { - #[must_use] - pub fn none() -> Self { - Self { - depth: u32::MAX, - len: usize::MAX, - } - } - - #[must_use] - pub fn depth(depth: u32) -> Self { - Limits { - depth, - ..Limits::none() - } - } - - #[must_use] - pub fn len(len: usize) -> Self { - Limits { - len, - ..Limits::none() - } - } -} - -/// `Limited` wraps an object and provides functions for enforcing limits. -/// -/// Intended for use with readers and writers and limiting their reads and -/// writes. -#[cfg(feature = "std")] -pub struct Limited { - pub inner: L, - pub(crate) limits: Limits, -} - -#[cfg(feature = "std")] -impl Limited { - /// Constructs a new `Limited`. - /// - /// - `inner`: The value being limited. - /// - `limits`: The limits to enforce. - pub fn new(inner: L, limits: Limits) -> Self { - Limited { inner, limits } - } - - /// Consume the given length from the internal remaining length limit. - /// - /// ### Errors - /// - /// If the length would consume more length than the remaining length limit - /// allows. - pub(crate) fn consume_len(&mut self, len: usize) -> Result<(), Error> { - if let Some(len) = self.limits.len.checked_sub(len) { - self.limits.len = len; - Ok(()) - } else { - Err(Error::LengthLimitExceeded) - } - } - - /// Consumes a single depth for the duration of the given function. - /// - /// ### Errors - /// - /// If the depth limit is already exhausted. - pub(crate) fn with_limited_depth(&mut self, f: F) -> Result - where - F: FnOnce(&mut Self) -> Result, - { - if let Some(depth) = self.limits.depth.checked_sub(1) { - self.limits.depth = depth; - let res = f(self); - self.limits.depth = self.limits.depth.saturating_add(1); - res - } else { - Err(Error::DepthLimitExceeded) - } - } -} - -#[cfg(feature = "std")] -impl Read for Limited { - /// Forwards the read operation to the wrapped object. - fn read(&mut self, buf: &mut [u8]) -> std::io::Result { - self.inner.read(buf) - } -} - -#[cfg(feature = "std")] -impl BufRead for Limited { - /// Forwards the read operation to the wrapped object. - fn fill_buf(&mut self) -> std::io::Result<&[u8]> { - self.inner.fill_buf() - } - - /// Forwards the read operation to the wrapped object. - fn consume(&mut self, amt: usize) { - self.inner.consume(amt); - } -} - -#[cfg(feature = "std")] -impl Write for Limited { - /// Forwards the write operation to the wrapped object. - fn write(&mut self, buf: &[u8]) -> std::io::Result { - self.inner.write(buf) - } - - /// Forwards the flush operation to the wrapped object. - fn flush(&mut self) -> std::io::Result<()> { - self.inner.flush() - } -} - -#[cfg(feature = "std")] -pub struct ReadXdrIter { - reader: Limited>, - _s: PhantomData, -} - -#[cfg(feature = "std")] -impl ReadXdrIter { - fn new(r: R, limits: Limits) -> Self { - Self { - reader: Limited { - inner: BufReader::new(r), - limits, - }, - _s: PhantomData, - } - } -} - -#[cfg(feature = "std")] -impl Iterator for ReadXdrIter { - type Item = Result; - - // Next reads the internal reader and XDR decodes it into the Self type. If - // the EOF is reached without reading any new bytes `None` is returned. If - // EOF is reached after reading some bytes a truncated entry is assumed an - // an `Error::Io` containing an `UnexpectedEof`. If any other IO error - // occurs it is returned. Iteration of this iterator stops naturally when - // `None` is returned, but not when a `Some(Err(...))` is returned. The - // caller is responsible for checking each Result. - fn next(&mut self) -> Option { - // Try to fill the buffer to see if the EOF has been reached or not. - // This happens to effectively peek to see if the stream has finished - // and there are no more items. It is necessary to do this because the - // xdr types in this crate heavily use the `std::io::Read::read_exact` - // method that doesn't distinguish between an EOF at the beginning of a - // read and an EOF after a partial fill of a read_exact. - match self.reader.fill_buf() { - // If the reader has no more data and is unable to fill any new data - // into its internal buf, then the EOF has been reached. - Ok([]) => return None, - // If an error occurs filling the buffer, treat that as an error and stop. - Err(e) => return Some(Err(Error::Io(e))), - // If there is data in the buf available for reading, continue. - Ok([..]) => (), - }; - // Read the buf into the type. - let r = self.reader.with_limited_depth(|dlr| S::read_xdr(dlr)); - match r { - Ok(s) => Some(Ok(s)), - Err(e) => Some(Err(e)), - } - } -} - -pub trait ReadXdr -where - Self: Sized, -{ - /// Read the XDR and construct the type. - /// - /// Read bytes from the given read implementation, decoding the bytes as - /// XDR, and construct the type implementing this interface from those - /// bytes. - /// - /// Just enough bytes are read from the read implementation to construct the - /// type. Any residual bytes remain in the read implementation. - /// - /// All implementations should continue if the read implementation returns - /// [`ErrorKind::Interrupted`](std::io::ErrorKind::Interrupted). - /// - /// Use [`ReadXdR: Read_xdr_to_end`] when the intent is for all bytes in the - /// read implementation to be consumed by the read. - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result; - - /// Construct the type from the XDR bytes base64 encoded. - /// - /// An error is returned if the bytes are not completely consumed by the - /// deserialization. - #[cfg(feature = "base64")] - fn read_xdr_base64(r: &mut Limited) -> Result { - let mut dec = Limited::new( - base64::read::DecoderReader::new( - SkipWhitespace::new(&mut r.inner), - &base64::engine::general_purpose::STANDARD, - ), - r.limits.clone(), - ); - let t = Self::read_xdr(&mut dec)?; - Ok(t) - } - - /// Read the XDR and construct the type, and consider it an error if the - /// read does not completely consume the read implementation. - /// - /// Read bytes from the given read implementation, decoding the bytes as - /// XDR, and construct the type implementing this interface from those - /// bytes. - /// - /// Just enough bytes are read from the read implementation to construct the - /// type, and then confirm that no further bytes remain. To confirm no - /// further bytes remain additional bytes are attempted to be read from the - /// read implementation. If it is possible to read any residual bytes from - /// the read implementation an error is returned. The read implementation - /// may not be exhaustively read if there are residual bytes, and it is - /// considered undefined how many residual bytes or how much of the residual - /// buffer are consumed in this case. - /// - /// All implementations should continue if the read implementation returns - /// [`ErrorKind::Interrupted`](std::io::ErrorKind::Interrupted). - #[cfg(feature = "std")] - fn read_xdr_to_end(r: &mut Limited) -> Result { - let s = Self::read_xdr(r)?; - // Check that any further reads, such as this read of one byte, read no - // data, indicating EOF. If a byte is read the data is invalid. - if r.read(&mut [0u8; 1])? == 0 { - Ok(s) - } else { - Err(Error::Invalid) - } - } - - /// Construct the type from the XDR bytes base64 encoded. - /// - /// An error is returned if the bytes are not completely consumed by the - /// deserialization. - #[cfg(feature = "base64")] - fn read_xdr_base64_to_end(r: &mut Limited) -> Result { - let mut dec = Limited::new( - base64::read::DecoderReader::new( - SkipWhitespace::new(&mut r.inner), - &base64::engine::general_purpose::STANDARD, - ), - r.limits.clone(), - ); - let t = Self::read_xdr_to_end(&mut dec)?; - Ok(t) - } - - /// Read the XDR and construct the type. - /// - /// Read bytes from the given read implementation, decoding the bytes as - /// XDR, and construct the type implementing this interface from those - /// bytes. - /// - /// Just enough bytes are read from the read implementation to construct the - /// type. Any residual bytes remain in the read implementation. - /// - /// All implementations should continue if the read implementation returns - /// [`ErrorKind::Interrupted`](std::io::ErrorKind::Interrupted). - /// - /// Use [`ReadXdR: Read_xdr_into_to_end`] when the intent is for all bytes - /// in the read implementation to be consumed by the read. - #[cfg(feature = "std")] - fn read_xdr_into(&mut self, r: &mut Limited) -> Result<(), Error> { - *self = Self::read_xdr(r)?; - Ok(()) - } - - /// Read the XDR into the existing value, and consider it an error if the - /// read does not completely consume the read implementation. - /// - /// Read bytes from the given read implementation, decoding the bytes as - /// XDR, and construct the type implementing this interface from those - /// bytes. - /// - /// Just enough bytes are read from the read implementation to construct the - /// type, and then confirm that no further bytes remain. To confirm no - /// further bytes remain additional bytes are attempted to be read from the - /// read implementation. If it is possible to read any residual bytes from - /// the read implementation an error is returned. The read implementation - /// may not be exhaustively read if there are residual bytes, and it is - /// considered undefined how many residual bytes or how much of the residual - /// buffer are consumed in this case. - /// - /// All implementations should continue if the read implementation returns - /// [`ErrorKind::Interrupted`](std::io::ErrorKind::Interrupted). - #[cfg(feature = "std")] - fn read_xdr_into_to_end(&mut self, r: &mut Limited) -> Result<(), Error> { - Self::read_xdr_into(self, r)?; - // Check that any further reads, such as this read of one byte, read no - // data, indicating EOF. If a byte is read the data is invalid. - if r.read(&mut [0u8; 1])? == 0 { - Ok(()) - } else { - Err(Error::Invalid) - } - } - - /// Create an iterator that reads the read implementation as a stream of - /// values that are read into the implementing type. - /// - /// Read bytes from the given read implementation, decoding the bytes as - /// XDR, and construct the type implementing this interface from those - /// bytes. - /// - /// Just enough bytes are read from the read implementation to construct the - /// type, and then confirm that no further bytes remain. To confirm no - /// further bytes remain additional bytes are attempted to be read from the - /// read implementation. If it is possible to read any residual bytes from - /// the read implementation an error is returned. The read implementation - /// may not be exhaustively read if there are residual bytes, and it is - /// considered undefined how many residual bytes or how much of the residual - /// buffer are consumed in this case. - /// - /// All implementations should continue if the read implementation returns - /// [`ErrorKind::Interrupted`](std::io::ErrorKind::Interrupted). - #[cfg(feature = "std")] - fn read_xdr_iter(r: &mut Limited) -> ReadXdrIter<&mut R, Self> { - ReadXdrIter::new(&mut r.inner, r.limits.clone()) - } - - /// Create an iterator that reads the read implementation as a stream of - /// values that are read into the implementing type. - #[cfg(feature = "base64")] - fn read_xdr_base64_iter( - r: &mut Limited, - ) -> ReadXdrIter< - base64::read::DecoderReader< - '_, - base64::engine::general_purpose::GeneralPurpose, - SkipWhitespace<&mut R>, - >, - Self, - > { - let dec = base64::read::DecoderReader::new( - SkipWhitespace::new(&mut r.inner), - &base64::engine::general_purpose::STANDARD, - ); - ReadXdrIter::new(dec, r.limits.clone()) - } - - /// Construct the type from the XDR bytes. - /// - /// An error is returned if the bytes are not completely consumed by the - /// deserialization. - #[cfg(feature = "std")] - fn from_xdr(bytes: impl AsRef<[u8]>, limits: Limits) -> Result { - let mut cursor = Limited::new(Cursor::new(bytes.as_ref()), limits); - let t = Self::read_xdr_to_end(&mut cursor)?; - Ok(t) - } - - /// Construct the type from the XDR bytes base64 encoded. - /// - /// An error is returned if the bytes are not completely consumed by the - /// deserialization. - #[cfg(feature = "base64")] - fn from_xdr_base64(b64: impl AsRef<[u8]>, limits: Limits) -> Result { - let b64_reader = Cursor::new(b64); - let mut dec = Limited::new( - base64::read::DecoderReader::new( - SkipWhitespace::new(b64_reader), - &base64::engine::general_purpose::STANDARD, - ), - limits, - ); - let t = Self::read_xdr_to_end(&mut dec)?; - Ok(t) - } -} - -pub trait WriteXdr { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error>; - - #[cfg(feature = "std")] - fn to_xdr(&self, limits: Limits) -> Result, Error> { - let mut cursor = Limited::new(Cursor::new(vec![]), limits); - self.write_xdr(&mut cursor)?; - let bytes = cursor.inner.into_inner(); - Ok(bytes) - } - - #[cfg(feature = "base64")] - fn to_xdr_base64(&self, limits: Limits) -> Result { - let mut enc = Limited::new( - base64::write::EncoderStringWriter::new(&base64::engine::general_purpose::STANDARD), - limits, - ); - self.write_xdr(&mut enc)?; - let b64 = enc.inner.into_inner(); - Ok(b64) - } -} - -/// `Pad_len` returns the number of bytes to pad an XDR value of the given -/// length to make the final serialized size a multiple of 4. -#[cfg(feature = "std")] -fn pad_len(len: usize) -> usize { - (4 - (len % 4)) % 4 -} - -impl ReadXdr for i32 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - let mut b = [0u8; 4]; - r.with_limited_depth(|r| { - r.consume_len(b.len())?; - r.read_exact(&mut b)?; - Ok(i32::from_be_bytes(b)) - }) - } -} - -impl WriteXdr for i32 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - let b: [u8; 4] = self.to_be_bytes(); - w.with_limited_depth(|w| { - w.consume_len(b.len())?; - Ok(w.write_all(&b)?) - }) - } -} - -impl ReadXdr for u32 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - let mut b = [0u8; 4]; - r.with_limited_depth(|r| { - r.consume_len(b.len())?; - r.read_exact(&mut b)?; - Ok(u32::from_be_bytes(b)) - }) - } -} - -impl WriteXdr for u32 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - let b: [u8; 4] = self.to_be_bytes(); - w.with_limited_depth(|w| { - w.consume_len(b.len())?; - Ok(w.write_all(&b)?) - }) - } -} - -impl ReadXdr for i64 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - let mut b = [0u8; 8]; - r.with_limited_depth(|r| { - r.consume_len(b.len())?; - r.read_exact(&mut b)?; - Ok(i64::from_be_bytes(b)) - }) - } -} - -impl WriteXdr for i64 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - let b: [u8; 8] = self.to_be_bytes(); - w.with_limited_depth(|w| { - w.consume_len(b.len())?; - Ok(w.write_all(&b)?) - }) - } -} - -impl ReadXdr for u64 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - let mut b = [0u8; 8]; - r.with_limited_depth(|r| { - r.consume_len(b.len())?; - r.read_exact(&mut b)?; - Ok(u64::from_be_bytes(b)) - }) - } -} - -impl WriteXdr for u64 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - let b: [u8; 8] = self.to_be_bytes(); - w.with_limited_depth(|w| { - w.consume_len(b.len())?; - Ok(w.write_all(&b)?) - }) - } -} - -impl ReadXdr for f32 { - #[cfg(feature = "std")] - fn read_xdr(_r: &mut Limited) -> Result { - todo!() - } -} - -impl WriteXdr for f32 { - #[cfg(feature = "std")] - fn write_xdr(&self, _w: &mut Limited) -> Result<(), Error> { - todo!() - } -} - -impl ReadXdr for f64 { - #[cfg(feature = "std")] - fn read_xdr(_r: &mut Limited) -> Result { - todo!() - } -} - -impl WriteXdr for f64 { - #[cfg(feature = "std")] - fn write_xdr(&self, _w: &mut Limited) -> Result<(), Error> { - todo!() - } -} - -impl ReadXdr for bool { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = u32::read_xdr(r)?; - let b = i == 1; - Ok(b) - }) - } -} - -impl WriteXdr for bool { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i = u32::from(*self); // true = 1, false = 0 - i.write_xdr(w) - }) - } -} - -impl ReadXdr for Option { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = u32::read_xdr(r)?; - match i { - 0 => Ok(None), - 1 => { - let t = T::read_xdr(r)?; - Ok(Some(t)) - } - _ => Err(Error::Invalid), - } - }) - } -} - -impl WriteXdr for Option { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - if let Some(t) = self { - 1u32.write_xdr(w)?; - t.write_xdr(w)?; - } else { - 0u32.write_xdr(w)?; - } - Ok(()) - }) - } -} - -impl ReadXdr for Box { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| Ok(Box::new(T::read_xdr(r)?))) - } -} - -impl WriteXdr for Box { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| T::write_xdr(self, w)) - } -} - -impl ReadXdr for () { - #[cfg(feature = "std")] - fn read_xdr(_r: &mut Limited) -> Result { - Ok(()) - } -} - -impl WriteXdr for () { - #[cfg(feature = "std")] - fn write_xdr(&self, _w: &mut Limited) -> Result<(), Error> { - Ok(()) - } -} - -impl ReadXdr for [u8; N] { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - r.consume_len(N)?; - let padding = pad_len(N); - r.consume_len(padding)?; - let mut arr = [0u8; N]; - r.read_exact(&mut arr)?; - let pad = &mut [0u8; 3][..padding]; - r.read_exact(pad)?; - if pad.iter().any(|b| *b != 0) { - return Err(Error::NonZeroPadding); - } - Ok(arr) - }) - } -} - -impl WriteXdr for [u8; N] { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - w.consume_len(N)?; - let padding = pad_len(N); - w.consume_len(padding)?; - w.write_all(self)?; - w.write_all(&[0u8; 3][..padding])?; - Ok(()) - }) - } -} - -impl ReadXdr for [T; N] { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let mut vec = Vec::with_capacity(N); - for _ in 0..N { - let t = T::read_xdr(r)?; - vec.push(t); - } - let arr: [T; N] = vec.try_into().unwrap_or_else(|_: Vec| unreachable!()); - Ok(arr) - }) - } -} - -impl WriteXdr for [T; N] { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - for t in self { - t.write_xdr(w)?; - } - Ok(()) - }) - } -} - -// VecM ------------------------------------------------------------------------ - -#[cfg(feature = "alloc")] -#[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr( - feature = "serde", - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize) -)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -pub struct VecM(Vec); - -#[cfg(not(feature = "alloc"))] -#[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -pub struct VecM(Vec) -where - T: 'static; - -impl Deref for VecM { - type Target = Vec; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl Default for VecM { - fn default() -> Self { - Self(Vec::default()) - } -} - -#[cfg(feature = "schemars")] -impl schemars::JsonSchema for VecM { - fn schema_name() -> String { - format!("VecM<{}, {}>", T::schema_name(), MAX) - } - - fn is_referenceable() -> bool { - false - } - - fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { - let schema = Vec::::json_schema(gen); - if let schemars::schema::Schema::Object(mut schema) = schema { - if let Some(array) = schema.array.clone() { - schema.array = Some(Box::new(schemars::schema::ArrayValidation { - max_items: Some(MAX), - ..*array - })); - } - schema.into() - } else { - schema - } - } -} - -#[cfg(feature = "schemars")] -impl serde_with::schemars_0_8::JsonSchemaAs> for VecM -where - TA: serde_with::schemars_0_8::JsonSchemaAs, -{ - fn schema_name() -> String { - , MAX> as schemars::JsonSchema>::schema_name() - } - - fn schema_id() -> Cow<'static, str> { - , MAX> as schemars::JsonSchema>::schema_id() - } - - fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { - , MAX> as schemars::JsonSchema>::json_schema(gen) - } - - fn is_referenceable() -> bool { - , MAX> as schemars::JsonSchema>::is_referenceable() - } -} - -#[cfg(feature = "serde")] -impl serde_with::SerializeAs> for VecM -where - U: serde_with::SerializeAs, -{ - fn serialize_as(source: &VecM, serializer: S) -> Result - where - S: serde::Serializer, - { - serializer.collect_seq( - source - .iter() - .map(|item| serde_with::ser::SerializeAsWrap::::new(item)), - ) - } -} - -#[cfg(feature = "serde")] -impl<'de, T, U, const MAX: u32> serde_with::DeserializeAs<'de, VecM> for VecM -where - U: serde_with::DeserializeAs<'de, T>, -{ - fn deserialize_as(deserializer: D) -> Result, D::Error> - where - D: serde::Deserializer<'de>, - { - let vec = as serde_with::DeserializeAs>>::deserialize_as(deserializer)?; - vec.try_into().map_err(serde::de::Error::custom) - } -} - -impl VecM { - pub const MAX_LEN: usize = { MAX as usize }; - - #[must_use] - #[allow(clippy::unused_self)] - pub fn max_len(&self) -> usize { - Self::MAX_LEN - } - - #[must_use] - pub fn as_vec(&self) -> &Vec { - self.as_ref() - } -} - -#[cfg(feature = "alloc")] -impl VecM { - pub fn iter_mut(&mut self) -> core::slice::IterMut<'_, T> { - self.0.iter_mut() - } -} - -#[cfg(feature = "alloc")] -impl<'a, T, const MAX: u32> core::iter::IntoIterator for &'a mut VecM { - type Item = &'a mut T; - type IntoIter = core::slice::IterMut<'a, T>; - fn into_iter(self) -> Self::IntoIter { - self.iter_mut() - } -} - -#[cfg(feature = "alloc")] -impl core::iter::IntoIterator for VecM { - type Item = T; - type IntoIter = as IntoIterator>::IntoIter; - fn into_iter(self) -> Self::IntoIter { - self.0.into_iter() - } -} - -impl<'a, T, const MAX: u32> core::iter::IntoIterator for &'a VecM { - type Item = &'a T; - type IntoIter = core::slice::Iter<'a, T>; - fn into_iter(self) -> Self::IntoIter { - self.iter() - } -} - -impl VecM { - #[must_use] - #[cfg(feature = "alloc")] - pub fn to_vec(&self) -> Vec { - self.into() - } - - #[must_use] - pub fn into_vec(self) -> Vec { - self.into() - } -} - -impl VecM { - #[cfg(feature = "alloc")] - pub fn to_string(&self) -> Result { - self.try_into() - } - - #[cfg(feature = "alloc")] - pub fn into_string(self) -> Result { - self.try_into() - } - - #[cfg(feature = "alloc")] - #[must_use] - pub fn to_string_lossy(&self) -> String { - String::from_utf8_lossy(&self.0).into_owned() - } - - #[cfg(feature = "alloc")] - #[must_use] - pub fn into_string_lossy(self) -> String { - String::from_utf8_lossy(&self.0).into_owned() - } -} - -impl VecM { - #[must_use] - pub fn to_option(&self) -> Option { - if self.len() > 0 { - Some(self.0[0].clone()) - } else { - None - } - } -} - -#[cfg(not(feature = "alloc"))] -impl From> for Option { - #[must_use] - fn from(v: VecM) -> Self { - v.to_option() - } -} - -#[cfg(feature = "alloc")] -impl VecM { - #[must_use] - pub fn into_option(mut self) -> Option { - self.0.drain(..).next() - } -} - -#[cfg(feature = "alloc")] -impl From> for Option { - #[must_use] - fn from(v: VecM) -> Self { - v.into_option() - } -} - -impl TryFrom> for VecM { - type Error = Error; - - fn try_from(v: Vec) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(VecM(v)) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -impl From> for Vec { - #[must_use] - fn from(v: VecM) -> Self { - v.0 - } -} - -#[cfg(feature = "alloc")] -impl From<&VecM> for Vec { - #[must_use] - fn from(v: &VecM) -> Self { - v.0.clone() - } -} - -impl AsRef> for VecM { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for VecM { - type Error = Error; - - fn try_from(v: &Vec) -> Result { - v.as_slice().try_into() - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&[T]> for VecM { - type Error = Error; - - fn try_from(v: &[T]) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(VecM(v.to_vec())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -impl AsRef<[T]> for VecM { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[T] { - self.0.as_ref() - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[T] { - self.0 - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<[T; N]> for VecM { - type Error = Error; - - fn try_from(v: [T; N]) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(VecM(v.to_vec())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom> for [T; N] { - type Error = VecM; - - fn try_from(v: VecM) -> core::result::Result { - let s: [T; N] = v.0.try_into().map_err(|v: Vec| VecM::(v))?; - Ok(s) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&[T; N]> for VecM { - type Error = Error; - - fn try_from(v: &[T; N]) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(VecM(v.to_vec())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(not(feature = "alloc"))] -impl TryFrom<&'static [T; N]> for VecM { - type Error = Error; - - fn try_from(v: &'static [T; N]) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(VecM(v)) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&String> for VecM { - type Error = Error; - - fn try_from(v: &String) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(VecM(v.as_bytes().to_vec())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom for VecM { - type Error = Error; - - fn try_from(v: String) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(VecM(v.into())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom> for String { - type Error = Error; - - fn try_from(v: VecM) -> Result { - Ok(String::from_utf8(v.0)?) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&VecM> for String { - type Error = Error; - - fn try_from(v: &VecM) -> Result { - Ok(core::str::from_utf8(v.as_ref())?.to_owned()) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&str> for VecM { - type Error = Error; - - fn try_from(v: &str) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(VecM(v.into())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(not(feature = "alloc"))] -impl TryFrom<&'static str> for VecM { - type Error = Error; - - fn try_from(v: &'static str) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(VecM(v.as_bytes())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -impl<'a, const MAX: u32> TryFrom<&'a VecM> for &'a str { - type Error = Error; - - fn try_from(v: &'a VecM) -> Result { - Ok(core::str::from_utf8(v.as_ref())?) - } -} - -impl ReadXdr for VecM { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let len: u32 = u32::read_xdr(r)?; - if len > MAX { - return Err(Error::LengthExceedsMax); - } - - r.consume_len(len as usize)?; - let padding = pad_len(len as usize); - r.consume_len(padding)?; - - let mut vec = vec![0u8; len as usize]; - r.read_exact(&mut vec)?; - - let pad = &mut [0u8; 3][..padding]; - r.read_exact(pad)?; - if pad.iter().any(|b| *b != 0) { - return Err(Error::NonZeroPadding); - } - - Ok(VecM(vec)) - }) - } -} - -impl WriteXdr for VecM { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - len.write_xdr(w)?; - - w.consume_len(self.len())?; - let padding = pad_len(self.len()); - w.consume_len(padding)?; - - w.write_all(&self.0)?; - - w.write_all(&[0u8; 3][..padding])?; - - Ok(()) - }) - } -} - -impl ReadXdr for VecM { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let len = u32::read_xdr(r)?; - if len > MAX { - return Err(Error::LengthExceedsMax); - } - - let mut vec = Vec::new(); - for _ in 0..len { - let t = T::read_xdr(r)?; - vec.push(t); - } - - Ok(VecM(vec)) - }) - } -} - -impl WriteXdr for VecM { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - len.write_xdr(w)?; - - for t in &self.0 { - t.write_xdr(w)?; - } - - Ok(()) - }) - } -} - -// BytesM ------------------------------------------------------------------------ - -#[cfg(feature = "alloc")] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr( - feature = "serde", - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -pub struct BytesM(Vec); - -#[cfg(not(feature = "alloc"))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -pub struct BytesM(Vec); - -impl core::fmt::Display for BytesM { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - #[cfg(feature = "alloc")] - let v = &self.0; - #[cfg(not(feature = "alloc"))] - let v = self.0; - for b in v { - write!(f, "{b:02x}")?; - } - Ok(()) - } -} - -impl core::fmt::Debug for BytesM { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - #[cfg(feature = "alloc")] - let v = &self.0; - #[cfg(not(feature = "alloc"))] - let v = self.0; - write!(f, "BytesM(")?; - for b in v { - write!(f, "{b:02x}")?; - } - write!(f, ")")?; - Ok(()) - } -} - -#[cfg(feature = "alloc")] -impl core::str::FromStr for BytesM { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - hex::decode(s).map_err(|_| Error::InvalidHex)?.try_into() - } -} - -impl Deref for BytesM { - type Target = Vec; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -#[cfg(feature = "schemars")] -impl schemars::JsonSchema for BytesM { - fn schema_name() -> String { - format!("BytesM<{MAX}>") - } - - fn is_referenceable() -> bool { - false - } - - fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { - let schema = String::json_schema(gen); - if let schemars::schema::Schema::Object(mut schema) = schema { - schema.extensions.insert( - "contentEncoding".to_owned(), - serde_json::Value::String("hex".to_string()), - ); - schema.extensions.insert( - "contentMediaType".to_owned(), - serde_json::Value::String("application/binary".to_string()), - ); - let string = *schema.string.unwrap_or_default().clone(); - schema.string = Some(Box::new(schemars::schema::StringValidation { - max_length: MAX.checked_mul(2).map(Some).unwrap_or_default(), - min_length: None, - ..string - })); - schema.into() - } else { - schema - } - } -} - -impl Default for BytesM { - fn default() -> Self { - Self(Vec::default()) - } -} - -impl BytesM { - pub const MAX_LEN: usize = { MAX as usize }; - - #[must_use] - #[allow(clippy::unused_self)] - pub fn max_len(&self) -> usize { - Self::MAX_LEN - } - - #[must_use] - pub fn as_vec(&self) -> &Vec { - self.as_ref() - } -} - -impl BytesM { - #[must_use] - #[cfg(feature = "alloc")] - pub fn to_vec(&self) -> Vec { - self.into() - } - - #[must_use] - pub fn into_vec(self) -> Vec { - self.into() - } -} - -impl BytesM { - #[cfg(feature = "alloc")] - pub fn to_string(&self) -> Result { - self.try_into() - } - - #[cfg(feature = "alloc")] - pub fn into_string(self) -> Result { - self.try_into() - } - - #[cfg(feature = "alloc")] - #[must_use] - pub fn to_string_lossy(&self) -> String { - String::from_utf8_lossy(&self.0).into_owned() - } - - #[cfg(feature = "alloc")] - #[must_use] - pub fn into_string_lossy(self) -> String { - String::from_utf8_lossy(&self.0).into_owned() - } -} - -impl TryFrom> for BytesM { - type Error = Error; - - fn try_from(v: Vec) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(BytesM(v)) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -impl From> for Vec { - #[must_use] - fn from(v: BytesM) -> Self { - v.0 - } -} - -#[cfg(feature = "alloc")] -impl From<&BytesM> for Vec { - #[must_use] - fn from(v: &BytesM) -> Self { - v.0.clone() - } -} - -impl AsRef> for BytesM { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for BytesM { - type Error = Error; - - fn try_from(v: &Vec) -> Result { - v.as_slice().try_into() - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&[u8]> for BytesM { - type Error = Error; - - fn try_from(v: &[u8]) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(BytesM(v.to_vec())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -impl AsRef<[u8]> for BytesM { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0.as_ref() - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0 - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<[u8; N]> for BytesM { - type Error = Error; - - fn try_from(v: [u8; N]) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(BytesM(v.to_vec())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom> for [u8; N] { - type Error = BytesM; - - fn try_from(v: BytesM) -> core::result::Result { - let s: [u8; N] = v.0.try_into().map_err(BytesM::)?; - Ok(s) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&[u8; N]> for BytesM { - type Error = Error; - - fn try_from(v: &[u8; N]) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(BytesM(v.to_vec())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(not(feature = "alloc"))] -impl TryFrom<&'static [u8; N]> for BytesM { - type Error = Error; - - fn try_from(v: &'static [u8; N]) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(BytesM(v)) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&String> for BytesM { - type Error = Error; - - fn try_from(v: &String) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(BytesM(v.as_bytes().to_vec())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom for BytesM { - type Error = Error; - - fn try_from(v: String) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(BytesM(v.into())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom> for String { - type Error = Error; - - fn try_from(v: BytesM) -> Result { - Ok(String::from_utf8(v.0)?) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&BytesM> for String { - type Error = Error; - - fn try_from(v: &BytesM) -> Result { - Ok(core::str::from_utf8(v.as_ref())?.to_owned()) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&str> for BytesM { - type Error = Error; - - fn try_from(v: &str) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(BytesM(v.into())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(not(feature = "alloc"))] -impl TryFrom<&'static str> for BytesM { - type Error = Error; - - fn try_from(v: &'static str) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(BytesM(v.as_bytes())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -impl<'a, const MAX: u32> TryFrom<&'a BytesM> for &'a str { - type Error = Error; - - fn try_from(v: &'a BytesM) -> Result { - Ok(core::str::from_utf8(v.as_ref())?) - } -} - -impl ReadXdr for BytesM { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let len: u32 = u32::read_xdr(r)?; - if len > MAX { - return Err(Error::LengthExceedsMax); - } - - r.consume_len(len as usize)?; - let padding = pad_len(len as usize); - r.consume_len(padding)?; - - let mut vec = vec![0u8; len as usize]; - r.read_exact(&mut vec)?; - - let pad = &mut [0u8; 3][..padding]; - r.read_exact(pad)?; - if pad.iter().any(|b| *b != 0) { - return Err(Error::NonZeroPadding); - } - - Ok(BytesM(vec)) - }) - } -} - -impl WriteXdr for BytesM { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - len.write_xdr(w)?; - - w.consume_len(self.len())?; - let padding = pad_len(self.len()); - w.consume_len(padding)?; - - w.write_all(&self.0)?; - - w.write_all(&[0u8; 3][..pad_len(len as usize)])?; - - Ok(()) - }) - } -} - -// StringM ------------------------------------------------------------------------ - -/// A string type that contains arbitrary bytes. -/// -/// Convertible, fallibly, to/from a Rust UTF-8 String using -/// [`TryFrom`]/[`TryInto`]/[`StringM::to_utf8_string`]. -/// -/// Convertible, lossyly, to a Rust UTF-8 String using -/// [`StringM::to_utf8_string_lossy`]. -/// -/// Convertible to/from escaped printable-ASCII using -/// [`Display`]/[`ToString`]/[`FromStr`]. - -#[cfg(feature = "alloc")] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr( - feature = "serde", - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -pub struct StringM(Vec); - -#[cfg(not(feature = "alloc"))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -pub struct StringM(Vec); - -impl core::fmt::Display for StringM { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - #[cfg(feature = "alloc")] - let v = &self.0; - #[cfg(not(feature = "alloc"))] - let v = self.0; - for b in escape_bytes::Escape::new(v) { - write!(f, "{}", b as char)?; - } - Ok(()) - } -} - -impl core::fmt::Debug for StringM { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - #[cfg(feature = "alloc")] - let v = &self.0; - #[cfg(not(feature = "alloc"))] - let v = self.0; - write!(f, "StringM(")?; - for b in escape_bytes::Escape::new(v) { - write!(f, "{}", b as char)?; - } - write!(f, ")")?; - Ok(()) - } -} - -#[cfg(feature = "alloc")] -impl core::str::FromStr for StringM { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let b = escape_bytes::unescape(s.as_bytes()).map_err(|_| Error::Invalid)?; - b.try_into() - } -} - -impl Deref for StringM { - type Target = Vec; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl Default for StringM { - fn default() -> Self { - Self(Vec::default()) - } -} - -#[cfg(feature = "schemars")] -impl schemars::JsonSchema for StringM { - fn schema_name() -> String { - format!("StringM<{MAX}>") - } - - fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { - let schema = String::json_schema(gen); - if let schemars::schema::Schema::Object(mut schema) = schema { - let string = *schema.string.unwrap_or_default().clone(); - schema.string = Some(Box::new(schemars::schema::StringValidation { - max_length: Some(MAX), - ..string - })); - schema.into() - } else { - schema - } - } -} - -impl StringM { - pub const MAX_LEN: usize = { MAX as usize }; - - #[must_use] - #[allow(clippy::unused_self)] - pub fn max_len(&self) -> usize { - Self::MAX_LEN - } - - #[must_use] - pub fn as_vec(&self) -> &Vec { - self.as_ref() - } -} - -impl StringM { - #[must_use] - #[cfg(feature = "alloc")] - pub fn to_vec(&self) -> Vec { - self.into() - } - - #[must_use] - pub fn into_vec(self) -> Vec { - self.into() - } -} - -impl StringM { - #[cfg(feature = "alloc")] - pub fn to_utf8_string(&self) -> Result { - self.try_into() - } - - #[cfg(feature = "alloc")] - pub fn into_utf8_string(self) -> Result { - self.try_into() - } - - #[cfg(feature = "alloc")] - #[must_use] - pub fn to_utf8_string_lossy(&self) -> String { - String::from_utf8_lossy(&self.0).into_owned() - } - - #[cfg(feature = "alloc")] - #[must_use] - pub fn into_utf8_string_lossy(self) -> String { - String::from_utf8_lossy(&self.0).into_owned() - } -} - -impl TryFrom> for StringM { - type Error = Error; - - fn try_from(v: Vec) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(StringM(v)) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -impl From> for Vec { - #[must_use] - fn from(v: StringM) -> Self { - v.0 - } -} - -#[cfg(feature = "alloc")] -impl From<&StringM> for Vec { - #[must_use] - fn from(v: &StringM) -> Self { - v.0.clone() - } -} - -impl AsRef> for StringM { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for StringM { - type Error = Error; - - fn try_from(v: &Vec) -> Result { - v.as_slice().try_into() - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&[u8]> for StringM { - type Error = Error; - - fn try_from(v: &[u8]) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(StringM(v.to_vec())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -impl AsRef<[u8]> for StringM { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0.as_ref() - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0 - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<[u8; N]> for StringM { - type Error = Error; - - fn try_from(v: [u8; N]) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(StringM(v.to_vec())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom> for [u8; N] { - type Error = StringM; - - fn try_from(v: StringM) -> core::result::Result { - let s: [u8; N] = v.0.try_into().map_err(StringM::)?; - Ok(s) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&[u8; N]> for StringM { - type Error = Error; - - fn try_from(v: &[u8; N]) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(StringM(v.to_vec())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(not(feature = "alloc"))] -impl TryFrom<&'static [u8; N]> for StringM { - type Error = Error; - - fn try_from(v: &'static [u8; N]) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(StringM(v)) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&String> for StringM { - type Error = Error; - - fn try_from(v: &String) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(StringM(v.as_bytes().to_vec())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom for StringM { - type Error = Error; - - fn try_from(v: String) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(StringM(v.into())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom> for String { - type Error = Error; - - fn try_from(v: StringM) -> Result { - Ok(String::from_utf8(v.0)?) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&StringM> for String { - type Error = Error; - - fn try_from(v: &StringM) -> Result { - Ok(core::str::from_utf8(v.as_ref())?.to_owned()) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&str> for StringM { - type Error = Error; - - fn try_from(v: &str) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(StringM(v.into())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -#[cfg(not(feature = "alloc"))] -impl TryFrom<&'static str> for StringM { - type Error = Error; - - fn try_from(v: &'static str) -> Result { - let len: u32 = v.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - if len <= MAX { - Ok(StringM(v.as_bytes())) - } else { - Err(Error::LengthExceedsMax) - } - } -} - -impl<'a, const MAX: u32> TryFrom<&'a StringM> for &'a str { - type Error = Error; - - fn try_from(v: &'a StringM) -> Result { - Ok(core::str::from_utf8(v.as_ref())?) - } -} - -impl ReadXdr for StringM { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let len: u32 = u32::read_xdr(r)?; - if len > MAX { - return Err(Error::LengthExceedsMax); - } - - r.consume_len(len as usize)?; - let padding = pad_len(len as usize); - r.consume_len(padding)?; - - let mut vec = vec![0u8; len as usize]; - r.read_exact(&mut vec)?; - - let pad = &mut [0u8; 3][..padding]; - r.read_exact(pad)?; - if pad.iter().any(|b| *b != 0) { - return Err(Error::NonZeroPadding); - } - - Ok(StringM(vec)) - }) - } -} - -impl WriteXdr for StringM { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; - len.write_xdr(w)?; - - w.consume_len(self.len())?; - let padding = pad_len(self.len()); - w.consume_len(padding)?; - - w.write_all(&self.0)?; - - w.write_all(&[0u8; 3][..padding])?; - - Ok(()) - }) - } -} - -// Frame ------------------------------------------------------------------------ - -/// Frame wraps an XDR object with the framing defined by the Record Marking -/// Standard in [RFC 5531 Section 11]. -/// -/// Each frame begins with a 4-byte big-endian header where: -/// - Bit 31 (high bit) is the last-fragment flag (`1` = last fragment). -/// - Bits 0-30 contain the byte length of the fragment data that follows. -/// -/// A record is composed of one or more fragments. In Stellar's usage each -/// record contains exactly one XDR object encoded as a single fragment with -/// the last-fragment bit set. -/// -/// [RFC 5531 Section 11]: https://www.rfc-editor.org/rfc/rfc5531#section-11 -#[derive(Default, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -pub struct Frame(pub T) -where - T: ReadXdr; - -#[cfg(feature = "schemars")] -impl schemars::JsonSchema for Frame { - fn schema_name() -> String { - format!("Frame<{}>", T::schema_name()) - } - - fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { - T::json_schema(gen) - } -} - -impl ReadXdr for Frame -where - T: ReadXdr, -{ - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - // Read the 4-byte fragment header defined by the Record Marking - // Standard in RFC 5531 Section 11 - // (https://www.rfc-editor.org/rfc/rfc5531#section-11). - // - Bit 31 (high bit) is the last-fragment flag: 1 if this is the - // last fragment of the record, 0 if more fragments follow. - // - Bits 0-30 contain the byte length of the fragment data that - // follows the header. - let header = u32::read_xdr(r)?; - // TODO: Use the length and cap the length we'll read from `r`. - let last_record = header >> 31 == 1; - if last_record { - // Read the record in the frame. - Ok(Self(T::read_xdr(r)?)) - } else { - // TODO: Support reading those additional frames for the same - // record. - Err(Error::Unsupported) - } - } -} - -/// Forwards read operations to the wrapped object, skipping over any -/// whitespace. -#[cfg(feature = "std")] -pub struct SkipWhitespace { - pub inner: R, -} - -#[cfg(feature = "std")] -impl SkipWhitespace { - pub fn new(inner: R) -> Self { - SkipWhitespace { inner } - } -} - -#[cfg(feature = "std")] -impl Read for SkipWhitespace { - fn read(&mut self, buf: &mut [u8]) -> std::io::Result { - let n = self.inner.read(buf)?; - - let mut written = 0; - for read in 0..n { - if !buf[read].is_ascii_whitespace() { - buf[written] = buf[read]; - written += 1; - } - } - - Ok(written) - } -} - -#[cfg(all(test, feature = "std"))] -mod test_skip_whitespace { - use super::*; - - #[test] - fn test() { - struct Test { - input: &'static [u8], - output: &'static [u8], - } - let tests = [ - Test { - input: b"", - output: b"", - }, - Test { - input: b" \n\t\r", - output: b"", - }, - Test { - input: b"a c", - output: b"ac", - }, - Test { - input: b"ab cd", - output: b"abcd", - }, - Test { - input: b" ab \n cd ", - output: b"abcd", - }, - ]; - for (i, t) in tests.iter().enumerate() { - let mut skip = SkipWhitespace::new(t.input); - let mut output = Vec::new(); - skip.read_to_end(&mut output).unwrap(); - assert_eq!(output, t.output, "#{i}"); - } - } -} - -// NumberOrString --------------------------------------------------------------- - -/// NumberOrString is a serde_as serializer/deserializer. -/// -/// It deserializers any integer that fits into a 64-bit value into an i64 or u64 field from either -/// a JSON Number or JSON String value. -/// -/// It serializes always to a string. -/// -/// It has a JsonSchema implementation that only advertises that the allowed format is a String. -/// This is because the type is intended to soften the changing of fields from JSON Number to JSON -/// String by permitting deserialization, but discourage new uses of JSON Number. -#[cfg(feature = "serde")] -struct NumberOrString; - -#[cfg(feature = "serde")] -impl<'de> serde_with::DeserializeAs<'de, i64> for NumberOrString { - fn deserialize_as(deserializer: D) -> Result - where - D: serde::Deserializer<'de>, - { - use serde::Deserialize; - #[derive(Deserialize)] - #[serde(untagged)] - enum I64OrString<'a> { - Str(&'a str), - String(String), - I64(i64), - } - match I64OrString::deserialize(deserializer)? { - I64OrString::Str(s) => s.parse().map_err(serde::de::Error::custom), - I64OrString::String(s) => s.parse().map_err(serde::de::Error::custom), - I64OrString::I64(v) => Ok(v), - } - } -} - -#[cfg(feature = "serde")] -impl<'de> serde_with::DeserializeAs<'de, u64> for NumberOrString { - fn deserialize_as(deserializer: D) -> Result - where - D: serde::Deserializer<'de>, - { - use serde::Deserialize; - #[derive(Deserialize)] - #[serde(untagged)] - enum U64OrString<'a> { - Str(&'a str), - String(String), - U64(u64), - } - match U64OrString::deserialize(deserializer)? { - U64OrString::Str(s) => s.parse().map_err(serde::de::Error::custom), - U64OrString::String(s) => s.parse().map_err(serde::de::Error::custom), - U64OrString::U64(v) => Ok(v), - } - } -} - -#[cfg(feature = "serde")] -impl serde_with::SerializeAs for NumberOrString { - fn serialize_as(source: &i64, serializer: S) -> Result - where - S: serde::Serializer, - { - serializer.collect_str(source) - } -} - -#[cfg(feature = "serde")] -impl serde_with::SerializeAs for NumberOrString { - fn serialize_as(source: &u64, serializer: S) -> Result - where - S: serde::Serializer, - { - serializer.collect_str(source) - } -} - -#[cfg(feature = "schemars")] -impl serde_with::schemars_0_8::JsonSchemaAs for NumberOrString { - fn schema_name() -> String { - ::schema_name() - } - - fn schema_id() -> std::borrow::Cow<'static, str> { - ::schema_id() - } - - fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { - ::json_schema(gen) - } - - fn is_referenceable() -> bool { - ::is_referenceable() - } -} - -// Tests ------------------------------------------------------------------------ - -#[cfg(all(test, feature = "std"))] -mod tests { - use std::io::Cursor; - - use super::*; - - #[test] - pub fn vec_u8_read_without_padding() { - let buf = Cursor::new(vec![0, 0, 0, 4, 2, 2, 2, 2]); - let v = VecM::::read_xdr(&mut Limited::new(buf, Limits::none())).unwrap(); - assert_eq!(v.to_vec(), vec![2, 2, 2, 2]); - } - - #[test] - pub fn vec_u8_read_with_padding() { - let buf = Cursor::new(vec![0, 0, 0, 1, 2, 0, 0, 0]); - let v = VecM::::read_xdr(&mut Limited::new(buf, Limits::none())).unwrap(); - assert_eq!(v.to_vec(), vec![2]); - } - - #[test] - pub fn vec_u8_read_with_insufficient_padding() { - let buf = Cursor::new(vec![0, 0, 0, 1, 2, 0, 0]); - let res = VecM::::read_xdr(&mut Limited::new(buf, Limits::none())); - match res { - Err(Error::Io(_)) => (), - _ => panic!("expected IO error got {res:?}"), - } - } - - #[test] - pub fn vec_u8_read_with_non_zero_padding() { - let buf = Cursor::new(vec![0, 0, 0, 1, 2, 3, 0, 0]); - let res = VecM::::read_xdr(&mut Limited::new(buf, Limits::none())); - match res { - Err(Error::NonZeroPadding) => (), - _ => panic!("expected NonZeroPadding got {res:?}"), - } - } - - #[test] - pub fn vec_u8_write_without_padding() { - let mut buf = vec![]; - let v: VecM = vec![2, 2, 2, 2].try_into().unwrap(); - - v.write_xdr(&mut Limited::new(Cursor::new(&mut buf), Limits::none())) - .unwrap(); - assert_eq!(buf, vec![0, 0, 0, 4, 2, 2, 2, 2]); - } - - #[test] - pub fn vec_u8_write_with_padding() { - let mut buf = vec![]; - let v: VecM = vec![2].try_into().unwrap(); - v.write_xdr(&mut Limited::new(Cursor::new(&mut buf), Limits::none())) - .unwrap(); - assert_eq!(buf, vec![0, 0, 0, 1, 2, 0, 0, 0]); - } - - #[test] - pub fn arr_u8_read_without_padding() { - let buf = Cursor::new(vec![2, 2, 2, 2]); - let v = <[u8; 4]>::read_xdr(&mut Limited::new(buf, Limits::none())).unwrap(); - assert_eq!(v, [2, 2, 2, 2]); - } - - #[test] - pub fn arr_u8_read_with_padding() { - let buf = Cursor::new(vec![2, 0, 0, 0]); - let v = <[u8; 1]>::read_xdr(&mut Limited::new(buf, Limits::none())).unwrap(); - assert_eq!(v, [2]); - } - - #[test] - pub fn arr_u8_read_with_insufficient_padding() { - let buf = Cursor::new(vec![2, 0, 0]); - let res = <[u8; 1]>::read_xdr(&mut Limited::new(buf, Limits::none())); - match res { - Err(Error::Io(_)) => (), - _ => panic!("expected IO error got {res:?}"), - } - } - - #[test] - pub fn arr_u8_read_with_non_zero_padding() { - let buf = Cursor::new(vec![2, 3, 0, 0]); - let res = <[u8; 1]>::read_xdr(&mut Limited::new(buf, Limits::none())); - match res { - Err(Error::NonZeroPadding) => (), - _ => panic!("expected NonZeroPadding got {res:?}"), - } - } - - #[test] - pub fn arr_u8_write_without_padding() { - let mut buf = vec![]; - [2u8, 2, 2, 2] - .write_xdr(&mut Limited::new(Cursor::new(&mut buf), Limits::none())) - .unwrap(); - assert_eq!(buf, vec![2, 2, 2, 2]); - } - - #[test] - pub fn arr_u8_write_with_padding() { - let mut buf = vec![]; - [2u8] - .write_xdr(&mut Limited::new(Cursor::new(&mut buf), Limits::none())) - .unwrap(); - assert_eq!(buf, vec![2, 0, 0, 0]); - } -} - -#[cfg(all(test, feature = "std"))] -mod test { - use super::*; - - #[test] - fn into_option_none() { - let v: VecM = vec![].try_into().unwrap(); - assert_eq!(v.into_option(), None); - } - - #[test] - fn into_option_some() { - let v: VecM<_, 1> = vec![1].try_into().unwrap(); - assert_eq!(v.into_option(), Some(1)); - } - - #[test] - fn to_option_none() { - let v: VecM = vec![].try_into().unwrap(); - assert_eq!(v.to_option(), None); - } - - #[test] - fn to_option_some() { - let v: VecM<_, 1> = vec![1].try_into().unwrap(); - assert_eq!(v.to_option(), Some(1)); - } - - #[test] - fn depth_limited_read_write_under_the_limit_success() { - let a: Option>> = Some(Some(Some(5))); - let mut buf = Limited::new(Vec::new(), Limits::depth(4)); - a.write_xdr(&mut buf).unwrap(); - - let mut dlr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::depth(4)); - let a_back: Option>> = ReadXdr::read_xdr(&mut dlr).unwrap(); - assert_eq!(a, a_back); - } - - #[test] - fn write_over_depth_limit_fail() { - let a: Option>> = Some(Some(Some(5))); - let mut buf = Limited::new(Vec::new(), Limits::depth(3)); - let res = a.write_xdr(&mut buf); - match res { - Err(Error::DepthLimitExceeded) => (), - _ => panic!("expected DepthLimitExceeded got {res:?}"), - } - } - - #[test] - fn read_over_depth_limit_fail() { - let read_limits = Limits::depth(3); - let write_limits = Limits::depth(5); - let a: Option>> = Some(Some(Some(5))); - let mut buf = Limited::new(Vec::new(), write_limits); - a.write_xdr(&mut buf).unwrap(); - - let mut dlr = Limited::new(Cursor::new(buf.inner.as_slice()), read_limits); - let res: Result>>, _> = ReadXdr::read_xdr(&mut dlr); - match res { - Err(Error::DepthLimitExceeded) => (), - _ => panic!("expected DepthLimitExceeded got {res:?}"), - } - } - - #[test] - fn length_limited_read_write_i32() { - // Exact limit, success - let v = 123i32; - let mut buf = Limited::new(Vec::new(), Limits::len(4)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(4)); - let v_back: i32 = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 0); - assert_eq!(v, v_back); - - // Over limit, success - let v = 123i32; - let mut buf = Limited::new(Vec::new(), Limits::len(5)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 1); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(5)); - let v_back: i32 = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 1); - assert_eq!(v, v_back); - - // Write under limit, failure - let v = 123i32; - let mut buf = Limited::new(Vec::new(), Limits::len(3)); - assert_eq!(v.write_xdr(&mut buf), Err(Error::LengthLimitExceeded)); - - // Read under limit, failure - let v = 123i32; - let mut buf = Limited::new(Vec::new(), Limits::len(4)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(3)); - assert_eq!( - ::read_xdr(&mut lr), - Err(Error::LengthLimitExceeded) - ); - } - - #[test] - fn length_limited_read_write_u32() { - // Exact limit, success - let v = 123u32; - let mut buf = Limited::new(Vec::new(), Limits::len(4)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(4)); - let v_back: u32 = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 0); - assert_eq!(v, v_back); - - // Over limit, success - let v = 123u32; - let mut buf = Limited::new(Vec::new(), Limits::len(5)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 1); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(5)); - let v_back: u32 = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 1); - assert_eq!(v, v_back); - - // Write under limit, failure - let v = 123u32; - let mut buf = Limited::new(Vec::new(), Limits::len(3)); - assert_eq!(v.write_xdr(&mut buf), Err(Error::LengthLimitExceeded)); - - // Read under limit, failure - let v = 123u32; - let mut buf = Limited::new(Vec::new(), Limits::len(4)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(3)); - assert_eq!( - ::read_xdr(&mut lr), - Err(Error::LengthLimitExceeded) - ); - } - - #[test] - fn length_limited_read_write_i64() { - // Exact limit, success - let v = 123i64; - let mut buf = Limited::new(Vec::new(), Limits::len(8)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(8)); - let v_back: i64 = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 0); - assert_eq!(v, v_back); - - // Over limit, success - let v = 123i64; - let mut buf = Limited::new(Vec::new(), Limits::len(9)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 1); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(9)); - let v_back: i64 = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 1); - assert_eq!(v, v_back); - - // Write under limit, failure - let v = 123i64; - let mut buf = Limited::new(Vec::new(), Limits::len(7)); - assert_eq!(v.write_xdr(&mut buf), Err(Error::LengthLimitExceeded)); - - // Read under limit, failure - let v = 123i64; - let mut buf = Limited::new(Vec::new(), Limits::len(8)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(7)); - assert_eq!( - ::read_xdr(&mut lr), - Err(Error::LengthLimitExceeded) - ); - } - - #[test] - fn length_limited_read_write_u64() { - // Exact limit, success - let v = 123u64; - let mut buf = Limited::new(Vec::new(), Limits::len(8)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(8)); - let v_back: u64 = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 0); - assert_eq!(v, v_back); - - // Over limit, success - let v = 123u64; - let mut buf = Limited::new(Vec::new(), Limits::len(9)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 1); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(9)); - let v_back: u64 = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 1); - assert_eq!(v, v_back); - - // Write under limit, failure - let v = 123u64; - let mut buf = Limited::new(Vec::new(), Limits::len(7)); - assert_eq!(v.write_xdr(&mut buf), Err(Error::LengthLimitExceeded)); - - // Read under limit, failure - let v = 123u64; - let mut buf = Limited::new(Vec::new(), Limits::len(8)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(7)); - assert_eq!( - ::read_xdr(&mut lr), - Err(Error::LengthLimitExceeded) - ); - } - - #[test] - fn length_limited_read_write_bool() { - // Exact limit, success - let v = true; - let mut buf = Limited::new(Vec::new(), Limits::len(4)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(4)); - let v_back: bool = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 0); - assert_eq!(v, v_back); - - // Over limit, success - let v = true; - let mut buf = Limited::new(Vec::new(), Limits::len(5)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 1); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(5)); - let v_back: bool = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 1); - assert_eq!(v, v_back); - - // Write under limit, failure - let v = true; - let mut buf = Limited::new(Vec::new(), Limits::len(3)); - assert_eq!(v.write_xdr(&mut buf), Err(Error::LengthLimitExceeded)); - - // Read under limit, failure - let v = true; - let mut buf = Limited::new(Vec::new(), Limits::len(4)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(3)); - assert_eq!( - ::read_xdr(&mut lr), - Err(Error::LengthLimitExceeded) - ); - } - - #[test] - fn length_limited_read_write_option() { - // Exact limit, success - let v = Some(true); - let mut buf = Limited::new(Vec::new(), Limits::len(8)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(8)); - let v_back: Option = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 0); - assert_eq!(v, v_back); - - // Over limit, success - let v = Some(true); - let mut buf = Limited::new(Vec::new(), Limits::len(9)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 1); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(9)); - let v_back: Option = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 1); - assert_eq!(v, v_back); - - // Write under limit, failure - let v = Some(true); - let mut buf = Limited::new(Vec::new(), Limits::len(7)); - assert_eq!(v.write_xdr(&mut buf), Err(Error::LengthLimitExceeded)); - - // Read under limit, failure - let v = Some(true); - let mut buf = Limited::new(Vec::new(), Limits::len(8)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(7)); - assert_eq!( - as ReadXdr>::read_xdr(&mut lr), - Err(Error::LengthLimitExceeded) - ); - } - - #[test] - fn length_limited_read_write_array_u8() { - // Exact limit, success - let v = [1u8, 2, 3]; - let mut buf = Limited::new(Vec::new(), Limits::len(4)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(4)); - let v_back: [u8; 3] = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 0); - assert_eq!(v, v_back); - - // Over limit, success - let v = [1u8, 2, 3]; - let mut buf = Limited::new(Vec::new(), Limits::len(5)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 1); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(5)); - let v_back: [u8; 3] = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 1); - assert_eq!(v, v_back); - - // Write under limit, failure - let v = [1u8, 2, 3]; - let mut buf = Limited::new(Vec::new(), Limits::len(3)); - assert_eq!(v.write_xdr(&mut buf), Err(Error::LengthLimitExceeded)); - - // Read under limit, failure - let v = [1u8, 2, 3]; - let mut buf = Limited::new(Vec::new(), Limits::len(4)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(3)); - assert_eq!( - <[u8; 3] as ReadXdr>::read_xdr(&mut lr), - Err(Error::LengthLimitExceeded) - ); - } - - #[test] - fn length_limited_read_write_array_type() { - // Exact limit, success - let v = [true, false, true]; - let mut buf = Limited::new(Vec::new(), Limits::len(12)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(12)); - let v_back: [bool; 3] = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 0); - assert_eq!(v, v_back); - - // Over limit, success - let v = [true, false, true]; - let mut buf = Limited::new(Vec::new(), Limits::len(13)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 1); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(13)); - let v_back: [bool; 3] = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 1); - assert_eq!(v, v_back); - - // Write under limit, failure - let v = [true, false, true]; - let mut buf = Limited::new(Vec::new(), Limits::len(11)); - assert_eq!(v.write_xdr(&mut buf), Err(Error::LengthLimitExceeded)); - - // Read under limit, failure - let v = [true, false, true]; - let mut buf = Limited::new(Vec::new(), Limits::len(12)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(11)); - assert_eq!( - <[bool; 3] as ReadXdr>::read_xdr(&mut lr), - Err(Error::LengthLimitExceeded) - ); - } - - #[test] - fn length_limited_read_write_vec() { - // Exact limit, success - let v = VecM::::try_from([1i32, 2, 3]).unwrap(); - let mut buf = Limited::new(Vec::new(), Limits::len(16)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(16)); - let v_back: VecM = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 0); - assert_eq!(v, v_back); - - // Over limit, success - let v = VecM::::try_from([1i32, 2, 3]).unwrap(); - let mut buf = Limited::new(Vec::new(), Limits::len(17)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 1); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(17)); - let v_back: VecM = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 1); - assert_eq!(v, v_back); - - // Write under limit, failure - let v = VecM::::try_from([1i32, 2, 3]).unwrap(); - let mut buf = Limited::new(Vec::new(), Limits::len(15)); - assert_eq!(v.write_xdr(&mut buf), Err(Error::LengthLimitExceeded)); - - // Read under limit, failure - let v = VecM::::try_from([1i32, 2, 3]).unwrap(); - let mut buf = Limited::new(Vec::new(), Limits::len(16)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(15)); - assert_eq!( - as ReadXdr>::read_xdr(&mut lr), - Err(Error::LengthLimitExceeded) - ); - } - - #[test] - fn length_limited_read_write_bytes() { - // Exact limit, success - let v = BytesM::<3>::try_from([1u8, 2, 3]).unwrap(); - let mut buf = Limited::new(Vec::new(), Limits::len(8)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(8)); - let v_back: BytesM<3> = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 0); - assert_eq!(v, v_back); - - // Over limit, success - let v = BytesM::<3>::try_from([1u8, 2, 3]).unwrap(); - let mut buf = Limited::new(Vec::new(), Limits::len(9)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 1); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(9)); - let v_back: BytesM<3> = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 1); - assert_eq!(v, v_back); - - // Write under limit, failure - let v = BytesM::<3>::try_from([1u8, 2, 3]).unwrap(); - let mut buf = Limited::new(Vec::new(), Limits::len(7)); - assert_eq!(v.write_xdr(&mut buf), Err(Error::LengthLimitExceeded)); - - // Read under limit, failure - let v = BytesM::<3>::try_from([1u8, 2, 3]).unwrap(); - let mut buf = Limited::new(Vec::new(), Limits::len(8)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(7)); - assert_eq!( - as ReadXdr>::read_xdr(&mut lr), - Err(Error::LengthLimitExceeded) - ); - } - - #[test] - fn length_limited_read_write_string() { - // Exact limit, success - let v = StringM::<3>::try_from("123").unwrap(); - let mut buf = Limited::new(Vec::new(), Limits::len(8)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(8)); - let v_back: StringM<3> = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 0); - assert_eq!(v, v_back); - - // Over limit, success - let v = StringM::<3>::try_from("123").unwrap(); - let mut buf = Limited::new(Vec::new(), Limits::len(9)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 1); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(9)); - let v_back: StringM<3> = ReadXdr::read_xdr(&mut lr).unwrap(); - assert_eq!(buf.limits.len, 1); - assert_eq!(v, v_back); - - // Write under limit, failure - let v = StringM::<3>::try_from("123").unwrap(); - let mut buf = Limited::new(Vec::new(), Limits::len(7)); - assert_eq!(v.write_xdr(&mut buf), Err(Error::LengthLimitExceeded)); - - // Read under limit, failure - let v = StringM::<3>::try_from("123").unwrap(); - let mut buf = Limited::new(Vec::new(), Limits::len(8)); - v.write_xdr(&mut buf).unwrap(); - assert_eq!(buf.limits.len, 0); - let mut lr = Limited::new(Cursor::new(buf.inner.as_slice()), Limits::len(7)); - assert_eq!( - as ReadXdr>::read_xdr(&mut lr), - Err(Error::LengthLimitExceeded) - ); - } -} - -#[cfg(all(test, not(feature = "alloc")))] -mod test { - use super::VecM; - - #[test] - fn to_option_none() { - let v: VecM = (&[]).try_into().unwrap(); - assert_eq!(v.to_option(), None); - } - - #[test] - fn to_option_some() { - let v: VecM<_, 1> = (&[1]).try_into().unwrap(); - assert_eq!(v.to_option(), Some(1)); - } -} - -#[cfg(all(test, feature = "serde"))] -mod tests_for_number_or_string { - use super::*; - use serde::{Deserialize, Serialize}; - use serde_json; - use serde_with::serde_as; - - // --- Helper Structs --- - #[serde_as] - #[derive(Debug, PartialEq, Deserialize, Serialize)] - struct TestI64 { - #[serde_as(as = "NumberOrString")] - val: i64, - } - - #[serde_as] - #[derive(Debug, PartialEq, Deserialize, Serialize)] - struct TestU64 { - #[serde_as(as = "NumberOrString")] - val: u64, - } - - #[serde_as] - #[derive(Debug, PartialEq, Deserialize, Serialize)] - struct TestOptionI64 { - #[serde_as(as = "Option")] - val: Option, - } - - #[serde_as] - #[derive(Debug, PartialEq, Deserialize, Serialize)] - struct TestOptionU64 { - #[serde_as(as = "Option")] - val: Option, - } - - #[serde_as] - #[derive(Debug, PartialEq, Deserialize, Serialize)] - struct TestVecI64 { - #[serde_as(as = "Vec")] - val: Vec, - } - - #[serde_as] - #[derive(Debug, PartialEq, Deserialize, Serialize)] - struct TestVecU64 { - #[serde_as(as = "Vec")] - val: Vec, - } - - // Helper Enum for testing field access within variants - #[serde_as] - #[derive(Debug, PartialEq, Deserialize, Serialize)] - #[serde(rename_all = "camelCase")] // Added to make JSON keys distinct for variants - enum TestEnum { - VariantA { - #[serde(rename = "numVal")] - #[serde_as(as = "NumberOrString")] - num_val: i64, - #[serde(rename = "otherData")] - other_data: String, - }, - VariantB { - #[serde_as(as = "NumberOrString")] - count: u64, - }, - SimpleVariant, - } - - // --- i64 Deserialization Tests --- - #[test] - fn deserialize_i64_from_json_reader() { - let json = r#"{"val": "123"}"#; - let expected = TestI64 { val: 123 }; - assert_eq!( - serde_json::from_reader::<_, TestI64>(Cursor::new(json)).unwrap(), - expected - ); - } - - #[test] - fn deserialize_i64_from_json_number_positive() { - let json = r#"{"val": 123}"#; - let expected = TestI64 { val: 123 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_i64_from_json_number_negative() { - let json = r#"{"val": -456}"#; - let expected = TestI64 { val: -456 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_i64_from_json_number_zero() { - let json = r#"{"val": 0}"#; - let expected = TestI64 { val: 0 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_i64_from_json_number_max() { - let json = format!(r#"{{"val": {}}}"#, i64::MAX); - let expected = TestI64 { val: i64::MAX }; - assert_eq!(serde_json::from_str::(&json).unwrap(), expected); - } - - #[test] - fn deserialize_i64_from_json_number_min() { - let json = format!(r#"{{"val": {}}}"#, i64::MIN); - let expected = TestI64 { val: i64::MIN }; - assert_eq!(serde_json::from_str::(&json).unwrap(), expected); - } - - #[test] - fn deserialize_i64_from_json_string_positive() { - let json = r#"{"val": "789"}"#; - let expected = TestI64 { val: 789 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_i64_from_json_string_negative() { - let json = r#"{"val": "-101"}"#; - let expected = TestI64 { val: -101 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_i64_from_json_string_zero() { - let json = r#"{"val": "0"}"#; - let expected = TestI64 { val: 0 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_i64_from_json_string_max() { - let json = format!(r#"{{"val": "{}"}}"#, i64::MAX); - let expected = TestI64 { val: i64::MAX }; - assert_eq!(serde_json::from_str::(&json).unwrap(), expected); - } - - #[test] - fn deserialize_i64_from_json_string_min() { - let json = format!(r#"{{"val": "{}"}}"#, i64::MIN); - let expected = TestI64 { val: i64::MIN }; - assert_eq!(serde_json::from_str::(&json).unwrap(), expected); - } - - #[test] - fn deserialize_i64_from_json_string_with_plus_prefix() { - let json = r#"{"val": "+123"}"#; - let expected = TestI64 { val: 123 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_i64_from_json_string_with_plus_zero() { - let json = r#"{"val": "+0"}"#; - let expected = TestI64 { val: 0 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_i64_from_json_string_with_minus_zero() { - let json = r#"{"val": "-0"}"#; - let expected = TestI64 { val: 0 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_i64_error_from_json_string_with_leading_whitespace() { - let json = r#"{"val": " 123"}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_json_string_with_trailing_whitespace() { - let json = r#"{"val": "123 "}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_json_string_with_both_whitespace() { - let json = r#"{"val": " 123 "}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_json_string_with_invalid_plus_prefix() { - let json = r#"{"val": "++123"}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_json_string_with_invalid_minus_prefix() { - let json = r#"{"val": "--123"}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_json_string_with_invalid_mixed_prefix() { - let json = r#"{"val": "+-123"}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_string_not_a_number() { - let json = r#"{"val": "abc"}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_string_float() { - let json = r#"{"val": "123.45"}"#; // Not an integer - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_string_empty() { - let json = r#"{"val": ""}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_string_overflow() { - let overflow_val = i128::from(i64::MAX) + 1; - let json = format!(r#"{{"val": "{overflow_val}"}}"#); - assert!(serde_json::from_str::(&json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_string_underflow() { - let underflow_val = i128::from(i64::MIN) - 1; - let json = format!(r#"{{"val": "{underflow_val}"}}"#); - assert!(serde_json::from_str::(&json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_json_float_number() { - let json = r#"{"val": 123.45}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_json_bool_true() { - let json = r#"{"val": true}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_json_array() { - let json = r#"{"val": []}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_json_object() { - let json = r#"{"val": {}}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_i64_error_from_json_null() { - let json = r#"{"val": null}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - // -- Additional i64 String Format Tests -- - #[test] - fn deserialize_i64_error_from_hex_string() { - let json = r#"{"val": "0x1A"}"#; // Hex "26" - // std::primitive::i64.from_str() does not support "0x" - assert!( - serde_json::from_str::(json).is_err(), - "Hex string should fail parsing to i64" - ); - } - - #[test] - fn deserialize_i64_error_from_octal_string() { - let json = r#"{"val": "0o77"}"#; // Octal "63" - // std::primitive::i64.from_str() does not support "0o" - assert!( - serde_json::from_str::(json).is_err(), - "Octal string should fail parsing to i64" - ); - } - - #[test] - fn deserialize_i64_error_from_scientific_notation_string() { - let json = r#"{"val": "1e3"}"#; // "1000" in scientific - // std::primitive::i64.from_str() does not support scientific notation - assert!( - serde_json::from_str::(json).is_err(), - "Scientific notation string should fail parsing to i64" - ); - } - - #[test] - fn deserialize_i64_error_from_invalid_scientific_notation_string() { - let json = r#"{"val": "1e"}"#; - assert!( - serde_json::from_str::(json).is_err(), - "Invalid scientific notation string should fail" - ); - } - - #[test] - fn deserialize_i64_error_from_string_with_underscores() { - let json = r#"{"val": "1_000_000"}"#; - // std::primitive::i64.from_str() does not support underscores - assert!( - serde_json::from_str::(json).is_err(), - "String with underscores should fail parsing to i64" - ); - } - - #[test] - fn deserialize_i64_from_string_with_leading_zeros() { - let json = r#"{"val": "000123"}"#; - let expected = TestI64 { val: 123 }; - // std::primitive::i64.from_str() supports leading zeros - assert_eq!( - serde_json::from_str::(json).unwrap(), - expected, - "String with leading zeros should parse" - ); - } - - #[test] - fn deserialize_i64_from_string_with_leading_zeros_negative() { - let json = r#"{"val": "-000123"}"#; - let expected = TestI64 { val: -123 }; - assert_eq!( - serde_json::from_str::(json).unwrap(), - expected, - "Negative string with leading zeros should parse" - ); - } - - #[test] - fn deserialize_i64_error_from_string_with_decimal_zeros() { - let json = r#"{"val": "123.000"}"#; - // std::primitive::i64.from_str() does not support decimals - assert!( - serde_json::from_str::(json).is_err(), - "String with decimal part should fail parsing to i64" - ); - } - - #[test] - fn deserialize_i64_error_from_string_with_internal_decimal() { - let json = r#"{"val": "12.345"}"#; - assert!( - serde_json::from_str::(json).is_err(), - "String with internal decimal point should fail" - ); - } - - #[test] - fn deserialize_i64_error_from_localized_string_commas() { - let json = r#"{"val": "1,234"}"#; - // std::primitive::i64.from_str() does not support commas - assert!( - serde_json::from_str::(json).is_err(), - "Localized string with commas should fail parsing to i64" - ); - } - - // --- u64 Deserialization Tests --- - #[test] - fn deserialize_u64_from_json_reader() { - let json = r#"{"val": "123"}"#; - let expected = TestU64 { val: 123 }; - assert_eq!( - serde_json::from_reader::<_, TestU64>(Cursor::new(json)).unwrap(), - expected - ); - } - - #[test] - fn deserialize_u64_from_json_number() { - let json = r#"{"val": 123}"#; - let expected = TestU64 { val: 123 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_u64_from_json_number_zero() { - let json = r#"{"val": 0}"#; - let expected = TestU64 { val: 0 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_u64_from_json_number_max() { - let json = format!(r#"{{"val": {}}}"#, u64::MAX); - let expected = TestU64 { val: u64::MAX }; - assert_eq!(serde_json::from_str::(&json).unwrap(), expected); - } - - #[test] - fn deserialize_u64_from_json_string() { - let json = r#"{"val": "789"}"#; - let expected = TestU64 { val: 789 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_u64_from_json_string_zero() { - let json = r#"{"val": "0"}"#; - let expected = TestU64 { val: 0 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_u64_from_json_string_max() { - let json = format!(r#"{{"val": "{}"}}"#, u64::MAX); - let expected = TestU64 { val: u64::MAX }; - assert_eq!(serde_json::from_str::(&json).unwrap(), expected); - } - - #[test] - fn deserialize_u64_from_json_string_with_plus_prefix() { - let json = r#"{"val": "+123"}"#; - let expected = TestU64 { val: 123 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_u64_from_json_string_with_plus_zero() { - let json = r#"{"val": "+0"}"#; - let expected = TestU64 { val: 0 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_u64_error_from_json_string_with_leading_whitespace() { - let json = r#"{"val": " 123"}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_u64_error_from_json_string_with_trailing_whitespace() { - let json = r#"{"val": "123 "}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_u64_error_from_json_string_with_invalid_plus_prefix() { - let json = r#"{"val": "++123"}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_u64_error_from_string_negative() { - let json = r#"{"val": "-123"}"#; // Negative not allowed for u64 string parse - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_u64_error_from_json_number_negative() { - let json = r#"{"val": -1}"#; // Negative not allowed for u64 - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_u64_error_from_string_not_a_number() { - let json = r#"{"val": "abc"}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_u64_error_from_string_float() { - let json = r#"{"val": "123.45"}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_u64_error_from_string_empty() { - let json = r#"{"val": ""}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_u64_error_from_string_overflow() { - let overflow_val = u128::from(u64::MAX) + 1; - let json = format!(r#"{{"val": "{overflow_val}"}}"#); - assert!(serde_json::from_str::(&json).is_err()); - } - - #[test] - fn deserialize_u64_error_from_json_float_number() { - let json = r#"{"val": 123.45}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_u64_error_from_json_bool_true() { - let json = r#"{"val": true}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_u64_error_from_json_array() { - let json = r#"{"val": []}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_u64_error_from_json_object() { - let json = r#"{"val": {}}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_u64_error_from_json_null() { - let json = r#"{"val": null}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - // -- Additional u64 String Format Tests -- - #[test] - fn deserialize_u64_error_from_hex_string() { - let json = r#"{"val": "0x1A"}"#; // Hex "26" - assert!( - serde_json::from_str::(json).is_err(), - "Hex string should fail parsing to u64" - ); - } - - #[test] - fn deserialize_u64_error_from_octal_string() { - let json = r#"{"val": "0o77"}"#; // Octal "63" - assert!( - serde_json::from_str::(json).is_err(), - "Octal string should fail parsing to u64" - ); - } - - #[test] - fn deserialize_u64_error_from_scientific_notation_string() { - let json = r#"{"val": "1e3"}"#; - assert!( - serde_json::from_str::(json).is_err(), - "Scientific notation string should fail parsing to u64" - ); - } - - #[test] - fn deserialize_u64_error_from_string_with_underscores() { - let json = r#"{"val": "1_000_000"}"#; - assert!( - serde_json::from_str::(json).is_err(), - "String with underscores should fail parsing to u64" - ); - } - - #[test] - fn deserialize_u64_from_string_with_leading_zeros() { - let json = r#"{"val": "000123"}"#; - let expected = TestU64 { val: 123 }; - assert_eq!( - serde_json::from_str::(json).unwrap(), - expected, - "String with leading zeros should parse to u64" - ); - } - - #[test] - fn deserialize_u64_error_from_string_with_decimal_zeros() { - let json = r#"{"val": "123.000"}"#; - assert!( - serde_json::from_str::(json).is_err(), - "String with decimal part should fail parsing to u64" - ); - } - - #[test] - fn deserialize_u64_error_from_localized_string_commas() { - let json = r#"{"val": "1,234"}"#; - assert!( - serde_json::from_str::(json).is_err(), - "Localized string with commas should fail parsing to u64" - ); - } - - // --- i64 Serialization Tests --- - #[test] - fn serialize_i64_positive() { - let data = TestI64 { val: 123 }; - let expected_json = r#"{"val":"123"}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - #[test] - fn serialize_i64_negative() { - let data = TestI64 { val: -456 }; - let expected_json = r#"{"val":"-456"}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - #[test] - fn serialize_i64_zero() { - let data = TestI64 { val: 0 }; - let expected_json = r#"{"val":"0"}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - #[test] - fn serialize_i64_max() { - let data = TestI64 { val: i64::MAX }; - let expected_json = format!(r#"{{"val":"{}"}}"#, i64::MAX); - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - #[test] - fn serialize_i64_min() { - let data = TestI64 { val: i64::MIN }; - let expected_json = format!(r#"{{"val":"{}"}}"#, i64::MIN); - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - // --- u64 Serialization Tests --- - #[test] - fn serialize_u64_positive() { - let data = TestU64 { val: 789 }; - let expected_json = r#"{"val":"789"}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - #[test] - fn serialize_u64_zero() { - let data = TestU64 { val: 0 }; - let expected_json = r#"{"val":"0"}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - #[test] - fn serialize_u64_max() { - let data = TestU64 { val: u64::MAX }; - let expected_json = format!(r#"{{"val":"{}"}}"#, u64::MAX); - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - // --- Option Tests --- - #[test] - fn deserialize_option_i64_some_from_json_number() { - let json = r#"{"val": 123}"#; - let expected = TestOptionI64 { val: Some(123) }; - assert_eq!( - serde_json::from_str::(json).unwrap(), - expected - ); - } - - #[test] - fn deserialize_option_i64_some_from_json_string() { - let json = r#"{"val": "456"}"#; - let expected = TestOptionI64 { val: Some(456) }; - assert_eq!( - serde_json::from_str::(json).unwrap(), - expected - ); - } - - #[test] - fn deserialize_option_i64_none_from_json_null() { - let json = r#"{"val": null}"#; - let expected = TestOptionI64 { val: None }; - assert_eq!( - serde_json::from_str::(json).unwrap(), - expected - ); - } - - #[test] - fn deserialize_option_i64_error_from_invalid_string() { - let json = r#"{"val": "abc"}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_option_i64_error_from_invalid_type() { - let json = r#"{"val": true}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn serialize_option_i64_some() { - let data = TestOptionI64 { val: Some(123) }; - let expected_json = r#"{"val":"123"}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - #[test] - fn serialize_option_i64_none() { - let data = TestOptionI64 { val: None }; - let expected_json = r#"{"val":null}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - // --- Option Tests --- - #[test] - fn deserialize_option_u64_some_from_json_number() { - let json = r#"{"val": 123}"#; - let expected = TestOptionU64 { val: Some(123) }; - assert_eq!( - serde_json::from_str::(json).unwrap(), - expected - ); - } - - #[test] - fn deserialize_option_u64_some_from_json_string() { - let json = r#"{"val": "456"}"#; - let expected = TestOptionU64 { val: Some(456) }; - assert_eq!( - serde_json::from_str::(json).unwrap(), - expected - ); - } - - #[test] - fn deserialize_option_u64_none_from_json_null() { - let json = r#"{"val": null}"#; - let expected = TestOptionU64 { val: None }; - assert_eq!( - serde_json::from_str::(json).unwrap(), - expected - ); - } - - #[test] - fn deserialize_option_u64_error_from_invalid_string() { - let json = r#"{"val": "abc"}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn deserialize_option_u64_error_from_negative_string() { - let json = r#"{"val": "-1"}"#; // Invalid for u64 - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn serialize_option_u64_some() { - let data = TestOptionU64 { val: Some(123) }; - let expected_json = r#"{"val":"123"}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - #[test] - fn serialize_option_u64_none() { - let data = TestOptionU64 { val: None }; - let expected_json = r#"{"val":null}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - // --- Vec Tests --- - #[test] - fn deserialize_vec_i64_empty() { - let json = r#"{"val": []}"#; - let expected = TestVecI64 { val: vec![] }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_vec_i64_from_numbers_and_strings() { - let json = r#"{"val": [1, "2", -3, "-4"]}"#; - let expected = TestVecI64 { - val: vec![1, 2, -3, -4], - }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_vec_i64_error_if_item_is_invalid_string() { - let json = r#"{"val": [1, "abc", 3]}"#; - let err = serde_json::from_str::(json).unwrap_err(); - // The error will point to the specific failing element - assert!(err.to_string().contains("invalid digit found in string")); // From parse error - } - - #[test] - fn deserialize_vec_i64_error_if_item_is_invalid_type() { - let json = r#"{"val": [1, true, 3]}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn serialize_vec_i64_empty() { - let data = TestVecI64 { val: vec![] }; - let expected_json = r#"{"val":[]}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - #[test] - fn serialize_vec_i64_with_values() { - let data = TestVecI64 { - val: vec![1, -2, 0], - }; - let expected_json = r#"{"val":["1","-2","0"]}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - // --- Vec Tests --- - #[test] - fn deserialize_vec_u64_empty() { - let json = r#"{"val": []}"#; - let expected = TestVecU64 { val: vec![] }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_vec_u64_from_numbers_and_strings() { - let json = r#"{"val": [1, "2", 3, "4"]}"#; - let expected = TestVecU64 { - val: vec![1, 2, 3, 4], - }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_vec_u64_error_if_item_is_invalid_string() { - let json = r#"{"val": [1, "abc", 3]}"#; - let err = serde_json::from_str::(json).unwrap_err(); - assert!(err.to_string().contains("invalid digit found in string")); - } - - #[test] - fn deserialize_vec_u64_error_if_item_is_negative_string() { - let json = r#"{"val": [1, "-2", 3]}"#; - let err = serde_json::from_str::(json).unwrap_err(); - assert!(err.to_string().contains("invalid digit found in string")); // u64 parse error - } - - #[test] - fn deserialize_vec_u64_error_if_item_is_negative_number() { - let json = r#"{"val": [1, -2, 3]}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn serialize_vec_u64_empty() { - let data = TestVecU64 { val: vec![] }; - let expected_json = r#"{"val":[]}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - #[test] - fn serialize_vec_u64_with_values() { - let data = TestVecU64 { val: vec![1, 2, 0] }; - let expected_json = r#"{"val":["1","2","0"]}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - // --- Enum with NumberOrString field Tests --- - #[test] - fn deserialize_enum_variant_a_with_number() { - let json = r#"{"variantA": {"numVal": 123, "otherData": "test"}}"#; - let expected = TestEnum::VariantA { - num_val: 123, - other_data: "test".to_string(), - }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_enum_variant_a_with_string_number() { - let json = r#"{"variantA": {"numVal": "-45", "otherData": "data"}}"#; - let expected = TestEnum::VariantA { - num_val: -45, - other_data: "data".to_string(), - }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_enum_variant_b_with_number() { - let json = r#"{"variantB": {"count": 7890}}"#; - let expected = TestEnum::VariantB { count: 7890 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_enum_variant_b_with_string_number() { - let json = r#"{"variantB": {"count": "1234567890"}}"#; - let expected = TestEnum::VariantB { count: 1234567890 }; - assert_eq!(serde_json::from_str::(json).unwrap(), expected); - } - - #[test] - fn deserialize_enum_variant_a_error_invalid_num_string() { - let json = r#"{"variantA": {"numVal": "abc", "otherData": "test"}}"#; - assert!(serde_json::from_str::(json).is_err()); - } - - #[test] - fn serialize_enum_variant_a() { - let data = TestEnum::VariantA { - num_val: 123, - other_data: "test".to_string(), - }; - // Note: num_val will be serialized as a string by NumberOrString - let expected_json = r#"{"variantA":{"numVal":"123","otherData":"test"}}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } - - #[test] - fn serialize_enum_variant_b() { - let data = TestEnum::VariantB { count: 7890 }; - let expected_json = r#"{"variantB":{"count":"7890"}}"#; - assert_eq!(serde_json::to_string(&data).unwrap(), expected_json); - } -} - -/// Value is an XDR Typedef defined as: -/// -/// ```text -/// typedef opaque Value<>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct Value(pub BytesM); - -impl From for BytesM { - #[must_use] - fn from(x: Value) -> Self { - x.0 - } -} - -impl From for Value { - #[must_use] - fn from(x: BytesM) -> Self { - Value(x) - } -} - -impl AsRef for Value { - #[must_use] - fn as_ref(&self) -> &BytesM { - &self.0 - } -} - -impl ReadXdr for Value { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = BytesM::read_xdr(r)?; - let v = Value(i); - Ok(v) - }) - } -} - -impl WriteXdr for Value { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for Value { - type Target = BytesM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: Value) -> Self { - x.0 .0 - } -} - -impl TryFrom> for Value { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(Value(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for Value { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(Value(x.try_into()?)) - } -} - -impl AsRef> for Value { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[u8]> for Value { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0 .0 - } -} - -/// ScpBallot is an XDR Struct defined as: -/// -/// ```text -/// struct SCPBallot -/// { -/// uint32 counter; // n -/// Value value; // x -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScpBallot { - pub counter: u32, - pub value: Value, -} - -impl ReadXdr for ScpBallot { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - counter: u32::read_xdr(r)?, - value: Value::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScpBallot { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.counter.write_xdr(w)?; - self.value.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScpStatementType is an XDR Enum defined as: -/// -/// ```text -/// enum SCPStatementType -/// { -/// SCP_ST_PREPARE = 0, -/// SCP_ST_CONFIRM = 1, -/// SCP_ST_EXTERNALIZE = 2, -/// SCP_ST_NOMINATE = 3 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ScpStatementType { - #[cfg_attr(feature = "alloc", default)] - Prepare = 0, - Confirm = 1, - Externalize = 2, - Nominate = 3, -} - -impl ScpStatementType { - const _VARIANTS: &[ScpStatementType] = &[ - ScpStatementType::Prepare, - ScpStatementType::Confirm, - ScpStatementType::Externalize, - ScpStatementType::Nominate, - ]; - pub const VARIANTS: [ScpStatementType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Prepare", "Confirm", "Externalize", "Nominate"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Prepare => "Prepare", - Self::Confirm => "Confirm", - Self::Externalize => "Externalize", - Self::Nominate => "Nominate", - } - } - - #[must_use] - pub const fn variants() -> [ScpStatementType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScpStatementType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ScpStatementType { - fn variants() -> slice::Iter<'static, ScpStatementType> { - Self::VARIANTS.iter() - } -} - -impl Enum for ScpStatementType {} - -impl fmt::Display for ScpStatementType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ScpStatementType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ScpStatementType::Prepare, - 1 => ScpStatementType::Confirm, - 2 => ScpStatementType::Externalize, - 3 => ScpStatementType::Nominate, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ScpStatementType) -> Self { - e as Self - } -} - -impl ReadXdr for ScpStatementType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ScpStatementType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ScpNomination is an XDR Struct defined as: -/// -/// ```text -/// struct SCPNomination -/// { -/// Hash quorumSetHash; // D -/// Value votes<>; // X -/// Value accepted<>; // Y -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScpNomination { - pub quorum_set_hash: Hash, - pub votes: VecM, - pub accepted: VecM, -} - -impl ReadXdr for ScpNomination { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - quorum_set_hash: Hash::read_xdr(r)?, - votes: VecM::::read_xdr(r)?, - accepted: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScpNomination { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.quorum_set_hash.write_xdr(w)?; - self.votes.write_xdr(w)?; - self.accepted.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScpStatementPrepare is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// Hash quorumSetHash; // D -/// SCPBallot ballot; // b -/// SCPBallot* prepared; // p -/// SCPBallot* preparedPrime; // p' -/// uint32 nC; // c.n -/// uint32 nH; // h.n -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScpStatementPrepare { - pub quorum_set_hash: Hash, - pub ballot: ScpBallot, - pub prepared: Option, - pub prepared_prime: Option, - pub n_c: u32, - pub n_h: u32, -} - -impl ReadXdr for ScpStatementPrepare { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - quorum_set_hash: Hash::read_xdr(r)?, - ballot: ScpBallot::read_xdr(r)?, - prepared: Option::::read_xdr(r)?, - prepared_prime: Option::::read_xdr(r)?, - n_c: u32::read_xdr(r)?, - n_h: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScpStatementPrepare { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.quorum_set_hash.write_xdr(w)?; - self.ballot.write_xdr(w)?; - self.prepared.write_xdr(w)?; - self.prepared_prime.write_xdr(w)?; - self.n_c.write_xdr(w)?; - self.n_h.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScpStatementConfirm is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// SCPBallot ballot; // b -/// uint32 nPrepared; // p.n -/// uint32 nCommit; // c.n -/// uint32 nH; // h.n -/// Hash quorumSetHash; // D -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScpStatementConfirm { - pub ballot: ScpBallot, - pub n_prepared: u32, - pub n_commit: u32, - pub n_h: u32, - pub quorum_set_hash: Hash, -} - -impl ReadXdr for ScpStatementConfirm { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ballot: ScpBallot::read_xdr(r)?, - n_prepared: u32::read_xdr(r)?, - n_commit: u32::read_xdr(r)?, - n_h: u32::read_xdr(r)?, - quorum_set_hash: Hash::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScpStatementConfirm { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ballot.write_xdr(w)?; - self.n_prepared.write_xdr(w)?; - self.n_commit.write_xdr(w)?; - self.n_h.write_xdr(w)?; - self.quorum_set_hash.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScpStatementExternalize is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// SCPBallot commit; // c -/// uint32 nH; // h.n -/// Hash commitQuorumSetHash; // D used before EXTERNALIZE -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScpStatementExternalize { - pub commit: ScpBallot, - pub n_h: u32, - pub commit_quorum_set_hash: Hash, -} - -impl ReadXdr for ScpStatementExternalize { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - commit: ScpBallot::read_xdr(r)?, - n_h: u32::read_xdr(r)?, - commit_quorum_set_hash: Hash::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScpStatementExternalize { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.commit.write_xdr(w)?; - self.n_h.write_xdr(w)?; - self.commit_quorum_set_hash.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScpStatementPledges is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (SCPStatementType type) -/// { -/// case SCP_ST_PREPARE: -/// struct -/// { -/// Hash quorumSetHash; // D -/// SCPBallot ballot; // b -/// SCPBallot* prepared; // p -/// SCPBallot* preparedPrime; // p' -/// uint32 nC; // c.n -/// uint32 nH; // h.n -/// } prepare; -/// case SCP_ST_CONFIRM: -/// struct -/// { -/// SCPBallot ballot; // b -/// uint32 nPrepared; // p.n -/// uint32 nCommit; // c.n -/// uint32 nH; // h.n -/// Hash quorumSetHash; // D -/// } confirm; -/// case SCP_ST_EXTERNALIZE: -/// struct -/// { -/// SCPBallot commit; // c -/// uint32 nH; // h.n -/// Hash commitQuorumSetHash; // D used before EXTERNALIZE -/// } externalize; -/// case SCP_ST_NOMINATE: -/// SCPNomination nominate; -/// } -/// ``` -/// -// union with discriminant ScpStatementType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ScpStatementPledges { - Prepare(ScpStatementPrepare), - Confirm(ScpStatementConfirm), - Externalize(ScpStatementExternalize), - Nominate(ScpNomination), -} - -#[cfg(feature = "alloc")] -impl Default for ScpStatementPledges { - fn default() -> Self { - Self::Prepare(ScpStatementPrepare::default()) - } -} - -impl ScpStatementPledges { - const _VARIANTS: &[ScpStatementType] = &[ - ScpStatementType::Prepare, - ScpStatementType::Confirm, - ScpStatementType::Externalize, - ScpStatementType::Nominate, - ]; - pub const VARIANTS: [ScpStatementType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Prepare", "Confirm", "Externalize", "Nominate"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Prepare(_) => "Prepare", - Self::Confirm(_) => "Confirm", - Self::Externalize(_) => "Externalize", - Self::Nominate(_) => "Nominate", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ScpStatementType { - #[allow(clippy::match_same_arms)] - match self { - Self::Prepare(_) => ScpStatementType::Prepare, - Self::Confirm(_) => ScpStatementType::Confirm, - Self::Externalize(_) => ScpStatementType::Externalize, - Self::Nominate(_) => ScpStatementType::Nominate, - } - } - - #[must_use] - pub const fn variants() -> [ScpStatementType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScpStatementPledges { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ScpStatementPledges { - #[must_use] - fn discriminant(&self) -> ScpStatementType { - Self::discriminant(self) - } -} - -impl Variants for ScpStatementPledges { - fn variants() -> slice::Iter<'static, ScpStatementType> { - Self::VARIANTS.iter() - } -} - -impl Union for ScpStatementPledges {} - -impl ReadXdr for ScpStatementPledges { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ScpStatementType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ScpStatementType::Prepare => Self::Prepare(ScpStatementPrepare::read_xdr(r)?), - ScpStatementType::Confirm => Self::Confirm(ScpStatementConfirm::read_xdr(r)?), - ScpStatementType::Externalize => { - Self::Externalize(ScpStatementExternalize::read_xdr(r)?) - } - ScpStatementType::Nominate => Self::Nominate(ScpNomination::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ScpStatementPledges { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Prepare(v) => v.write_xdr(w)?, - Self::Confirm(v) => v.write_xdr(w)?, - Self::Externalize(v) => v.write_xdr(w)?, - Self::Nominate(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ScpStatement is an XDR Struct defined as: -/// -/// ```text -/// struct SCPStatement -/// { -/// NodeID nodeID; // v -/// uint64 slotIndex; // i -/// -/// union switch (SCPStatementType type) -/// { -/// case SCP_ST_PREPARE: -/// struct -/// { -/// Hash quorumSetHash; // D -/// SCPBallot ballot; // b -/// SCPBallot* prepared; // p -/// SCPBallot* preparedPrime; // p' -/// uint32 nC; // c.n -/// uint32 nH; // h.n -/// } prepare; -/// case SCP_ST_CONFIRM: -/// struct -/// { -/// SCPBallot ballot; // b -/// uint32 nPrepared; // p.n -/// uint32 nCommit; // c.n -/// uint32 nH; // h.n -/// Hash quorumSetHash; // D -/// } confirm; -/// case SCP_ST_EXTERNALIZE: -/// struct -/// { -/// SCPBallot commit; // c -/// uint32 nH; // h.n -/// Hash commitQuorumSetHash; // D used before EXTERNALIZE -/// } externalize; -/// case SCP_ST_NOMINATE: -/// SCPNomination nominate; -/// } -/// pledges; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScpStatement { - pub node_id: NodeId, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub slot_index: u64, - pub pledges: ScpStatementPledges, -} - -impl ReadXdr for ScpStatement { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - node_id: NodeId::read_xdr(r)?, - slot_index: u64::read_xdr(r)?, - pledges: ScpStatementPledges::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScpStatement { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.node_id.write_xdr(w)?; - self.slot_index.write_xdr(w)?; - self.pledges.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScpEnvelope is an XDR Struct defined as: -/// -/// ```text -/// struct SCPEnvelope -/// { -/// SCPStatement statement; -/// Signature signature; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScpEnvelope { - pub statement: ScpStatement, - pub signature: Signature, -} - -impl ReadXdr for ScpEnvelope { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - statement: ScpStatement::read_xdr(r)?, - signature: Signature::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScpEnvelope { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.statement.write_xdr(w)?; - self.signature.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScpQuorumSet is an XDR Struct defined as: -/// -/// ```text -/// struct SCPQuorumSet -/// { -/// uint32 threshold; -/// NodeID validators<>; -/// SCPQuorumSet innerSets<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScpQuorumSet { - pub threshold: u32, - pub validators: VecM, - pub inner_sets: VecM, -} - -impl ReadXdr for ScpQuorumSet { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - threshold: u32::read_xdr(r)?, - validators: VecM::::read_xdr(r)?, - inner_sets: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScpQuorumSet { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.threshold.write_xdr(w)?; - self.validators.write_xdr(w)?; - self.inner_sets.write_xdr(w)?; - Ok(()) - }) - } -} - -/// EncodedLedgerKey is an XDR Typedef defined as: -/// -/// ```text -/// typedef opaque EncodedLedgerKey<>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct EncodedLedgerKey(pub BytesM); - -impl From for BytesM { - #[must_use] - fn from(x: EncodedLedgerKey) -> Self { - x.0 - } -} - -impl From for EncodedLedgerKey { - #[must_use] - fn from(x: BytesM) -> Self { - EncodedLedgerKey(x) - } -} - -impl AsRef for EncodedLedgerKey { - #[must_use] - fn as_ref(&self) -> &BytesM { - &self.0 - } -} - -impl ReadXdr for EncodedLedgerKey { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = BytesM::read_xdr(r)?; - let v = EncodedLedgerKey(i); - Ok(v) - }) - } -} - -impl WriteXdr for EncodedLedgerKey { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for EncodedLedgerKey { - type Target = BytesM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: EncodedLedgerKey) -> Self { - x.0 .0 - } -} - -impl TryFrom> for EncodedLedgerKey { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(EncodedLedgerKey(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for EncodedLedgerKey { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(EncodedLedgerKey(x.try_into()?)) - } -} - -impl AsRef> for EncodedLedgerKey { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[u8]> for EncodedLedgerKey { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0 .0 - } -} - -/// ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as: -/// -/// ```text -/// struct ConfigSettingContractExecutionLanesV0 -/// { -/// // maximum number of Soroban transactions per ledger -/// uint32 ledgerMaxTxCount; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ConfigSettingContractExecutionLanesV0 { - pub ledger_max_tx_count: u32, -} - -impl ReadXdr for ConfigSettingContractExecutionLanesV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ledger_max_tx_count: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ConfigSettingContractExecutionLanesV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ledger_max_tx_count.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ConfigSettingContractComputeV0 is an XDR Struct defined as: -/// -/// ```text -/// struct ConfigSettingContractComputeV0 -/// { -/// // Maximum instructions per ledger -/// int64 ledgerMaxInstructions; -/// // Maximum instructions per transaction -/// int64 txMaxInstructions; -/// // Cost of 10000 instructions -/// int64 feeRatePerInstructionsIncrement; -/// -/// // Memory limit per transaction. Unlike instructions, there is no fee -/// // for memory, just the limit. -/// uint32 txMemoryLimit; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ConfigSettingContractComputeV0 { - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub ledger_max_instructions: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub tx_max_instructions: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub fee_rate_per_instructions_increment: i64, - pub tx_memory_limit: u32, -} - -impl ReadXdr for ConfigSettingContractComputeV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ledger_max_instructions: i64::read_xdr(r)?, - tx_max_instructions: i64::read_xdr(r)?, - fee_rate_per_instructions_increment: i64::read_xdr(r)?, - tx_memory_limit: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ConfigSettingContractComputeV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ledger_max_instructions.write_xdr(w)?; - self.tx_max_instructions.write_xdr(w)?; - self.fee_rate_per_instructions_increment.write_xdr(w)?; - self.tx_memory_limit.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ConfigSettingContractParallelComputeV0 is an XDR Struct defined as: -/// -/// ```text -/// struct ConfigSettingContractParallelComputeV0 -/// { -/// // Maximum number of clusters with dependent transactions allowed in a -/// // stage of parallel tx set component. -/// // This effectively sets the lower bound on the number of physical threads -/// // necessary to effectively apply transaction sets in parallel. -/// uint32 ledgerMaxDependentTxClusters; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ConfigSettingContractParallelComputeV0 { - pub ledger_max_dependent_tx_clusters: u32, -} - -impl ReadXdr for ConfigSettingContractParallelComputeV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ledger_max_dependent_tx_clusters: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ConfigSettingContractParallelComputeV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ledger_max_dependent_tx_clusters.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ConfigSettingContractLedgerCostV0 is an XDR Struct defined as: -/// -/// ```text -/// struct ConfigSettingContractLedgerCostV0 -/// { -/// // Maximum number of disk entry read operations per ledger -/// uint32 ledgerMaxDiskReadEntries; -/// // Maximum number of bytes of disk reads that can be performed per ledger -/// uint32 ledgerMaxDiskReadBytes; -/// // Maximum number of ledger entry write operations per ledger -/// uint32 ledgerMaxWriteLedgerEntries; -/// // Maximum number of bytes that can be written per ledger -/// uint32 ledgerMaxWriteBytes; -/// -/// // Maximum number of disk entry read operations per transaction -/// uint32 txMaxDiskReadEntries; -/// // Maximum number of bytes of disk reads that can be performed per transaction -/// uint32 txMaxDiskReadBytes; -/// // Maximum number of ledger entry write operations per transaction -/// uint32 txMaxWriteLedgerEntries; -/// // Maximum number of bytes that can be written per transaction -/// uint32 txMaxWriteBytes; -/// -/// int64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read -/// int64 feeWriteLedgerEntry; // Fee per ledger entry write -/// -/// int64 feeDiskRead1KB; // Fee for reading 1KB disk -/// -/// // The following parameters determine the write fee per 1KB. -/// // Rent fee grows linearly until soroban state reaches this size -/// int64 sorobanStateTargetSizeBytes; -/// // Fee per 1KB rent when the soroban state is empty -/// int64 rentFee1KBSorobanStateSizeLow; -/// // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` -/// int64 rentFee1KBSorobanStateSizeHigh; -/// // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` -/// uint32 sorobanStateRentFeeGrowthFactor; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ConfigSettingContractLedgerCostV0 { - pub ledger_max_disk_read_entries: u32, - pub ledger_max_disk_read_bytes: u32, - pub ledger_max_write_ledger_entries: u32, - pub ledger_max_write_bytes: u32, - pub tx_max_disk_read_entries: u32, - pub tx_max_disk_read_bytes: u32, - pub tx_max_write_ledger_entries: u32, - pub tx_max_write_bytes: u32, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub fee_disk_read_ledger_entry: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub fee_write_ledger_entry: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub fee_disk_read1_kb: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub soroban_state_target_size_bytes: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub rent_fee1_kb_soroban_state_size_low: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub rent_fee1_kb_soroban_state_size_high: i64, - pub soroban_state_rent_fee_growth_factor: u32, -} - -impl ReadXdr for ConfigSettingContractLedgerCostV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ledger_max_disk_read_entries: u32::read_xdr(r)?, - ledger_max_disk_read_bytes: u32::read_xdr(r)?, - ledger_max_write_ledger_entries: u32::read_xdr(r)?, - ledger_max_write_bytes: u32::read_xdr(r)?, - tx_max_disk_read_entries: u32::read_xdr(r)?, - tx_max_disk_read_bytes: u32::read_xdr(r)?, - tx_max_write_ledger_entries: u32::read_xdr(r)?, - tx_max_write_bytes: u32::read_xdr(r)?, - fee_disk_read_ledger_entry: i64::read_xdr(r)?, - fee_write_ledger_entry: i64::read_xdr(r)?, - fee_disk_read1_kb: i64::read_xdr(r)?, - soroban_state_target_size_bytes: i64::read_xdr(r)?, - rent_fee1_kb_soroban_state_size_low: i64::read_xdr(r)?, - rent_fee1_kb_soroban_state_size_high: i64::read_xdr(r)?, - soroban_state_rent_fee_growth_factor: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ConfigSettingContractLedgerCostV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ledger_max_disk_read_entries.write_xdr(w)?; - self.ledger_max_disk_read_bytes.write_xdr(w)?; - self.ledger_max_write_ledger_entries.write_xdr(w)?; - self.ledger_max_write_bytes.write_xdr(w)?; - self.tx_max_disk_read_entries.write_xdr(w)?; - self.tx_max_disk_read_bytes.write_xdr(w)?; - self.tx_max_write_ledger_entries.write_xdr(w)?; - self.tx_max_write_bytes.write_xdr(w)?; - self.fee_disk_read_ledger_entry.write_xdr(w)?; - self.fee_write_ledger_entry.write_xdr(w)?; - self.fee_disk_read1_kb.write_xdr(w)?; - self.soroban_state_target_size_bytes.write_xdr(w)?; - self.rent_fee1_kb_soroban_state_size_low.write_xdr(w)?; - self.rent_fee1_kb_soroban_state_size_high.write_xdr(w)?; - self.soroban_state_rent_fee_growth_factor.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as: -/// -/// ```text -/// struct ConfigSettingContractLedgerCostExtV0 -/// { -/// // Maximum number of RO+RW entries in the transaction footprint. -/// uint32 txMaxFootprintEntries; -/// // Fee per 1 KB of data written to the ledger. -/// // Unlike the rent fee, this is a flat fee that is charged for any ledger -/// // write, independent of the type of the entry being written. -/// int64 feeWrite1KB; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ConfigSettingContractLedgerCostExtV0 { - pub tx_max_footprint_entries: u32, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub fee_write1_kb: i64, -} - -impl ReadXdr for ConfigSettingContractLedgerCostExtV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - tx_max_footprint_entries: u32::read_xdr(r)?, - fee_write1_kb: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ConfigSettingContractLedgerCostExtV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.tx_max_footprint_entries.write_xdr(w)?; - self.fee_write1_kb.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as: -/// -/// ```text -/// struct ConfigSettingContractHistoricalDataV0 -/// { -/// int64 feeHistorical1KB; // Fee for storing 1KB in archives -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ConfigSettingContractHistoricalDataV0 { - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub fee_historical1_kb: i64, -} - -impl ReadXdr for ConfigSettingContractHistoricalDataV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - fee_historical1_kb: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ConfigSettingContractHistoricalDataV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.fee_historical1_kb.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ConfigSettingContractEventsV0 is an XDR Struct defined as: -/// -/// ```text -/// struct ConfigSettingContractEventsV0 -/// { -/// // Maximum size of events that a contract call can emit. -/// uint32 txMaxContractEventsSizeBytes; -/// // Fee for generating 1KB of contract events. -/// int64 feeContractEvents1KB; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ConfigSettingContractEventsV0 { - pub tx_max_contract_events_size_bytes: u32, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub fee_contract_events1_kb: i64, -} - -impl ReadXdr for ConfigSettingContractEventsV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - tx_max_contract_events_size_bytes: u32::read_xdr(r)?, - fee_contract_events1_kb: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ConfigSettingContractEventsV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.tx_max_contract_events_size_bytes.write_xdr(w)?; - self.fee_contract_events1_kb.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ConfigSettingContractBandwidthV0 is an XDR Struct defined as: -/// -/// ```text -/// struct ConfigSettingContractBandwidthV0 -/// { -/// // Maximum sum of all transaction sizes in the ledger in bytes -/// uint32 ledgerMaxTxsSizeBytes; -/// // Maximum size in bytes for a transaction -/// uint32 txMaxSizeBytes; -/// -/// // Fee for 1 KB of transaction size -/// int64 feeTxSize1KB; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ConfigSettingContractBandwidthV0 { - pub ledger_max_txs_size_bytes: u32, - pub tx_max_size_bytes: u32, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub fee_tx_size1_kb: i64, -} - -impl ReadXdr for ConfigSettingContractBandwidthV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ledger_max_txs_size_bytes: u32::read_xdr(r)?, - tx_max_size_bytes: u32::read_xdr(r)?, - fee_tx_size1_kb: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ConfigSettingContractBandwidthV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ledger_max_txs_size_bytes.write_xdr(w)?; - self.tx_max_size_bytes.write_xdr(w)?; - self.fee_tx_size1_kb.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ContractCostType is an XDR Enum defined as: -/// -/// ```text -/// enum ContractCostType { -/// // Cost of running 1 wasm instruction -/// WasmInsnExec = 0, -/// // Cost of allocating a slice of memory (in bytes) -/// MemAlloc = 1, -/// // Cost of copying a slice of bytes into a pre-allocated memory -/// MemCpy = 2, -/// // Cost of comparing two slices of memory -/// MemCmp = 3, -/// // Cost of a host function dispatch, not including the actual work done by -/// // the function nor the cost of VM invocation machinary -/// DispatchHostFunction = 4, -/// // Cost of visiting a host object from the host object storage. Exists to -/// // make sure some baseline cost coverage, i.e. repeatly visiting objects -/// // by the guest will always incur some charges. -/// VisitObject = 5, -/// // Cost of serializing an xdr object to bytes -/// ValSer = 6, -/// // Cost of deserializing an xdr object from bytes -/// ValDeser = 7, -/// // Cost of computing the sha256 hash from bytes -/// ComputeSha256Hash = 8, -/// // Cost of computing the ed25519 pubkey from bytes -/// ComputeEd25519PubKey = 9, -/// // Cost of verifying ed25519 signature of a payload. -/// VerifyEd25519Sig = 10, -/// // Cost of instantiation a VM from wasm bytes code. -/// VmInstantiation = 11, -/// // Cost of instantiation a VM from a cached state. -/// VmCachedInstantiation = 12, -/// // Cost of invoking a function on the VM. If the function is a host function, -/// // additional cost will be covered by `DispatchHostFunction`. -/// InvokeVmFunction = 13, -/// // Cost of computing a keccak256 hash from bytes. -/// ComputeKeccak256Hash = 14, -/// // Cost of decoding an ECDSA signature computed from a 256-bit prime modulus -/// // curve (e.g. secp256k1 and secp256r1) -/// DecodeEcdsaCurve256Sig = 15, -/// // Cost of recovering an ECDSA secp256k1 key from a signature. -/// RecoverEcdsaSecp256k1Key = 16, -/// // Cost of int256 addition (`+`) and subtraction (`-`) operations -/// Int256AddSub = 17, -/// // Cost of int256 multiplication (`*`) operation -/// Int256Mul = 18, -/// // Cost of int256 division (`/`) operation -/// Int256Div = 19, -/// // Cost of int256 power (`exp`) operation -/// Int256Pow = 20, -/// // Cost of int256 shift (`shl`, `shr`) operation -/// Int256Shift = 21, -/// // Cost of drawing random bytes using a ChaCha20 PRNG -/// ChaCha20DrawBytes = 22, -/// -/// // Cost of parsing wasm bytes that only encode instructions. -/// ParseWasmInstructions = 23, -/// // Cost of parsing a known number of wasm functions. -/// ParseWasmFunctions = 24, -/// // Cost of parsing a known number of wasm globals. -/// ParseWasmGlobals = 25, -/// // Cost of parsing a known number of wasm table entries. -/// ParseWasmTableEntries = 26, -/// // Cost of parsing a known number of wasm types. -/// ParseWasmTypes = 27, -/// // Cost of parsing a known number of wasm data segments. -/// ParseWasmDataSegments = 28, -/// // Cost of parsing a known number of wasm element segments. -/// ParseWasmElemSegments = 29, -/// // Cost of parsing a known number of wasm imports. -/// ParseWasmImports = 30, -/// // Cost of parsing a known number of wasm exports. -/// ParseWasmExports = 31, -/// // Cost of parsing a known number of data segment bytes. -/// ParseWasmDataSegmentBytes = 32, -/// -/// // Cost of instantiating wasm bytes that only encode instructions. -/// InstantiateWasmInstructions = 33, -/// // Cost of instantiating a known number of wasm functions. -/// InstantiateWasmFunctions = 34, -/// // Cost of instantiating a known number of wasm globals. -/// InstantiateWasmGlobals = 35, -/// // Cost of instantiating a known number of wasm table entries. -/// InstantiateWasmTableEntries = 36, -/// // Cost of instantiating a known number of wasm types. -/// InstantiateWasmTypes = 37, -/// // Cost of instantiating a known number of wasm data segments. -/// InstantiateWasmDataSegments = 38, -/// // Cost of instantiating a known number of wasm element segments. -/// InstantiateWasmElemSegments = 39, -/// // Cost of instantiating a known number of wasm imports. -/// InstantiateWasmImports = 40, -/// // Cost of instantiating a known number of wasm exports. -/// InstantiateWasmExports = 41, -/// // Cost of instantiating a known number of data segment bytes. -/// InstantiateWasmDataSegmentBytes = 42, -/// -/// // Cost of decoding a bytes array representing an uncompressed SEC-1 encoded -/// // point on a 256-bit elliptic curve -/// Sec1DecodePointUncompressed = 43, -/// // Cost of verifying an ECDSA Secp256r1 signature -/// VerifyEcdsaSecp256r1Sig = 44, -/// -/// // Cost of encoding a BLS12-381 Fp (base field element) -/// Bls12381EncodeFp = 45, -/// // Cost of decoding a BLS12-381 Fp (base field element) -/// Bls12381DecodeFp = 46, -/// // Cost of checking a G1 point lies on the curve -/// Bls12381G1CheckPointOnCurve = 47, -/// // Cost of checking a G1 point belongs to the correct subgroup -/// Bls12381G1CheckPointInSubgroup = 48, -/// // Cost of checking a G2 point lies on the curve -/// Bls12381G2CheckPointOnCurve = 49, -/// // Cost of checking a G2 point belongs to the correct subgroup -/// Bls12381G2CheckPointInSubgroup = 50, -/// // Cost of converting a BLS12-381 G1 point from projective to affine coordinates -/// Bls12381G1ProjectiveToAffine = 51, -/// // Cost of converting a BLS12-381 G2 point from projective to affine coordinates -/// Bls12381G2ProjectiveToAffine = 52, -/// // Cost of performing BLS12-381 G1 point addition -/// Bls12381G1Add = 53, -/// // Cost of performing BLS12-381 G1 scalar multiplication -/// Bls12381G1Mul = 54, -/// // Cost of performing BLS12-381 G1 multi-scalar multiplication (MSM) -/// Bls12381G1Msm = 55, -/// // Cost of mapping a BLS12-381 Fp field element to a G1 point -/// Bls12381MapFpToG1 = 56, -/// // Cost of hashing to a BLS12-381 G1 point -/// Bls12381HashToG1 = 57, -/// // Cost of performing BLS12-381 G2 point addition -/// Bls12381G2Add = 58, -/// // Cost of performing BLS12-381 G2 scalar multiplication -/// Bls12381G2Mul = 59, -/// // Cost of performing BLS12-381 G2 multi-scalar multiplication (MSM) -/// Bls12381G2Msm = 60, -/// // Cost of mapping a BLS12-381 Fp2 field element to a G2 point -/// Bls12381MapFp2ToG2 = 61, -/// // Cost of hashing to a BLS12-381 G2 point -/// Bls12381HashToG2 = 62, -/// // Cost of performing BLS12-381 pairing operation -/// Bls12381Pairing = 63, -/// // Cost of converting a BLS12-381 scalar element from U256 -/// Bls12381FrFromU256 = 64, -/// // Cost of converting a BLS12-381 scalar element to U256 -/// Bls12381FrToU256 = 65, -/// // Cost of performing BLS12-381 scalar element addition/subtraction -/// Bls12381FrAddSub = 66, -/// // Cost of performing BLS12-381 scalar element multiplication -/// Bls12381FrMul = 67, -/// // Cost of performing BLS12-381 scalar element exponentiation -/// Bls12381FrPow = 68, -/// // Cost of performing BLS12-381 scalar element inversion -/// Bls12381FrInv = 69, -/// -/// // Cost of encoding a BN254 Fp (base field element) -/// Bn254EncodeFp = 70, -/// // Cost of decoding a BN254 Fp (base field element) -/// Bn254DecodeFp = 71, -/// // Cost of checking a G1 point lies on the curve -/// Bn254G1CheckPointOnCurve = 72, -/// // Cost of checking a G2 point lies on the curve -/// Bn254G2CheckPointOnCurve = 73, -/// // Cost of checking a G2 point belongs to the correct subgroup -/// Bn254G2CheckPointInSubgroup = 74, -/// // Cost of converting a BN254 G1 point from projective to affine coordinates -/// Bn254G1ProjectiveToAffine = 75, -/// // Cost of performing BN254 G1 point addition -/// Bn254G1Add = 76, -/// // Cost of performing BN254 G1 scalar multiplication -/// Bn254G1Mul = 77, -/// // Cost of performing BN254 pairing operation -/// Bn254Pairing = 78, -/// // Cost of converting a BN254 scalar element from U256 -/// Bn254FrFromU256 = 79, -/// // Cost of converting a BN254 scalar element to U256 -/// Bn254FrToU256 = 80, -/// // // Cost of performing BN254 scalar element addition/subtraction -/// Bn254FrAddSub = 81, -/// // Cost of performing BN254 scalar element multiplication -/// Bn254FrMul = 82, -/// // Cost of performing BN254 scalar element exponentiation -/// Bn254FrPow = 83, -/// // Cost of performing BN254 scalar element inversion -/// Bn254FrInv = 84, -/// // Cost of performing BN254 G1 multi-scalar multiplication (MSM) -/// Bn254G1Msm = 85 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ContractCostType { - #[cfg_attr(feature = "alloc", default)] - WasmInsnExec = 0, - MemAlloc = 1, - MemCpy = 2, - MemCmp = 3, - DispatchHostFunction = 4, - VisitObject = 5, - ValSer = 6, - ValDeser = 7, - ComputeSha256Hash = 8, - ComputeEd25519PubKey = 9, - VerifyEd25519Sig = 10, - VmInstantiation = 11, - VmCachedInstantiation = 12, - InvokeVmFunction = 13, - ComputeKeccak256Hash = 14, - DecodeEcdsaCurve256Sig = 15, - RecoverEcdsaSecp256k1Key = 16, - Int256AddSub = 17, - Int256Mul = 18, - Int256Div = 19, - Int256Pow = 20, - Int256Shift = 21, - ChaCha20DrawBytes = 22, - ParseWasmInstructions = 23, - ParseWasmFunctions = 24, - ParseWasmGlobals = 25, - ParseWasmTableEntries = 26, - ParseWasmTypes = 27, - ParseWasmDataSegments = 28, - ParseWasmElemSegments = 29, - ParseWasmImports = 30, - ParseWasmExports = 31, - ParseWasmDataSegmentBytes = 32, - InstantiateWasmInstructions = 33, - InstantiateWasmFunctions = 34, - InstantiateWasmGlobals = 35, - InstantiateWasmTableEntries = 36, - InstantiateWasmTypes = 37, - InstantiateWasmDataSegments = 38, - InstantiateWasmElemSegments = 39, - InstantiateWasmImports = 40, - InstantiateWasmExports = 41, - InstantiateWasmDataSegmentBytes = 42, - Sec1DecodePointUncompressed = 43, - VerifyEcdsaSecp256r1Sig = 44, - Bls12381EncodeFp = 45, - Bls12381DecodeFp = 46, - Bls12381G1CheckPointOnCurve = 47, - Bls12381G1CheckPointInSubgroup = 48, - Bls12381G2CheckPointOnCurve = 49, - Bls12381G2CheckPointInSubgroup = 50, - Bls12381G1ProjectiveToAffine = 51, - Bls12381G2ProjectiveToAffine = 52, - Bls12381G1Add = 53, - Bls12381G1Mul = 54, - Bls12381G1Msm = 55, - Bls12381MapFpToG1 = 56, - Bls12381HashToG1 = 57, - Bls12381G2Add = 58, - Bls12381G2Mul = 59, - Bls12381G2Msm = 60, - Bls12381MapFp2ToG2 = 61, - Bls12381HashToG2 = 62, - Bls12381Pairing = 63, - Bls12381FrFromU256 = 64, - Bls12381FrToU256 = 65, - Bls12381FrAddSub = 66, - Bls12381FrMul = 67, - Bls12381FrPow = 68, - Bls12381FrInv = 69, - Bn254EncodeFp = 70, - Bn254DecodeFp = 71, - Bn254G1CheckPointOnCurve = 72, - Bn254G2CheckPointOnCurve = 73, - Bn254G2CheckPointInSubgroup = 74, - Bn254G1ProjectiveToAffine = 75, - Bn254G1Add = 76, - Bn254G1Mul = 77, - Bn254Pairing = 78, - Bn254FrFromU256 = 79, - Bn254FrToU256 = 80, - Bn254FrAddSub = 81, - Bn254FrMul = 82, - Bn254FrPow = 83, - Bn254FrInv = 84, - Bn254G1Msm = 85, -} - -impl ContractCostType { - const _VARIANTS: &[ContractCostType] = &[ - ContractCostType::WasmInsnExec, - ContractCostType::MemAlloc, - ContractCostType::MemCpy, - ContractCostType::MemCmp, - ContractCostType::DispatchHostFunction, - ContractCostType::VisitObject, - ContractCostType::ValSer, - ContractCostType::ValDeser, - ContractCostType::ComputeSha256Hash, - ContractCostType::ComputeEd25519PubKey, - ContractCostType::VerifyEd25519Sig, - ContractCostType::VmInstantiation, - ContractCostType::VmCachedInstantiation, - ContractCostType::InvokeVmFunction, - ContractCostType::ComputeKeccak256Hash, - ContractCostType::DecodeEcdsaCurve256Sig, - ContractCostType::RecoverEcdsaSecp256k1Key, - ContractCostType::Int256AddSub, - ContractCostType::Int256Mul, - ContractCostType::Int256Div, - ContractCostType::Int256Pow, - ContractCostType::Int256Shift, - ContractCostType::ChaCha20DrawBytes, - ContractCostType::ParseWasmInstructions, - ContractCostType::ParseWasmFunctions, - ContractCostType::ParseWasmGlobals, - ContractCostType::ParseWasmTableEntries, - ContractCostType::ParseWasmTypes, - ContractCostType::ParseWasmDataSegments, - ContractCostType::ParseWasmElemSegments, - ContractCostType::ParseWasmImports, - ContractCostType::ParseWasmExports, - ContractCostType::ParseWasmDataSegmentBytes, - ContractCostType::InstantiateWasmInstructions, - ContractCostType::InstantiateWasmFunctions, - ContractCostType::InstantiateWasmGlobals, - ContractCostType::InstantiateWasmTableEntries, - ContractCostType::InstantiateWasmTypes, - ContractCostType::InstantiateWasmDataSegments, - ContractCostType::InstantiateWasmElemSegments, - ContractCostType::InstantiateWasmImports, - ContractCostType::InstantiateWasmExports, - ContractCostType::InstantiateWasmDataSegmentBytes, - ContractCostType::Sec1DecodePointUncompressed, - ContractCostType::VerifyEcdsaSecp256r1Sig, - ContractCostType::Bls12381EncodeFp, - ContractCostType::Bls12381DecodeFp, - ContractCostType::Bls12381G1CheckPointOnCurve, - ContractCostType::Bls12381G1CheckPointInSubgroup, - ContractCostType::Bls12381G2CheckPointOnCurve, - ContractCostType::Bls12381G2CheckPointInSubgroup, - ContractCostType::Bls12381G1ProjectiveToAffine, - ContractCostType::Bls12381G2ProjectiveToAffine, - ContractCostType::Bls12381G1Add, - ContractCostType::Bls12381G1Mul, - ContractCostType::Bls12381G1Msm, - ContractCostType::Bls12381MapFpToG1, - ContractCostType::Bls12381HashToG1, - ContractCostType::Bls12381G2Add, - ContractCostType::Bls12381G2Mul, - ContractCostType::Bls12381G2Msm, - ContractCostType::Bls12381MapFp2ToG2, - ContractCostType::Bls12381HashToG2, - ContractCostType::Bls12381Pairing, - ContractCostType::Bls12381FrFromU256, - ContractCostType::Bls12381FrToU256, - ContractCostType::Bls12381FrAddSub, - ContractCostType::Bls12381FrMul, - ContractCostType::Bls12381FrPow, - ContractCostType::Bls12381FrInv, - ContractCostType::Bn254EncodeFp, - ContractCostType::Bn254DecodeFp, - ContractCostType::Bn254G1CheckPointOnCurve, - ContractCostType::Bn254G2CheckPointOnCurve, - ContractCostType::Bn254G2CheckPointInSubgroup, - ContractCostType::Bn254G1ProjectiveToAffine, - ContractCostType::Bn254G1Add, - ContractCostType::Bn254G1Mul, - ContractCostType::Bn254Pairing, - ContractCostType::Bn254FrFromU256, - ContractCostType::Bn254FrToU256, - ContractCostType::Bn254FrAddSub, - ContractCostType::Bn254FrMul, - ContractCostType::Bn254FrPow, - ContractCostType::Bn254FrInv, - ContractCostType::Bn254G1Msm, - ]; - pub const VARIANTS: [ContractCostType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "WasmInsnExec", - "MemAlloc", - "MemCpy", - "MemCmp", - "DispatchHostFunction", - "VisitObject", - "ValSer", - "ValDeser", - "ComputeSha256Hash", - "ComputeEd25519PubKey", - "VerifyEd25519Sig", - "VmInstantiation", - "VmCachedInstantiation", - "InvokeVmFunction", - "ComputeKeccak256Hash", - "DecodeEcdsaCurve256Sig", - "RecoverEcdsaSecp256k1Key", - "Int256AddSub", - "Int256Mul", - "Int256Div", - "Int256Pow", - "Int256Shift", - "ChaCha20DrawBytes", - "ParseWasmInstructions", - "ParseWasmFunctions", - "ParseWasmGlobals", - "ParseWasmTableEntries", - "ParseWasmTypes", - "ParseWasmDataSegments", - "ParseWasmElemSegments", - "ParseWasmImports", - "ParseWasmExports", - "ParseWasmDataSegmentBytes", - "InstantiateWasmInstructions", - "InstantiateWasmFunctions", - "InstantiateWasmGlobals", - "InstantiateWasmTableEntries", - "InstantiateWasmTypes", - "InstantiateWasmDataSegments", - "InstantiateWasmElemSegments", - "InstantiateWasmImports", - "InstantiateWasmExports", - "InstantiateWasmDataSegmentBytes", - "Sec1DecodePointUncompressed", - "VerifyEcdsaSecp256r1Sig", - "Bls12381EncodeFp", - "Bls12381DecodeFp", - "Bls12381G1CheckPointOnCurve", - "Bls12381G1CheckPointInSubgroup", - "Bls12381G2CheckPointOnCurve", - "Bls12381G2CheckPointInSubgroup", - "Bls12381G1ProjectiveToAffine", - "Bls12381G2ProjectiveToAffine", - "Bls12381G1Add", - "Bls12381G1Mul", - "Bls12381G1Msm", - "Bls12381MapFpToG1", - "Bls12381HashToG1", - "Bls12381G2Add", - "Bls12381G2Mul", - "Bls12381G2Msm", - "Bls12381MapFp2ToG2", - "Bls12381HashToG2", - "Bls12381Pairing", - "Bls12381FrFromU256", - "Bls12381FrToU256", - "Bls12381FrAddSub", - "Bls12381FrMul", - "Bls12381FrPow", - "Bls12381FrInv", - "Bn254EncodeFp", - "Bn254DecodeFp", - "Bn254G1CheckPointOnCurve", - "Bn254G2CheckPointOnCurve", - "Bn254G2CheckPointInSubgroup", - "Bn254G1ProjectiveToAffine", - "Bn254G1Add", - "Bn254G1Mul", - "Bn254Pairing", - "Bn254FrFromU256", - "Bn254FrToU256", - "Bn254FrAddSub", - "Bn254FrMul", - "Bn254FrPow", - "Bn254FrInv", - "Bn254G1Msm", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::WasmInsnExec => "WasmInsnExec", - Self::MemAlloc => "MemAlloc", - Self::MemCpy => "MemCpy", - Self::MemCmp => "MemCmp", - Self::DispatchHostFunction => "DispatchHostFunction", - Self::VisitObject => "VisitObject", - Self::ValSer => "ValSer", - Self::ValDeser => "ValDeser", - Self::ComputeSha256Hash => "ComputeSha256Hash", - Self::ComputeEd25519PubKey => "ComputeEd25519PubKey", - Self::VerifyEd25519Sig => "VerifyEd25519Sig", - Self::VmInstantiation => "VmInstantiation", - Self::VmCachedInstantiation => "VmCachedInstantiation", - Self::InvokeVmFunction => "InvokeVmFunction", - Self::ComputeKeccak256Hash => "ComputeKeccak256Hash", - Self::DecodeEcdsaCurve256Sig => "DecodeEcdsaCurve256Sig", - Self::RecoverEcdsaSecp256k1Key => "RecoverEcdsaSecp256k1Key", - Self::Int256AddSub => "Int256AddSub", - Self::Int256Mul => "Int256Mul", - Self::Int256Div => "Int256Div", - Self::Int256Pow => "Int256Pow", - Self::Int256Shift => "Int256Shift", - Self::ChaCha20DrawBytes => "ChaCha20DrawBytes", - Self::ParseWasmInstructions => "ParseWasmInstructions", - Self::ParseWasmFunctions => "ParseWasmFunctions", - Self::ParseWasmGlobals => "ParseWasmGlobals", - Self::ParseWasmTableEntries => "ParseWasmTableEntries", - Self::ParseWasmTypes => "ParseWasmTypes", - Self::ParseWasmDataSegments => "ParseWasmDataSegments", - Self::ParseWasmElemSegments => "ParseWasmElemSegments", - Self::ParseWasmImports => "ParseWasmImports", - Self::ParseWasmExports => "ParseWasmExports", - Self::ParseWasmDataSegmentBytes => "ParseWasmDataSegmentBytes", - Self::InstantiateWasmInstructions => "InstantiateWasmInstructions", - Self::InstantiateWasmFunctions => "InstantiateWasmFunctions", - Self::InstantiateWasmGlobals => "InstantiateWasmGlobals", - Self::InstantiateWasmTableEntries => "InstantiateWasmTableEntries", - Self::InstantiateWasmTypes => "InstantiateWasmTypes", - Self::InstantiateWasmDataSegments => "InstantiateWasmDataSegments", - Self::InstantiateWasmElemSegments => "InstantiateWasmElemSegments", - Self::InstantiateWasmImports => "InstantiateWasmImports", - Self::InstantiateWasmExports => "InstantiateWasmExports", - Self::InstantiateWasmDataSegmentBytes => "InstantiateWasmDataSegmentBytes", - Self::Sec1DecodePointUncompressed => "Sec1DecodePointUncompressed", - Self::VerifyEcdsaSecp256r1Sig => "VerifyEcdsaSecp256r1Sig", - Self::Bls12381EncodeFp => "Bls12381EncodeFp", - Self::Bls12381DecodeFp => "Bls12381DecodeFp", - Self::Bls12381G1CheckPointOnCurve => "Bls12381G1CheckPointOnCurve", - Self::Bls12381G1CheckPointInSubgroup => "Bls12381G1CheckPointInSubgroup", - Self::Bls12381G2CheckPointOnCurve => "Bls12381G2CheckPointOnCurve", - Self::Bls12381G2CheckPointInSubgroup => "Bls12381G2CheckPointInSubgroup", - Self::Bls12381G1ProjectiveToAffine => "Bls12381G1ProjectiveToAffine", - Self::Bls12381G2ProjectiveToAffine => "Bls12381G2ProjectiveToAffine", - Self::Bls12381G1Add => "Bls12381G1Add", - Self::Bls12381G1Mul => "Bls12381G1Mul", - Self::Bls12381G1Msm => "Bls12381G1Msm", - Self::Bls12381MapFpToG1 => "Bls12381MapFpToG1", - Self::Bls12381HashToG1 => "Bls12381HashToG1", - Self::Bls12381G2Add => "Bls12381G2Add", - Self::Bls12381G2Mul => "Bls12381G2Mul", - Self::Bls12381G2Msm => "Bls12381G2Msm", - Self::Bls12381MapFp2ToG2 => "Bls12381MapFp2ToG2", - Self::Bls12381HashToG2 => "Bls12381HashToG2", - Self::Bls12381Pairing => "Bls12381Pairing", - Self::Bls12381FrFromU256 => "Bls12381FrFromU256", - Self::Bls12381FrToU256 => "Bls12381FrToU256", - Self::Bls12381FrAddSub => "Bls12381FrAddSub", - Self::Bls12381FrMul => "Bls12381FrMul", - Self::Bls12381FrPow => "Bls12381FrPow", - Self::Bls12381FrInv => "Bls12381FrInv", - Self::Bn254EncodeFp => "Bn254EncodeFp", - Self::Bn254DecodeFp => "Bn254DecodeFp", - Self::Bn254G1CheckPointOnCurve => "Bn254G1CheckPointOnCurve", - Self::Bn254G2CheckPointOnCurve => "Bn254G2CheckPointOnCurve", - Self::Bn254G2CheckPointInSubgroup => "Bn254G2CheckPointInSubgroup", - Self::Bn254G1ProjectiveToAffine => "Bn254G1ProjectiveToAffine", - Self::Bn254G1Add => "Bn254G1Add", - Self::Bn254G1Mul => "Bn254G1Mul", - Self::Bn254Pairing => "Bn254Pairing", - Self::Bn254FrFromU256 => "Bn254FrFromU256", - Self::Bn254FrToU256 => "Bn254FrToU256", - Self::Bn254FrAddSub => "Bn254FrAddSub", - Self::Bn254FrMul => "Bn254FrMul", - Self::Bn254FrPow => "Bn254FrPow", - Self::Bn254FrInv => "Bn254FrInv", - Self::Bn254G1Msm => "Bn254G1Msm", - } - } - - #[must_use] - pub const fn variants() -> [ContractCostType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ContractCostType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ContractCostType { - fn variants() -> slice::Iter<'static, ContractCostType> { - Self::VARIANTS.iter() - } -} - -impl Enum for ContractCostType {} - -impl fmt::Display for ContractCostType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ContractCostType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ContractCostType::WasmInsnExec, - 1 => ContractCostType::MemAlloc, - 2 => ContractCostType::MemCpy, - 3 => ContractCostType::MemCmp, - 4 => ContractCostType::DispatchHostFunction, - 5 => ContractCostType::VisitObject, - 6 => ContractCostType::ValSer, - 7 => ContractCostType::ValDeser, - 8 => ContractCostType::ComputeSha256Hash, - 9 => ContractCostType::ComputeEd25519PubKey, - 10 => ContractCostType::VerifyEd25519Sig, - 11 => ContractCostType::VmInstantiation, - 12 => ContractCostType::VmCachedInstantiation, - 13 => ContractCostType::InvokeVmFunction, - 14 => ContractCostType::ComputeKeccak256Hash, - 15 => ContractCostType::DecodeEcdsaCurve256Sig, - 16 => ContractCostType::RecoverEcdsaSecp256k1Key, - 17 => ContractCostType::Int256AddSub, - 18 => ContractCostType::Int256Mul, - 19 => ContractCostType::Int256Div, - 20 => ContractCostType::Int256Pow, - 21 => ContractCostType::Int256Shift, - 22 => ContractCostType::ChaCha20DrawBytes, - 23 => ContractCostType::ParseWasmInstructions, - 24 => ContractCostType::ParseWasmFunctions, - 25 => ContractCostType::ParseWasmGlobals, - 26 => ContractCostType::ParseWasmTableEntries, - 27 => ContractCostType::ParseWasmTypes, - 28 => ContractCostType::ParseWasmDataSegments, - 29 => ContractCostType::ParseWasmElemSegments, - 30 => ContractCostType::ParseWasmImports, - 31 => ContractCostType::ParseWasmExports, - 32 => ContractCostType::ParseWasmDataSegmentBytes, - 33 => ContractCostType::InstantiateWasmInstructions, - 34 => ContractCostType::InstantiateWasmFunctions, - 35 => ContractCostType::InstantiateWasmGlobals, - 36 => ContractCostType::InstantiateWasmTableEntries, - 37 => ContractCostType::InstantiateWasmTypes, - 38 => ContractCostType::InstantiateWasmDataSegments, - 39 => ContractCostType::InstantiateWasmElemSegments, - 40 => ContractCostType::InstantiateWasmImports, - 41 => ContractCostType::InstantiateWasmExports, - 42 => ContractCostType::InstantiateWasmDataSegmentBytes, - 43 => ContractCostType::Sec1DecodePointUncompressed, - 44 => ContractCostType::VerifyEcdsaSecp256r1Sig, - 45 => ContractCostType::Bls12381EncodeFp, - 46 => ContractCostType::Bls12381DecodeFp, - 47 => ContractCostType::Bls12381G1CheckPointOnCurve, - 48 => ContractCostType::Bls12381G1CheckPointInSubgroup, - 49 => ContractCostType::Bls12381G2CheckPointOnCurve, - 50 => ContractCostType::Bls12381G2CheckPointInSubgroup, - 51 => ContractCostType::Bls12381G1ProjectiveToAffine, - 52 => ContractCostType::Bls12381G2ProjectiveToAffine, - 53 => ContractCostType::Bls12381G1Add, - 54 => ContractCostType::Bls12381G1Mul, - 55 => ContractCostType::Bls12381G1Msm, - 56 => ContractCostType::Bls12381MapFpToG1, - 57 => ContractCostType::Bls12381HashToG1, - 58 => ContractCostType::Bls12381G2Add, - 59 => ContractCostType::Bls12381G2Mul, - 60 => ContractCostType::Bls12381G2Msm, - 61 => ContractCostType::Bls12381MapFp2ToG2, - 62 => ContractCostType::Bls12381HashToG2, - 63 => ContractCostType::Bls12381Pairing, - 64 => ContractCostType::Bls12381FrFromU256, - 65 => ContractCostType::Bls12381FrToU256, - 66 => ContractCostType::Bls12381FrAddSub, - 67 => ContractCostType::Bls12381FrMul, - 68 => ContractCostType::Bls12381FrPow, - 69 => ContractCostType::Bls12381FrInv, - 70 => ContractCostType::Bn254EncodeFp, - 71 => ContractCostType::Bn254DecodeFp, - 72 => ContractCostType::Bn254G1CheckPointOnCurve, - 73 => ContractCostType::Bn254G2CheckPointOnCurve, - 74 => ContractCostType::Bn254G2CheckPointInSubgroup, - 75 => ContractCostType::Bn254G1ProjectiveToAffine, - 76 => ContractCostType::Bn254G1Add, - 77 => ContractCostType::Bn254G1Mul, - 78 => ContractCostType::Bn254Pairing, - 79 => ContractCostType::Bn254FrFromU256, - 80 => ContractCostType::Bn254FrToU256, - 81 => ContractCostType::Bn254FrAddSub, - 82 => ContractCostType::Bn254FrMul, - 83 => ContractCostType::Bn254FrPow, - 84 => ContractCostType::Bn254FrInv, - 85 => ContractCostType::Bn254G1Msm, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ContractCostType) -> Self { - e as Self - } -} - -impl ReadXdr for ContractCostType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ContractCostType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ContractCostParamEntry is an XDR Struct defined as: -/// -/// ```text -/// struct ContractCostParamEntry { -/// // use `ext` to add more terms (e.g. higher order polynomials) in the future -/// ExtensionPoint ext; -/// -/// int64 constTerm; -/// int64 linearTerm; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ContractCostParamEntry { - pub ext: ExtensionPoint, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub const_term: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub linear_term: i64, -} - -impl ReadXdr for ContractCostParamEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, - const_term: i64::read_xdr(r)?, - linear_term: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ContractCostParamEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.const_term.write_xdr(w)?; - self.linear_term.write_xdr(w)?; - Ok(()) - }) - } -} - -/// StateArchivalSettings is an XDR Struct defined as: -/// -/// ```text -/// struct StateArchivalSettings { -/// uint32 maxEntryTTL; -/// uint32 minTemporaryTTL; -/// uint32 minPersistentTTL; -/// -/// // rent_fee = wfee_rate_average / rent_rate_denominator_for_type -/// int64 persistentRentRateDenominator; -/// int64 tempRentRateDenominator; -/// -/// // max number of entries that emit archival meta in a single ledger -/// uint32 maxEntriesToArchive; -/// -/// // Number of snapshots to use when calculating average live Soroban State size -/// uint32 liveSorobanStateSizeWindowSampleSize; -/// -/// // How often to sample the live Soroban State size for the average, in ledgers -/// uint32 liveSorobanStateSizeWindowSamplePeriod; -/// -/// // Maximum number of bytes that we scan for eviction per ledger -/// uint32 evictionScanSize; -/// -/// // Lowest BucketList level to be scanned to evict entries -/// uint32 startingEvictionScanLevel; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct StateArchivalSettings { - pub max_entry_ttl: u32, - pub min_temporary_ttl: u32, - pub min_persistent_ttl: u32, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub persistent_rent_rate_denominator: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub temp_rent_rate_denominator: i64, - pub max_entries_to_archive: u32, - pub live_soroban_state_size_window_sample_size: u32, - pub live_soroban_state_size_window_sample_period: u32, - pub eviction_scan_size: u32, - pub starting_eviction_scan_level: u32, -} - -impl ReadXdr for StateArchivalSettings { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - max_entry_ttl: u32::read_xdr(r)?, - min_temporary_ttl: u32::read_xdr(r)?, - min_persistent_ttl: u32::read_xdr(r)?, - persistent_rent_rate_denominator: i64::read_xdr(r)?, - temp_rent_rate_denominator: i64::read_xdr(r)?, - max_entries_to_archive: u32::read_xdr(r)?, - live_soroban_state_size_window_sample_size: u32::read_xdr(r)?, - live_soroban_state_size_window_sample_period: u32::read_xdr(r)?, - eviction_scan_size: u32::read_xdr(r)?, - starting_eviction_scan_level: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for StateArchivalSettings { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.max_entry_ttl.write_xdr(w)?; - self.min_temporary_ttl.write_xdr(w)?; - self.min_persistent_ttl.write_xdr(w)?; - self.persistent_rent_rate_denominator.write_xdr(w)?; - self.temp_rent_rate_denominator.write_xdr(w)?; - self.max_entries_to_archive.write_xdr(w)?; - self.live_soroban_state_size_window_sample_size - .write_xdr(w)?; - self.live_soroban_state_size_window_sample_period - .write_xdr(w)?; - self.eviction_scan_size.write_xdr(w)?; - self.starting_eviction_scan_level.write_xdr(w)?; - Ok(()) - }) - } -} - -/// EvictionIterator is an XDR Struct defined as: -/// -/// ```text -/// struct EvictionIterator { -/// uint32 bucketListLevel; -/// bool isCurrBucket; -/// uint64 bucketFileOffset; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct EvictionIterator { - pub bucket_list_level: u32, - pub is_curr_bucket: bool, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub bucket_file_offset: u64, -} - -impl ReadXdr for EvictionIterator { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - bucket_list_level: u32::read_xdr(r)?, - is_curr_bucket: bool::read_xdr(r)?, - bucket_file_offset: u64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for EvictionIterator { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.bucket_list_level.write_xdr(w)?; - self.is_curr_bucket.write_xdr(w)?; - self.bucket_file_offset.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ConfigSettingScpTiming is an XDR Struct defined as: -/// -/// ```text -/// struct ConfigSettingSCPTiming { -/// uint32 ledgerTargetCloseTimeMilliseconds; -/// uint32 nominationTimeoutInitialMilliseconds; -/// uint32 nominationTimeoutIncrementMilliseconds; -/// uint32 ballotTimeoutInitialMilliseconds; -/// uint32 ballotTimeoutIncrementMilliseconds; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ConfigSettingScpTiming { - pub ledger_target_close_time_milliseconds: u32, - pub nomination_timeout_initial_milliseconds: u32, - pub nomination_timeout_increment_milliseconds: u32, - pub ballot_timeout_initial_milliseconds: u32, - pub ballot_timeout_increment_milliseconds: u32, -} - -impl ReadXdr for ConfigSettingScpTiming { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ledger_target_close_time_milliseconds: u32::read_xdr(r)?, - nomination_timeout_initial_milliseconds: u32::read_xdr(r)?, - nomination_timeout_increment_milliseconds: u32::read_xdr(r)?, - ballot_timeout_initial_milliseconds: u32::read_xdr(r)?, - ballot_timeout_increment_milliseconds: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ConfigSettingScpTiming { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ledger_target_close_time_milliseconds.write_xdr(w)?; - self.nomination_timeout_initial_milliseconds.write_xdr(w)?; - self.nomination_timeout_increment_milliseconds - .write_xdr(w)?; - self.ballot_timeout_initial_milliseconds.write_xdr(w)?; - self.ballot_timeout_increment_milliseconds.write_xdr(w)?; - Ok(()) - }) - } -} - -/// FrozenLedgerKeys is an XDR Struct defined as: -/// -/// ```text -/// struct FrozenLedgerKeys { -/// EncodedLedgerKey keys<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct FrozenLedgerKeys { - pub keys: VecM, -} - -impl ReadXdr for FrozenLedgerKeys { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - keys: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for FrozenLedgerKeys { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.keys.write_xdr(w)?; - Ok(()) - }) - } -} - -/// FrozenLedgerKeysDelta is an XDR Struct defined as: -/// -/// ```text -/// struct FrozenLedgerKeysDelta { -/// EncodedLedgerKey keysToFreeze<>; -/// EncodedLedgerKey keysToUnfreeze<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct FrozenLedgerKeysDelta { - pub keys_to_freeze: VecM, - pub keys_to_unfreeze: VecM, -} - -impl ReadXdr for FrozenLedgerKeysDelta { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - keys_to_freeze: VecM::::read_xdr(r)?, - keys_to_unfreeze: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for FrozenLedgerKeysDelta { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.keys_to_freeze.write_xdr(w)?; - self.keys_to_unfreeze.write_xdr(w)?; - Ok(()) - }) - } -} - -/// FreezeBypassTxs is an XDR Struct defined as: -/// -/// ```text -/// struct FreezeBypassTxs { -/// Hash txHashes<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct FreezeBypassTxs { - pub tx_hashes: VecM, -} - -impl ReadXdr for FreezeBypassTxs { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - tx_hashes: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for FreezeBypassTxs { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.tx_hashes.write_xdr(w)?; - Ok(()) - }) - } -} - -/// FreezeBypassTxsDelta is an XDR Struct defined as: -/// -/// ```text -/// struct FreezeBypassTxsDelta { -/// Hash addTxs<>; -/// Hash removeTxs<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct FreezeBypassTxsDelta { - pub add_txs: VecM, - pub remove_txs: VecM, -} - -impl ReadXdr for FreezeBypassTxsDelta { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - add_txs: VecM::::read_xdr(r)?, - remove_txs: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for FreezeBypassTxsDelta { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.add_txs.write_xdr(w)?; - self.remove_txs.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ContractCostCountLimit is an XDR Const defined as: -/// -/// ```text -/// const CONTRACT_COST_COUNT_LIMIT = 1024; -/// ``` -/// -pub const CONTRACT_COST_COUNT_LIMIT: u64 = 1024; - -/// ContractCostParams is an XDR Typedef defined as: -/// -/// ```text -/// typedef ContractCostParamEntry ContractCostParams; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct ContractCostParams(pub VecM); - -impl From for VecM { - #[must_use] - fn from(x: ContractCostParams) -> Self { - x.0 - } -} - -impl From> for ContractCostParams { - #[must_use] - fn from(x: VecM) -> Self { - ContractCostParams(x) - } -} - -impl AsRef> for ContractCostParams { - #[must_use] - fn as_ref(&self) -> &VecM { - &self.0 - } -} - -impl ReadXdr for ContractCostParams { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = VecM::::read_xdr(r)?; - let v = ContractCostParams(i); - Ok(v) - }) - } -} - -impl WriteXdr for ContractCostParams { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for ContractCostParams { - type Target = VecM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: ContractCostParams) -> Self { - x.0 .0 - } -} - -impl TryFrom> for ContractCostParams { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(ContractCostParams(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for ContractCostParams { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(ContractCostParams(x.try_into()?)) - } -} - -impl AsRef> for ContractCostParams { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[ContractCostParamEntry]> for ContractCostParams { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[ContractCostParamEntry] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[ContractCostParamEntry] { - self.0 .0 - } -} - -/// ConfigSettingId is an XDR Enum defined as: -/// -/// ```text -/// enum ConfigSettingID -/// { -/// CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, -/// CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, -/// CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, -/// CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, -/// CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, -/// CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, -/// CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, -/// CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, -/// CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, -/// CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, -/// CONFIG_SETTING_STATE_ARCHIVAL = 10, -/// CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, -/// CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, -/// CONFIG_SETTING_EVICTION_ITERATOR = 13, -/// CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, -/// CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, -/// CONFIG_SETTING_SCP_TIMING = 16, -/// CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, -/// CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, -/// CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, -/// CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ConfigSettingId { - #[cfg_attr(feature = "alloc", default)] - ContractMaxSizeBytes = 0, - ContractComputeV0 = 1, - ContractLedgerCostV0 = 2, - ContractHistoricalDataV0 = 3, - ContractEventsV0 = 4, - ContractBandwidthV0 = 5, - ContractCostParamsCpuInstructions = 6, - ContractCostParamsMemoryBytes = 7, - ContractDataKeySizeBytes = 8, - ContractDataEntrySizeBytes = 9, - StateArchival = 10, - ContractExecutionLanes = 11, - LiveSorobanStateSizeWindow = 12, - EvictionIterator = 13, - ContractParallelComputeV0 = 14, - ContractLedgerCostExtV0 = 15, - ScpTiming = 16, - FrozenLedgerKeys = 17, - FrozenLedgerKeysDelta = 18, - FreezeBypassTxs = 19, - FreezeBypassTxsDelta = 20, -} - -impl ConfigSettingId { - const _VARIANTS: &[ConfigSettingId] = &[ - ConfigSettingId::ContractMaxSizeBytes, - ConfigSettingId::ContractComputeV0, - ConfigSettingId::ContractLedgerCostV0, - ConfigSettingId::ContractHistoricalDataV0, - ConfigSettingId::ContractEventsV0, - ConfigSettingId::ContractBandwidthV0, - ConfigSettingId::ContractCostParamsCpuInstructions, - ConfigSettingId::ContractCostParamsMemoryBytes, - ConfigSettingId::ContractDataKeySizeBytes, - ConfigSettingId::ContractDataEntrySizeBytes, - ConfigSettingId::StateArchival, - ConfigSettingId::ContractExecutionLanes, - ConfigSettingId::LiveSorobanStateSizeWindow, - ConfigSettingId::EvictionIterator, - ConfigSettingId::ContractParallelComputeV0, - ConfigSettingId::ContractLedgerCostExtV0, - ConfigSettingId::ScpTiming, - ConfigSettingId::FrozenLedgerKeys, - ConfigSettingId::FrozenLedgerKeysDelta, - ConfigSettingId::FreezeBypassTxs, - ConfigSettingId::FreezeBypassTxsDelta, - ]; - pub const VARIANTS: [ConfigSettingId; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "ContractMaxSizeBytes", - "ContractComputeV0", - "ContractLedgerCostV0", - "ContractHistoricalDataV0", - "ContractEventsV0", - "ContractBandwidthV0", - "ContractCostParamsCpuInstructions", - "ContractCostParamsMemoryBytes", - "ContractDataKeySizeBytes", - "ContractDataEntrySizeBytes", - "StateArchival", - "ContractExecutionLanes", - "LiveSorobanStateSizeWindow", - "EvictionIterator", - "ContractParallelComputeV0", - "ContractLedgerCostExtV0", - "ScpTiming", - "FrozenLedgerKeys", - "FrozenLedgerKeysDelta", - "FreezeBypassTxs", - "FreezeBypassTxsDelta", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ContractMaxSizeBytes => "ContractMaxSizeBytes", - Self::ContractComputeV0 => "ContractComputeV0", - Self::ContractLedgerCostV0 => "ContractLedgerCostV0", - Self::ContractHistoricalDataV0 => "ContractHistoricalDataV0", - Self::ContractEventsV0 => "ContractEventsV0", - Self::ContractBandwidthV0 => "ContractBandwidthV0", - Self::ContractCostParamsCpuInstructions => "ContractCostParamsCpuInstructions", - Self::ContractCostParamsMemoryBytes => "ContractCostParamsMemoryBytes", - Self::ContractDataKeySizeBytes => "ContractDataKeySizeBytes", - Self::ContractDataEntrySizeBytes => "ContractDataEntrySizeBytes", - Self::StateArchival => "StateArchival", - Self::ContractExecutionLanes => "ContractExecutionLanes", - Self::LiveSorobanStateSizeWindow => "LiveSorobanStateSizeWindow", - Self::EvictionIterator => "EvictionIterator", - Self::ContractParallelComputeV0 => "ContractParallelComputeV0", - Self::ContractLedgerCostExtV0 => "ContractLedgerCostExtV0", - Self::ScpTiming => "ScpTiming", - Self::FrozenLedgerKeys => "FrozenLedgerKeys", - Self::FrozenLedgerKeysDelta => "FrozenLedgerKeysDelta", - Self::FreezeBypassTxs => "FreezeBypassTxs", - Self::FreezeBypassTxsDelta => "FreezeBypassTxsDelta", - } - } - - #[must_use] - pub const fn variants() -> [ConfigSettingId; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ConfigSettingId { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ConfigSettingId { - fn variants() -> slice::Iter<'static, ConfigSettingId> { - Self::VARIANTS.iter() - } -} - -impl Enum for ConfigSettingId {} - -impl fmt::Display for ConfigSettingId { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ConfigSettingId { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ConfigSettingId::ContractMaxSizeBytes, - 1 => ConfigSettingId::ContractComputeV0, - 2 => ConfigSettingId::ContractLedgerCostV0, - 3 => ConfigSettingId::ContractHistoricalDataV0, - 4 => ConfigSettingId::ContractEventsV0, - 5 => ConfigSettingId::ContractBandwidthV0, - 6 => ConfigSettingId::ContractCostParamsCpuInstructions, - 7 => ConfigSettingId::ContractCostParamsMemoryBytes, - 8 => ConfigSettingId::ContractDataKeySizeBytes, - 9 => ConfigSettingId::ContractDataEntrySizeBytes, - 10 => ConfigSettingId::StateArchival, - 11 => ConfigSettingId::ContractExecutionLanes, - 12 => ConfigSettingId::LiveSorobanStateSizeWindow, - 13 => ConfigSettingId::EvictionIterator, - 14 => ConfigSettingId::ContractParallelComputeV0, - 15 => ConfigSettingId::ContractLedgerCostExtV0, - 16 => ConfigSettingId::ScpTiming, - 17 => ConfigSettingId::FrozenLedgerKeys, - 18 => ConfigSettingId::FrozenLedgerKeysDelta, - 19 => ConfigSettingId::FreezeBypassTxs, - 20 => ConfigSettingId::FreezeBypassTxsDelta, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ConfigSettingId) -> Self { - e as Self - } -} - -impl ReadXdr for ConfigSettingId { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ConfigSettingId { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ConfigSettingEntry is an XDR Union defined as: -/// -/// ```text -/// union ConfigSettingEntry switch (ConfigSettingID configSettingID) -/// { -/// case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: -/// uint32 contractMaxSizeBytes; -/// case CONFIG_SETTING_CONTRACT_COMPUTE_V0: -/// ConfigSettingContractComputeV0 contractCompute; -/// case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: -/// ConfigSettingContractLedgerCostV0 contractLedgerCost; -/// case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: -/// ConfigSettingContractHistoricalDataV0 contractHistoricalData; -/// case CONFIG_SETTING_CONTRACT_EVENTS_V0: -/// ConfigSettingContractEventsV0 contractEvents; -/// case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: -/// ConfigSettingContractBandwidthV0 contractBandwidth; -/// case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: -/// ContractCostParams contractCostParamsCpuInsns; -/// case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: -/// ContractCostParams contractCostParamsMemBytes; -/// case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: -/// uint32 contractDataKeySizeBytes; -/// case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: -/// uint32 contractDataEntrySizeBytes; -/// case CONFIG_SETTING_STATE_ARCHIVAL: -/// StateArchivalSettings stateArchivalSettings; -/// case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: -/// ConfigSettingContractExecutionLanesV0 contractExecutionLanes; -/// case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: -/// uint64 liveSorobanStateSizeWindow<>; -/// case CONFIG_SETTING_EVICTION_ITERATOR: -/// EvictionIterator evictionIterator; -/// case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: -/// ConfigSettingContractParallelComputeV0 contractParallelCompute; -/// case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: -/// ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; -/// case CONFIG_SETTING_SCP_TIMING: -/// ConfigSettingSCPTiming contractSCPTiming; -/// case CONFIG_SETTING_FROZEN_LEDGER_KEYS: -/// FrozenLedgerKeys frozenLedgerKeys; -/// case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: -/// FrozenLedgerKeysDelta frozenLedgerKeysDelta; -/// case CONFIG_SETTING_FREEZE_BYPASS_TXS: -/// FreezeBypassTxs freezeBypassTxs; -/// case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: -/// FreezeBypassTxsDelta freezeBypassTxsDelta; -/// }; -/// ``` -/// -// union with discriminant ConfigSettingId -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ConfigSettingEntry { - ContractMaxSizeBytes(u32), - ContractComputeV0(ConfigSettingContractComputeV0), - ContractLedgerCostV0(ConfigSettingContractLedgerCostV0), - ContractHistoricalDataV0(ConfigSettingContractHistoricalDataV0), - ContractEventsV0(ConfigSettingContractEventsV0), - ContractBandwidthV0(ConfigSettingContractBandwidthV0), - ContractCostParamsCpuInstructions(ContractCostParams), - ContractCostParamsMemoryBytes(ContractCostParams), - ContractDataKeySizeBytes(u32), - ContractDataEntrySizeBytes(u32), - StateArchival(StateArchivalSettings), - ContractExecutionLanes(ConfigSettingContractExecutionLanesV0), - LiveSorobanStateSizeWindow( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "VecM") - )] - VecM, - ), - EvictionIterator(EvictionIterator), - ContractParallelComputeV0(ConfigSettingContractParallelComputeV0), - ContractLedgerCostExtV0(ConfigSettingContractLedgerCostExtV0), - ScpTiming(ConfigSettingScpTiming), - FrozenLedgerKeys(FrozenLedgerKeys), - FrozenLedgerKeysDelta(FrozenLedgerKeysDelta), - FreezeBypassTxs(FreezeBypassTxs), - FreezeBypassTxsDelta(FreezeBypassTxsDelta), -} - -#[cfg(feature = "alloc")] -impl Default for ConfigSettingEntry { - fn default() -> Self { - Self::ContractMaxSizeBytes(u32::default()) - } -} - -impl ConfigSettingEntry { - const _VARIANTS: &[ConfigSettingId] = &[ - ConfigSettingId::ContractMaxSizeBytes, - ConfigSettingId::ContractComputeV0, - ConfigSettingId::ContractLedgerCostV0, - ConfigSettingId::ContractHistoricalDataV0, - ConfigSettingId::ContractEventsV0, - ConfigSettingId::ContractBandwidthV0, - ConfigSettingId::ContractCostParamsCpuInstructions, - ConfigSettingId::ContractCostParamsMemoryBytes, - ConfigSettingId::ContractDataKeySizeBytes, - ConfigSettingId::ContractDataEntrySizeBytes, - ConfigSettingId::StateArchival, - ConfigSettingId::ContractExecutionLanes, - ConfigSettingId::LiveSorobanStateSizeWindow, - ConfigSettingId::EvictionIterator, - ConfigSettingId::ContractParallelComputeV0, - ConfigSettingId::ContractLedgerCostExtV0, - ConfigSettingId::ScpTiming, - ConfigSettingId::FrozenLedgerKeys, - ConfigSettingId::FrozenLedgerKeysDelta, - ConfigSettingId::FreezeBypassTxs, - ConfigSettingId::FreezeBypassTxsDelta, - ]; - pub const VARIANTS: [ConfigSettingId; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "ContractMaxSizeBytes", - "ContractComputeV0", - "ContractLedgerCostV0", - "ContractHistoricalDataV0", - "ContractEventsV0", - "ContractBandwidthV0", - "ContractCostParamsCpuInstructions", - "ContractCostParamsMemoryBytes", - "ContractDataKeySizeBytes", - "ContractDataEntrySizeBytes", - "StateArchival", - "ContractExecutionLanes", - "LiveSorobanStateSizeWindow", - "EvictionIterator", - "ContractParallelComputeV0", - "ContractLedgerCostExtV0", - "ScpTiming", - "FrozenLedgerKeys", - "FrozenLedgerKeysDelta", - "FreezeBypassTxs", - "FreezeBypassTxsDelta", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ContractMaxSizeBytes(_) => "ContractMaxSizeBytes", - Self::ContractComputeV0(_) => "ContractComputeV0", - Self::ContractLedgerCostV0(_) => "ContractLedgerCostV0", - Self::ContractHistoricalDataV0(_) => "ContractHistoricalDataV0", - Self::ContractEventsV0(_) => "ContractEventsV0", - Self::ContractBandwidthV0(_) => "ContractBandwidthV0", - Self::ContractCostParamsCpuInstructions(_) => "ContractCostParamsCpuInstructions", - Self::ContractCostParamsMemoryBytes(_) => "ContractCostParamsMemoryBytes", - Self::ContractDataKeySizeBytes(_) => "ContractDataKeySizeBytes", - Self::ContractDataEntrySizeBytes(_) => "ContractDataEntrySizeBytes", - Self::StateArchival(_) => "StateArchival", - Self::ContractExecutionLanes(_) => "ContractExecutionLanes", - Self::LiveSorobanStateSizeWindow(_) => "LiveSorobanStateSizeWindow", - Self::EvictionIterator(_) => "EvictionIterator", - Self::ContractParallelComputeV0(_) => "ContractParallelComputeV0", - Self::ContractLedgerCostExtV0(_) => "ContractLedgerCostExtV0", - Self::ScpTiming(_) => "ScpTiming", - Self::FrozenLedgerKeys(_) => "FrozenLedgerKeys", - Self::FrozenLedgerKeysDelta(_) => "FrozenLedgerKeysDelta", - Self::FreezeBypassTxs(_) => "FreezeBypassTxs", - Self::FreezeBypassTxsDelta(_) => "FreezeBypassTxsDelta", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ConfigSettingId { - #[allow(clippy::match_same_arms)] - match self { - Self::ContractMaxSizeBytes(_) => ConfigSettingId::ContractMaxSizeBytes, - Self::ContractComputeV0(_) => ConfigSettingId::ContractComputeV0, - Self::ContractLedgerCostV0(_) => ConfigSettingId::ContractLedgerCostV0, - Self::ContractHistoricalDataV0(_) => ConfigSettingId::ContractHistoricalDataV0, - Self::ContractEventsV0(_) => ConfigSettingId::ContractEventsV0, - Self::ContractBandwidthV0(_) => ConfigSettingId::ContractBandwidthV0, - Self::ContractCostParamsCpuInstructions(_) => { - ConfigSettingId::ContractCostParamsCpuInstructions - } - Self::ContractCostParamsMemoryBytes(_) => { - ConfigSettingId::ContractCostParamsMemoryBytes - } - Self::ContractDataKeySizeBytes(_) => ConfigSettingId::ContractDataKeySizeBytes, - Self::ContractDataEntrySizeBytes(_) => ConfigSettingId::ContractDataEntrySizeBytes, - Self::StateArchival(_) => ConfigSettingId::StateArchival, - Self::ContractExecutionLanes(_) => ConfigSettingId::ContractExecutionLanes, - Self::LiveSorobanStateSizeWindow(_) => ConfigSettingId::LiveSorobanStateSizeWindow, - Self::EvictionIterator(_) => ConfigSettingId::EvictionIterator, - Self::ContractParallelComputeV0(_) => ConfigSettingId::ContractParallelComputeV0, - Self::ContractLedgerCostExtV0(_) => ConfigSettingId::ContractLedgerCostExtV0, - Self::ScpTiming(_) => ConfigSettingId::ScpTiming, - Self::FrozenLedgerKeys(_) => ConfigSettingId::FrozenLedgerKeys, - Self::FrozenLedgerKeysDelta(_) => ConfigSettingId::FrozenLedgerKeysDelta, - Self::FreezeBypassTxs(_) => ConfigSettingId::FreezeBypassTxs, - Self::FreezeBypassTxsDelta(_) => ConfigSettingId::FreezeBypassTxsDelta, - } - } - - #[must_use] - pub const fn variants() -> [ConfigSettingId; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ConfigSettingEntry { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ConfigSettingEntry { - #[must_use] - fn discriminant(&self) -> ConfigSettingId { - Self::discriminant(self) - } -} - -impl Variants for ConfigSettingEntry { - fn variants() -> slice::Iter<'static, ConfigSettingId> { - Self::VARIANTS.iter() - } -} - -impl Union for ConfigSettingEntry {} - -impl ReadXdr for ConfigSettingEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ConfigSettingId = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ConfigSettingId::ContractMaxSizeBytes => { - Self::ContractMaxSizeBytes(u32::read_xdr(r)?) - } - ConfigSettingId::ContractComputeV0 => { - Self::ContractComputeV0(ConfigSettingContractComputeV0::read_xdr(r)?) - } - ConfigSettingId::ContractLedgerCostV0 => { - Self::ContractLedgerCostV0(ConfigSettingContractLedgerCostV0::read_xdr(r)?) - } - ConfigSettingId::ContractHistoricalDataV0 => Self::ContractHistoricalDataV0( - ConfigSettingContractHistoricalDataV0::read_xdr(r)?, - ), - ConfigSettingId::ContractEventsV0 => { - Self::ContractEventsV0(ConfigSettingContractEventsV0::read_xdr(r)?) - } - ConfigSettingId::ContractBandwidthV0 => { - Self::ContractBandwidthV0(ConfigSettingContractBandwidthV0::read_xdr(r)?) - } - ConfigSettingId::ContractCostParamsCpuInstructions => { - Self::ContractCostParamsCpuInstructions(ContractCostParams::read_xdr(r)?) - } - ConfigSettingId::ContractCostParamsMemoryBytes => { - Self::ContractCostParamsMemoryBytes(ContractCostParams::read_xdr(r)?) - } - ConfigSettingId::ContractDataKeySizeBytes => { - Self::ContractDataKeySizeBytes(u32::read_xdr(r)?) - } - ConfigSettingId::ContractDataEntrySizeBytes => { - Self::ContractDataEntrySizeBytes(u32::read_xdr(r)?) - } - ConfigSettingId::StateArchival => { - Self::StateArchival(StateArchivalSettings::read_xdr(r)?) - } - ConfigSettingId::ContractExecutionLanes => Self::ContractExecutionLanes( - ConfigSettingContractExecutionLanesV0::read_xdr(r)?, - ), - ConfigSettingId::LiveSorobanStateSizeWindow => { - Self::LiveSorobanStateSizeWindow(VecM::::read_xdr(r)?) - } - ConfigSettingId::EvictionIterator => { - Self::EvictionIterator(EvictionIterator::read_xdr(r)?) - } - ConfigSettingId::ContractParallelComputeV0 => Self::ContractParallelComputeV0( - ConfigSettingContractParallelComputeV0::read_xdr(r)?, - ), - ConfigSettingId::ContractLedgerCostExtV0 => Self::ContractLedgerCostExtV0( - ConfigSettingContractLedgerCostExtV0::read_xdr(r)?, - ), - ConfigSettingId::ScpTiming => Self::ScpTiming(ConfigSettingScpTiming::read_xdr(r)?), - ConfigSettingId::FrozenLedgerKeys => { - Self::FrozenLedgerKeys(FrozenLedgerKeys::read_xdr(r)?) - } - ConfigSettingId::FrozenLedgerKeysDelta => { - Self::FrozenLedgerKeysDelta(FrozenLedgerKeysDelta::read_xdr(r)?) - } - ConfigSettingId::FreezeBypassTxs => { - Self::FreezeBypassTxs(FreezeBypassTxs::read_xdr(r)?) - } - ConfigSettingId::FreezeBypassTxsDelta => { - Self::FreezeBypassTxsDelta(FreezeBypassTxsDelta::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ConfigSettingEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::ContractMaxSizeBytes(v) => v.write_xdr(w)?, - Self::ContractComputeV0(v) => v.write_xdr(w)?, - Self::ContractLedgerCostV0(v) => v.write_xdr(w)?, - Self::ContractHistoricalDataV0(v) => v.write_xdr(w)?, - Self::ContractEventsV0(v) => v.write_xdr(w)?, - Self::ContractBandwidthV0(v) => v.write_xdr(w)?, - Self::ContractCostParamsCpuInstructions(v) => v.write_xdr(w)?, - Self::ContractCostParamsMemoryBytes(v) => v.write_xdr(w)?, - Self::ContractDataKeySizeBytes(v) => v.write_xdr(w)?, - Self::ContractDataEntrySizeBytes(v) => v.write_xdr(w)?, - Self::StateArchival(v) => v.write_xdr(w)?, - Self::ContractExecutionLanes(v) => v.write_xdr(w)?, - Self::LiveSorobanStateSizeWindow(v) => v.write_xdr(w)?, - Self::EvictionIterator(v) => v.write_xdr(w)?, - Self::ContractParallelComputeV0(v) => v.write_xdr(w)?, - Self::ContractLedgerCostExtV0(v) => v.write_xdr(w)?, - Self::ScpTiming(v) => v.write_xdr(w)?, - Self::FrozenLedgerKeys(v) => v.write_xdr(w)?, - Self::FrozenLedgerKeysDelta(v) => v.write_xdr(w)?, - Self::FreezeBypassTxs(v) => v.write_xdr(w)?, - Self::FreezeBypassTxsDelta(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ScEnvMetaKind is an XDR Enum defined as: -/// -/// ```text -/// enum SCEnvMetaKind -/// { -/// SC_ENV_META_KIND_INTERFACE_VERSION = 0 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ScEnvMetaKind { - #[cfg_attr(feature = "alloc", default)] - ScEnvMetaKindInterfaceVersion = 0, -} - -impl ScEnvMetaKind { - const _VARIANTS: &[ScEnvMetaKind] = &[ScEnvMetaKind::ScEnvMetaKindInterfaceVersion]; - pub const VARIANTS: [ScEnvMetaKind; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["ScEnvMetaKindInterfaceVersion"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ScEnvMetaKindInterfaceVersion => "ScEnvMetaKindInterfaceVersion", - } - } - - #[must_use] - pub const fn variants() -> [ScEnvMetaKind; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScEnvMetaKind { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ScEnvMetaKind { - fn variants() -> slice::Iter<'static, ScEnvMetaKind> { - Self::VARIANTS.iter() - } -} - -impl Enum for ScEnvMetaKind {} - -impl fmt::Display for ScEnvMetaKind { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ScEnvMetaKind { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ScEnvMetaKind::ScEnvMetaKindInterfaceVersion, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ScEnvMetaKind) -> Self { - e as Self - } -} - -impl ReadXdr for ScEnvMetaKind { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ScEnvMetaKind { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ScEnvMetaEntryInterfaceVersion is an XDR NestedStruct defined as: -/// -/// ```text -/// struct { -/// uint32 protocol; -/// uint32 preRelease; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScEnvMetaEntryInterfaceVersion { - pub protocol: u32, - pub pre_release: u32, -} - -impl ReadXdr for ScEnvMetaEntryInterfaceVersion { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - protocol: u32::read_xdr(r)?, - pre_release: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScEnvMetaEntryInterfaceVersion { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.protocol.write_xdr(w)?; - self.pre_release.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScEnvMetaEntry is an XDR Union defined as: -/// -/// ```text -/// union SCEnvMetaEntry switch (SCEnvMetaKind kind) -/// { -/// case SC_ENV_META_KIND_INTERFACE_VERSION: -/// struct { -/// uint32 protocol; -/// uint32 preRelease; -/// } interfaceVersion; -/// }; -/// ``` -/// -// union with discriminant ScEnvMetaKind -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ScEnvMetaEntry { - ScEnvMetaKindInterfaceVersion(ScEnvMetaEntryInterfaceVersion), -} - -#[cfg(feature = "alloc")] -impl Default for ScEnvMetaEntry { - fn default() -> Self { - Self::ScEnvMetaKindInterfaceVersion(ScEnvMetaEntryInterfaceVersion::default()) - } -} - -impl ScEnvMetaEntry { - const _VARIANTS: &[ScEnvMetaKind] = &[ScEnvMetaKind::ScEnvMetaKindInterfaceVersion]; - pub const VARIANTS: [ScEnvMetaKind; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["ScEnvMetaKindInterfaceVersion"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ScEnvMetaKindInterfaceVersion(_) => "ScEnvMetaKindInterfaceVersion", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ScEnvMetaKind { - #[allow(clippy::match_same_arms)] - match self { - Self::ScEnvMetaKindInterfaceVersion(_) => ScEnvMetaKind::ScEnvMetaKindInterfaceVersion, - } - } - - #[must_use] - pub const fn variants() -> [ScEnvMetaKind; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScEnvMetaEntry { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ScEnvMetaEntry { - #[must_use] - fn discriminant(&self) -> ScEnvMetaKind { - Self::discriminant(self) - } -} - -impl Variants for ScEnvMetaEntry { - fn variants() -> slice::Iter<'static, ScEnvMetaKind> { - Self::VARIANTS.iter() - } -} - -impl Union for ScEnvMetaEntry {} - -impl ReadXdr for ScEnvMetaEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ScEnvMetaKind = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ScEnvMetaKind::ScEnvMetaKindInterfaceVersion => { - Self::ScEnvMetaKindInterfaceVersion(ScEnvMetaEntryInterfaceVersion::read_xdr( - r, - )?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ScEnvMetaEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::ScEnvMetaKindInterfaceVersion(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ScMetaV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCMetaV0 -/// { -/// string key<>; -/// string val<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScMetaV0 { - pub key: StringM, - pub val: StringM, -} - -impl ReadXdr for ScMetaV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - key: StringM::read_xdr(r)?, - val: StringM::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScMetaV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.key.write_xdr(w)?; - self.val.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScMetaKind is an XDR Enum defined as: -/// -/// ```text -/// enum SCMetaKind -/// { -/// SC_META_V0 = 0 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ScMetaKind { - #[cfg_attr(feature = "alloc", default)] - ScMetaV0 = 0, -} - -impl ScMetaKind { - const _VARIANTS: &[ScMetaKind] = &[ScMetaKind::ScMetaV0]; - pub const VARIANTS: [ScMetaKind; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["ScMetaV0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ScMetaV0 => "ScMetaV0", - } - } - - #[must_use] - pub const fn variants() -> [ScMetaKind; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScMetaKind { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ScMetaKind { - fn variants() -> slice::Iter<'static, ScMetaKind> { - Self::VARIANTS.iter() - } -} - -impl Enum for ScMetaKind {} - -impl fmt::Display for ScMetaKind { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ScMetaKind { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ScMetaKind::ScMetaV0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ScMetaKind) -> Self { - e as Self - } -} - -impl ReadXdr for ScMetaKind { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ScMetaKind { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ScMetaEntry is an XDR Union defined as: -/// -/// ```text -/// union SCMetaEntry switch (SCMetaKind kind) -/// { -/// case SC_META_V0: -/// SCMetaV0 v0; -/// }; -/// ``` -/// -// union with discriminant ScMetaKind -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ScMetaEntry { - ScMetaV0(ScMetaV0), -} - -#[cfg(feature = "alloc")] -impl Default for ScMetaEntry { - fn default() -> Self { - Self::ScMetaV0(ScMetaV0::default()) - } -} - -impl ScMetaEntry { - const _VARIANTS: &[ScMetaKind] = &[ScMetaKind::ScMetaV0]; - pub const VARIANTS: [ScMetaKind; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["ScMetaV0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ScMetaV0(_) => "ScMetaV0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ScMetaKind { - #[allow(clippy::match_same_arms)] - match self { - Self::ScMetaV0(_) => ScMetaKind::ScMetaV0, - } - } - - #[must_use] - pub const fn variants() -> [ScMetaKind; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScMetaEntry { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ScMetaEntry { - #[must_use] - fn discriminant(&self) -> ScMetaKind { - Self::discriminant(self) - } -} - -impl Variants for ScMetaEntry { - fn variants() -> slice::Iter<'static, ScMetaKind> { - Self::VARIANTS.iter() - } -} - -impl Union for ScMetaEntry {} - -impl ReadXdr for ScMetaEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ScMetaKind = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ScMetaKind::ScMetaV0 => Self::ScMetaV0(ScMetaV0::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ScMetaEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::ScMetaV0(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ScSpecDocLimit is an XDR Const defined as: -/// -/// ```text -/// const SC_SPEC_DOC_LIMIT = 1024; -/// ``` -/// -pub const SC_SPEC_DOC_LIMIT: u64 = 1024; - -/// ScSpecType is an XDR Enum defined as: -/// -/// ```text -/// enum SCSpecType -/// { -/// SC_SPEC_TYPE_VAL = 0, -/// -/// // Types with no parameters. -/// SC_SPEC_TYPE_BOOL = 1, -/// SC_SPEC_TYPE_VOID = 2, -/// SC_SPEC_TYPE_ERROR = 3, -/// SC_SPEC_TYPE_U32 = 4, -/// SC_SPEC_TYPE_I32 = 5, -/// SC_SPEC_TYPE_U64 = 6, -/// SC_SPEC_TYPE_I64 = 7, -/// SC_SPEC_TYPE_TIMEPOINT = 8, -/// SC_SPEC_TYPE_DURATION = 9, -/// SC_SPEC_TYPE_U128 = 10, -/// SC_SPEC_TYPE_I128 = 11, -/// SC_SPEC_TYPE_U256 = 12, -/// SC_SPEC_TYPE_I256 = 13, -/// SC_SPEC_TYPE_BYTES = 14, -/// SC_SPEC_TYPE_STRING = 16, -/// SC_SPEC_TYPE_SYMBOL = 17, -/// SC_SPEC_TYPE_ADDRESS = 19, -/// SC_SPEC_TYPE_MUXED_ADDRESS = 20, -/// -/// // Types with parameters. -/// SC_SPEC_TYPE_OPTION = 1000, -/// SC_SPEC_TYPE_RESULT = 1001, -/// SC_SPEC_TYPE_VEC = 1002, -/// SC_SPEC_TYPE_MAP = 1004, -/// SC_SPEC_TYPE_TUPLE = 1005, -/// SC_SPEC_TYPE_BYTES_N = 1006, -/// -/// // User defined types. -/// SC_SPEC_TYPE_UDT = 2000 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ScSpecType { - #[cfg_attr(feature = "alloc", default)] - Val = 0, - Bool = 1, - Void = 2, - Error = 3, - U32 = 4, - I32 = 5, - U64 = 6, - I64 = 7, - Timepoint = 8, - Duration = 9, - U128 = 10, - I128 = 11, - U256 = 12, - I256 = 13, - Bytes = 14, - String = 16, - Symbol = 17, - Address = 19, - MuxedAddress = 20, - Option = 1000, - Result = 1001, - Vec = 1002, - Map = 1004, - Tuple = 1005, - BytesN = 1006, - Udt = 2000, -} - -impl ScSpecType { - const _VARIANTS: &[ScSpecType] = &[ - ScSpecType::Val, - ScSpecType::Bool, - ScSpecType::Void, - ScSpecType::Error, - ScSpecType::U32, - ScSpecType::I32, - ScSpecType::U64, - ScSpecType::I64, - ScSpecType::Timepoint, - ScSpecType::Duration, - ScSpecType::U128, - ScSpecType::I128, - ScSpecType::U256, - ScSpecType::I256, - ScSpecType::Bytes, - ScSpecType::String, - ScSpecType::Symbol, - ScSpecType::Address, - ScSpecType::MuxedAddress, - ScSpecType::Option, - ScSpecType::Result, - ScSpecType::Vec, - ScSpecType::Map, - ScSpecType::Tuple, - ScSpecType::BytesN, - ScSpecType::Udt, - ]; - pub const VARIANTS: [ScSpecType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Val", - "Bool", - "Void", - "Error", - "U32", - "I32", - "U64", - "I64", - "Timepoint", - "Duration", - "U128", - "I128", - "U256", - "I256", - "Bytes", - "String", - "Symbol", - "Address", - "MuxedAddress", - "Option", - "Result", - "Vec", - "Map", - "Tuple", - "BytesN", - "Udt", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Val => "Val", - Self::Bool => "Bool", - Self::Void => "Void", - Self::Error => "Error", - Self::U32 => "U32", - Self::I32 => "I32", - Self::U64 => "U64", - Self::I64 => "I64", - Self::Timepoint => "Timepoint", - Self::Duration => "Duration", - Self::U128 => "U128", - Self::I128 => "I128", - Self::U256 => "U256", - Self::I256 => "I256", - Self::Bytes => "Bytes", - Self::String => "String", - Self::Symbol => "Symbol", - Self::Address => "Address", - Self::MuxedAddress => "MuxedAddress", - Self::Option => "Option", - Self::Result => "Result", - Self::Vec => "Vec", - Self::Map => "Map", - Self::Tuple => "Tuple", - Self::BytesN => "BytesN", - Self::Udt => "Udt", - } - } - - #[must_use] - pub const fn variants() -> [ScSpecType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScSpecType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ScSpecType { - fn variants() -> slice::Iter<'static, ScSpecType> { - Self::VARIANTS.iter() - } -} - -impl Enum for ScSpecType {} - -impl fmt::Display for ScSpecType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ScSpecType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ScSpecType::Val, - 1 => ScSpecType::Bool, - 2 => ScSpecType::Void, - 3 => ScSpecType::Error, - 4 => ScSpecType::U32, - 5 => ScSpecType::I32, - 6 => ScSpecType::U64, - 7 => ScSpecType::I64, - 8 => ScSpecType::Timepoint, - 9 => ScSpecType::Duration, - 10 => ScSpecType::U128, - 11 => ScSpecType::I128, - 12 => ScSpecType::U256, - 13 => ScSpecType::I256, - 14 => ScSpecType::Bytes, - 16 => ScSpecType::String, - 17 => ScSpecType::Symbol, - 19 => ScSpecType::Address, - 20 => ScSpecType::MuxedAddress, - 1000 => ScSpecType::Option, - 1001 => ScSpecType::Result, - 1002 => ScSpecType::Vec, - 1004 => ScSpecType::Map, - 1005 => ScSpecType::Tuple, - 1006 => ScSpecType::BytesN, - 2000 => ScSpecType::Udt, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ScSpecType) -> Self { - e as Self - } -} - -impl ReadXdr for ScSpecType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ScSpecType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ScSpecTypeOption is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecTypeOption -/// { -/// SCSpecTypeDef valueType; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecTypeOption { - pub value_type: Box, -} - -impl ReadXdr for ScSpecTypeOption { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - value_type: Box::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecTypeOption { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.value_type.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecTypeResult is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecTypeResult -/// { -/// SCSpecTypeDef okType; -/// SCSpecTypeDef errorType; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecTypeResult { - pub ok_type: Box, - pub error_type: Box, -} - -impl ReadXdr for ScSpecTypeResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ok_type: Box::::read_xdr(r)?, - error_type: Box::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecTypeResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ok_type.write_xdr(w)?; - self.error_type.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecTypeVec is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecTypeVec -/// { -/// SCSpecTypeDef elementType; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecTypeVec { - pub element_type: Box, -} - -impl ReadXdr for ScSpecTypeVec { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - element_type: Box::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecTypeVec { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.element_type.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecTypeMap is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecTypeMap -/// { -/// SCSpecTypeDef keyType; -/// SCSpecTypeDef valueType; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecTypeMap { - pub key_type: Box, - pub value_type: Box, -} - -impl ReadXdr for ScSpecTypeMap { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - key_type: Box::::read_xdr(r)?, - value_type: Box::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecTypeMap { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.key_type.write_xdr(w)?; - self.value_type.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecTypeTuple is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecTypeTuple -/// { -/// SCSpecTypeDef valueTypes<12>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecTypeTuple { - pub value_types: VecM, -} - -impl ReadXdr for ScSpecTypeTuple { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - value_types: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecTypeTuple { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.value_types.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecTypeBytesN is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecTypeBytesN -/// { -/// uint32 n; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecTypeBytesN { - pub n: u32, -} - -impl ReadXdr for ScSpecTypeBytesN { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - n: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecTypeBytesN { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.n.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecTypeUdt is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecTypeUDT -/// { -/// string name<60>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecTypeUdt { - pub name: StringM<60>, -} - -impl ReadXdr for ScSpecTypeUdt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - name: StringM::<60>::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecTypeUdt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.name.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecTypeDef is an XDR Union defined as: -/// -/// ```text -/// union SCSpecTypeDef switch (SCSpecType type) -/// { -/// case SC_SPEC_TYPE_VAL: -/// case SC_SPEC_TYPE_BOOL: -/// case SC_SPEC_TYPE_VOID: -/// case SC_SPEC_TYPE_ERROR: -/// case SC_SPEC_TYPE_U32: -/// case SC_SPEC_TYPE_I32: -/// case SC_SPEC_TYPE_U64: -/// case SC_SPEC_TYPE_I64: -/// case SC_SPEC_TYPE_TIMEPOINT: -/// case SC_SPEC_TYPE_DURATION: -/// case SC_SPEC_TYPE_U128: -/// case SC_SPEC_TYPE_I128: -/// case SC_SPEC_TYPE_U256: -/// case SC_SPEC_TYPE_I256: -/// case SC_SPEC_TYPE_BYTES: -/// case SC_SPEC_TYPE_STRING: -/// case SC_SPEC_TYPE_SYMBOL: -/// case SC_SPEC_TYPE_ADDRESS: -/// case SC_SPEC_TYPE_MUXED_ADDRESS: -/// void; -/// case SC_SPEC_TYPE_OPTION: -/// SCSpecTypeOption option; -/// case SC_SPEC_TYPE_RESULT: -/// SCSpecTypeResult result; -/// case SC_SPEC_TYPE_VEC: -/// SCSpecTypeVec vec; -/// case SC_SPEC_TYPE_MAP: -/// SCSpecTypeMap map; -/// case SC_SPEC_TYPE_TUPLE: -/// SCSpecTypeTuple tuple; -/// case SC_SPEC_TYPE_BYTES_N: -/// SCSpecTypeBytesN bytesN; -/// case SC_SPEC_TYPE_UDT: -/// SCSpecTypeUDT udt; -/// }; -/// ``` -/// -// union with discriminant ScSpecType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ScSpecTypeDef { - Val, - Bool, - Void, - Error, - U32, - I32, - U64, - I64, - Timepoint, - Duration, - U128, - I128, - U256, - I256, - Bytes, - String, - Symbol, - Address, - MuxedAddress, - Option(Box), - Result(Box), - Vec(Box), - Map(Box), - Tuple(Box), - BytesN(ScSpecTypeBytesN), - Udt(ScSpecTypeUdt), -} - -#[cfg(feature = "alloc")] -impl Default for ScSpecTypeDef { - fn default() -> Self { - Self::Val - } -} - -impl ScSpecTypeDef { - const _VARIANTS: &[ScSpecType] = &[ - ScSpecType::Val, - ScSpecType::Bool, - ScSpecType::Void, - ScSpecType::Error, - ScSpecType::U32, - ScSpecType::I32, - ScSpecType::U64, - ScSpecType::I64, - ScSpecType::Timepoint, - ScSpecType::Duration, - ScSpecType::U128, - ScSpecType::I128, - ScSpecType::U256, - ScSpecType::I256, - ScSpecType::Bytes, - ScSpecType::String, - ScSpecType::Symbol, - ScSpecType::Address, - ScSpecType::MuxedAddress, - ScSpecType::Option, - ScSpecType::Result, - ScSpecType::Vec, - ScSpecType::Map, - ScSpecType::Tuple, - ScSpecType::BytesN, - ScSpecType::Udt, - ]; - pub const VARIANTS: [ScSpecType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Val", - "Bool", - "Void", - "Error", - "U32", - "I32", - "U64", - "I64", - "Timepoint", - "Duration", - "U128", - "I128", - "U256", - "I256", - "Bytes", - "String", - "Symbol", - "Address", - "MuxedAddress", - "Option", - "Result", - "Vec", - "Map", - "Tuple", - "BytesN", - "Udt", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Val => "Val", - Self::Bool => "Bool", - Self::Void => "Void", - Self::Error => "Error", - Self::U32 => "U32", - Self::I32 => "I32", - Self::U64 => "U64", - Self::I64 => "I64", - Self::Timepoint => "Timepoint", - Self::Duration => "Duration", - Self::U128 => "U128", - Self::I128 => "I128", - Self::U256 => "U256", - Self::I256 => "I256", - Self::Bytes => "Bytes", - Self::String => "String", - Self::Symbol => "Symbol", - Self::Address => "Address", - Self::MuxedAddress => "MuxedAddress", - Self::Option(_) => "Option", - Self::Result(_) => "Result", - Self::Vec(_) => "Vec", - Self::Map(_) => "Map", - Self::Tuple(_) => "Tuple", - Self::BytesN(_) => "BytesN", - Self::Udt(_) => "Udt", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ScSpecType { - #[allow(clippy::match_same_arms)] - match self { - Self::Val => ScSpecType::Val, - Self::Bool => ScSpecType::Bool, - Self::Void => ScSpecType::Void, - Self::Error => ScSpecType::Error, - Self::U32 => ScSpecType::U32, - Self::I32 => ScSpecType::I32, - Self::U64 => ScSpecType::U64, - Self::I64 => ScSpecType::I64, - Self::Timepoint => ScSpecType::Timepoint, - Self::Duration => ScSpecType::Duration, - Self::U128 => ScSpecType::U128, - Self::I128 => ScSpecType::I128, - Self::U256 => ScSpecType::U256, - Self::I256 => ScSpecType::I256, - Self::Bytes => ScSpecType::Bytes, - Self::String => ScSpecType::String, - Self::Symbol => ScSpecType::Symbol, - Self::Address => ScSpecType::Address, - Self::MuxedAddress => ScSpecType::MuxedAddress, - Self::Option(_) => ScSpecType::Option, - Self::Result(_) => ScSpecType::Result, - Self::Vec(_) => ScSpecType::Vec, - Self::Map(_) => ScSpecType::Map, - Self::Tuple(_) => ScSpecType::Tuple, - Self::BytesN(_) => ScSpecType::BytesN, - Self::Udt(_) => ScSpecType::Udt, - } - } - - #[must_use] - pub const fn variants() -> [ScSpecType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScSpecTypeDef { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ScSpecTypeDef { - #[must_use] - fn discriminant(&self) -> ScSpecType { - Self::discriminant(self) - } -} - -impl Variants for ScSpecTypeDef { - fn variants() -> slice::Iter<'static, ScSpecType> { - Self::VARIANTS.iter() - } -} - -impl Union for ScSpecTypeDef {} - -impl ReadXdr for ScSpecTypeDef { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ScSpecType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ScSpecType::Val => Self::Val, - ScSpecType::Bool => Self::Bool, - ScSpecType::Void => Self::Void, - ScSpecType::Error => Self::Error, - ScSpecType::U32 => Self::U32, - ScSpecType::I32 => Self::I32, - ScSpecType::U64 => Self::U64, - ScSpecType::I64 => Self::I64, - ScSpecType::Timepoint => Self::Timepoint, - ScSpecType::Duration => Self::Duration, - ScSpecType::U128 => Self::U128, - ScSpecType::I128 => Self::I128, - ScSpecType::U256 => Self::U256, - ScSpecType::I256 => Self::I256, - ScSpecType::Bytes => Self::Bytes, - ScSpecType::String => Self::String, - ScSpecType::Symbol => Self::Symbol, - ScSpecType::Address => Self::Address, - ScSpecType::MuxedAddress => Self::MuxedAddress, - ScSpecType::Option => Self::Option(Box::::read_xdr(r)?), - ScSpecType::Result => Self::Result(Box::::read_xdr(r)?), - ScSpecType::Vec => Self::Vec(Box::::read_xdr(r)?), - ScSpecType::Map => Self::Map(Box::::read_xdr(r)?), - ScSpecType::Tuple => Self::Tuple(Box::::read_xdr(r)?), - ScSpecType::BytesN => Self::BytesN(ScSpecTypeBytesN::read_xdr(r)?), - ScSpecType::Udt => Self::Udt(ScSpecTypeUdt::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ScSpecTypeDef { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Val => ().write_xdr(w)?, - Self::Bool => ().write_xdr(w)?, - Self::Void => ().write_xdr(w)?, - Self::Error => ().write_xdr(w)?, - Self::U32 => ().write_xdr(w)?, - Self::I32 => ().write_xdr(w)?, - Self::U64 => ().write_xdr(w)?, - Self::I64 => ().write_xdr(w)?, - Self::Timepoint => ().write_xdr(w)?, - Self::Duration => ().write_xdr(w)?, - Self::U128 => ().write_xdr(w)?, - Self::I128 => ().write_xdr(w)?, - Self::U256 => ().write_xdr(w)?, - Self::I256 => ().write_xdr(w)?, - Self::Bytes => ().write_xdr(w)?, - Self::String => ().write_xdr(w)?, - Self::Symbol => ().write_xdr(w)?, - Self::Address => ().write_xdr(w)?, - Self::MuxedAddress => ().write_xdr(w)?, - Self::Option(v) => v.write_xdr(w)?, - Self::Result(v) => v.write_xdr(w)?, - Self::Vec(v) => v.write_xdr(w)?, - Self::Map(v) => v.write_xdr(w)?, - Self::Tuple(v) => v.write_xdr(w)?, - Self::BytesN(v) => v.write_xdr(w)?, - Self::Udt(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ScSpecUdtStructFieldV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecUDTStructFieldV0 -/// { -/// string doc; -/// string name<30>; -/// SCSpecTypeDef type; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecUdtStructFieldV0 { - pub doc: StringM<1024>, - pub name: StringM<30>, - pub type_: ScSpecTypeDef, -} - -impl ReadXdr for ScSpecUdtStructFieldV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - doc: StringM::<1024>::read_xdr(r)?, - name: StringM::<30>::read_xdr(r)?, - type_: ScSpecTypeDef::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecUdtStructFieldV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.doc.write_xdr(w)?; - self.name.write_xdr(w)?; - self.type_.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecUdtStructV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecUDTStructV0 -/// { -/// string doc; -/// string lib<80>; -/// string name<60>; -/// SCSpecUDTStructFieldV0 fields<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecUdtStructV0 { - pub doc: StringM<1024>, - pub lib: StringM<80>, - pub name: StringM<60>, - pub fields: VecM, -} - -impl ReadXdr for ScSpecUdtStructV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - doc: StringM::<1024>::read_xdr(r)?, - lib: StringM::<80>::read_xdr(r)?, - name: StringM::<60>::read_xdr(r)?, - fields: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecUdtStructV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.doc.write_xdr(w)?; - self.lib.write_xdr(w)?; - self.name.write_xdr(w)?; - self.fields.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecUdtUnionCaseVoidV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecUDTUnionCaseVoidV0 -/// { -/// string doc; -/// string name<60>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecUdtUnionCaseVoidV0 { - pub doc: StringM<1024>, - pub name: StringM<60>, -} - -impl ReadXdr for ScSpecUdtUnionCaseVoidV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - doc: StringM::<1024>::read_xdr(r)?, - name: StringM::<60>::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecUdtUnionCaseVoidV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.doc.write_xdr(w)?; - self.name.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecUdtUnionCaseTupleV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecUDTUnionCaseTupleV0 -/// { -/// string doc; -/// string name<60>; -/// SCSpecTypeDef type<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecUdtUnionCaseTupleV0 { - pub doc: StringM<1024>, - pub name: StringM<60>, - pub type_: VecM, -} - -impl ReadXdr for ScSpecUdtUnionCaseTupleV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - doc: StringM::<1024>::read_xdr(r)?, - name: StringM::<60>::read_xdr(r)?, - type_: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecUdtUnionCaseTupleV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.doc.write_xdr(w)?; - self.name.write_xdr(w)?; - self.type_.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecUdtUnionCaseV0Kind is an XDR Enum defined as: -/// -/// ```text -/// enum SCSpecUDTUnionCaseV0Kind -/// { -/// SC_SPEC_UDT_UNION_CASE_VOID_V0 = 0, -/// SC_SPEC_UDT_UNION_CASE_TUPLE_V0 = 1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ScSpecUdtUnionCaseV0Kind { - #[cfg_attr(feature = "alloc", default)] - VoidV0 = 0, - TupleV0 = 1, -} - -impl ScSpecUdtUnionCaseV0Kind { - const _VARIANTS: &[ScSpecUdtUnionCaseV0Kind] = &[ - ScSpecUdtUnionCaseV0Kind::VoidV0, - ScSpecUdtUnionCaseV0Kind::TupleV0, - ]; - pub const VARIANTS: [ScSpecUdtUnionCaseV0Kind; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["VoidV0", "TupleV0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::VoidV0 => "VoidV0", - Self::TupleV0 => "TupleV0", - } - } - - #[must_use] - pub const fn variants() -> [ScSpecUdtUnionCaseV0Kind; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScSpecUdtUnionCaseV0Kind { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ScSpecUdtUnionCaseV0Kind { - fn variants() -> slice::Iter<'static, ScSpecUdtUnionCaseV0Kind> { - Self::VARIANTS.iter() - } -} - -impl Enum for ScSpecUdtUnionCaseV0Kind {} - -impl fmt::Display for ScSpecUdtUnionCaseV0Kind { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ScSpecUdtUnionCaseV0Kind { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ScSpecUdtUnionCaseV0Kind::VoidV0, - 1 => ScSpecUdtUnionCaseV0Kind::TupleV0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ScSpecUdtUnionCaseV0Kind) -> Self { - e as Self - } -} - -impl ReadXdr for ScSpecUdtUnionCaseV0Kind { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ScSpecUdtUnionCaseV0Kind { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ScSpecUdtUnionCaseV0 is an XDR Union defined as: -/// -/// ```text -/// union SCSpecUDTUnionCaseV0 switch (SCSpecUDTUnionCaseV0Kind kind) -/// { -/// case SC_SPEC_UDT_UNION_CASE_VOID_V0: -/// SCSpecUDTUnionCaseVoidV0 voidCase; -/// case SC_SPEC_UDT_UNION_CASE_TUPLE_V0: -/// SCSpecUDTUnionCaseTupleV0 tupleCase; -/// }; -/// ``` -/// -// union with discriminant ScSpecUdtUnionCaseV0Kind -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ScSpecUdtUnionCaseV0 { - VoidV0(ScSpecUdtUnionCaseVoidV0), - TupleV0(ScSpecUdtUnionCaseTupleV0), -} - -#[cfg(feature = "alloc")] -impl Default for ScSpecUdtUnionCaseV0 { - fn default() -> Self { - Self::VoidV0(ScSpecUdtUnionCaseVoidV0::default()) - } -} - -impl ScSpecUdtUnionCaseV0 { - const _VARIANTS: &[ScSpecUdtUnionCaseV0Kind] = &[ - ScSpecUdtUnionCaseV0Kind::VoidV0, - ScSpecUdtUnionCaseV0Kind::TupleV0, - ]; - pub const VARIANTS: [ScSpecUdtUnionCaseV0Kind; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["VoidV0", "TupleV0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::VoidV0(_) => "VoidV0", - Self::TupleV0(_) => "TupleV0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ScSpecUdtUnionCaseV0Kind { - #[allow(clippy::match_same_arms)] - match self { - Self::VoidV0(_) => ScSpecUdtUnionCaseV0Kind::VoidV0, - Self::TupleV0(_) => ScSpecUdtUnionCaseV0Kind::TupleV0, - } - } - - #[must_use] - pub const fn variants() -> [ScSpecUdtUnionCaseV0Kind; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScSpecUdtUnionCaseV0 { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ScSpecUdtUnionCaseV0 { - #[must_use] - fn discriminant(&self) -> ScSpecUdtUnionCaseV0Kind { - Self::discriminant(self) - } -} - -impl Variants for ScSpecUdtUnionCaseV0 { - fn variants() -> slice::Iter<'static, ScSpecUdtUnionCaseV0Kind> { - Self::VARIANTS.iter() - } -} - -impl Union for ScSpecUdtUnionCaseV0 {} - -impl ReadXdr for ScSpecUdtUnionCaseV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ScSpecUdtUnionCaseV0Kind = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ScSpecUdtUnionCaseV0Kind::VoidV0 => { - Self::VoidV0(ScSpecUdtUnionCaseVoidV0::read_xdr(r)?) - } - ScSpecUdtUnionCaseV0Kind::TupleV0 => { - Self::TupleV0(ScSpecUdtUnionCaseTupleV0::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ScSpecUdtUnionCaseV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::VoidV0(v) => v.write_xdr(w)?, - Self::TupleV0(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ScSpecUdtUnionV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecUDTUnionV0 -/// { -/// string doc; -/// string lib<80>; -/// string name<60>; -/// SCSpecUDTUnionCaseV0 cases<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecUdtUnionV0 { - pub doc: StringM<1024>, - pub lib: StringM<80>, - pub name: StringM<60>, - pub cases: VecM, -} - -impl ReadXdr for ScSpecUdtUnionV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - doc: StringM::<1024>::read_xdr(r)?, - lib: StringM::<80>::read_xdr(r)?, - name: StringM::<60>::read_xdr(r)?, - cases: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecUdtUnionV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.doc.write_xdr(w)?; - self.lib.write_xdr(w)?; - self.name.write_xdr(w)?; - self.cases.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecUdtEnumCaseV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecUDTEnumCaseV0 -/// { -/// string doc; -/// string name<60>; -/// uint32 value; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecUdtEnumCaseV0 { - pub doc: StringM<1024>, - pub name: StringM<60>, - pub value: u32, -} - -impl ReadXdr for ScSpecUdtEnumCaseV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - doc: StringM::<1024>::read_xdr(r)?, - name: StringM::<60>::read_xdr(r)?, - value: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecUdtEnumCaseV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.doc.write_xdr(w)?; - self.name.write_xdr(w)?; - self.value.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecUdtEnumV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecUDTEnumV0 -/// { -/// string doc; -/// string lib<80>; -/// string name<60>; -/// SCSpecUDTEnumCaseV0 cases<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecUdtEnumV0 { - pub doc: StringM<1024>, - pub lib: StringM<80>, - pub name: StringM<60>, - pub cases: VecM, -} - -impl ReadXdr for ScSpecUdtEnumV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - doc: StringM::<1024>::read_xdr(r)?, - lib: StringM::<80>::read_xdr(r)?, - name: StringM::<60>::read_xdr(r)?, - cases: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecUdtEnumV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.doc.write_xdr(w)?; - self.lib.write_xdr(w)?; - self.name.write_xdr(w)?; - self.cases.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecUdtErrorEnumCaseV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecUDTErrorEnumCaseV0 -/// { -/// string doc; -/// string name<60>; -/// uint32 value; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecUdtErrorEnumCaseV0 { - pub doc: StringM<1024>, - pub name: StringM<60>, - pub value: u32, -} - -impl ReadXdr for ScSpecUdtErrorEnumCaseV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - doc: StringM::<1024>::read_xdr(r)?, - name: StringM::<60>::read_xdr(r)?, - value: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecUdtErrorEnumCaseV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.doc.write_xdr(w)?; - self.name.write_xdr(w)?; - self.value.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecUdtErrorEnumV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecUDTErrorEnumV0 -/// { -/// string doc; -/// string lib<80>; -/// string name<60>; -/// SCSpecUDTErrorEnumCaseV0 cases<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecUdtErrorEnumV0 { - pub doc: StringM<1024>, - pub lib: StringM<80>, - pub name: StringM<60>, - pub cases: VecM, -} - -impl ReadXdr for ScSpecUdtErrorEnumV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - doc: StringM::<1024>::read_xdr(r)?, - lib: StringM::<80>::read_xdr(r)?, - name: StringM::<60>::read_xdr(r)?, - cases: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecUdtErrorEnumV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.doc.write_xdr(w)?; - self.lib.write_xdr(w)?; - self.name.write_xdr(w)?; - self.cases.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecFunctionInputV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecFunctionInputV0 -/// { -/// string doc; -/// string name<30>; -/// SCSpecTypeDef type; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecFunctionInputV0 { - pub doc: StringM<1024>, - pub name: StringM<30>, - pub type_: ScSpecTypeDef, -} - -impl ReadXdr for ScSpecFunctionInputV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - doc: StringM::<1024>::read_xdr(r)?, - name: StringM::<30>::read_xdr(r)?, - type_: ScSpecTypeDef::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecFunctionInputV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.doc.write_xdr(w)?; - self.name.write_xdr(w)?; - self.type_.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecFunctionV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecFunctionV0 -/// { -/// string doc; -/// SCSymbol name; -/// SCSpecFunctionInputV0 inputs<>; -/// SCSpecTypeDef outputs<1>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecFunctionV0 { - pub doc: StringM<1024>, - pub name: ScSymbol, - pub inputs: VecM, - pub outputs: VecM, -} - -impl ReadXdr for ScSpecFunctionV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - doc: StringM::<1024>::read_xdr(r)?, - name: ScSymbol::read_xdr(r)?, - inputs: VecM::::read_xdr(r)?, - outputs: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecFunctionV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.doc.write_xdr(w)?; - self.name.write_xdr(w)?; - self.inputs.write_xdr(w)?; - self.outputs.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecEventParamLocationV0 is an XDR Enum defined as: -/// -/// ```text -/// enum SCSpecEventParamLocationV0 -/// { -/// SC_SPEC_EVENT_PARAM_LOCATION_DATA = 0, -/// SC_SPEC_EVENT_PARAM_LOCATION_TOPIC_LIST = 1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ScSpecEventParamLocationV0 { - #[cfg_attr(feature = "alloc", default)] - Data = 0, - TopicList = 1, -} - -impl ScSpecEventParamLocationV0 { - const _VARIANTS: &[ScSpecEventParamLocationV0] = &[ - ScSpecEventParamLocationV0::Data, - ScSpecEventParamLocationV0::TopicList, - ]; - pub const VARIANTS: [ScSpecEventParamLocationV0; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Data", "TopicList"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Data => "Data", - Self::TopicList => "TopicList", - } - } - - #[must_use] - pub const fn variants() -> [ScSpecEventParamLocationV0; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScSpecEventParamLocationV0 { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ScSpecEventParamLocationV0 { - fn variants() -> slice::Iter<'static, ScSpecEventParamLocationV0> { - Self::VARIANTS.iter() - } -} - -impl Enum for ScSpecEventParamLocationV0 {} - -impl fmt::Display for ScSpecEventParamLocationV0 { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ScSpecEventParamLocationV0 { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ScSpecEventParamLocationV0::Data, - 1 => ScSpecEventParamLocationV0::TopicList, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ScSpecEventParamLocationV0) -> Self { - e as Self - } -} - -impl ReadXdr for ScSpecEventParamLocationV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ScSpecEventParamLocationV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ScSpecEventParamV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecEventParamV0 -/// { -/// string doc; -/// string name<30>; -/// SCSpecTypeDef type; -/// SCSpecEventParamLocationV0 location; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecEventParamV0 { - pub doc: StringM<1024>, - pub name: StringM<30>, - pub type_: ScSpecTypeDef, - pub location: ScSpecEventParamLocationV0, -} - -impl ReadXdr for ScSpecEventParamV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - doc: StringM::<1024>::read_xdr(r)?, - name: StringM::<30>::read_xdr(r)?, - type_: ScSpecTypeDef::read_xdr(r)?, - location: ScSpecEventParamLocationV0::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecEventParamV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.doc.write_xdr(w)?; - self.name.write_xdr(w)?; - self.type_.write_xdr(w)?; - self.location.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecEventDataFormat is an XDR Enum defined as: -/// -/// ```text -/// enum SCSpecEventDataFormat -/// { -/// SC_SPEC_EVENT_DATA_FORMAT_SINGLE_VALUE = 0, -/// SC_SPEC_EVENT_DATA_FORMAT_VEC = 1, -/// SC_SPEC_EVENT_DATA_FORMAT_MAP = 2 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ScSpecEventDataFormat { - #[cfg_attr(feature = "alloc", default)] - SingleValue = 0, - Vec = 1, - Map = 2, -} - -impl ScSpecEventDataFormat { - const _VARIANTS: &[ScSpecEventDataFormat] = &[ - ScSpecEventDataFormat::SingleValue, - ScSpecEventDataFormat::Vec, - ScSpecEventDataFormat::Map, - ]; - pub const VARIANTS: [ScSpecEventDataFormat; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["SingleValue", "Vec", "Map"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::SingleValue => "SingleValue", - Self::Vec => "Vec", - Self::Map => "Map", - } - } - - #[must_use] - pub const fn variants() -> [ScSpecEventDataFormat; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScSpecEventDataFormat { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ScSpecEventDataFormat { - fn variants() -> slice::Iter<'static, ScSpecEventDataFormat> { - Self::VARIANTS.iter() - } -} - -impl Enum for ScSpecEventDataFormat {} - -impl fmt::Display for ScSpecEventDataFormat { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ScSpecEventDataFormat { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ScSpecEventDataFormat::SingleValue, - 1 => ScSpecEventDataFormat::Vec, - 2 => ScSpecEventDataFormat::Map, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ScSpecEventDataFormat) -> Self { - e as Self - } -} - -impl ReadXdr for ScSpecEventDataFormat { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ScSpecEventDataFormat { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ScSpecEventV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCSpecEventV0 -/// { -/// string doc; -/// string lib<80>; -/// SCSymbol name; -/// SCSymbol prefixTopics<2>; -/// SCSpecEventParamV0 params<>; -/// SCSpecEventDataFormat dataFormat; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScSpecEventV0 { - pub doc: StringM<1024>, - pub lib: StringM<80>, - pub name: ScSymbol, - pub prefix_topics: VecM, - pub params: VecM, - pub data_format: ScSpecEventDataFormat, -} - -impl ReadXdr for ScSpecEventV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - doc: StringM::<1024>::read_xdr(r)?, - lib: StringM::<80>::read_xdr(r)?, - name: ScSymbol::read_xdr(r)?, - prefix_topics: VecM::::read_xdr(r)?, - params: VecM::::read_xdr(r)?, - data_format: ScSpecEventDataFormat::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScSpecEventV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.doc.write_xdr(w)?; - self.lib.write_xdr(w)?; - self.name.write_xdr(w)?; - self.prefix_topics.write_xdr(w)?; - self.params.write_xdr(w)?; - self.data_format.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScSpecEntryKind is an XDR Enum defined as: -/// -/// ```text -/// enum SCSpecEntryKind -/// { -/// SC_SPEC_ENTRY_FUNCTION_V0 = 0, -/// SC_SPEC_ENTRY_UDT_STRUCT_V0 = 1, -/// SC_SPEC_ENTRY_UDT_UNION_V0 = 2, -/// SC_SPEC_ENTRY_UDT_ENUM_V0 = 3, -/// SC_SPEC_ENTRY_UDT_ERROR_ENUM_V0 = 4, -/// SC_SPEC_ENTRY_EVENT_V0 = 5 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ScSpecEntryKind { - #[cfg_attr(feature = "alloc", default)] - FunctionV0 = 0, - UdtStructV0 = 1, - UdtUnionV0 = 2, - UdtEnumV0 = 3, - UdtErrorEnumV0 = 4, - EventV0 = 5, -} - -impl ScSpecEntryKind { - const _VARIANTS: &[ScSpecEntryKind] = &[ - ScSpecEntryKind::FunctionV0, - ScSpecEntryKind::UdtStructV0, - ScSpecEntryKind::UdtUnionV0, - ScSpecEntryKind::UdtEnumV0, - ScSpecEntryKind::UdtErrorEnumV0, - ScSpecEntryKind::EventV0, - ]; - pub const VARIANTS: [ScSpecEntryKind; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "FunctionV0", - "UdtStructV0", - "UdtUnionV0", - "UdtEnumV0", - "UdtErrorEnumV0", - "EventV0", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::FunctionV0 => "FunctionV0", - Self::UdtStructV0 => "UdtStructV0", - Self::UdtUnionV0 => "UdtUnionV0", - Self::UdtEnumV0 => "UdtEnumV0", - Self::UdtErrorEnumV0 => "UdtErrorEnumV0", - Self::EventV0 => "EventV0", - } - } - - #[must_use] - pub const fn variants() -> [ScSpecEntryKind; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScSpecEntryKind { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ScSpecEntryKind { - fn variants() -> slice::Iter<'static, ScSpecEntryKind> { - Self::VARIANTS.iter() - } -} - -impl Enum for ScSpecEntryKind {} - -impl fmt::Display for ScSpecEntryKind { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ScSpecEntryKind { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ScSpecEntryKind::FunctionV0, - 1 => ScSpecEntryKind::UdtStructV0, - 2 => ScSpecEntryKind::UdtUnionV0, - 3 => ScSpecEntryKind::UdtEnumV0, - 4 => ScSpecEntryKind::UdtErrorEnumV0, - 5 => ScSpecEntryKind::EventV0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ScSpecEntryKind) -> Self { - e as Self - } -} - -impl ReadXdr for ScSpecEntryKind { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ScSpecEntryKind { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ScSpecEntry is an XDR Union defined as: -/// -/// ```text -/// union SCSpecEntry switch (SCSpecEntryKind kind) -/// { -/// case SC_SPEC_ENTRY_FUNCTION_V0: -/// SCSpecFunctionV0 functionV0; -/// case SC_SPEC_ENTRY_UDT_STRUCT_V0: -/// SCSpecUDTStructV0 udtStructV0; -/// case SC_SPEC_ENTRY_UDT_UNION_V0: -/// SCSpecUDTUnionV0 udtUnionV0; -/// case SC_SPEC_ENTRY_UDT_ENUM_V0: -/// SCSpecUDTEnumV0 udtEnumV0; -/// case SC_SPEC_ENTRY_UDT_ERROR_ENUM_V0: -/// SCSpecUDTErrorEnumV0 udtErrorEnumV0; -/// case SC_SPEC_ENTRY_EVENT_V0: -/// SCSpecEventV0 eventV0; -/// }; -/// ``` -/// -// union with discriminant ScSpecEntryKind -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ScSpecEntry { - FunctionV0(ScSpecFunctionV0), - UdtStructV0(ScSpecUdtStructV0), - UdtUnionV0(ScSpecUdtUnionV0), - UdtEnumV0(ScSpecUdtEnumV0), - UdtErrorEnumV0(ScSpecUdtErrorEnumV0), - EventV0(ScSpecEventV0), -} - -#[cfg(feature = "alloc")] -impl Default for ScSpecEntry { - fn default() -> Self { - Self::FunctionV0(ScSpecFunctionV0::default()) - } -} - -impl ScSpecEntry { - const _VARIANTS: &[ScSpecEntryKind] = &[ - ScSpecEntryKind::FunctionV0, - ScSpecEntryKind::UdtStructV0, - ScSpecEntryKind::UdtUnionV0, - ScSpecEntryKind::UdtEnumV0, - ScSpecEntryKind::UdtErrorEnumV0, - ScSpecEntryKind::EventV0, - ]; - pub const VARIANTS: [ScSpecEntryKind; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "FunctionV0", - "UdtStructV0", - "UdtUnionV0", - "UdtEnumV0", - "UdtErrorEnumV0", - "EventV0", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::FunctionV0(_) => "FunctionV0", - Self::UdtStructV0(_) => "UdtStructV0", - Self::UdtUnionV0(_) => "UdtUnionV0", - Self::UdtEnumV0(_) => "UdtEnumV0", - Self::UdtErrorEnumV0(_) => "UdtErrorEnumV0", - Self::EventV0(_) => "EventV0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ScSpecEntryKind { - #[allow(clippy::match_same_arms)] - match self { - Self::FunctionV0(_) => ScSpecEntryKind::FunctionV0, - Self::UdtStructV0(_) => ScSpecEntryKind::UdtStructV0, - Self::UdtUnionV0(_) => ScSpecEntryKind::UdtUnionV0, - Self::UdtEnumV0(_) => ScSpecEntryKind::UdtEnumV0, - Self::UdtErrorEnumV0(_) => ScSpecEntryKind::UdtErrorEnumV0, - Self::EventV0(_) => ScSpecEntryKind::EventV0, - } - } - - #[must_use] - pub const fn variants() -> [ScSpecEntryKind; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScSpecEntry { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ScSpecEntry { - #[must_use] - fn discriminant(&self) -> ScSpecEntryKind { - Self::discriminant(self) - } -} - -impl Variants for ScSpecEntry { - fn variants() -> slice::Iter<'static, ScSpecEntryKind> { - Self::VARIANTS.iter() - } -} - -impl Union for ScSpecEntry {} - -impl ReadXdr for ScSpecEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ScSpecEntryKind = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ScSpecEntryKind::FunctionV0 => Self::FunctionV0(ScSpecFunctionV0::read_xdr(r)?), - ScSpecEntryKind::UdtStructV0 => Self::UdtStructV0(ScSpecUdtStructV0::read_xdr(r)?), - ScSpecEntryKind::UdtUnionV0 => Self::UdtUnionV0(ScSpecUdtUnionV0::read_xdr(r)?), - ScSpecEntryKind::UdtEnumV0 => Self::UdtEnumV0(ScSpecUdtEnumV0::read_xdr(r)?), - ScSpecEntryKind::UdtErrorEnumV0 => { - Self::UdtErrorEnumV0(ScSpecUdtErrorEnumV0::read_xdr(r)?) - } - ScSpecEntryKind::EventV0 => Self::EventV0(ScSpecEventV0::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ScSpecEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::FunctionV0(v) => v.write_xdr(w)?, - Self::UdtStructV0(v) => v.write_xdr(w)?, - Self::UdtUnionV0(v) => v.write_xdr(w)?, - Self::UdtEnumV0(v) => v.write_xdr(w)?, - Self::UdtErrorEnumV0(v) => v.write_xdr(w)?, - Self::EventV0(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ScValType is an XDR Enum defined as: -/// -/// ```text -/// enum SCValType -/// { -/// SCV_BOOL = 0, -/// SCV_VOID = 1, -/// SCV_ERROR = 2, -/// -/// // 32 bits is the smallest type in WASM or XDR; no need for u8/u16. -/// SCV_U32 = 3, -/// SCV_I32 = 4, -/// -/// // 64 bits is naturally supported by both WASM and XDR also. -/// SCV_U64 = 5, -/// SCV_I64 = 6, -/// -/// // Time-related u64 subtypes with their own functions and formatting. -/// SCV_TIMEPOINT = 7, -/// SCV_DURATION = 8, -/// -/// // 128 bits is naturally supported by Rust and we use it for Soroban -/// // fixed-point arithmetic prices / balances / similar "quantities". These -/// // are represented in XDR as a pair of 2 u64s. -/// SCV_U128 = 9, -/// SCV_I128 = 10, -/// -/// // 256 bits is the size of sha256 output, ed25519 keys, and the EVM machine -/// // word, so for interop use we include this even though it requires a small -/// // amount of Rust guest and/or host library code. -/// SCV_U256 = 11, -/// SCV_I256 = 12, -/// -/// // Bytes come in 3 flavors, 2 of which have meaningfully different -/// // formatting and validity-checking / domain-restriction. -/// SCV_BYTES = 13, -/// SCV_STRING = 14, -/// SCV_SYMBOL = 15, -/// -/// // Vecs and maps are just polymorphic containers of other ScVals. -/// SCV_VEC = 16, -/// SCV_MAP = 17, -/// -/// // Address is the universal identifier for contracts and classic -/// // accounts. -/// SCV_ADDRESS = 18, -/// -/// // The following are the internal SCVal variants that are not -/// // exposed to the contracts. -/// SCV_CONTRACT_INSTANCE = 19, -/// -/// // SCV_LEDGER_KEY_CONTRACT_INSTANCE and SCV_LEDGER_KEY_NONCE are unique -/// // symbolic SCVals used as the key for ledger entries for a contract's -/// // instance and an address' nonce, respectively. -/// SCV_LEDGER_KEY_CONTRACT_INSTANCE = 20, -/// SCV_LEDGER_KEY_NONCE = 21 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ScValType { - #[cfg_attr(feature = "alloc", default)] - Bool = 0, - Void = 1, - Error = 2, - U32 = 3, - I32 = 4, - U64 = 5, - I64 = 6, - Timepoint = 7, - Duration = 8, - U128 = 9, - I128 = 10, - U256 = 11, - I256 = 12, - Bytes = 13, - String = 14, - Symbol = 15, - Vec = 16, - Map = 17, - Address = 18, - ContractInstance = 19, - LedgerKeyContractInstance = 20, - LedgerKeyNonce = 21, -} - -impl ScValType { - const _VARIANTS: &[ScValType] = &[ - ScValType::Bool, - ScValType::Void, - ScValType::Error, - ScValType::U32, - ScValType::I32, - ScValType::U64, - ScValType::I64, - ScValType::Timepoint, - ScValType::Duration, - ScValType::U128, - ScValType::I128, - ScValType::U256, - ScValType::I256, - ScValType::Bytes, - ScValType::String, - ScValType::Symbol, - ScValType::Vec, - ScValType::Map, - ScValType::Address, - ScValType::ContractInstance, - ScValType::LedgerKeyContractInstance, - ScValType::LedgerKeyNonce, - ]; - pub const VARIANTS: [ScValType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Bool", - "Void", - "Error", - "U32", - "I32", - "U64", - "I64", - "Timepoint", - "Duration", - "U128", - "I128", - "U256", - "I256", - "Bytes", - "String", - "Symbol", - "Vec", - "Map", - "Address", - "ContractInstance", - "LedgerKeyContractInstance", - "LedgerKeyNonce", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Bool => "Bool", - Self::Void => "Void", - Self::Error => "Error", - Self::U32 => "U32", - Self::I32 => "I32", - Self::U64 => "U64", - Self::I64 => "I64", - Self::Timepoint => "Timepoint", - Self::Duration => "Duration", - Self::U128 => "U128", - Self::I128 => "I128", - Self::U256 => "U256", - Self::I256 => "I256", - Self::Bytes => "Bytes", - Self::String => "String", - Self::Symbol => "Symbol", - Self::Vec => "Vec", - Self::Map => "Map", - Self::Address => "Address", - Self::ContractInstance => "ContractInstance", - Self::LedgerKeyContractInstance => "LedgerKeyContractInstance", - Self::LedgerKeyNonce => "LedgerKeyNonce", - } - } - - #[must_use] - pub const fn variants() -> [ScValType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScValType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ScValType { - fn variants() -> slice::Iter<'static, ScValType> { - Self::VARIANTS.iter() - } -} - -impl Enum for ScValType {} - -impl fmt::Display for ScValType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ScValType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ScValType::Bool, - 1 => ScValType::Void, - 2 => ScValType::Error, - 3 => ScValType::U32, - 4 => ScValType::I32, - 5 => ScValType::U64, - 6 => ScValType::I64, - 7 => ScValType::Timepoint, - 8 => ScValType::Duration, - 9 => ScValType::U128, - 10 => ScValType::I128, - 11 => ScValType::U256, - 12 => ScValType::I256, - 13 => ScValType::Bytes, - 14 => ScValType::String, - 15 => ScValType::Symbol, - 16 => ScValType::Vec, - 17 => ScValType::Map, - 18 => ScValType::Address, - 19 => ScValType::ContractInstance, - 20 => ScValType::LedgerKeyContractInstance, - 21 => ScValType::LedgerKeyNonce, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ScValType) -> Self { - e as Self - } -} - -impl ReadXdr for ScValType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ScValType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ScErrorType is an XDR Enum defined as: -/// -/// ```text -/// enum SCErrorType -/// { -/// SCE_CONTRACT = 0, // Contract-specific, user-defined codes. -/// SCE_WASM_VM = 1, // Errors while interpreting WASM bytecode. -/// SCE_CONTEXT = 2, // Errors in the contract's host context. -/// SCE_STORAGE = 3, // Errors accessing host storage. -/// SCE_OBJECT = 4, // Errors working with host objects. -/// SCE_CRYPTO = 5, // Errors in cryptographic operations. -/// SCE_EVENTS = 6, // Errors while emitting events. -/// SCE_BUDGET = 7, // Errors relating to budget limits. -/// SCE_VALUE = 8, // Errors working with host values or SCVals. -/// SCE_AUTH = 9 // Errors from the authentication subsystem. -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ScErrorType { - #[cfg_attr(feature = "alloc", default)] - Contract = 0, - WasmVm = 1, - Context = 2, - Storage = 3, - Object = 4, - Crypto = 5, - Events = 6, - Budget = 7, - Value = 8, - Auth = 9, -} - -impl ScErrorType { - const _VARIANTS: &[ScErrorType] = &[ - ScErrorType::Contract, - ScErrorType::WasmVm, - ScErrorType::Context, - ScErrorType::Storage, - ScErrorType::Object, - ScErrorType::Crypto, - ScErrorType::Events, - ScErrorType::Budget, - ScErrorType::Value, - ScErrorType::Auth, - ]; - pub const VARIANTS: [ScErrorType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Contract", "WasmVm", "Context", "Storage", "Object", "Crypto", "Events", "Budget", - "Value", "Auth", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Contract => "Contract", - Self::WasmVm => "WasmVm", - Self::Context => "Context", - Self::Storage => "Storage", - Self::Object => "Object", - Self::Crypto => "Crypto", - Self::Events => "Events", - Self::Budget => "Budget", - Self::Value => "Value", - Self::Auth => "Auth", - } - } - - #[must_use] - pub const fn variants() -> [ScErrorType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScErrorType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ScErrorType { - fn variants() -> slice::Iter<'static, ScErrorType> { - Self::VARIANTS.iter() - } -} - -impl Enum for ScErrorType {} - -impl fmt::Display for ScErrorType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ScErrorType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ScErrorType::Contract, - 1 => ScErrorType::WasmVm, - 2 => ScErrorType::Context, - 3 => ScErrorType::Storage, - 4 => ScErrorType::Object, - 5 => ScErrorType::Crypto, - 6 => ScErrorType::Events, - 7 => ScErrorType::Budget, - 8 => ScErrorType::Value, - 9 => ScErrorType::Auth, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ScErrorType) -> Self { - e as Self - } -} - -impl ReadXdr for ScErrorType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ScErrorType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ScErrorCode is an XDR Enum defined as: -/// -/// ```text -/// enum SCErrorCode -/// { -/// SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). -/// SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. -/// SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. -/// SCEC_MISSING_VALUE = 3, // Some value was required but not provided. -/// SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. -/// SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. -/// SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. -/// SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. -/// SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. -/// SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ScErrorCode { - #[cfg_attr(feature = "alloc", default)] - ArithDomain = 0, - IndexBounds = 1, - InvalidInput = 2, - MissingValue = 3, - ExistingValue = 4, - ExceededLimit = 5, - InvalidAction = 6, - InternalError = 7, - UnexpectedType = 8, - UnexpectedSize = 9, -} - -impl ScErrorCode { - const _VARIANTS: &[ScErrorCode] = &[ - ScErrorCode::ArithDomain, - ScErrorCode::IndexBounds, - ScErrorCode::InvalidInput, - ScErrorCode::MissingValue, - ScErrorCode::ExistingValue, - ScErrorCode::ExceededLimit, - ScErrorCode::InvalidAction, - ScErrorCode::InternalError, - ScErrorCode::UnexpectedType, - ScErrorCode::UnexpectedSize, - ]; - pub const VARIANTS: [ScErrorCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "ArithDomain", - "IndexBounds", - "InvalidInput", - "MissingValue", - "ExistingValue", - "ExceededLimit", - "InvalidAction", - "InternalError", - "UnexpectedType", - "UnexpectedSize", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ArithDomain => "ArithDomain", - Self::IndexBounds => "IndexBounds", - Self::InvalidInput => "InvalidInput", - Self::MissingValue => "MissingValue", - Self::ExistingValue => "ExistingValue", - Self::ExceededLimit => "ExceededLimit", - Self::InvalidAction => "InvalidAction", - Self::InternalError => "InternalError", - Self::UnexpectedType => "UnexpectedType", - Self::UnexpectedSize => "UnexpectedSize", - } - } - - #[must_use] - pub const fn variants() -> [ScErrorCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScErrorCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ScErrorCode { - fn variants() -> slice::Iter<'static, ScErrorCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for ScErrorCode {} - -impl fmt::Display for ScErrorCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ScErrorCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ScErrorCode::ArithDomain, - 1 => ScErrorCode::IndexBounds, - 2 => ScErrorCode::InvalidInput, - 3 => ScErrorCode::MissingValue, - 4 => ScErrorCode::ExistingValue, - 5 => ScErrorCode::ExceededLimit, - 6 => ScErrorCode::InvalidAction, - 7 => ScErrorCode::InternalError, - 8 => ScErrorCode::UnexpectedType, - 9 => ScErrorCode::UnexpectedSize, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ScErrorCode) -> Self { - e as Self - } -} - -impl ReadXdr for ScErrorCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ScErrorCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ScError is an XDR Union defined as: -/// -/// ```text -/// union SCError switch (SCErrorType type) -/// { -/// case SCE_CONTRACT: -/// uint32 contractCode; -/// case SCE_WASM_VM: -/// case SCE_CONTEXT: -/// case SCE_STORAGE: -/// case SCE_OBJECT: -/// case SCE_CRYPTO: -/// case SCE_EVENTS: -/// case SCE_BUDGET: -/// case SCE_VALUE: -/// case SCE_AUTH: -/// SCErrorCode code; -/// }; -/// ``` -/// -// union with discriminant ScErrorType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ScError { - Contract(u32), - WasmVm(ScErrorCode), - Context(ScErrorCode), - Storage(ScErrorCode), - Object(ScErrorCode), - Crypto(ScErrorCode), - Events(ScErrorCode), - Budget(ScErrorCode), - Value(ScErrorCode), - Auth(ScErrorCode), -} - -#[cfg(feature = "alloc")] -impl Default for ScError { - fn default() -> Self { - Self::Contract(u32::default()) - } -} - -impl ScError { - const _VARIANTS: &[ScErrorType] = &[ - ScErrorType::Contract, - ScErrorType::WasmVm, - ScErrorType::Context, - ScErrorType::Storage, - ScErrorType::Object, - ScErrorType::Crypto, - ScErrorType::Events, - ScErrorType::Budget, - ScErrorType::Value, - ScErrorType::Auth, - ]; - pub const VARIANTS: [ScErrorType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Contract", "WasmVm", "Context", "Storage", "Object", "Crypto", "Events", "Budget", - "Value", "Auth", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Contract(_) => "Contract", - Self::WasmVm(_) => "WasmVm", - Self::Context(_) => "Context", - Self::Storage(_) => "Storage", - Self::Object(_) => "Object", - Self::Crypto(_) => "Crypto", - Self::Events(_) => "Events", - Self::Budget(_) => "Budget", - Self::Value(_) => "Value", - Self::Auth(_) => "Auth", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ScErrorType { - #[allow(clippy::match_same_arms)] - match self { - Self::Contract(_) => ScErrorType::Contract, - Self::WasmVm(_) => ScErrorType::WasmVm, - Self::Context(_) => ScErrorType::Context, - Self::Storage(_) => ScErrorType::Storage, - Self::Object(_) => ScErrorType::Object, - Self::Crypto(_) => ScErrorType::Crypto, - Self::Events(_) => ScErrorType::Events, - Self::Budget(_) => ScErrorType::Budget, - Self::Value(_) => ScErrorType::Value, - Self::Auth(_) => ScErrorType::Auth, - } - } - - #[must_use] - pub const fn variants() -> [ScErrorType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScError { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ScError { - #[must_use] - fn discriminant(&self) -> ScErrorType { - Self::discriminant(self) - } -} - -impl Variants for ScError { - fn variants() -> slice::Iter<'static, ScErrorType> { - Self::VARIANTS.iter() - } -} - -impl Union for ScError {} - -impl ReadXdr for ScError { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ScErrorType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ScErrorType::Contract => Self::Contract(u32::read_xdr(r)?), - ScErrorType::WasmVm => Self::WasmVm(ScErrorCode::read_xdr(r)?), - ScErrorType::Context => Self::Context(ScErrorCode::read_xdr(r)?), - ScErrorType::Storage => Self::Storage(ScErrorCode::read_xdr(r)?), - ScErrorType::Object => Self::Object(ScErrorCode::read_xdr(r)?), - ScErrorType::Crypto => Self::Crypto(ScErrorCode::read_xdr(r)?), - ScErrorType::Events => Self::Events(ScErrorCode::read_xdr(r)?), - ScErrorType::Budget => Self::Budget(ScErrorCode::read_xdr(r)?), - ScErrorType::Value => Self::Value(ScErrorCode::read_xdr(r)?), - ScErrorType::Auth => Self::Auth(ScErrorCode::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ScError { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Contract(v) => v.write_xdr(w)?, - Self::WasmVm(v) => v.write_xdr(w)?, - Self::Context(v) => v.write_xdr(w)?, - Self::Storage(v) => v.write_xdr(w)?, - Self::Object(v) => v.write_xdr(w)?, - Self::Crypto(v) => v.write_xdr(w)?, - Self::Events(v) => v.write_xdr(w)?, - Self::Budget(v) => v.write_xdr(w)?, - Self::Value(v) => v.write_xdr(w)?, - Self::Auth(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// UInt128Parts is an XDR Struct defined as: -/// -/// ```text -/// struct UInt128Parts { -/// uint64 hi; -/// uint64 lo; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay) -)] -pub struct UInt128Parts { - pub hi: u64, - pub lo: u64, -} - -impl ReadXdr for UInt128Parts { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - hi: u64::read_xdr(r)?, - lo: u64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for UInt128Parts { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.hi.write_xdr(w)?; - self.lo.write_xdr(w)?; - Ok(()) - }) - } -} -#[cfg(all(feature = "serde", feature = "alloc"))] -impl<'de> serde::Deserialize<'de> for UInt128Parts { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - use serde::Deserialize; - #[derive(Deserialize)] - struct UInt128Parts { - hi: u64, - lo: u64, - } - #[derive(Deserialize)] - #[serde(untagged)] - enum UInt128PartsOrString<'a> { - Str(&'a str), - String(String), - UInt128Parts(UInt128Parts), - } - match UInt128PartsOrString::deserialize(deserializer)? { - UInt128PartsOrString::Str(s) => s.parse().map_err(serde::de::Error::custom), - UInt128PartsOrString::String(s) => s.parse().map_err(serde::de::Error::custom), - UInt128PartsOrString::UInt128Parts(UInt128Parts { hi, lo }) => { - Ok(self::UInt128Parts { hi, lo }) - } - } - } -} - -/// Int128Parts is an XDR Struct defined as: -/// -/// ```text -/// struct Int128Parts { -/// int64 hi; -/// uint64 lo; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay) -)] -pub struct Int128Parts { - pub hi: i64, - pub lo: u64, -} - -impl ReadXdr for Int128Parts { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - hi: i64::read_xdr(r)?, - lo: u64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for Int128Parts { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.hi.write_xdr(w)?; - self.lo.write_xdr(w)?; - Ok(()) - }) - } -} -#[cfg(all(feature = "serde", feature = "alloc"))] -impl<'de> serde::Deserialize<'de> for Int128Parts { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - use serde::Deserialize; - #[derive(Deserialize)] - struct Int128Parts { - hi: i64, - lo: u64, - } - #[derive(Deserialize)] - #[serde(untagged)] - enum Int128PartsOrString<'a> { - Str(&'a str), - String(String), - Int128Parts(Int128Parts), - } - match Int128PartsOrString::deserialize(deserializer)? { - Int128PartsOrString::Str(s) => s.parse().map_err(serde::de::Error::custom), - Int128PartsOrString::String(s) => s.parse().map_err(serde::de::Error::custom), - Int128PartsOrString::Int128Parts(Int128Parts { hi, lo }) => { - Ok(self::Int128Parts { hi, lo }) - } - } - } -} - -/// UInt256Parts is an XDR Struct defined as: -/// -/// ```text -/// struct UInt256Parts { -/// uint64 hi_hi; -/// uint64 hi_lo; -/// uint64 lo_hi; -/// uint64 lo_lo; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay) -)] -pub struct UInt256Parts { - pub hi_hi: u64, - pub hi_lo: u64, - pub lo_hi: u64, - pub lo_lo: u64, -} - -impl ReadXdr for UInt256Parts { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - hi_hi: u64::read_xdr(r)?, - hi_lo: u64::read_xdr(r)?, - lo_hi: u64::read_xdr(r)?, - lo_lo: u64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for UInt256Parts { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.hi_hi.write_xdr(w)?; - self.hi_lo.write_xdr(w)?; - self.lo_hi.write_xdr(w)?; - self.lo_lo.write_xdr(w)?; - Ok(()) - }) - } -} -#[cfg(all(feature = "serde", feature = "alloc"))] -impl<'de> serde::Deserialize<'de> for UInt256Parts { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - use serde::Deserialize; - #[derive(Deserialize)] - struct UInt256Parts { - hi_hi: u64, - hi_lo: u64, - lo_hi: u64, - lo_lo: u64, - } - #[derive(Deserialize)] - #[serde(untagged)] - enum UInt256PartsOrString<'a> { - Str(&'a str), - String(String), - UInt256Parts(UInt256Parts), - } - match UInt256PartsOrString::deserialize(deserializer)? { - UInt256PartsOrString::Str(s) => s.parse().map_err(serde::de::Error::custom), - UInt256PartsOrString::String(s) => s.parse().map_err(serde::de::Error::custom), - UInt256PartsOrString::UInt256Parts(UInt256Parts { - hi_hi, - hi_lo, - lo_hi, - lo_lo, - }) => Ok(self::UInt256Parts { - hi_hi, - hi_lo, - lo_hi, - lo_lo, - }), - } - } -} - -/// Int256Parts is an XDR Struct defined as: -/// -/// ```text -/// struct Int256Parts { -/// int64 hi_hi; -/// uint64 hi_lo; -/// uint64 lo_hi; -/// uint64 lo_lo; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay) -)] -pub struct Int256Parts { - pub hi_hi: i64, - pub hi_lo: u64, - pub lo_hi: u64, - pub lo_lo: u64, -} - -impl ReadXdr for Int256Parts { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - hi_hi: i64::read_xdr(r)?, - hi_lo: u64::read_xdr(r)?, - lo_hi: u64::read_xdr(r)?, - lo_lo: u64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for Int256Parts { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.hi_hi.write_xdr(w)?; - self.hi_lo.write_xdr(w)?; - self.lo_hi.write_xdr(w)?; - self.lo_lo.write_xdr(w)?; - Ok(()) - }) - } -} -#[cfg(all(feature = "serde", feature = "alloc"))] -impl<'de> serde::Deserialize<'de> for Int256Parts { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - use serde::Deserialize; - #[derive(Deserialize)] - struct Int256Parts { - hi_hi: i64, - hi_lo: u64, - lo_hi: u64, - lo_lo: u64, - } - #[derive(Deserialize)] - #[serde(untagged)] - enum Int256PartsOrString<'a> { - Str(&'a str), - String(String), - Int256Parts(Int256Parts), - } - match Int256PartsOrString::deserialize(deserializer)? { - Int256PartsOrString::Str(s) => s.parse().map_err(serde::de::Error::custom), - Int256PartsOrString::String(s) => s.parse().map_err(serde::de::Error::custom), - Int256PartsOrString::Int256Parts(Int256Parts { - hi_hi, - hi_lo, - lo_hi, - lo_lo, - }) => Ok(self::Int256Parts { - hi_hi, - hi_lo, - lo_hi, - lo_lo, - }), - } - } -} - -/// ContractExecutableType is an XDR Enum defined as: -/// -/// ```text -/// enum ContractExecutableType -/// { -/// CONTRACT_EXECUTABLE_WASM = 0, -/// CONTRACT_EXECUTABLE_STELLAR_ASSET = 1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ContractExecutableType { - #[cfg_attr(feature = "alloc", default)] - Wasm = 0, - StellarAsset = 1, -} - -impl ContractExecutableType { - const _VARIANTS: &[ContractExecutableType] = &[ - ContractExecutableType::Wasm, - ContractExecutableType::StellarAsset, - ]; - pub const VARIANTS: [ContractExecutableType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Wasm", "StellarAsset"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Wasm => "Wasm", - Self::StellarAsset => "StellarAsset", - } - } - - #[must_use] - pub const fn variants() -> [ContractExecutableType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ContractExecutableType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ContractExecutableType { - fn variants() -> slice::Iter<'static, ContractExecutableType> { - Self::VARIANTS.iter() - } -} - -impl Enum for ContractExecutableType {} - -impl fmt::Display for ContractExecutableType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ContractExecutableType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ContractExecutableType::Wasm, - 1 => ContractExecutableType::StellarAsset, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ContractExecutableType) -> Self { - e as Self - } -} - -impl ReadXdr for ContractExecutableType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ContractExecutableType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ContractExecutable is an XDR Union defined as: -/// -/// ```text -/// union ContractExecutable switch (ContractExecutableType type) -/// { -/// case CONTRACT_EXECUTABLE_WASM: -/// Hash wasm_hash; -/// case CONTRACT_EXECUTABLE_STELLAR_ASSET: -/// void; -/// }; -/// ``` -/// -// union with discriminant ContractExecutableType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ContractExecutable { - Wasm(Hash), - StellarAsset, -} - -#[cfg(feature = "alloc")] -impl Default for ContractExecutable { - fn default() -> Self { - Self::Wasm(Hash::default()) - } -} - -impl ContractExecutable { - const _VARIANTS: &[ContractExecutableType] = &[ - ContractExecutableType::Wasm, - ContractExecutableType::StellarAsset, - ]; - pub const VARIANTS: [ContractExecutableType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Wasm", "StellarAsset"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Wasm(_) => "Wasm", - Self::StellarAsset => "StellarAsset", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ContractExecutableType { - #[allow(clippy::match_same_arms)] - match self { - Self::Wasm(_) => ContractExecutableType::Wasm, - Self::StellarAsset => ContractExecutableType::StellarAsset, - } - } - - #[must_use] - pub const fn variants() -> [ContractExecutableType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ContractExecutable { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ContractExecutable { - #[must_use] - fn discriminant(&self) -> ContractExecutableType { - Self::discriminant(self) - } -} - -impl Variants for ContractExecutable { - fn variants() -> slice::Iter<'static, ContractExecutableType> { - Self::VARIANTS.iter() - } -} - -impl Union for ContractExecutable {} - -impl ReadXdr for ContractExecutable { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ContractExecutableType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ContractExecutableType::Wasm => Self::Wasm(Hash::read_xdr(r)?), - ContractExecutableType::StellarAsset => Self::StellarAsset, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ContractExecutable { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Wasm(v) => v.write_xdr(w)?, - Self::StellarAsset => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ScAddressType is an XDR Enum defined as: -/// -/// ```text -/// enum SCAddressType -/// { -/// SC_ADDRESS_TYPE_ACCOUNT = 0, -/// SC_ADDRESS_TYPE_CONTRACT = 1, -/// SC_ADDRESS_TYPE_MUXED_ACCOUNT = 2, -/// SC_ADDRESS_TYPE_CLAIMABLE_BALANCE = 3, -/// SC_ADDRESS_TYPE_LIQUIDITY_POOL = 4 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ScAddressType { - #[cfg_attr(feature = "alloc", default)] - Account = 0, - Contract = 1, - MuxedAccount = 2, - ClaimableBalance = 3, - LiquidityPool = 4, -} - -impl ScAddressType { - const _VARIANTS: &[ScAddressType] = &[ - ScAddressType::Account, - ScAddressType::Contract, - ScAddressType::MuxedAccount, - ScAddressType::ClaimableBalance, - ScAddressType::LiquidityPool, - ]; - pub const VARIANTS: [ScAddressType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Account", - "Contract", - "MuxedAccount", - "ClaimableBalance", - "LiquidityPool", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Account => "Account", - Self::Contract => "Contract", - Self::MuxedAccount => "MuxedAccount", - Self::ClaimableBalance => "ClaimableBalance", - Self::LiquidityPool => "LiquidityPool", - } - } - - #[must_use] - pub const fn variants() -> [ScAddressType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScAddressType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ScAddressType { - fn variants() -> slice::Iter<'static, ScAddressType> { - Self::VARIANTS.iter() - } -} - -impl Enum for ScAddressType {} - -impl fmt::Display for ScAddressType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ScAddressType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ScAddressType::Account, - 1 => ScAddressType::Contract, - 2 => ScAddressType::MuxedAccount, - 3 => ScAddressType::ClaimableBalance, - 4 => ScAddressType::LiquidityPool, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ScAddressType) -> Self { - e as Self - } -} - -impl ReadXdr for ScAddressType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ScAddressType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// MuxedEd25519Account is an XDR Struct defined as: -/// -/// ```text -/// struct MuxedEd25519Account -/// { -/// uint64 id; -/// uint256 ed25519; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay) -)] -pub struct MuxedEd25519Account { - pub id: u64, - pub ed25519: Uint256, -} - -impl ReadXdr for MuxedEd25519Account { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - id: u64::read_xdr(r)?, - ed25519: Uint256::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for MuxedEd25519Account { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.id.write_xdr(w)?; - self.ed25519.write_xdr(w)?; - Ok(()) - }) - } -} -#[cfg(all(feature = "serde", feature = "alloc"))] -impl<'de> serde::Deserialize<'de> for MuxedEd25519Account { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - use serde::Deserialize; - #[derive(Deserialize)] - struct MuxedEd25519Account { - id: u64, - ed25519: Uint256, - } - #[derive(Deserialize)] - #[serde(untagged)] - enum MuxedEd25519AccountOrString<'a> { - Str(&'a str), - String(String), - MuxedEd25519Account(MuxedEd25519Account), - } - match MuxedEd25519AccountOrString::deserialize(deserializer)? { - MuxedEd25519AccountOrString::Str(s) => s.parse().map_err(serde::de::Error::custom), - MuxedEd25519AccountOrString::String(s) => s.parse().map_err(serde::de::Error::custom), - MuxedEd25519AccountOrString::MuxedEd25519Account(MuxedEd25519Account { - id, - ed25519, - }) => Ok(self::MuxedEd25519Account { id, ed25519 }), - } - } -} - -/// ScAddress is an XDR Union defined as: -/// -/// ```text -/// union SCAddress switch (SCAddressType type) -/// { -/// case SC_ADDRESS_TYPE_ACCOUNT: -/// AccountID accountId; -/// case SC_ADDRESS_TYPE_CONTRACT: -/// ContractID contractId; -/// case SC_ADDRESS_TYPE_MUXED_ACCOUNT: -/// MuxedEd25519Account muxedAccount; -/// case SC_ADDRESS_TYPE_CLAIMABLE_BALANCE: -/// ClaimableBalanceID claimableBalanceId; -/// case SC_ADDRESS_TYPE_LIQUIDITY_POOL: -/// PoolID liquidityPoolId; -/// }; -/// ``` -/// -// union with discriminant ScAddressType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -#[allow(clippy::large_enum_variant)] -pub enum ScAddress { - Account(AccountId), - Contract(ContractId), - MuxedAccount(MuxedEd25519Account), - ClaimableBalance(ClaimableBalanceId), - LiquidityPool(PoolId), -} - -#[cfg(feature = "alloc")] -impl Default for ScAddress { - fn default() -> Self { - Self::Account(AccountId::default()) - } -} - -impl ScAddress { - const _VARIANTS: &[ScAddressType] = &[ - ScAddressType::Account, - ScAddressType::Contract, - ScAddressType::MuxedAccount, - ScAddressType::ClaimableBalance, - ScAddressType::LiquidityPool, - ]; - pub const VARIANTS: [ScAddressType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Account", - "Contract", - "MuxedAccount", - "ClaimableBalance", - "LiquidityPool", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Account(_) => "Account", - Self::Contract(_) => "Contract", - Self::MuxedAccount(_) => "MuxedAccount", - Self::ClaimableBalance(_) => "ClaimableBalance", - Self::LiquidityPool(_) => "LiquidityPool", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ScAddressType { - #[allow(clippy::match_same_arms)] - match self { - Self::Account(_) => ScAddressType::Account, - Self::Contract(_) => ScAddressType::Contract, - Self::MuxedAccount(_) => ScAddressType::MuxedAccount, - Self::ClaimableBalance(_) => ScAddressType::ClaimableBalance, - Self::LiquidityPool(_) => ScAddressType::LiquidityPool, - } - } - - #[must_use] - pub const fn variants() -> [ScAddressType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScAddress { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ScAddress { - #[must_use] - fn discriminant(&self) -> ScAddressType { - Self::discriminant(self) - } -} - -impl Variants for ScAddress { - fn variants() -> slice::Iter<'static, ScAddressType> { - Self::VARIANTS.iter() - } -} - -impl Union for ScAddress {} - -impl ReadXdr for ScAddress { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ScAddressType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ScAddressType::Account => Self::Account(AccountId::read_xdr(r)?), - ScAddressType::Contract => Self::Contract(ContractId::read_xdr(r)?), - ScAddressType::MuxedAccount => { - Self::MuxedAccount(MuxedEd25519Account::read_xdr(r)?) - } - ScAddressType::ClaimableBalance => { - Self::ClaimableBalance(ClaimableBalanceId::read_xdr(r)?) - } - ScAddressType::LiquidityPool => Self::LiquidityPool(PoolId::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ScAddress { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Account(v) => v.write_xdr(w)?, - Self::Contract(v) => v.write_xdr(w)?, - Self::MuxedAccount(v) => v.write_xdr(w)?, - Self::ClaimableBalance(v) => v.write_xdr(w)?, - Self::LiquidityPool(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ScsymbolLimit is an XDR Const defined as: -/// -/// ```text -/// const SCSYMBOL_LIMIT = 32; -/// ``` -/// -pub const SCSYMBOL_LIMIT: u64 = 32; - -/// ScVec is an XDR Typedef defined as: -/// -/// ```text -/// typedef SCVal SCVec<>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct ScVec(pub VecM); - -impl From for VecM { - #[must_use] - fn from(x: ScVec) -> Self { - x.0 - } -} - -impl From> for ScVec { - #[must_use] - fn from(x: VecM) -> Self { - ScVec(x) - } -} - -impl AsRef> for ScVec { - #[must_use] - fn as_ref(&self) -> &VecM { - &self.0 - } -} - -impl ReadXdr for ScVec { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = VecM::::read_xdr(r)?; - let v = ScVec(i); - Ok(v) - }) - } -} - -impl WriteXdr for ScVec { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for ScVec { - type Target = VecM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: ScVec) -> Self { - x.0 .0 - } -} - -impl TryFrom> for ScVec { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(ScVec(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for ScVec { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(ScVec(x.try_into()?)) - } -} - -impl AsRef> for ScVec { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[ScVal]> for ScVec { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[ScVal] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[ScVal] { - self.0 .0 - } -} - -/// ScMap is an XDR Typedef defined as: -/// -/// ```text -/// typedef SCMapEntry SCMap<>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct ScMap(pub VecM); - -impl From for VecM { - #[must_use] - fn from(x: ScMap) -> Self { - x.0 - } -} - -impl From> for ScMap { - #[must_use] - fn from(x: VecM) -> Self { - ScMap(x) - } -} - -impl AsRef> for ScMap { - #[must_use] - fn as_ref(&self) -> &VecM { - &self.0 - } -} - -impl ReadXdr for ScMap { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = VecM::::read_xdr(r)?; - let v = ScMap(i); - Ok(v) - }) - } -} - -impl WriteXdr for ScMap { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for ScMap { - type Target = VecM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: ScMap) -> Self { - x.0 .0 - } -} - -impl TryFrom> for ScMap { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(ScMap(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for ScMap { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(ScMap(x.try_into()?)) - } -} - -impl AsRef> for ScMap { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[ScMapEntry]> for ScMap { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[ScMapEntry] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[ScMapEntry] { - self.0 .0 - } -} - -/// ScBytes is an XDR Typedef defined as: -/// -/// ```text -/// typedef opaque SCBytes<>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct ScBytes(pub BytesM); - -impl From for BytesM { - #[must_use] - fn from(x: ScBytes) -> Self { - x.0 - } -} - -impl From for ScBytes { - #[must_use] - fn from(x: BytesM) -> Self { - ScBytes(x) - } -} - -impl AsRef for ScBytes { - #[must_use] - fn as_ref(&self) -> &BytesM { - &self.0 - } -} - -impl ReadXdr for ScBytes { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = BytesM::read_xdr(r)?; - let v = ScBytes(i); - Ok(v) - }) - } -} - -impl WriteXdr for ScBytes { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for ScBytes { - type Target = BytesM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: ScBytes) -> Self { - x.0 .0 - } -} - -impl TryFrom> for ScBytes { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(ScBytes(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for ScBytes { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(ScBytes(x.try_into()?)) - } -} - -impl AsRef> for ScBytes { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[u8]> for ScBytes { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0 .0 - } -} - -/// ScString is an XDR Typedef defined as: -/// -/// ```text -/// typedef string SCString<>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct ScString(pub StringM); - -impl From for StringM { - #[must_use] - fn from(x: ScString) -> Self { - x.0 - } -} - -impl From for ScString { - #[must_use] - fn from(x: StringM) -> Self { - ScString(x) - } -} - -impl AsRef for ScString { - #[must_use] - fn as_ref(&self) -> &StringM { - &self.0 - } -} - -impl ReadXdr for ScString { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = StringM::read_xdr(r)?; - let v = ScString(i); - Ok(v) - }) - } -} - -impl WriteXdr for ScString { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for ScString { - type Target = StringM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: ScString) -> Self { - x.0 .0 - } -} - -impl TryFrom> for ScString { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(ScString(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for ScString { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(ScString(x.try_into()?)) - } -} - -impl AsRef> for ScString { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[u8]> for ScString { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0 .0 - } -} - -/// ScSymbol is an XDR Typedef defined as: -/// -/// ```text -/// typedef string SCSymbol; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct ScSymbol(pub StringM<32>); - -impl From for StringM<32> { - #[must_use] - fn from(x: ScSymbol) -> Self { - x.0 - } -} - -impl From> for ScSymbol { - #[must_use] - fn from(x: StringM<32>) -> Self { - ScSymbol(x) - } -} - -impl AsRef> for ScSymbol { - #[must_use] - fn as_ref(&self) -> &StringM<32> { - &self.0 - } -} - -impl ReadXdr for ScSymbol { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = StringM::<32>::read_xdr(r)?; - let v = ScSymbol(i); - Ok(v) - }) - } -} - -impl WriteXdr for ScSymbol { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for ScSymbol { - type Target = StringM<32>; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: ScSymbol) -> Self { - x.0 .0 - } -} - -impl TryFrom> for ScSymbol { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(ScSymbol(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for ScSymbol { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(ScSymbol(x.try_into()?)) - } -} - -impl AsRef> for ScSymbol { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[u8]> for ScSymbol { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0 .0 - } -} - -/// ScNonceKey is an XDR Struct defined as: -/// -/// ```text -/// struct SCNonceKey { -/// int64 nonce; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScNonceKey { - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub nonce: i64, -} - -impl ReadXdr for ScNonceKey { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - nonce: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScNonceKey { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.nonce.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScContractInstance is an XDR Struct defined as: -/// -/// ```text -/// struct SCContractInstance { -/// ContractExecutable executable; -/// SCMap* storage; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScContractInstance { - pub executable: ContractExecutable, - pub storage: Option, -} - -impl ReadXdr for ScContractInstance { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - executable: ContractExecutable::read_xdr(r)?, - storage: Option::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScContractInstance { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.executable.write_xdr(w)?; - self.storage.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScVal is an XDR Union defined as: -/// -/// ```text -/// union SCVal switch (SCValType type) -/// { -/// -/// case SCV_BOOL: -/// bool b; -/// case SCV_VOID: -/// void; -/// case SCV_ERROR: -/// SCError error; -/// -/// case SCV_U32: -/// uint32 u32; -/// case SCV_I32: -/// int32 i32; -/// -/// case SCV_U64: -/// uint64 u64; -/// case SCV_I64: -/// int64 i64; -/// case SCV_TIMEPOINT: -/// TimePoint timepoint; -/// case SCV_DURATION: -/// Duration duration; -/// -/// case SCV_U128: -/// UInt128Parts u128; -/// case SCV_I128: -/// Int128Parts i128; -/// -/// case SCV_U256: -/// UInt256Parts u256; -/// case SCV_I256: -/// Int256Parts i256; -/// -/// case SCV_BYTES: -/// SCBytes bytes; -/// case SCV_STRING: -/// SCString str; -/// case SCV_SYMBOL: -/// SCSymbol sym; -/// -/// // Vec and Map are recursive so need to live -/// // behind an option, due to xdrpp limitations. -/// case SCV_VEC: -/// SCVec *vec; -/// case SCV_MAP: -/// SCMap *map; -/// -/// case SCV_ADDRESS: -/// SCAddress address; -/// -/// // Special SCVals reserved for system-constructed contract-data -/// // ledger keys, not generally usable elsewhere. -/// case SCV_CONTRACT_INSTANCE: -/// SCContractInstance instance; -/// case SCV_LEDGER_KEY_CONTRACT_INSTANCE: -/// void; -/// case SCV_LEDGER_KEY_NONCE: -/// SCNonceKey nonce_key; -/// }; -/// ``` -/// -// union with discriminant ScValType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ScVal { - Bool(bool), - Void, - Error(ScError), - U32(u32), - I32(i32), - U64( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - u64, - ), - I64( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - i64, - ), - Timepoint(TimePoint), - Duration(Duration), - U128(UInt128Parts), - I128(Int128Parts), - U256(UInt256Parts), - I256(Int256Parts), - Bytes(ScBytes), - String(ScString), - Symbol(ScSymbol), - Vec(Option), - Map(Option), - Address(ScAddress), - ContractInstance(ScContractInstance), - LedgerKeyContractInstance, - LedgerKeyNonce(ScNonceKey), -} - -#[cfg(feature = "alloc")] -impl Default for ScVal { - fn default() -> Self { - Self::Bool(bool::default()) - } -} - -impl ScVal { - const _VARIANTS: &[ScValType] = &[ - ScValType::Bool, - ScValType::Void, - ScValType::Error, - ScValType::U32, - ScValType::I32, - ScValType::U64, - ScValType::I64, - ScValType::Timepoint, - ScValType::Duration, - ScValType::U128, - ScValType::I128, - ScValType::U256, - ScValType::I256, - ScValType::Bytes, - ScValType::String, - ScValType::Symbol, - ScValType::Vec, - ScValType::Map, - ScValType::Address, - ScValType::ContractInstance, - ScValType::LedgerKeyContractInstance, - ScValType::LedgerKeyNonce, - ]; - pub const VARIANTS: [ScValType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Bool", - "Void", - "Error", - "U32", - "I32", - "U64", - "I64", - "Timepoint", - "Duration", - "U128", - "I128", - "U256", - "I256", - "Bytes", - "String", - "Symbol", - "Vec", - "Map", - "Address", - "ContractInstance", - "LedgerKeyContractInstance", - "LedgerKeyNonce", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Bool(_) => "Bool", - Self::Void => "Void", - Self::Error(_) => "Error", - Self::U32(_) => "U32", - Self::I32(_) => "I32", - Self::U64(_) => "U64", - Self::I64(_) => "I64", - Self::Timepoint(_) => "Timepoint", - Self::Duration(_) => "Duration", - Self::U128(_) => "U128", - Self::I128(_) => "I128", - Self::U256(_) => "U256", - Self::I256(_) => "I256", - Self::Bytes(_) => "Bytes", - Self::String(_) => "String", - Self::Symbol(_) => "Symbol", - Self::Vec(_) => "Vec", - Self::Map(_) => "Map", - Self::Address(_) => "Address", - Self::ContractInstance(_) => "ContractInstance", - Self::LedgerKeyContractInstance => "LedgerKeyContractInstance", - Self::LedgerKeyNonce(_) => "LedgerKeyNonce", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ScValType { - #[allow(clippy::match_same_arms)] - match self { - Self::Bool(_) => ScValType::Bool, - Self::Void => ScValType::Void, - Self::Error(_) => ScValType::Error, - Self::U32(_) => ScValType::U32, - Self::I32(_) => ScValType::I32, - Self::U64(_) => ScValType::U64, - Self::I64(_) => ScValType::I64, - Self::Timepoint(_) => ScValType::Timepoint, - Self::Duration(_) => ScValType::Duration, - Self::U128(_) => ScValType::U128, - Self::I128(_) => ScValType::I128, - Self::U256(_) => ScValType::U256, - Self::I256(_) => ScValType::I256, - Self::Bytes(_) => ScValType::Bytes, - Self::String(_) => ScValType::String, - Self::Symbol(_) => ScValType::Symbol, - Self::Vec(_) => ScValType::Vec, - Self::Map(_) => ScValType::Map, - Self::Address(_) => ScValType::Address, - Self::ContractInstance(_) => ScValType::ContractInstance, - Self::LedgerKeyContractInstance => ScValType::LedgerKeyContractInstance, - Self::LedgerKeyNonce(_) => ScValType::LedgerKeyNonce, - } - } - - #[must_use] - pub const fn variants() -> [ScValType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScVal { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ScVal { - #[must_use] - fn discriminant(&self) -> ScValType { - Self::discriminant(self) - } -} - -impl Variants for ScVal { - fn variants() -> slice::Iter<'static, ScValType> { - Self::VARIANTS.iter() - } -} - -impl Union for ScVal {} - -impl ReadXdr for ScVal { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ScValType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ScValType::Bool => Self::Bool(bool::read_xdr(r)?), - ScValType::Void => Self::Void, - ScValType::Error => Self::Error(ScError::read_xdr(r)?), - ScValType::U32 => Self::U32(u32::read_xdr(r)?), - ScValType::I32 => Self::I32(i32::read_xdr(r)?), - ScValType::U64 => Self::U64(u64::read_xdr(r)?), - ScValType::I64 => Self::I64(i64::read_xdr(r)?), - ScValType::Timepoint => Self::Timepoint(TimePoint::read_xdr(r)?), - ScValType::Duration => Self::Duration(Duration::read_xdr(r)?), - ScValType::U128 => Self::U128(UInt128Parts::read_xdr(r)?), - ScValType::I128 => Self::I128(Int128Parts::read_xdr(r)?), - ScValType::U256 => Self::U256(UInt256Parts::read_xdr(r)?), - ScValType::I256 => Self::I256(Int256Parts::read_xdr(r)?), - ScValType::Bytes => Self::Bytes(ScBytes::read_xdr(r)?), - ScValType::String => Self::String(ScString::read_xdr(r)?), - ScValType::Symbol => Self::Symbol(ScSymbol::read_xdr(r)?), - ScValType::Vec => Self::Vec(Option::::read_xdr(r)?), - ScValType::Map => Self::Map(Option::::read_xdr(r)?), - ScValType::Address => Self::Address(ScAddress::read_xdr(r)?), - ScValType::ContractInstance => { - Self::ContractInstance(ScContractInstance::read_xdr(r)?) - } - ScValType::LedgerKeyContractInstance => Self::LedgerKeyContractInstance, - ScValType::LedgerKeyNonce => Self::LedgerKeyNonce(ScNonceKey::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ScVal { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Bool(v) => v.write_xdr(w)?, - Self::Void => ().write_xdr(w)?, - Self::Error(v) => v.write_xdr(w)?, - Self::U32(v) => v.write_xdr(w)?, - Self::I32(v) => v.write_xdr(w)?, - Self::U64(v) => v.write_xdr(w)?, - Self::I64(v) => v.write_xdr(w)?, - Self::Timepoint(v) => v.write_xdr(w)?, - Self::Duration(v) => v.write_xdr(w)?, - Self::U128(v) => v.write_xdr(w)?, - Self::I128(v) => v.write_xdr(w)?, - Self::U256(v) => v.write_xdr(w)?, - Self::I256(v) => v.write_xdr(w)?, - Self::Bytes(v) => v.write_xdr(w)?, - Self::String(v) => v.write_xdr(w)?, - Self::Symbol(v) => v.write_xdr(w)?, - Self::Vec(v) => v.write_xdr(w)?, - Self::Map(v) => v.write_xdr(w)?, - Self::Address(v) => v.write_xdr(w)?, - Self::ContractInstance(v) => v.write_xdr(w)?, - Self::LedgerKeyContractInstance => ().write_xdr(w)?, - Self::LedgerKeyNonce(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ScMapEntry is an XDR Struct defined as: -/// -/// ```text -/// struct SCMapEntry -/// { -/// SCVal key; -/// SCVal val; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScMapEntry { - pub key: ScVal, - pub val: ScVal, -} - -impl ReadXdr for ScMapEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - key: ScVal::read_xdr(r)?, - val: ScVal::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScMapEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.key.write_xdr(w)?; - self.val.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerCloseMetaBatch is an XDR Struct defined as: -/// -/// ```text -/// struct LedgerCloseMetaBatch -/// { -/// // starting ledger sequence number in the batch -/// uint32 startSequence; -/// -/// // ending ledger sequence number in the batch -/// uint32 endSequence; -/// -/// // Ledger close meta for each ledger within the batch -/// LedgerCloseMeta ledgerCloseMetas<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerCloseMetaBatch { - pub start_sequence: u32, - pub end_sequence: u32, - pub ledger_close_metas: VecM, -} - -impl ReadXdr for LedgerCloseMetaBatch { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - start_sequence: u32::read_xdr(r)?, - end_sequence: u32::read_xdr(r)?, - ledger_close_metas: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerCloseMetaBatch { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.start_sequence.write_xdr(w)?; - self.end_sequence.write_xdr(w)?; - self.ledger_close_metas.write_xdr(w)?; - Ok(()) - }) - } -} - -/// StoredTransactionSet is an XDR Union defined as: -/// -/// ```text -/// union StoredTransactionSet switch (int v) -/// { -/// case 0: -/// TransactionSet txSet; -/// case 1: -/// GeneralizedTransactionSet generalizedTxSet; -/// }; -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum StoredTransactionSet { - V0(TransactionSet), - V1(GeneralizedTransactionSet), -} - -#[cfg(feature = "alloc")] -impl Default for StoredTransactionSet { - fn default() -> Self { - Self::V0(TransactionSet::default()) - } -} - -impl StoredTransactionSet { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0(_) => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0(_) => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for StoredTransactionSet { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for StoredTransactionSet { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for StoredTransactionSet { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for StoredTransactionSet {} - -impl ReadXdr for StoredTransactionSet { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0(TransactionSet::read_xdr(r)?), - 1 => Self::V1(GeneralizedTransactionSet::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for StoredTransactionSet { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0(v) => v.write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// StoredDebugTransactionSet is an XDR Struct defined as: -/// -/// ```text -/// struct StoredDebugTransactionSet -/// { -/// StoredTransactionSet txSet; -/// uint32 ledgerSeq; -/// StellarValue scpValue; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct StoredDebugTransactionSet { - pub tx_set: StoredTransactionSet, - pub ledger_seq: u32, - pub scp_value: StellarValue, -} - -impl ReadXdr for StoredDebugTransactionSet { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - tx_set: StoredTransactionSet::read_xdr(r)?, - ledger_seq: u32::read_xdr(r)?, - scp_value: StellarValue::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for StoredDebugTransactionSet { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.tx_set.write_xdr(w)?; - self.ledger_seq.write_xdr(w)?; - self.scp_value.write_xdr(w)?; - Ok(()) - }) - } -} - -/// PersistedScpStateV0 is an XDR Struct defined as: -/// -/// ```text -/// struct PersistedSCPStateV0 -/// { -/// SCPEnvelope scpEnvelopes<>; -/// SCPQuorumSet quorumSets<>; -/// StoredTransactionSet txSets<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct PersistedScpStateV0 { - pub scp_envelopes: VecM, - pub quorum_sets: VecM, - pub tx_sets: VecM, -} - -impl ReadXdr for PersistedScpStateV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - scp_envelopes: VecM::::read_xdr(r)?, - quorum_sets: VecM::::read_xdr(r)?, - tx_sets: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for PersistedScpStateV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.scp_envelopes.write_xdr(w)?; - self.quorum_sets.write_xdr(w)?; - self.tx_sets.write_xdr(w)?; - Ok(()) - }) - } -} - -/// PersistedScpStateV1 is an XDR Struct defined as: -/// -/// ```text -/// struct PersistedSCPStateV1 -/// { -/// // Tx sets are saved separately -/// SCPEnvelope scpEnvelopes<>; -/// SCPQuorumSet quorumSets<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct PersistedScpStateV1 { - pub scp_envelopes: VecM, - pub quorum_sets: VecM, -} - -impl ReadXdr for PersistedScpStateV1 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - scp_envelopes: VecM::::read_xdr(r)?, - quorum_sets: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for PersistedScpStateV1 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.scp_envelopes.write_xdr(w)?; - self.quorum_sets.write_xdr(w)?; - Ok(()) - }) - } -} - -/// PersistedScpState is an XDR Union defined as: -/// -/// ```text -/// union PersistedSCPState switch (int v) -/// { -/// case 0: -/// PersistedSCPStateV0 v0; -/// case 1: -/// PersistedSCPStateV1 v1; -/// }; -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum PersistedScpState { - V0(PersistedScpStateV0), - V1(PersistedScpStateV1), -} - -#[cfg(feature = "alloc")] -impl Default for PersistedScpState { - fn default() -> Self { - Self::V0(PersistedScpStateV0::default()) - } -} - -impl PersistedScpState { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0(_) => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0(_) => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for PersistedScpState { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for PersistedScpState { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for PersistedScpState { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for PersistedScpState {} - -impl ReadXdr for PersistedScpState { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0(PersistedScpStateV0::read_xdr(r)?), - 1 => Self::V1(PersistedScpStateV1::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for PersistedScpState { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0(v) => v.write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// Thresholds is an XDR Typedef defined as: -/// -/// ```text -/// typedef opaque Thresholds[4]; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -pub struct Thresholds(pub [u8; 4]); - -impl core::fmt::Debug for Thresholds { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let v = &self.0; - write!(f, "Thresholds(")?; - for b in v { - write!(f, "{b:02x}")?; - } - write!(f, ")")?; - Ok(()) - } -} -impl core::fmt::Display for Thresholds { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let v = &self.0; - for b in v { - write!(f, "{b:02x}")?; - } - Ok(()) - } -} - -#[cfg(feature = "alloc")] -impl core::str::FromStr for Thresholds { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - hex::decode(s).map_err(|_| Error::InvalidHex)?.try_into() - } -} -#[cfg(feature = "schemars")] -impl schemars::JsonSchema for Thresholds { - fn schema_name() -> String { - "Thresholds".to_string() - } - - fn is_referenceable() -> bool { - false - } - - fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { - let schema = String::json_schema(gen); - if let schemars::schema::Schema::Object(mut schema) = schema { - schema.extensions.insert( - "contentEncoding".to_owned(), - serde_json::Value::String("hex".to_string()), - ); - schema.extensions.insert( - "contentMediaType".to_owned(), - serde_json::Value::String("application/binary".to_string()), - ); - let string = *schema.string.unwrap_or_default().clone(); - schema.string = Some(Box::new(schemars::schema::StringValidation { - max_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(), - min_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(), - ..string - })); - schema.into() - } else { - schema - } - } -} -impl From for [u8; 4] { - #[must_use] - fn from(x: Thresholds) -> Self { - x.0 - } -} - -impl From<[u8; 4]> for Thresholds { - #[must_use] - fn from(x: [u8; 4]) -> Self { - Thresholds(x) - } -} - -impl AsRef<[u8; 4]> for Thresholds { - #[must_use] - fn as_ref(&self) -> &[u8; 4] { - &self.0 - } -} - -impl ReadXdr for Thresholds { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = <[u8; 4]>::read_xdr(r)?; - let v = Thresholds(i); - Ok(v) - }) - } -} - -impl WriteXdr for Thresholds { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Thresholds { - #[must_use] - pub fn as_slice(&self) -> &[u8] { - &self.0 - } -} - -#[cfg(feature = "alloc")] -impl TryFrom> for Thresholds { - type Error = Error; - fn try_from(x: Vec) -> Result { - x.as_slice().try_into() - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for Thresholds { - type Error = Error; - fn try_from(x: &Vec) -> Result { - x.as_slice().try_into() - } -} - -impl TryFrom<&[u8]> for Thresholds { - type Error = Error; - fn try_from(x: &[u8]) -> Result { - Ok(Thresholds(x.try_into()?)) - } -} - -impl AsRef<[u8]> for Thresholds { - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 - } -} - -/// String32 is an XDR Typedef defined as: -/// -/// ```text -/// typedef string string32<32>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct String32(pub StringM<32>); - -impl From for StringM<32> { - #[must_use] - fn from(x: String32) -> Self { - x.0 - } -} - -impl From> for String32 { - #[must_use] - fn from(x: StringM<32>) -> Self { - String32(x) - } -} - -impl AsRef> for String32 { - #[must_use] - fn as_ref(&self) -> &StringM<32> { - &self.0 - } -} - -impl ReadXdr for String32 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = StringM::<32>::read_xdr(r)?; - let v = String32(i); - Ok(v) - }) - } -} - -impl WriteXdr for String32 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for String32 { - type Target = StringM<32>; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: String32) -> Self { - x.0 .0 - } -} - -impl TryFrom> for String32 { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(String32(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for String32 { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(String32(x.try_into()?)) - } -} - -impl AsRef> for String32 { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[u8]> for String32 { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0 .0 - } -} - -/// String64 is an XDR Typedef defined as: -/// -/// ```text -/// typedef string string64<64>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct String64(pub StringM<64>); - -impl From for StringM<64> { - #[must_use] - fn from(x: String64) -> Self { - x.0 - } -} - -impl From> for String64 { - #[must_use] - fn from(x: StringM<64>) -> Self { - String64(x) - } -} - -impl AsRef> for String64 { - #[must_use] - fn as_ref(&self) -> &StringM<64> { - &self.0 - } -} - -impl ReadXdr for String64 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = StringM::<64>::read_xdr(r)?; - let v = String64(i); - Ok(v) - }) - } -} - -impl WriteXdr for String64 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for String64 { - type Target = StringM<64>; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: String64) -> Self { - x.0 .0 - } -} - -impl TryFrom> for String64 { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(String64(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for String64 { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(String64(x.try_into()?)) - } -} - -impl AsRef> for String64 { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[u8]> for String64 { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0 .0 - } -} - -/// SequenceNumber is an XDR Typedef defined as: -/// -/// ```text -/// typedef int64 SequenceNumber; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct SequenceNumber( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub i64, -); - -impl From for i64 { - #[must_use] - fn from(x: SequenceNumber) -> Self { - x.0 - } -} - -impl From for SequenceNumber { - #[must_use] - fn from(x: i64) -> Self { - SequenceNumber(x) - } -} - -impl AsRef for SequenceNumber { - #[must_use] - fn as_ref(&self) -> &i64 { - &self.0 - } -} - -impl ReadXdr for SequenceNumber { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = i64::read_xdr(r)?; - let v = SequenceNumber(i); - Ok(v) - }) - } -} - -impl WriteXdr for SequenceNumber { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -/// DataValue is an XDR Typedef defined as: -/// -/// ```text -/// typedef opaque DataValue<64>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct DataValue(pub BytesM<64>); - -impl From for BytesM<64> { - #[must_use] - fn from(x: DataValue) -> Self { - x.0 - } -} - -impl From> for DataValue { - #[must_use] - fn from(x: BytesM<64>) -> Self { - DataValue(x) - } -} - -impl AsRef> for DataValue { - #[must_use] - fn as_ref(&self) -> &BytesM<64> { - &self.0 - } -} - -impl ReadXdr for DataValue { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = BytesM::<64>::read_xdr(r)?; - let v = DataValue(i); - Ok(v) - }) - } -} - -impl WriteXdr for DataValue { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for DataValue { - type Target = BytesM<64>; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: DataValue) -> Self { - x.0 .0 - } -} - -impl TryFrom> for DataValue { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(DataValue(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for DataValue { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(DataValue(x.try_into()?)) - } -} - -impl AsRef> for DataValue { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[u8]> for DataValue { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0 .0 - } -} - -/// AssetCode4 is an XDR Typedef defined as: -/// -/// ```text -/// typedef opaque AssetCode4[4]; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -pub struct AssetCode4(pub [u8; 4]); - -impl core::fmt::Debug for AssetCode4 { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let v = &self.0; - write!(f, "AssetCode4(")?; - for b in v { - write!(f, "{b:02x}")?; - } - write!(f, ")")?; - Ok(()) - } -} -impl From for [u8; 4] { - #[must_use] - fn from(x: AssetCode4) -> Self { - x.0 - } -} - -impl From<[u8; 4]> for AssetCode4 { - #[must_use] - fn from(x: [u8; 4]) -> Self { - AssetCode4(x) - } -} - -impl AsRef<[u8; 4]> for AssetCode4 { - #[must_use] - fn as_ref(&self) -> &[u8; 4] { - &self.0 - } -} - -impl ReadXdr for AssetCode4 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = <[u8; 4]>::read_xdr(r)?; - let v = AssetCode4(i); - Ok(v) - }) - } -} - -impl WriteXdr for AssetCode4 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl AssetCode4 { - #[must_use] - pub fn as_slice(&self) -> &[u8] { - &self.0 - } -} - -#[cfg(feature = "alloc")] -impl TryFrom> for AssetCode4 { - type Error = Error; - fn try_from(x: Vec) -> Result { - x.as_slice().try_into() - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for AssetCode4 { - type Error = Error; - fn try_from(x: &Vec) -> Result { - x.as_slice().try_into() - } -} - -impl TryFrom<&[u8]> for AssetCode4 { - type Error = Error; - fn try_from(x: &[u8]) -> Result { - Ok(AssetCode4(x.try_into()?)) - } -} - -impl AsRef<[u8]> for AssetCode4 { - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 - } -} - -/// AssetCode12 is an XDR Typedef defined as: -/// -/// ```text -/// typedef opaque AssetCode12[12]; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -pub struct AssetCode12(pub [u8; 12]); - -impl core::fmt::Debug for AssetCode12 { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let v = &self.0; - write!(f, "AssetCode12(")?; - for b in v { - write!(f, "{b:02x}")?; - } - write!(f, ")")?; - Ok(()) - } -} -impl From for [u8; 12] { - #[must_use] - fn from(x: AssetCode12) -> Self { - x.0 - } -} - -impl From<[u8; 12]> for AssetCode12 { - #[must_use] - fn from(x: [u8; 12]) -> Self { - AssetCode12(x) - } -} - -impl AsRef<[u8; 12]> for AssetCode12 { - #[must_use] - fn as_ref(&self) -> &[u8; 12] { - &self.0 - } -} - -impl ReadXdr for AssetCode12 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = <[u8; 12]>::read_xdr(r)?; - let v = AssetCode12(i); - Ok(v) - }) - } -} - -impl WriteXdr for AssetCode12 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl AssetCode12 { - #[must_use] - pub fn as_slice(&self) -> &[u8] { - &self.0 - } -} - -#[cfg(feature = "alloc")] -impl TryFrom> for AssetCode12 { - type Error = Error; - fn try_from(x: Vec) -> Result { - x.as_slice().try_into() - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for AssetCode12 { - type Error = Error; - fn try_from(x: &Vec) -> Result { - x.as_slice().try_into() - } -} - -impl TryFrom<&[u8]> for AssetCode12 { - type Error = Error; - fn try_from(x: &[u8]) -> Result { - Ok(AssetCode12(x.try_into()?)) - } -} - -impl AsRef<[u8]> for AssetCode12 { - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 - } -} - -/// AssetType is an XDR Enum defined as: -/// -/// ```text -/// enum AssetType -/// { -/// ASSET_TYPE_NATIVE = 0, -/// ASSET_TYPE_CREDIT_ALPHANUM4 = 1, -/// ASSET_TYPE_CREDIT_ALPHANUM12 = 2, -/// ASSET_TYPE_POOL_SHARE = 3 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum AssetType { - #[cfg_attr(feature = "alloc", default)] - Native = 0, - CreditAlphanum4 = 1, - CreditAlphanum12 = 2, - PoolShare = 3, -} - -impl AssetType { - const _VARIANTS: &[AssetType] = &[ - AssetType::Native, - AssetType::CreditAlphanum4, - AssetType::CreditAlphanum12, - AssetType::PoolShare, - ]; - pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Native => "Native", - Self::CreditAlphanum4 => "CreditAlphanum4", - Self::CreditAlphanum12 => "CreditAlphanum12", - Self::PoolShare => "PoolShare", - } - } - - #[must_use] - pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for AssetType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for AssetType { - fn variants() -> slice::Iter<'static, AssetType> { - Self::VARIANTS.iter() - } -} - -impl Enum for AssetType {} - -impl fmt::Display for AssetType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for AssetType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => AssetType::Native, - 1 => AssetType::CreditAlphanum4, - 2 => AssetType::CreditAlphanum12, - 3 => AssetType::PoolShare, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: AssetType) -> Self { - e as Self - } -} - -impl ReadXdr for AssetType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for AssetType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// AssetCode is an XDR Union defined as: -/// -/// ```text -/// union AssetCode switch (AssetType type) -/// { -/// case ASSET_TYPE_CREDIT_ALPHANUM4: -/// AssetCode4 assetCode4; -/// -/// case ASSET_TYPE_CREDIT_ALPHANUM12: -/// AssetCode12 assetCode12; -/// -/// // add other asset types here in the future -/// }; -/// ``` -/// -// union with discriminant AssetType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -#[allow(clippy::large_enum_variant)] -pub enum AssetCode { - CreditAlphanum4(AssetCode4), - CreditAlphanum12(AssetCode12), -} - -#[cfg(feature = "alloc")] -impl Default for AssetCode { - fn default() -> Self { - Self::CreditAlphanum4(AssetCode4::default()) - } -} - -impl AssetCode { - const _VARIANTS: &[AssetType] = &[AssetType::CreditAlphanum4, AssetType::CreditAlphanum12]; - pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["CreditAlphanum4", "CreditAlphanum12"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::CreditAlphanum4(_) => "CreditAlphanum4", - Self::CreditAlphanum12(_) => "CreditAlphanum12", - } - } - - #[must_use] - pub const fn discriminant(&self) -> AssetType { - #[allow(clippy::match_same_arms)] - match self { - Self::CreditAlphanum4(_) => AssetType::CreditAlphanum4, - Self::CreditAlphanum12(_) => AssetType::CreditAlphanum12, - } - } - - #[must_use] - pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for AssetCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for AssetCode { - #[must_use] - fn discriminant(&self) -> AssetType { - Self::discriminant(self) - } -} - -impl Variants for AssetCode { - fn variants() -> slice::Iter<'static, AssetType> { - Self::VARIANTS.iter() - } -} - -impl Union for AssetCode {} - -impl ReadXdr for AssetCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: AssetType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - AssetType::CreditAlphanum4 => Self::CreditAlphanum4(AssetCode4::read_xdr(r)?), - AssetType::CreditAlphanum12 => Self::CreditAlphanum12(AssetCode12::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for AssetCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::CreditAlphanum4(v) => v.write_xdr(w)?, - Self::CreditAlphanum12(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// AlphaNum4 is an XDR Struct defined as: -/// -/// ```text -/// struct AlphaNum4 -/// { -/// AssetCode4 assetCode; -/// AccountID issuer; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct AlphaNum4 { - pub asset_code: AssetCode4, - pub issuer: AccountId, -} - -impl ReadXdr for AlphaNum4 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - asset_code: AssetCode4::read_xdr(r)?, - issuer: AccountId::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for AlphaNum4 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.asset_code.write_xdr(w)?; - self.issuer.write_xdr(w)?; - Ok(()) - }) - } -} - -/// AlphaNum12 is an XDR Struct defined as: -/// -/// ```text -/// struct AlphaNum12 -/// { -/// AssetCode12 assetCode; -/// AccountID issuer; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct AlphaNum12 { - pub asset_code: AssetCode12, - pub issuer: AccountId, -} - -impl ReadXdr for AlphaNum12 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - asset_code: AssetCode12::read_xdr(r)?, - issuer: AccountId::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for AlphaNum12 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.asset_code.write_xdr(w)?; - self.issuer.write_xdr(w)?; - Ok(()) - }) - } -} - -/// Asset is an XDR Union defined as: -/// -/// ```text -/// union Asset switch (AssetType type) -/// { -/// case ASSET_TYPE_NATIVE: // Not credit -/// void; -/// -/// case ASSET_TYPE_CREDIT_ALPHANUM4: -/// AlphaNum4 alphaNum4; -/// -/// case ASSET_TYPE_CREDIT_ALPHANUM12: -/// AlphaNum12 alphaNum12; -/// -/// // add other asset types here in the future -/// }; -/// ``` -/// -// union with discriminant AssetType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum Asset { - Native, - CreditAlphanum4(AlphaNum4), - CreditAlphanum12(AlphaNum12), -} - -#[cfg(feature = "alloc")] -impl Default for Asset { - fn default() -> Self { - Self::Native - } -} - -impl Asset { - const _VARIANTS: &[AssetType] = &[ - AssetType::Native, - AssetType::CreditAlphanum4, - AssetType::CreditAlphanum12, - ]; - pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Native => "Native", - Self::CreditAlphanum4(_) => "CreditAlphanum4", - Self::CreditAlphanum12(_) => "CreditAlphanum12", - } - } - - #[must_use] - pub const fn discriminant(&self) -> AssetType { - #[allow(clippy::match_same_arms)] - match self { - Self::Native => AssetType::Native, - Self::CreditAlphanum4(_) => AssetType::CreditAlphanum4, - Self::CreditAlphanum12(_) => AssetType::CreditAlphanum12, - } - } - - #[must_use] - pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for Asset { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for Asset { - #[must_use] - fn discriminant(&self) -> AssetType { - Self::discriminant(self) - } -} - -impl Variants for Asset { - fn variants() -> slice::Iter<'static, AssetType> { - Self::VARIANTS.iter() - } -} - -impl Union for Asset {} - -impl ReadXdr for Asset { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: AssetType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - AssetType::Native => Self::Native, - AssetType::CreditAlphanum4 => Self::CreditAlphanum4(AlphaNum4::read_xdr(r)?), - AssetType::CreditAlphanum12 => Self::CreditAlphanum12(AlphaNum12::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for Asset { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Native => ().write_xdr(w)?, - Self::CreditAlphanum4(v) => v.write_xdr(w)?, - Self::CreditAlphanum12(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// Price is an XDR Struct defined as: -/// -/// ```text -/// struct Price -/// { -/// int32 n; // numerator -/// int32 d; // denominator -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct Price { - pub n: i32, - pub d: i32, -} - -impl ReadXdr for Price { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - n: i32::read_xdr(r)?, - d: i32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for Price { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.n.write_xdr(w)?; - self.d.write_xdr(w)?; - Ok(()) - }) - } -} - -/// Liabilities is an XDR Struct defined as: -/// -/// ```text -/// struct Liabilities -/// { -/// int64 buying; -/// int64 selling; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct Liabilities { - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub buying: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub selling: i64, -} - -impl ReadXdr for Liabilities { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - buying: i64::read_xdr(r)?, - selling: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for Liabilities { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.buying.write_xdr(w)?; - self.selling.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ThresholdIndexes is an XDR Enum defined as: -/// -/// ```text -/// enum ThresholdIndexes -/// { -/// THRESHOLD_MASTER_WEIGHT = 0, -/// THRESHOLD_LOW = 1, -/// THRESHOLD_MED = 2, -/// THRESHOLD_HIGH = 3 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ThresholdIndexes { - #[cfg_attr(feature = "alloc", default)] - MasterWeight = 0, - Low = 1, - Med = 2, - High = 3, -} - -impl ThresholdIndexes { - const _VARIANTS: &[ThresholdIndexes] = &[ - ThresholdIndexes::MasterWeight, - ThresholdIndexes::Low, - ThresholdIndexes::Med, - ThresholdIndexes::High, - ]; - pub const VARIANTS: [ThresholdIndexes; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["MasterWeight", "Low", "Med", "High"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::MasterWeight => "MasterWeight", - Self::Low => "Low", - Self::Med => "Med", - Self::High => "High", - } - } - - #[must_use] - pub const fn variants() -> [ThresholdIndexes; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ThresholdIndexes { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ThresholdIndexes { - fn variants() -> slice::Iter<'static, ThresholdIndexes> { - Self::VARIANTS.iter() - } -} - -impl Enum for ThresholdIndexes {} - -impl fmt::Display for ThresholdIndexes { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ThresholdIndexes { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ThresholdIndexes::MasterWeight, - 1 => ThresholdIndexes::Low, - 2 => ThresholdIndexes::Med, - 3 => ThresholdIndexes::High, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ThresholdIndexes) -> Self { - e as Self - } -} - -impl ReadXdr for ThresholdIndexes { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ThresholdIndexes { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// LedgerEntryType is an XDR Enum defined as: -/// -/// ```text -/// enum LedgerEntryType -/// { -/// ACCOUNT = 0, -/// TRUSTLINE = 1, -/// OFFER = 2, -/// DATA = 3, -/// CLAIMABLE_BALANCE = 4, -/// LIQUIDITY_POOL = 5, -/// CONTRACT_DATA = 6, -/// CONTRACT_CODE = 7, -/// CONFIG_SETTING = 8, -/// TTL = 9 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum LedgerEntryType { - #[cfg_attr(feature = "alloc", default)] - Account = 0, - Trustline = 1, - Offer = 2, - Data = 3, - ClaimableBalance = 4, - LiquidityPool = 5, - ContractData = 6, - ContractCode = 7, - ConfigSetting = 8, - Ttl = 9, -} - -impl LedgerEntryType { - const _VARIANTS: &[LedgerEntryType] = &[ - LedgerEntryType::Account, - LedgerEntryType::Trustline, - LedgerEntryType::Offer, - LedgerEntryType::Data, - LedgerEntryType::ClaimableBalance, - LedgerEntryType::LiquidityPool, - LedgerEntryType::ContractData, - LedgerEntryType::ContractCode, - LedgerEntryType::ConfigSetting, - LedgerEntryType::Ttl, - ]; - pub const VARIANTS: [LedgerEntryType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Account", - "Trustline", - "Offer", - "Data", - "ClaimableBalance", - "LiquidityPool", - "ContractData", - "ContractCode", - "ConfigSetting", - "Ttl", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Account => "Account", - Self::Trustline => "Trustline", - Self::Offer => "Offer", - Self::Data => "Data", - Self::ClaimableBalance => "ClaimableBalance", - Self::LiquidityPool => "LiquidityPool", - Self::ContractData => "ContractData", - Self::ContractCode => "ContractCode", - Self::ConfigSetting => "ConfigSetting", - Self::Ttl => "Ttl", - } - } - - #[must_use] - pub const fn variants() -> [LedgerEntryType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerEntryType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for LedgerEntryType { - fn variants() -> slice::Iter<'static, LedgerEntryType> { - Self::VARIANTS.iter() - } -} - -impl Enum for LedgerEntryType {} - -impl fmt::Display for LedgerEntryType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for LedgerEntryType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => LedgerEntryType::Account, - 1 => LedgerEntryType::Trustline, - 2 => LedgerEntryType::Offer, - 3 => LedgerEntryType::Data, - 4 => LedgerEntryType::ClaimableBalance, - 5 => LedgerEntryType::LiquidityPool, - 6 => LedgerEntryType::ContractData, - 7 => LedgerEntryType::ContractCode, - 8 => LedgerEntryType::ConfigSetting, - 9 => LedgerEntryType::Ttl, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: LedgerEntryType) -> Self { - e as Self - } -} - -impl ReadXdr for LedgerEntryType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerEntryType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// Signer is an XDR Struct defined as: -/// -/// ```text -/// struct Signer -/// { -/// SignerKey key; -/// uint32 weight; // really only need 1 byte -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct Signer { - pub key: SignerKey, - pub weight: u32, -} - -impl ReadXdr for Signer { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - key: SignerKey::read_xdr(r)?, - weight: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for Signer { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.key.write_xdr(w)?; - self.weight.write_xdr(w)?; - Ok(()) - }) - } -} - -/// AccountFlags is an XDR Enum defined as: -/// -/// ```text -/// enum AccountFlags -/// { // masks for each flag -/// -/// // Flags set on issuer accounts -/// // TrustLines are created with authorized set to "false" requiring -/// // the issuer to set it for each TrustLine -/// AUTH_REQUIRED_FLAG = 0x1, -/// // If set, the authorized flag in TrustLines can be cleared -/// // otherwise, authorization cannot be revoked -/// AUTH_REVOCABLE_FLAG = 0x2, -/// // Once set, causes all AUTH_* flags to be read-only -/// AUTH_IMMUTABLE_FLAG = 0x4, -/// // Trustlines are created with clawback enabled set to "true", -/// // and claimable balances created from those trustlines are created -/// // with clawback enabled set to "true" -/// AUTH_CLAWBACK_ENABLED_FLAG = 0x8 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum AccountFlags { - #[cfg_attr(feature = "alloc", default)] - RequiredFlag = 1, - RevocableFlag = 2, - ImmutableFlag = 4, - ClawbackEnabledFlag = 8, -} - -impl AccountFlags { - const _VARIANTS: &[AccountFlags] = &[ - AccountFlags::RequiredFlag, - AccountFlags::RevocableFlag, - AccountFlags::ImmutableFlag, - AccountFlags::ClawbackEnabledFlag, - ]; - pub const VARIANTS: [AccountFlags; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "RequiredFlag", - "RevocableFlag", - "ImmutableFlag", - "ClawbackEnabledFlag", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::RequiredFlag => "RequiredFlag", - Self::RevocableFlag => "RevocableFlag", - Self::ImmutableFlag => "ImmutableFlag", - Self::ClawbackEnabledFlag => "ClawbackEnabledFlag", - } - } - - #[must_use] - pub const fn variants() -> [AccountFlags; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for AccountFlags { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for AccountFlags { - fn variants() -> slice::Iter<'static, AccountFlags> { - Self::VARIANTS.iter() - } -} - -impl Enum for AccountFlags {} - -impl fmt::Display for AccountFlags { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for AccountFlags { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 1 => AccountFlags::RequiredFlag, - 2 => AccountFlags::RevocableFlag, - 4 => AccountFlags::ImmutableFlag, - 8 => AccountFlags::ClawbackEnabledFlag, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: AccountFlags) -> Self { - e as Self - } -} - -impl ReadXdr for AccountFlags { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for AccountFlags { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// MaskAccountFlags is an XDR Const defined as: -/// -/// ```text -/// const MASK_ACCOUNT_FLAGS = 0x7; -/// ``` -/// -pub const MASK_ACCOUNT_FLAGS: u64 = 0x7; - -/// MaskAccountFlagsV17 is an XDR Const defined as: -/// -/// ```text -/// const MASK_ACCOUNT_FLAGS_V17 = 0xF; -/// ``` -/// -pub const MASK_ACCOUNT_FLAGS_V17: u64 = 0xF; - -/// MaxSigners is an XDR Const defined as: -/// -/// ```text -/// const MAX_SIGNERS = 20; -/// ``` -/// -pub const MAX_SIGNERS: u64 = 20; - -/// SponsorshipDescriptor is an XDR Typedef defined as: -/// -/// ```text -/// typedef AccountID* SponsorshipDescriptor; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct SponsorshipDescriptor(pub Option); - -impl From for Option { - #[must_use] - fn from(x: SponsorshipDescriptor) -> Self { - x.0 - } -} - -impl From> for SponsorshipDescriptor { - #[must_use] - fn from(x: Option) -> Self { - SponsorshipDescriptor(x) - } -} - -impl AsRef> for SponsorshipDescriptor { - #[must_use] - fn as_ref(&self) -> &Option { - &self.0 - } -} - -impl ReadXdr for SponsorshipDescriptor { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = Option::::read_xdr(r)?; - let v = SponsorshipDescriptor(i); - Ok(v) - }) - } -} - -impl WriteXdr for SponsorshipDescriptor { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -/// AccountEntryExtensionV3 is an XDR Struct defined as: -/// -/// ```text -/// struct AccountEntryExtensionV3 -/// { -/// // We can use this to add more fields, or because it is first, to -/// // change AccountEntryExtensionV3 into a union. -/// ExtensionPoint ext; -/// -/// // Ledger number at which `seqNum` took on its present value. -/// uint32 seqLedger; -/// -/// // Time at which `seqNum` took on its present value. -/// TimePoint seqTime; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct AccountEntryExtensionV3 { - pub ext: ExtensionPoint, - pub seq_ledger: u32, - pub seq_time: TimePoint, -} - -impl ReadXdr for AccountEntryExtensionV3 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, - seq_ledger: u32::read_xdr(r)?, - seq_time: TimePoint::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for AccountEntryExtensionV3 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.seq_ledger.write_xdr(w)?; - self.seq_time.write_xdr(w)?; - Ok(()) - }) - } -} - -/// AccountEntryExtensionV2Ext is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 3: -/// AccountEntryExtensionV3 v3; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum AccountEntryExtensionV2Ext { - V0, - V3(AccountEntryExtensionV3), -} - -#[cfg(feature = "alloc")] -impl Default for AccountEntryExtensionV2Ext { - fn default() -> Self { - Self::V0 - } -} - -impl AccountEntryExtensionV2Ext { - const _VARIANTS: &[i32] = &[0, 3]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V3"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V3(_) => "V3", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V3(_) => 3, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for AccountEntryExtensionV2Ext { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for AccountEntryExtensionV2Ext { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for AccountEntryExtensionV2Ext { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for AccountEntryExtensionV2Ext {} - -impl ReadXdr for AccountEntryExtensionV2Ext { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 3 => Self::V3(AccountEntryExtensionV3::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for AccountEntryExtensionV2Ext { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V3(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// AccountEntryExtensionV2 is an XDR Struct defined as: -/// -/// ```text -/// struct AccountEntryExtensionV2 -/// { -/// uint32 numSponsored; -/// uint32 numSponsoring; -/// SponsorshipDescriptor signerSponsoringIDs; -/// -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 3: -/// AccountEntryExtensionV3 v3; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct AccountEntryExtensionV2 { - pub num_sponsored: u32, - pub num_sponsoring: u32, - pub signer_sponsoring_i_ds: VecM, - pub ext: AccountEntryExtensionV2Ext, -} - -impl ReadXdr for AccountEntryExtensionV2 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - num_sponsored: u32::read_xdr(r)?, - num_sponsoring: u32::read_xdr(r)?, - signer_sponsoring_i_ds: VecM::::read_xdr(r)?, - ext: AccountEntryExtensionV2Ext::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for AccountEntryExtensionV2 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.num_sponsored.write_xdr(w)?; - self.num_sponsoring.write_xdr(w)?; - self.signer_sponsoring_i_ds.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// AccountEntryExtensionV1Ext is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 2: -/// AccountEntryExtensionV2 v2; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum AccountEntryExtensionV1Ext { - V0, - V2(AccountEntryExtensionV2), -} - -#[cfg(feature = "alloc")] -impl Default for AccountEntryExtensionV1Ext { - fn default() -> Self { - Self::V0 - } -} - -impl AccountEntryExtensionV1Ext { - const _VARIANTS: &[i32] = &[0, 2]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V2"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V2(_) => "V2", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V2(_) => 2, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for AccountEntryExtensionV1Ext { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for AccountEntryExtensionV1Ext { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for AccountEntryExtensionV1Ext { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for AccountEntryExtensionV1Ext {} - -impl ReadXdr for AccountEntryExtensionV1Ext { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 2 => Self::V2(AccountEntryExtensionV2::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for AccountEntryExtensionV1Ext { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V2(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// AccountEntryExtensionV1 is an XDR Struct defined as: -/// -/// ```text -/// struct AccountEntryExtensionV1 -/// { -/// Liabilities liabilities; -/// -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 2: -/// AccountEntryExtensionV2 v2; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct AccountEntryExtensionV1 { - pub liabilities: Liabilities, - pub ext: AccountEntryExtensionV1Ext, -} - -impl ReadXdr for AccountEntryExtensionV1 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - liabilities: Liabilities::read_xdr(r)?, - ext: AccountEntryExtensionV1Ext::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for AccountEntryExtensionV1 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.liabilities.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// AccountEntryExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// AccountEntryExtensionV1 v1; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum AccountEntryExt { - V0, - V1(AccountEntryExtensionV1), -} - -#[cfg(feature = "alloc")] -impl Default for AccountEntryExt { - fn default() -> Self { - Self::V0 - } -} - -impl AccountEntryExt { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for AccountEntryExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for AccountEntryExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for AccountEntryExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for AccountEntryExt {} - -impl ReadXdr for AccountEntryExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 1 => Self::V1(AccountEntryExtensionV1::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for AccountEntryExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// AccountEntry is an XDR Struct defined as: -/// -/// ```text -/// struct AccountEntry -/// { -/// AccountID accountID; // master public key for this account -/// int64 balance; // in stroops -/// SequenceNumber seqNum; // last sequence number used for this account -/// uint32 numSubEntries; // number of sub-entries this account has -/// // drives the reserve -/// AccountID* inflationDest; // Account to vote for during inflation -/// uint32 flags; // see AccountFlags -/// -/// string32 homeDomain; // can be used for reverse federation and memo lookup -/// -/// // fields used for signatures -/// // thresholds stores unsigned bytes: [weight of master|low|medium|high] -/// Thresholds thresholds; -/// -/// Signer signers; // possible signers for this account -/// -/// // reserved for future use -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// AccountEntryExtensionV1 v1; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct AccountEntry { - pub account_id: AccountId, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub balance: i64, - pub seq_num: SequenceNumber, - pub num_sub_entries: u32, - pub inflation_dest: Option, - pub flags: u32, - pub home_domain: String32, - pub thresholds: Thresholds, - pub signers: VecM, - pub ext: AccountEntryExt, -} - -impl ReadXdr for AccountEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - account_id: AccountId::read_xdr(r)?, - balance: i64::read_xdr(r)?, - seq_num: SequenceNumber::read_xdr(r)?, - num_sub_entries: u32::read_xdr(r)?, - inflation_dest: Option::::read_xdr(r)?, - flags: u32::read_xdr(r)?, - home_domain: String32::read_xdr(r)?, - thresholds: Thresholds::read_xdr(r)?, - signers: VecM::::read_xdr(r)?, - ext: AccountEntryExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for AccountEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.account_id.write_xdr(w)?; - self.balance.write_xdr(w)?; - self.seq_num.write_xdr(w)?; - self.num_sub_entries.write_xdr(w)?; - self.inflation_dest.write_xdr(w)?; - self.flags.write_xdr(w)?; - self.home_domain.write_xdr(w)?; - self.thresholds.write_xdr(w)?; - self.signers.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TrustLineFlags is an XDR Enum defined as: -/// -/// ```text -/// enum TrustLineFlags -/// { -/// // issuer has authorized account to perform transactions with its credit -/// AUTHORIZED_FLAG = 1, -/// // issuer has authorized account to maintain and reduce liabilities for its -/// // credit -/// AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG = 2, -/// // issuer has specified that it may clawback its credit, and that claimable -/// // balances created with its credit may also be clawed back -/// TRUSTLINE_CLAWBACK_ENABLED_FLAG = 4 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum TrustLineFlags { - #[cfg_attr(feature = "alloc", default)] - AuthorizedFlag = 1, - AuthorizedToMaintainLiabilitiesFlag = 2, - TrustlineClawbackEnabledFlag = 4, -} - -impl TrustLineFlags { - const _VARIANTS: &[TrustLineFlags] = &[ - TrustLineFlags::AuthorizedFlag, - TrustLineFlags::AuthorizedToMaintainLiabilitiesFlag, - TrustLineFlags::TrustlineClawbackEnabledFlag, - ]; - pub const VARIANTS: [TrustLineFlags; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "AuthorizedFlag", - "AuthorizedToMaintainLiabilitiesFlag", - "TrustlineClawbackEnabledFlag", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::AuthorizedFlag => "AuthorizedFlag", - Self::AuthorizedToMaintainLiabilitiesFlag => "AuthorizedToMaintainLiabilitiesFlag", - Self::TrustlineClawbackEnabledFlag => "TrustlineClawbackEnabledFlag", - } - } - - #[must_use] - pub const fn variants() -> [TrustLineFlags; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TrustLineFlags { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for TrustLineFlags { - fn variants() -> slice::Iter<'static, TrustLineFlags> { - Self::VARIANTS.iter() - } -} - -impl Enum for TrustLineFlags {} - -impl fmt::Display for TrustLineFlags { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for TrustLineFlags { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 1 => TrustLineFlags::AuthorizedFlag, - 2 => TrustLineFlags::AuthorizedToMaintainLiabilitiesFlag, - 4 => TrustLineFlags::TrustlineClawbackEnabledFlag, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: TrustLineFlags) -> Self { - e as Self - } -} - -impl ReadXdr for TrustLineFlags { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for TrustLineFlags { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// MaskTrustlineFlags is an XDR Const defined as: -/// -/// ```text -/// const MASK_TRUSTLINE_FLAGS = 1; -/// ``` -/// -pub const MASK_TRUSTLINE_FLAGS: u64 = 1; - -/// MaskTrustlineFlagsV13 is an XDR Const defined as: -/// -/// ```text -/// const MASK_TRUSTLINE_FLAGS_V13 = 3; -/// ``` -/// -pub const MASK_TRUSTLINE_FLAGS_V13: u64 = 3; - -/// MaskTrustlineFlagsV17 is an XDR Const defined as: -/// -/// ```text -/// const MASK_TRUSTLINE_FLAGS_V17 = 7; -/// ``` -/// -pub const MASK_TRUSTLINE_FLAGS_V17: u64 = 7; - -/// LiquidityPoolType is an XDR Enum defined as: -/// -/// ```text -/// enum LiquidityPoolType -/// { -/// LIQUIDITY_POOL_CONSTANT_PRODUCT = 0 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum LiquidityPoolType { - #[cfg_attr(feature = "alloc", default)] - LiquidityPoolConstantProduct = 0, -} - -impl LiquidityPoolType { - const _VARIANTS: &[LiquidityPoolType] = &[LiquidityPoolType::LiquidityPoolConstantProduct]; - pub const VARIANTS: [LiquidityPoolType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::LiquidityPoolConstantProduct => "LiquidityPoolConstantProduct", - } - } - - #[must_use] - pub const fn variants() -> [LiquidityPoolType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LiquidityPoolType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for LiquidityPoolType { - fn variants() -> slice::Iter<'static, LiquidityPoolType> { - Self::VARIANTS.iter() - } -} - -impl Enum for LiquidityPoolType {} - -impl fmt::Display for LiquidityPoolType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for LiquidityPoolType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => LiquidityPoolType::LiquidityPoolConstantProduct, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: LiquidityPoolType) -> Self { - e as Self - } -} - -impl ReadXdr for LiquidityPoolType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for LiquidityPoolType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// TrustLineAsset is an XDR Union defined as: -/// -/// ```text -/// union TrustLineAsset switch (AssetType type) -/// { -/// case ASSET_TYPE_NATIVE: // Not credit -/// void; -/// -/// case ASSET_TYPE_CREDIT_ALPHANUM4: -/// AlphaNum4 alphaNum4; -/// -/// case ASSET_TYPE_CREDIT_ALPHANUM12: -/// AlphaNum12 alphaNum12; -/// -/// case ASSET_TYPE_POOL_SHARE: -/// PoolID liquidityPoolID; -/// -/// // add other asset types here in the future -/// }; -/// ``` -/// -// union with discriminant AssetType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TrustLineAsset { - Native, - CreditAlphanum4(AlphaNum4), - CreditAlphanum12(AlphaNum12), - PoolShare(PoolId), -} - -#[cfg(feature = "alloc")] -impl Default for TrustLineAsset { - fn default() -> Self { - Self::Native - } -} - -impl TrustLineAsset { - const _VARIANTS: &[AssetType] = &[ - AssetType::Native, - AssetType::CreditAlphanum4, - AssetType::CreditAlphanum12, - AssetType::PoolShare, - ]; - pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Native => "Native", - Self::CreditAlphanum4(_) => "CreditAlphanum4", - Self::CreditAlphanum12(_) => "CreditAlphanum12", - Self::PoolShare(_) => "PoolShare", - } - } - - #[must_use] - pub const fn discriminant(&self) -> AssetType { - #[allow(clippy::match_same_arms)] - match self { - Self::Native => AssetType::Native, - Self::CreditAlphanum4(_) => AssetType::CreditAlphanum4, - Self::CreditAlphanum12(_) => AssetType::CreditAlphanum12, - Self::PoolShare(_) => AssetType::PoolShare, - } - } - - #[must_use] - pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TrustLineAsset { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TrustLineAsset { - #[must_use] - fn discriminant(&self) -> AssetType { - Self::discriminant(self) - } -} - -impl Variants for TrustLineAsset { - fn variants() -> slice::Iter<'static, AssetType> { - Self::VARIANTS.iter() - } -} - -impl Union for TrustLineAsset {} - -impl ReadXdr for TrustLineAsset { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: AssetType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - AssetType::Native => Self::Native, - AssetType::CreditAlphanum4 => Self::CreditAlphanum4(AlphaNum4::read_xdr(r)?), - AssetType::CreditAlphanum12 => Self::CreditAlphanum12(AlphaNum12::read_xdr(r)?), - AssetType::PoolShare => Self::PoolShare(PoolId::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TrustLineAsset { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Native => ().write_xdr(w)?, - Self::CreditAlphanum4(v) => v.write_xdr(w)?, - Self::CreditAlphanum12(v) => v.write_xdr(w)?, - Self::PoolShare(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TrustLineEntryExtensionV2Ext { - V0, -} - -#[cfg(feature = "alloc")] -impl Default for TrustLineEntryExtensionV2Ext { - fn default() -> Self { - Self::V0 - } -} - -impl TrustLineEntryExtensionV2Ext { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TrustLineEntryExtensionV2Ext { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TrustLineEntryExtensionV2Ext { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for TrustLineEntryExtensionV2Ext { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for TrustLineEntryExtensionV2Ext {} - -impl ReadXdr for TrustLineEntryExtensionV2Ext { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TrustLineEntryExtensionV2Ext { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TrustLineEntryExtensionV2 is an XDR Struct defined as: -/// -/// ```text -/// struct TrustLineEntryExtensionV2 -/// { -/// int32 liquidityPoolUseCount; -/// -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TrustLineEntryExtensionV2 { - pub liquidity_pool_use_count: i32, - pub ext: TrustLineEntryExtensionV2Ext, -} - -impl ReadXdr for TrustLineEntryExtensionV2 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - liquidity_pool_use_count: i32::read_xdr(r)?, - ext: TrustLineEntryExtensionV2Ext::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TrustLineEntryExtensionV2 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.liquidity_pool_use_count.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TrustLineEntryV1Ext is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 2: -/// TrustLineEntryExtensionV2 v2; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TrustLineEntryV1Ext { - V0, - V2(TrustLineEntryExtensionV2), -} - -#[cfg(feature = "alloc")] -impl Default for TrustLineEntryV1Ext { - fn default() -> Self { - Self::V0 - } -} - -impl TrustLineEntryV1Ext { - const _VARIANTS: &[i32] = &[0, 2]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V2"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V2(_) => "V2", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V2(_) => 2, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TrustLineEntryV1Ext { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TrustLineEntryV1Ext { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for TrustLineEntryV1Ext { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for TrustLineEntryV1Ext {} - -impl ReadXdr for TrustLineEntryV1Ext { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 2 => Self::V2(TrustLineEntryExtensionV2::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TrustLineEntryV1Ext { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V2(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TrustLineEntryV1 is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// Liabilities liabilities; -/// -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 2: -/// TrustLineEntryExtensionV2 v2; -/// } -/// ext; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TrustLineEntryV1 { - pub liabilities: Liabilities, - pub ext: TrustLineEntryV1Ext, -} - -impl ReadXdr for TrustLineEntryV1 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - liabilities: Liabilities::read_xdr(r)?, - ext: TrustLineEntryV1Ext::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TrustLineEntryV1 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.liabilities.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TrustLineEntryExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// struct -/// { -/// Liabilities liabilities; -/// -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 2: -/// TrustLineEntryExtensionV2 v2; -/// } -/// ext; -/// } v1; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TrustLineEntryExt { - V0, - V1(TrustLineEntryV1), -} - -#[cfg(feature = "alloc")] -impl Default for TrustLineEntryExt { - fn default() -> Self { - Self::V0 - } -} - -impl TrustLineEntryExt { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TrustLineEntryExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TrustLineEntryExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for TrustLineEntryExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for TrustLineEntryExt {} - -impl ReadXdr for TrustLineEntryExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 1 => Self::V1(TrustLineEntryV1::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TrustLineEntryExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TrustLineEntry is an XDR Struct defined as: -/// -/// ```text -/// struct TrustLineEntry -/// { -/// AccountID accountID; // account this trustline belongs to -/// TrustLineAsset asset; // type of asset (with issuer) -/// int64 balance; // how much of this asset the user has. -/// // Asset defines the unit for this; -/// -/// int64 limit; // balance cannot be above this -/// uint32 flags; // see TrustLineFlags -/// -/// // reserved for future use -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// struct -/// { -/// Liabilities liabilities; -/// -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 2: -/// TrustLineEntryExtensionV2 v2; -/// } -/// ext; -/// } v1; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TrustLineEntry { - pub account_id: AccountId, - pub asset: TrustLineAsset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub balance: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub limit: i64, - pub flags: u32, - pub ext: TrustLineEntryExt, -} - -impl ReadXdr for TrustLineEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - account_id: AccountId::read_xdr(r)?, - asset: TrustLineAsset::read_xdr(r)?, - balance: i64::read_xdr(r)?, - limit: i64::read_xdr(r)?, - flags: u32::read_xdr(r)?, - ext: TrustLineEntryExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TrustLineEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.account_id.write_xdr(w)?; - self.asset.write_xdr(w)?; - self.balance.write_xdr(w)?; - self.limit.write_xdr(w)?; - self.flags.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// OfferEntryFlags is an XDR Enum defined as: -/// -/// ```text -/// enum OfferEntryFlags -/// { -/// // an offer with this flag will not act on and take a reverse offer of equal -/// // price -/// PASSIVE_FLAG = 1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum OfferEntryFlags { - #[cfg_attr(feature = "alloc", default)] - PassiveFlag = 1, -} - -impl OfferEntryFlags { - const _VARIANTS: &[OfferEntryFlags] = &[OfferEntryFlags::PassiveFlag]; - pub const VARIANTS: [OfferEntryFlags; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["PassiveFlag"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::PassiveFlag => "PassiveFlag", - } - } - - #[must_use] - pub const fn variants() -> [OfferEntryFlags; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for OfferEntryFlags { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for OfferEntryFlags { - fn variants() -> slice::Iter<'static, OfferEntryFlags> { - Self::VARIANTS.iter() - } -} - -impl Enum for OfferEntryFlags {} - -impl fmt::Display for OfferEntryFlags { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for OfferEntryFlags { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 1 => OfferEntryFlags::PassiveFlag, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: OfferEntryFlags) -> Self { - e as Self - } -} - -impl ReadXdr for OfferEntryFlags { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for OfferEntryFlags { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// MaskOfferentryFlags is an XDR Const defined as: -/// -/// ```text -/// const MASK_OFFERENTRY_FLAGS = 1; -/// ``` -/// -pub const MASK_OFFERENTRY_FLAGS: u64 = 1; - -/// OfferEntryExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum OfferEntryExt { - V0, -} - -#[cfg(feature = "alloc")] -impl Default for OfferEntryExt { - fn default() -> Self { - Self::V0 - } -} - -impl OfferEntryExt { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for OfferEntryExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for OfferEntryExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for OfferEntryExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for OfferEntryExt {} - -impl ReadXdr for OfferEntryExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for OfferEntryExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// OfferEntry is an XDR Struct defined as: -/// -/// ```text -/// struct OfferEntry -/// { -/// AccountID sellerID; -/// int64 offerID; -/// Asset selling; // A -/// Asset buying; // B -/// int64 amount; // amount of A -/// -/// /* price for this offer: -/// price of A in terms of B -/// price=AmountB/AmountA=priceNumerator/priceDenominator -/// price is after fees -/// */ -/// Price price; -/// uint32 flags; // see OfferEntryFlags -/// -/// // reserved for future use -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct OfferEntry { - pub seller_id: AccountId, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub offer_id: i64, - pub selling: Asset, - pub buying: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount: i64, - pub price: Price, - pub flags: u32, - pub ext: OfferEntryExt, -} - -impl ReadXdr for OfferEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - seller_id: AccountId::read_xdr(r)?, - offer_id: i64::read_xdr(r)?, - selling: Asset::read_xdr(r)?, - buying: Asset::read_xdr(r)?, - amount: i64::read_xdr(r)?, - price: Price::read_xdr(r)?, - flags: u32::read_xdr(r)?, - ext: OfferEntryExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for OfferEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.seller_id.write_xdr(w)?; - self.offer_id.write_xdr(w)?; - self.selling.write_xdr(w)?; - self.buying.write_xdr(w)?; - self.amount.write_xdr(w)?; - self.price.write_xdr(w)?; - self.flags.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// DataEntryExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum DataEntryExt { - V0, -} - -#[cfg(feature = "alloc")] -impl Default for DataEntryExt { - fn default() -> Self { - Self::V0 - } -} - -impl DataEntryExt { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for DataEntryExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for DataEntryExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for DataEntryExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for DataEntryExt {} - -impl ReadXdr for DataEntryExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for DataEntryExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// DataEntry is an XDR Struct defined as: -/// -/// ```text -/// struct DataEntry -/// { -/// AccountID accountID; // account this data belongs to -/// string64 dataName; -/// DataValue dataValue; -/// -/// // reserved for future use -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct DataEntry { - pub account_id: AccountId, - pub data_name: String64, - pub data_value: DataValue, - pub ext: DataEntryExt, -} - -impl ReadXdr for DataEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - account_id: AccountId::read_xdr(r)?, - data_name: String64::read_xdr(r)?, - data_value: DataValue::read_xdr(r)?, - ext: DataEntryExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for DataEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.account_id.write_xdr(w)?; - self.data_name.write_xdr(w)?; - self.data_value.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ClaimPredicateType is an XDR Enum defined as: -/// -/// ```text -/// enum ClaimPredicateType -/// { -/// CLAIM_PREDICATE_UNCONDITIONAL = 0, -/// CLAIM_PREDICATE_AND = 1, -/// CLAIM_PREDICATE_OR = 2, -/// CLAIM_PREDICATE_NOT = 3, -/// CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME = 4, -/// CLAIM_PREDICATE_BEFORE_RELATIVE_TIME = 5 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ClaimPredicateType { - #[cfg_attr(feature = "alloc", default)] - Unconditional = 0, - And = 1, - Or = 2, - Not = 3, - BeforeAbsoluteTime = 4, - BeforeRelativeTime = 5, -} - -impl ClaimPredicateType { - const _VARIANTS: &[ClaimPredicateType] = &[ - ClaimPredicateType::Unconditional, - ClaimPredicateType::And, - ClaimPredicateType::Or, - ClaimPredicateType::Not, - ClaimPredicateType::BeforeAbsoluteTime, - ClaimPredicateType::BeforeRelativeTime, - ]; - pub const VARIANTS: [ClaimPredicateType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Unconditional", - "And", - "Or", - "Not", - "BeforeAbsoluteTime", - "BeforeRelativeTime", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Unconditional => "Unconditional", - Self::And => "And", - Self::Or => "Or", - Self::Not => "Not", - Self::BeforeAbsoluteTime => "BeforeAbsoluteTime", - Self::BeforeRelativeTime => "BeforeRelativeTime", - } - } - - #[must_use] - pub const fn variants() -> [ClaimPredicateType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClaimPredicateType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ClaimPredicateType { - fn variants() -> slice::Iter<'static, ClaimPredicateType> { - Self::VARIANTS.iter() - } -} - -impl Enum for ClaimPredicateType {} - -impl fmt::Display for ClaimPredicateType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ClaimPredicateType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ClaimPredicateType::Unconditional, - 1 => ClaimPredicateType::And, - 2 => ClaimPredicateType::Or, - 3 => ClaimPredicateType::Not, - 4 => ClaimPredicateType::BeforeAbsoluteTime, - 5 => ClaimPredicateType::BeforeRelativeTime, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ClaimPredicateType) -> Self { - e as Self - } -} - -impl ReadXdr for ClaimPredicateType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ClaimPredicateType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ClaimPredicate is an XDR Union defined as: -/// -/// ```text -/// union ClaimPredicate switch (ClaimPredicateType type) -/// { -/// case CLAIM_PREDICATE_UNCONDITIONAL: -/// void; -/// case CLAIM_PREDICATE_AND: -/// ClaimPredicate andPredicates<2>; -/// case CLAIM_PREDICATE_OR: -/// ClaimPredicate orPredicates<2>; -/// case CLAIM_PREDICATE_NOT: -/// ClaimPredicate* notPredicate; -/// case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: -/// int64 absBefore; // Predicate will be true if closeTime < absBefore -/// case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: -/// int64 relBefore; // Seconds since closeTime of the ledger in which the -/// // ClaimableBalanceEntry was created -/// }; -/// ``` -/// -// union with discriminant ClaimPredicateType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ClaimPredicate { - Unconditional, - And(VecM), - Or(VecM), - Not(Option>), - BeforeAbsoluteTime( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - i64, - ), - BeforeRelativeTime( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - i64, - ), -} - -#[cfg(feature = "alloc")] -impl Default for ClaimPredicate { - fn default() -> Self { - Self::Unconditional - } -} - -impl ClaimPredicate { - const _VARIANTS: &[ClaimPredicateType] = &[ - ClaimPredicateType::Unconditional, - ClaimPredicateType::And, - ClaimPredicateType::Or, - ClaimPredicateType::Not, - ClaimPredicateType::BeforeAbsoluteTime, - ClaimPredicateType::BeforeRelativeTime, - ]; - pub const VARIANTS: [ClaimPredicateType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Unconditional", - "And", - "Or", - "Not", - "BeforeAbsoluteTime", - "BeforeRelativeTime", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Unconditional => "Unconditional", - Self::And(_) => "And", - Self::Or(_) => "Or", - Self::Not(_) => "Not", - Self::BeforeAbsoluteTime(_) => "BeforeAbsoluteTime", - Self::BeforeRelativeTime(_) => "BeforeRelativeTime", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ClaimPredicateType { - #[allow(clippy::match_same_arms)] - match self { - Self::Unconditional => ClaimPredicateType::Unconditional, - Self::And(_) => ClaimPredicateType::And, - Self::Or(_) => ClaimPredicateType::Or, - Self::Not(_) => ClaimPredicateType::Not, - Self::BeforeAbsoluteTime(_) => ClaimPredicateType::BeforeAbsoluteTime, - Self::BeforeRelativeTime(_) => ClaimPredicateType::BeforeRelativeTime, - } - } - - #[must_use] - pub const fn variants() -> [ClaimPredicateType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClaimPredicate { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ClaimPredicate { - #[must_use] - fn discriminant(&self) -> ClaimPredicateType { - Self::discriminant(self) - } -} - -impl Variants for ClaimPredicate { - fn variants() -> slice::Iter<'static, ClaimPredicateType> { - Self::VARIANTS.iter() - } -} - -impl Union for ClaimPredicate {} - -impl ReadXdr for ClaimPredicate { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ClaimPredicateType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ClaimPredicateType::Unconditional => Self::Unconditional, - ClaimPredicateType::And => Self::And(VecM::::read_xdr(r)?), - ClaimPredicateType::Or => Self::Or(VecM::::read_xdr(r)?), - ClaimPredicateType::Not => Self::Not(Option::>::read_xdr(r)?), - ClaimPredicateType::BeforeAbsoluteTime => { - Self::BeforeAbsoluteTime(i64::read_xdr(r)?) - } - ClaimPredicateType::BeforeRelativeTime => { - Self::BeforeRelativeTime(i64::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ClaimPredicate { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Unconditional => ().write_xdr(w)?, - Self::And(v) => v.write_xdr(w)?, - Self::Or(v) => v.write_xdr(w)?, - Self::Not(v) => v.write_xdr(w)?, - Self::BeforeAbsoluteTime(v) => v.write_xdr(w)?, - Self::BeforeRelativeTime(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ClaimantType is an XDR Enum defined as: -/// -/// ```text -/// enum ClaimantType -/// { -/// CLAIMANT_TYPE_V0 = 0 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ClaimantType { - #[cfg_attr(feature = "alloc", default)] - ClaimantTypeV0 = 0, -} - -impl ClaimantType { - const _VARIANTS: &[ClaimantType] = &[ClaimantType::ClaimantTypeV0]; - pub const VARIANTS: [ClaimantType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["ClaimantTypeV0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ClaimantTypeV0 => "ClaimantTypeV0", - } - } - - #[must_use] - pub const fn variants() -> [ClaimantType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClaimantType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ClaimantType { - fn variants() -> slice::Iter<'static, ClaimantType> { - Self::VARIANTS.iter() - } -} - -impl Enum for ClaimantType {} - -impl fmt::Display for ClaimantType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ClaimantType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ClaimantType::ClaimantTypeV0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ClaimantType) -> Self { - e as Self - } -} - -impl ReadXdr for ClaimantType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ClaimantType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ClaimantV0 is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// AccountID destination; // The account that can use this condition -/// ClaimPredicate predicate; // Claimable if predicate is true -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ClaimantV0 { - pub destination: AccountId, - pub predicate: ClaimPredicate, -} - -impl ReadXdr for ClaimantV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - destination: AccountId::read_xdr(r)?, - predicate: ClaimPredicate::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ClaimantV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.destination.write_xdr(w)?; - self.predicate.write_xdr(w)?; - Ok(()) - }) - } -} - -/// Claimant is an XDR Union defined as: -/// -/// ```text -/// union Claimant switch (ClaimantType type) -/// { -/// case CLAIMANT_TYPE_V0: -/// struct -/// { -/// AccountID destination; // The account that can use this condition -/// ClaimPredicate predicate; // Claimable if predicate is true -/// } v0; -/// }; -/// ``` -/// -// union with discriminant ClaimantType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum Claimant { - ClaimantTypeV0(ClaimantV0), -} - -#[cfg(feature = "alloc")] -impl Default for Claimant { - fn default() -> Self { - Self::ClaimantTypeV0(ClaimantV0::default()) - } -} - -impl Claimant { - const _VARIANTS: &[ClaimantType] = &[ClaimantType::ClaimantTypeV0]; - pub const VARIANTS: [ClaimantType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["ClaimantTypeV0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ClaimantTypeV0(_) => "ClaimantTypeV0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ClaimantType { - #[allow(clippy::match_same_arms)] - match self { - Self::ClaimantTypeV0(_) => ClaimantType::ClaimantTypeV0, - } - } - - #[must_use] - pub const fn variants() -> [ClaimantType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for Claimant { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for Claimant { - #[must_use] - fn discriminant(&self) -> ClaimantType { - Self::discriminant(self) - } -} - -impl Variants for Claimant { - fn variants() -> slice::Iter<'static, ClaimantType> { - Self::VARIANTS.iter() - } -} - -impl Union for Claimant {} - -impl ReadXdr for Claimant { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ClaimantType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ClaimantType::ClaimantTypeV0 => Self::ClaimantTypeV0(ClaimantV0::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for Claimant { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::ClaimantTypeV0(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ClaimableBalanceFlags is an XDR Enum defined as: -/// -/// ```text -/// enum ClaimableBalanceFlags -/// { -/// // If set, the issuer account of the asset held by the claimable balance may -/// // clawback the claimable balance -/// CLAIMABLE_BALANCE_CLAWBACK_ENABLED_FLAG = 0x1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ClaimableBalanceFlags { - #[cfg_attr(feature = "alloc", default)] - ClaimableBalanceClawbackEnabledFlag = 1, -} - -impl ClaimableBalanceFlags { - const _VARIANTS: &[ClaimableBalanceFlags] = - &[ClaimableBalanceFlags::ClaimableBalanceClawbackEnabledFlag]; - pub const VARIANTS: [ClaimableBalanceFlags; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["ClaimableBalanceClawbackEnabledFlag"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ClaimableBalanceClawbackEnabledFlag => "ClaimableBalanceClawbackEnabledFlag", - } - } - - #[must_use] - pub const fn variants() -> [ClaimableBalanceFlags; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClaimableBalanceFlags { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ClaimableBalanceFlags { - fn variants() -> slice::Iter<'static, ClaimableBalanceFlags> { - Self::VARIANTS.iter() - } -} - -impl Enum for ClaimableBalanceFlags {} - -impl fmt::Display for ClaimableBalanceFlags { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ClaimableBalanceFlags { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 1 => ClaimableBalanceFlags::ClaimableBalanceClawbackEnabledFlag, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ClaimableBalanceFlags) -> Self { - e as Self - } -} - -impl ReadXdr for ClaimableBalanceFlags { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ClaimableBalanceFlags { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// MaskClaimableBalanceFlags is an XDR Const defined as: -/// -/// ```text -/// const MASK_CLAIMABLE_BALANCE_FLAGS = 0x1; -/// ``` -/// -pub const MASK_CLAIMABLE_BALANCE_FLAGS: u64 = 0x1; - -/// ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ClaimableBalanceEntryExtensionV1Ext { - V0, -} - -#[cfg(feature = "alloc")] -impl Default for ClaimableBalanceEntryExtensionV1Ext { - fn default() -> Self { - Self::V0 - } -} - -impl ClaimableBalanceEntryExtensionV1Ext { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClaimableBalanceEntryExtensionV1Ext { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ClaimableBalanceEntryExtensionV1Ext { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for ClaimableBalanceEntryExtensionV1Ext { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for ClaimableBalanceEntryExtensionV1Ext {} - -impl ReadXdr for ClaimableBalanceEntryExtensionV1Ext { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ClaimableBalanceEntryExtensionV1Ext { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as: -/// -/// ```text -/// struct ClaimableBalanceEntryExtensionV1 -/// { -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ext; -/// -/// uint32 flags; // see ClaimableBalanceFlags -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ClaimableBalanceEntryExtensionV1 { - pub ext: ClaimableBalanceEntryExtensionV1Ext, - pub flags: u32, -} - -impl ReadXdr for ClaimableBalanceEntryExtensionV1 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ClaimableBalanceEntryExtensionV1Ext::read_xdr(r)?, - flags: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ClaimableBalanceEntryExtensionV1 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.flags.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ClaimableBalanceEntryExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// ClaimableBalanceEntryExtensionV1 v1; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ClaimableBalanceEntryExt { - V0, - V1(ClaimableBalanceEntryExtensionV1), -} - -#[cfg(feature = "alloc")] -impl Default for ClaimableBalanceEntryExt { - fn default() -> Self { - Self::V0 - } -} - -impl ClaimableBalanceEntryExt { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClaimableBalanceEntryExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ClaimableBalanceEntryExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for ClaimableBalanceEntryExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for ClaimableBalanceEntryExt {} - -impl ReadXdr for ClaimableBalanceEntryExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 1 => Self::V1(ClaimableBalanceEntryExtensionV1::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ClaimableBalanceEntryExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ClaimableBalanceEntry is an XDR Struct defined as: -/// -/// ```text -/// struct ClaimableBalanceEntry -/// { -/// // Unique identifier for this ClaimableBalanceEntry -/// ClaimableBalanceID balanceID; -/// -/// // List of claimants with associated predicate -/// Claimant claimants<10>; -/// -/// // Any asset including native -/// Asset asset; -/// -/// // Amount of asset -/// int64 amount; -/// -/// // reserved for future use -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// ClaimableBalanceEntryExtensionV1 v1; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ClaimableBalanceEntry { - pub balance_id: ClaimableBalanceId, - pub claimants: VecM, - pub asset: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount: i64, - pub ext: ClaimableBalanceEntryExt, -} - -impl ReadXdr for ClaimableBalanceEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - balance_id: ClaimableBalanceId::read_xdr(r)?, - claimants: VecM::::read_xdr(r)?, - asset: Asset::read_xdr(r)?, - amount: i64::read_xdr(r)?, - ext: ClaimableBalanceEntryExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ClaimableBalanceEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.balance_id.write_xdr(w)?; - self.claimants.write_xdr(w)?; - self.asset.write_xdr(w)?; - self.amount.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LiquidityPoolConstantProductParameters is an XDR Struct defined as: -/// -/// ```text -/// struct LiquidityPoolConstantProductParameters -/// { -/// Asset assetA; // assetA < assetB -/// Asset assetB; -/// int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LiquidityPoolConstantProductParameters { - pub asset_a: Asset, - pub asset_b: Asset, - pub fee: i32, -} - -impl ReadXdr for LiquidityPoolConstantProductParameters { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - asset_a: Asset::read_xdr(r)?, - asset_b: Asset::read_xdr(r)?, - fee: i32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LiquidityPoolConstantProductParameters { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.asset_a.write_xdr(w)?; - self.asset_b.write_xdr(w)?; - self.fee.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// LiquidityPoolConstantProductParameters params; -/// -/// int64 reserveA; // amount of A in the pool -/// int64 reserveB; // amount of B in the pool -/// int64 totalPoolShares; // total number of pool shares issued -/// int64 poolSharesTrustLineCount; // number of trust lines for the -/// // associated pool shares -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LiquidityPoolEntryConstantProduct { - pub params: LiquidityPoolConstantProductParameters, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub reserve_a: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub reserve_b: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub total_pool_shares: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub pool_shares_trust_line_count: i64, -} - -impl ReadXdr for LiquidityPoolEntryConstantProduct { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - params: LiquidityPoolConstantProductParameters::read_xdr(r)?, - reserve_a: i64::read_xdr(r)?, - reserve_b: i64::read_xdr(r)?, - total_pool_shares: i64::read_xdr(r)?, - pool_shares_trust_line_count: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LiquidityPoolEntryConstantProduct { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.params.write_xdr(w)?; - self.reserve_a.write_xdr(w)?; - self.reserve_b.write_xdr(w)?; - self.total_pool_shares.write_xdr(w)?; - self.pool_shares_trust_line_count.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LiquidityPoolEntryBody is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (LiquidityPoolType type) -/// { -/// case LIQUIDITY_POOL_CONSTANT_PRODUCT: -/// struct -/// { -/// LiquidityPoolConstantProductParameters params; -/// -/// int64 reserveA; // amount of A in the pool -/// int64 reserveB; // amount of B in the pool -/// int64 totalPoolShares; // total number of pool shares issued -/// int64 poolSharesTrustLineCount; // number of trust lines for the -/// // associated pool shares -/// } constantProduct; -/// } -/// ``` -/// -// union with discriminant LiquidityPoolType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LiquidityPoolEntryBody { - LiquidityPoolConstantProduct(LiquidityPoolEntryConstantProduct), -} - -#[cfg(feature = "alloc")] -impl Default for LiquidityPoolEntryBody { - fn default() -> Self { - Self::LiquidityPoolConstantProduct(LiquidityPoolEntryConstantProduct::default()) - } -} - -impl LiquidityPoolEntryBody { - const _VARIANTS: &[LiquidityPoolType] = &[LiquidityPoolType::LiquidityPoolConstantProduct]; - pub const VARIANTS: [LiquidityPoolType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::LiquidityPoolConstantProduct(_) => "LiquidityPoolConstantProduct", - } - } - - #[must_use] - pub const fn discriminant(&self) -> LiquidityPoolType { - #[allow(clippy::match_same_arms)] - match self { - Self::LiquidityPoolConstantProduct(_) => { - LiquidityPoolType::LiquidityPoolConstantProduct - } - } - } - - #[must_use] - pub const fn variants() -> [LiquidityPoolType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LiquidityPoolEntryBody { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LiquidityPoolEntryBody { - #[must_use] - fn discriminant(&self) -> LiquidityPoolType { - Self::discriminant(self) - } -} - -impl Variants for LiquidityPoolEntryBody { - fn variants() -> slice::Iter<'static, LiquidityPoolType> { - Self::VARIANTS.iter() - } -} - -impl Union for LiquidityPoolEntryBody {} - -impl ReadXdr for LiquidityPoolEntryBody { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: LiquidityPoolType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - LiquidityPoolType::LiquidityPoolConstantProduct => { - Self::LiquidityPoolConstantProduct(LiquidityPoolEntryConstantProduct::read_xdr( - r, - )?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LiquidityPoolEntryBody { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::LiquidityPoolConstantProduct(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// LiquidityPoolEntry is an XDR Struct defined as: -/// -/// ```text -/// struct LiquidityPoolEntry -/// { -/// PoolID liquidityPoolID; -/// -/// union switch (LiquidityPoolType type) -/// { -/// case LIQUIDITY_POOL_CONSTANT_PRODUCT: -/// struct -/// { -/// LiquidityPoolConstantProductParameters params; -/// -/// int64 reserveA; // amount of A in the pool -/// int64 reserveB; // amount of B in the pool -/// int64 totalPoolShares; // total number of pool shares issued -/// int64 poolSharesTrustLineCount; // number of trust lines for the -/// // associated pool shares -/// } constantProduct; -/// } -/// body; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LiquidityPoolEntry { - pub liquidity_pool_id: PoolId, - pub body: LiquidityPoolEntryBody, -} - -impl ReadXdr for LiquidityPoolEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - liquidity_pool_id: PoolId::read_xdr(r)?, - body: LiquidityPoolEntryBody::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LiquidityPoolEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.liquidity_pool_id.write_xdr(w)?; - self.body.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ContractDataDurability is an XDR Enum defined as: -/// -/// ```text -/// enum ContractDataDurability { -/// TEMPORARY = 0, -/// PERSISTENT = 1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ContractDataDurability { - #[cfg_attr(feature = "alloc", default)] - Temporary = 0, - Persistent = 1, -} - -impl ContractDataDurability { - const _VARIANTS: &[ContractDataDurability] = &[ - ContractDataDurability::Temporary, - ContractDataDurability::Persistent, - ]; - pub const VARIANTS: [ContractDataDurability; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Temporary", "Persistent"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Temporary => "Temporary", - Self::Persistent => "Persistent", - } - } - - #[must_use] - pub const fn variants() -> [ContractDataDurability; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ContractDataDurability { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ContractDataDurability { - fn variants() -> slice::Iter<'static, ContractDataDurability> { - Self::VARIANTS.iter() - } -} - -impl Enum for ContractDataDurability {} - -impl fmt::Display for ContractDataDurability { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ContractDataDurability { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ContractDataDurability::Temporary, - 1 => ContractDataDurability::Persistent, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ContractDataDurability) -> Self { - e as Self - } -} - -impl ReadXdr for ContractDataDurability { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ContractDataDurability { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ContractDataEntry is an XDR Struct defined as: -/// -/// ```text -/// struct ContractDataEntry { -/// ExtensionPoint ext; -/// -/// SCAddress contract; -/// SCVal key; -/// ContractDataDurability durability; -/// SCVal val; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ContractDataEntry { - pub ext: ExtensionPoint, - pub contract: ScAddress, - pub key: ScVal, - pub durability: ContractDataDurability, - pub val: ScVal, -} - -impl ReadXdr for ContractDataEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, - contract: ScAddress::read_xdr(r)?, - key: ScVal::read_xdr(r)?, - durability: ContractDataDurability::read_xdr(r)?, - val: ScVal::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ContractDataEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.contract.write_xdr(w)?; - self.key.write_xdr(w)?; - self.durability.write_xdr(w)?; - self.val.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ContractCodeCostInputs is an XDR Struct defined as: -/// -/// ```text -/// struct ContractCodeCostInputs { -/// ExtensionPoint ext; -/// uint32 nInstructions; -/// uint32 nFunctions; -/// uint32 nGlobals; -/// uint32 nTableEntries; -/// uint32 nTypes; -/// uint32 nDataSegments; -/// uint32 nElemSegments; -/// uint32 nImports; -/// uint32 nExports; -/// uint32 nDataSegmentBytes; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ContractCodeCostInputs { - pub ext: ExtensionPoint, - pub n_instructions: u32, - pub n_functions: u32, - pub n_globals: u32, - pub n_table_entries: u32, - pub n_types: u32, - pub n_data_segments: u32, - pub n_elem_segments: u32, - pub n_imports: u32, - pub n_exports: u32, - pub n_data_segment_bytes: u32, -} - -impl ReadXdr for ContractCodeCostInputs { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, - n_instructions: u32::read_xdr(r)?, - n_functions: u32::read_xdr(r)?, - n_globals: u32::read_xdr(r)?, - n_table_entries: u32::read_xdr(r)?, - n_types: u32::read_xdr(r)?, - n_data_segments: u32::read_xdr(r)?, - n_elem_segments: u32::read_xdr(r)?, - n_imports: u32::read_xdr(r)?, - n_exports: u32::read_xdr(r)?, - n_data_segment_bytes: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ContractCodeCostInputs { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.n_instructions.write_xdr(w)?; - self.n_functions.write_xdr(w)?; - self.n_globals.write_xdr(w)?; - self.n_table_entries.write_xdr(w)?; - self.n_types.write_xdr(w)?; - self.n_data_segments.write_xdr(w)?; - self.n_elem_segments.write_xdr(w)?; - self.n_imports.write_xdr(w)?; - self.n_exports.write_xdr(w)?; - self.n_data_segment_bytes.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ContractCodeEntryV1 is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// ExtensionPoint ext; -/// ContractCodeCostInputs costInputs; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ContractCodeEntryV1 { - pub ext: ExtensionPoint, - pub cost_inputs: ContractCodeCostInputs, -} - -impl ReadXdr for ContractCodeEntryV1 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, - cost_inputs: ContractCodeCostInputs::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ContractCodeEntryV1 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.cost_inputs.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ContractCodeEntryExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// struct -/// { -/// ExtensionPoint ext; -/// ContractCodeCostInputs costInputs; -/// } v1; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ContractCodeEntryExt { - V0, - V1(ContractCodeEntryV1), -} - -#[cfg(feature = "alloc")] -impl Default for ContractCodeEntryExt { - fn default() -> Self { - Self::V0 - } -} - -impl ContractCodeEntryExt { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ContractCodeEntryExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ContractCodeEntryExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for ContractCodeEntryExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for ContractCodeEntryExt {} - -impl ReadXdr for ContractCodeEntryExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 1 => Self::V1(ContractCodeEntryV1::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ContractCodeEntryExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ContractCodeEntry is an XDR Struct defined as: -/// -/// ```text -/// struct ContractCodeEntry { -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// struct -/// { -/// ExtensionPoint ext; -/// ContractCodeCostInputs costInputs; -/// } v1; -/// } ext; -/// -/// Hash hash; -/// opaque code<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ContractCodeEntry { - pub ext: ContractCodeEntryExt, - pub hash: Hash, - pub code: BytesM, -} - -impl ReadXdr for ContractCodeEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ContractCodeEntryExt::read_xdr(r)?, - hash: Hash::read_xdr(r)?, - code: BytesM::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ContractCodeEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.hash.write_xdr(w)?; - self.code.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TtlEntry is an XDR Struct defined as: -/// -/// ```text -/// struct TTLEntry { -/// // Hash of the LedgerKey that is associated with this TTLEntry -/// Hash keyHash; -/// uint32 liveUntilLedgerSeq; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TtlEntry { - pub key_hash: Hash, - pub live_until_ledger_seq: u32, -} - -impl ReadXdr for TtlEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - key_hash: Hash::read_xdr(r)?, - live_until_ledger_seq: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TtlEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.key_hash.write_xdr(w)?; - self.live_until_ledger_seq.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LedgerEntryExtensionV1Ext { - V0, -} - -#[cfg(feature = "alloc")] -impl Default for LedgerEntryExtensionV1Ext { - fn default() -> Self { - Self::V0 - } -} - -impl LedgerEntryExtensionV1Ext { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerEntryExtensionV1Ext { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LedgerEntryExtensionV1Ext { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for LedgerEntryExtensionV1Ext { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for LedgerEntryExtensionV1Ext {} - -impl ReadXdr for LedgerEntryExtensionV1Ext { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerEntryExtensionV1Ext { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// LedgerEntryExtensionV1 is an XDR Struct defined as: -/// -/// ```text -/// struct LedgerEntryExtensionV1 -/// { -/// SponsorshipDescriptor sponsoringID; -/// -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerEntryExtensionV1 { - pub sponsoring_id: SponsorshipDescriptor, - pub ext: LedgerEntryExtensionV1Ext, -} - -impl ReadXdr for LedgerEntryExtensionV1 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - sponsoring_id: SponsorshipDescriptor::read_xdr(r)?, - ext: LedgerEntryExtensionV1Ext::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerEntryExtensionV1 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.sponsoring_id.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerEntryData is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (LedgerEntryType type) -/// { -/// case ACCOUNT: -/// AccountEntry account; -/// case TRUSTLINE: -/// TrustLineEntry trustLine; -/// case OFFER: -/// OfferEntry offer; -/// case DATA: -/// DataEntry data; -/// case CLAIMABLE_BALANCE: -/// ClaimableBalanceEntry claimableBalance; -/// case LIQUIDITY_POOL: -/// LiquidityPoolEntry liquidityPool; -/// case CONTRACT_DATA: -/// ContractDataEntry contractData; -/// case CONTRACT_CODE: -/// ContractCodeEntry contractCode; -/// case CONFIG_SETTING: -/// ConfigSettingEntry configSetting; -/// case TTL: -/// TTLEntry ttl; -/// } -/// ``` -/// -// union with discriminant LedgerEntryType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LedgerEntryData { - Account(AccountEntry), - Trustline(TrustLineEntry), - Offer(OfferEntry), - Data(DataEntry), - ClaimableBalance(ClaimableBalanceEntry), - LiquidityPool(LiquidityPoolEntry), - ContractData(ContractDataEntry), - ContractCode(ContractCodeEntry), - ConfigSetting(ConfigSettingEntry), - Ttl(TtlEntry), -} - -#[cfg(feature = "alloc")] -impl Default for LedgerEntryData { - fn default() -> Self { - Self::Account(AccountEntry::default()) - } -} - -impl LedgerEntryData { - const _VARIANTS: &[LedgerEntryType] = &[ - LedgerEntryType::Account, - LedgerEntryType::Trustline, - LedgerEntryType::Offer, - LedgerEntryType::Data, - LedgerEntryType::ClaimableBalance, - LedgerEntryType::LiquidityPool, - LedgerEntryType::ContractData, - LedgerEntryType::ContractCode, - LedgerEntryType::ConfigSetting, - LedgerEntryType::Ttl, - ]; - pub const VARIANTS: [LedgerEntryType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Account", - "Trustline", - "Offer", - "Data", - "ClaimableBalance", - "LiquidityPool", - "ContractData", - "ContractCode", - "ConfigSetting", - "Ttl", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Account(_) => "Account", - Self::Trustline(_) => "Trustline", - Self::Offer(_) => "Offer", - Self::Data(_) => "Data", - Self::ClaimableBalance(_) => "ClaimableBalance", - Self::LiquidityPool(_) => "LiquidityPool", - Self::ContractData(_) => "ContractData", - Self::ContractCode(_) => "ContractCode", - Self::ConfigSetting(_) => "ConfigSetting", - Self::Ttl(_) => "Ttl", - } - } - - #[must_use] - pub const fn discriminant(&self) -> LedgerEntryType { - #[allow(clippy::match_same_arms)] - match self { - Self::Account(_) => LedgerEntryType::Account, - Self::Trustline(_) => LedgerEntryType::Trustline, - Self::Offer(_) => LedgerEntryType::Offer, - Self::Data(_) => LedgerEntryType::Data, - Self::ClaimableBalance(_) => LedgerEntryType::ClaimableBalance, - Self::LiquidityPool(_) => LedgerEntryType::LiquidityPool, - Self::ContractData(_) => LedgerEntryType::ContractData, - Self::ContractCode(_) => LedgerEntryType::ContractCode, - Self::ConfigSetting(_) => LedgerEntryType::ConfigSetting, - Self::Ttl(_) => LedgerEntryType::Ttl, - } - } - - #[must_use] - pub const fn variants() -> [LedgerEntryType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerEntryData { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LedgerEntryData { - #[must_use] - fn discriminant(&self) -> LedgerEntryType { - Self::discriminant(self) - } -} - -impl Variants for LedgerEntryData { - fn variants() -> slice::Iter<'static, LedgerEntryType> { - Self::VARIANTS.iter() - } -} - -impl Union for LedgerEntryData {} - -impl ReadXdr for LedgerEntryData { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: LedgerEntryType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - LedgerEntryType::Account => Self::Account(AccountEntry::read_xdr(r)?), - LedgerEntryType::Trustline => Self::Trustline(TrustLineEntry::read_xdr(r)?), - LedgerEntryType::Offer => Self::Offer(OfferEntry::read_xdr(r)?), - LedgerEntryType::Data => Self::Data(DataEntry::read_xdr(r)?), - LedgerEntryType::ClaimableBalance => { - Self::ClaimableBalance(ClaimableBalanceEntry::read_xdr(r)?) - } - LedgerEntryType::LiquidityPool => { - Self::LiquidityPool(LiquidityPoolEntry::read_xdr(r)?) - } - LedgerEntryType::ContractData => { - Self::ContractData(ContractDataEntry::read_xdr(r)?) - } - LedgerEntryType::ContractCode => { - Self::ContractCode(ContractCodeEntry::read_xdr(r)?) - } - LedgerEntryType::ConfigSetting => { - Self::ConfigSetting(ConfigSettingEntry::read_xdr(r)?) - } - LedgerEntryType::Ttl => Self::Ttl(TtlEntry::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerEntryData { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Account(v) => v.write_xdr(w)?, - Self::Trustline(v) => v.write_xdr(w)?, - Self::Offer(v) => v.write_xdr(w)?, - Self::Data(v) => v.write_xdr(w)?, - Self::ClaimableBalance(v) => v.write_xdr(w)?, - Self::LiquidityPool(v) => v.write_xdr(w)?, - Self::ContractData(v) => v.write_xdr(w)?, - Self::ContractCode(v) => v.write_xdr(w)?, - Self::ConfigSetting(v) => v.write_xdr(w)?, - Self::Ttl(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// LedgerEntryExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// LedgerEntryExtensionV1 v1; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LedgerEntryExt { - V0, - V1(LedgerEntryExtensionV1), -} - -#[cfg(feature = "alloc")] -impl Default for LedgerEntryExt { - fn default() -> Self { - Self::V0 - } -} - -impl LedgerEntryExt { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerEntryExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LedgerEntryExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for LedgerEntryExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for LedgerEntryExt {} - -impl ReadXdr for LedgerEntryExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 1 => Self::V1(LedgerEntryExtensionV1::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerEntryExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// LedgerEntry is an XDR Struct defined as: -/// -/// ```text -/// struct LedgerEntry -/// { -/// uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed -/// -/// union switch (LedgerEntryType type) -/// { -/// case ACCOUNT: -/// AccountEntry account; -/// case TRUSTLINE: -/// TrustLineEntry trustLine; -/// case OFFER: -/// OfferEntry offer; -/// case DATA: -/// DataEntry data; -/// case CLAIMABLE_BALANCE: -/// ClaimableBalanceEntry claimableBalance; -/// case LIQUIDITY_POOL: -/// LiquidityPoolEntry liquidityPool; -/// case CONTRACT_DATA: -/// ContractDataEntry contractData; -/// case CONTRACT_CODE: -/// ContractCodeEntry contractCode; -/// case CONFIG_SETTING: -/// ConfigSettingEntry configSetting; -/// case TTL: -/// TTLEntry ttl; -/// } -/// data; -/// -/// // reserved for future use -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// LedgerEntryExtensionV1 v1; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerEntry { - pub last_modified_ledger_seq: u32, - pub data: LedgerEntryData, - pub ext: LedgerEntryExt, -} - -impl ReadXdr for LedgerEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - last_modified_ledger_seq: u32::read_xdr(r)?, - data: LedgerEntryData::read_xdr(r)?, - ext: LedgerEntryExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.last_modified_ledger_seq.write_xdr(w)?; - self.data.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerKeyAccount is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// AccountID accountID; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerKeyAccount { - pub account_id: AccountId, -} - -impl ReadXdr for LedgerKeyAccount { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - account_id: AccountId::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerKeyAccount { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.account_id.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerKeyTrustLine is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// AccountID accountID; -/// TrustLineAsset asset; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerKeyTrustLine { - pub account_id: AccountId, - pub asset: TrustLineAsset, -} - -impl ReadXdr for LedgerKeyTrustLine { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - account_id: AccountId::read_xdr(r)?, - asset: TrustLineAsset::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerKeyTrustLine { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.account_id.write_xdr(w)?; - self.asset.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerKeyOffer is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// AccountID sellerID; -/// int64 offerID; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerKeyOffer { - pub seller_id: AccountId, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub offer_id: i64, -} - -impl ReadXdr for LedgerKeyOffer { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - seller_id: AccountId::read_xdr(r)?, - offer_id: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerKeyOffer { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.seller_id.write_xdr(w)?; - self.offer_id.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerKeyData is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// AccountID accountID; -/// string64 dataName; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerKeyData { - pub account_id: AccountId, - pub data_name: String64, -} - -impl ReadXdr for LedgerKeyData { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - account_id: AccountId::read_xdr(r)?, - data_name: String64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerKeyData { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.account_id.write_xdr(w)?; - self.data_name.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerKeyClaimableBalance is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// ClaimableBalanceID balanceID; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerKeyClaimableBalance { - pub balance_id: ClaimableBalanceId, -} - -impl ReadXdr for LedgerKeyClaimableBalance { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - balance_id: ClaimableBalanceId::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerKeyClaimableBalance { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.balance_id.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerKeyLiquidityPool is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// PoolID liquidityPoolID; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerKeyLiquidityPool { - pub liquidity_pool_id: PoolId, -} - -impl ReadXdr for LedgerKeyLiquidityPool { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - liquidity_pool_id: PoolId::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerKeyLiquidityPool { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.liquidity_pool_id.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerKeyContractData is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// SCAddress contract; -/// SCVal key; -/// ContractDataDurability durability; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerKeyContractData { - pub contract: ScAddress, - pub key: ScVal, - pub durability: ContractDataDurability, -} - -impl ReadXdr for LedgerKeyContractData { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - contract: ScAddress::read_xdr(r)?, - key: ScVal::read_xdr(r)?, - durability: ContractDataDurability::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerKeyContractData { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.contract.write_xdr(w)?; - self.key.write_xdr(w)?; - self.durability.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerKeyContractCode is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// Hash hash; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerKeyContractCode { - pub hash: Hash, -} - -impl ReadXdr for LedgerKeyContractCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - hash: Hash::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerKeyContractCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.hash.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerKeyConfigSetting is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// ConfigSettingID configSettingID; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerKeyConfigSetting { - pub config_setting_id: ConfigSettingId, -} - -impl ReadXdr for LedgerKeyConfigSetting { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - config_setting_id: ConfigSettingId::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerKeyConfigSetting { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.config_setting_id.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerKeyTtl is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// // Hash of the LedgerKey that is associated with this TTLEntry -/// Hash keyHash; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerKeyTtl { - pub key_hash: Hash, -} - -impl ReadXdr for LedgerKeyTtl { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - key_hash: Hash::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerKeyTtl { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.key_hash.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerKey is an XDR Union defined as: -/// -/// ```text -/// union LedgerKey switch (LedgerEntryType type) -/// { -/// case ACCOUNT: -/// struct -/// { -/// AccountID accountID; -/// } account; -/// -/// case TRUSTLINE: -/// struct -/// { -/// AccountID accountID; -/// TrustLineAsset asset; -/// } trustLine; -/// -/// case OFFER: -/// struct -/// { -/// AccountID sellerID; -/// int64 offerID; -/// } offer; -/// -/// case DATA: -/// struct -/// { -/// AccountID accountID; -/// string64 dataName; -/// } data; -/// -/// case CLAIMABLE_BALANCE: -/// struct -/// { -/// ClaimableBalanceID balanceID; -/// } claimableBalance; -/// -/// case LIQUIDITY_POOL: -/// struct -/// { -/// PoolID liquidityPoolID; -/// } liquidityPool; -/// case CONTRACT_DATA: -/// struct -/// { -/// SCAddress contract; -/// SCVal key; -/// ContractDataDurability durability; -/// } contractData; -/// case CONTRACT_CODE: -/// struct -/// { -/// Hash hash; -/// } contractCode; -/// case CONFIG_SETTING: -/// struct -/// { -/// ConfigSettingID configSettingID; -/// } configSetting; -/// case TTL: -/// struct -/// { -/// // Hash of the LedgerKey that is associated with this TTLEntry -/// Hash keyHash; -/// } ttl; -/// }; -/// ``` -/// -// union with discriminant LedgerEntryType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LedgerKey { - Account(LedgerKeyAccount), - Trustline(LedgerKeyTrustLine), - Offer(LedgerKeyOffer), - Data(LedgerKeyData), - ClaimableBalance(LedgerKeyClaimableBalance), - LiquidityPool(LedgerKeyLiquidityPool), - ContractData(LedgerKeyContractData), - ContractCode(LedgerKeyContractCode), - ConfigSetting(LedgerKeyConfigSetting), - Ttl(LedgerKeyTtl), -} - -#[cfg(feature = "alloc")] -impl Default for LedgerKey { - fn default() -> Self { - Self::Account(LedgerKeyAccount::default()) - } -} - -impl LedgerKey { - const _VARIANTS: &[LedgerEntryType] = &[ - LedgerEntryType::Account, - LedgerEntryType::Trustline, - LedgerEntryType::Offer, - LedgerEntryType::Data, - LedgerEntryType::ClaimableBalance, - LedgerEntryType::LiquidityPool, - LedgerEntryType::ContractData, - LedgerEntryType::ContractCode, - LedgerEntryType::ConfigSetting, - LedgerEntryType::Ttl, - ]; - pub const VARIANTS: [LedgerEntryType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Account", - "Trustline", - "Offer", - "Data", - "ClaimableBalance", - "LiquidityPool", - "ContractData", - "ContractCode", - "ConfigSetting", - "Ttl", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Account(_) => "Account", - Self::Trustline(_) => "Trustline", - Self::Offer(_) => "Offer", - Self::Data(_) => "Data", - Self::ClaimableBalance(_) => "ClaimableBalance", - Self::LiquidityPool(_) => "LiquidityPool", - Self::ContractData(_) => "ContractData", - Self::ContractCode(_) => "ContractCode", - Self::ConfigSetting(_) => "ConfigSetting", - Self::Ttl(_) => "Ttl", - } - } - - #[must_use] - pub const fn discriminant(&self) -> LedgerEntryType { - #[allow(clippy::match_same_arms)] - match self { - Self::Account(_) => LedgerEntryType::Account, - Self::Trustline(_) => LedgerEntryType::Trustline, - Self::Offer(_) => LedgerEntryType::Offer, - Self::Data(_) => LedgerEntryType::Data, - Self::ClaimableBalance(_) => LedgerEntryType::ClaimableBalance, - Self::LiquidityPool(_) => LedgerEntryType::LiquidityPool, - Self::ContractData(_) => LedgerEntryType::ContractData, - Self::ContractCode(_) => LedgerEntryType::ContractCode, - Self::ConfigSetting(_) => LedgerEntryType::ConfigSetting, - Self::Ttl(_) => LedgerEntryType::Ttl, - } - } - - #[must_use] - pub const fn variants() -> [LedgerEntryType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerKey { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LedgerKey { - #[must_use] - fn discriminant(&self) -> LedgerEntryType { - Self::discriminant(self) - } -} - -impl Variants for LedgerKey { - fn variants() -> slice::Iter<'static, LedgerEntryType> { - Self::VARIANTS.iter() - } -} - -impl Union for LedgerKey {} - -impl ReadXdr for LedgerKey { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: LedgerEntryType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - LedgerEntryType::Account => Self::Account(LedgerKeyAccount::read_xdr(r)?), - LedgerEntryType::Trustline => Self::Trustline(LedgerKeyTrustLine::read_xdr(r)?), - LedgerEntryType::Offer => Self::Offer(LedgerKeyOffer::read_xdr(r)?), - LedgerEntryType::Data => Self::Data(LedgerKeyData::read_xdr(r)?), - LedgerEntryType::ClaimableBalance => { - Self::ClaimableBalance(LedgerKeyClaimableBalance::read_xdr(r)?) - } - LedgerEntryType::LiquidityPool => { - Self::LiquidityPool(LedgerKeyLiquidityPool::read_xdr(r)?) - } - LedgerEntryType::ContractData => { - Self::ContractData(LedgerKeyContractData::read_xdr(r)?) - } - LedgerEntryType::ContractCode => { - Self::ContractCode(LedgerKeyContractCode::read_xdr(r)?) - } - LedgerEntryType::ConfigSetting => { - Self::ConfigSetting(LedgerKeyConfigSetting::read_xdr(r)?) - } - LedgerEntryType::Ttl => Self::Ttl(LedgerKeyTtl::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerKey { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Account(v) => v.write_xdr(w)?, - Self::Trustline(v) => v.write_xdr(w)?, - Self::Offer(v) => v.write_xdr(w)?, - Self::Data(v) => v.write_xdr(w)?, - Self::ClaimableBalance(v) => v.write_xdr(w)?, - Self::LiquidityPool(v) => v.write_xdr(w)?, - Self::ContractData(v) => v.write_xdr(w)?, - Self::ContractCode(v) => v.write_xdr(w)?, - Self::ConfigSetting(v) => v.write_xdr(w)?, - Self::Ttl(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// EnvelopeType is an XDR Enum defined as: -/// -/// ```text -/// enum EnvelopeType -/// { -/// ENVELOPE_TYPE_TX_V0 = 0, -/// ENVELOPE_TYPE_SCP = 1, -/// ENVELOPE_TYPE_TX = 2, -/// ENVELOPE_TYPE_AUTH = 3, -/// ENVELOPE_TYPE_SCPVALUE = 4, -/// ENVELOPE_TYPE_TX_FEE_BUMP = 5, -/// ENVELOPE_TYPE_OP_ID = 6, -/// ENVELOPE_TYPE_POOL_REVOKE_OP_ID = 7, -/// ENVELOPE_TYPE_CONTRACT_ID = 8, -/// ENVELOPE_TYPE_SOROBAN_AUTHORIZATION = 9 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum EnvelopeType { - #[cfg_attr(feature = "alloc", default)] - TxV0 = 0, - Scp = 1, - Tx = 2, - Auth = 3, - Scpvalue = 4, - TxFeeBump = 5, - OpId = 6, - PoolRevokeOpId = 7, - ContractId = 8, - SorobanAuthorization = 9, -} - -impl EnvelopeType { - const _VARIANTS: &[EnvelopeType] = &[ - EnvelopeType::TxV0, - EnvelopeType::Scp, - EnvelopeType::Tx, - EnvelopeType::Auth, - EnvelopeType::Scpvalue, - EnvelopeType::TxFeeBump, - EnvelopeType::OpId, - EnvelopeType::PoolRevokeOpId, - EnvelopeType::ContractId, - EnvelopeType::SorobanAuthorization, - ]; - pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "TxV0", - "Scp", - "Tx", - "Auth", - "Scpvalue", - "TxFeeBump", - "OpId", - "PoolRevokeOpId", - "ContractId", - "SorobanAuthorization", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::TxV0 => "TxV0", - Self::Scp => "Scp", - Self::Tx => "Tx", - Self::Auth => "Auth", - Self::Scpvalue => "Scpvalue", - Self::TxFeeBump => "TxFeeBump", - Self::OpId => "OpId", - Self::PoolRevokeOpId => "PoolRevokeOpId", - Self::ContractId => "ContractId", - Self::SorobanAuthorization => "SorobanAuthorization", - } - } - - #[must_use] - pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for EnvelopeType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for EnvelopeType { - fn variants() -> slice::Iter<'static, EnvelopeType> { - Self::VARIANTS.iter() - } -} - -impl Enum for EnvelopeType {} - -impl fmt::Display for EnvelopeType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for EnvelopeType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => EnvelopeType::TxV0, - 1 => EnvelopeType::Scp, - 2 => EnvelopeType::Tx, - 3 => EnvelopeType::Auth, - 4 => EnvelopeType::Scpvalue, - 5 => EnvelopeType::TxFeeBump, - 6 => EnvelopeType::OpId, - 7 => EnvelopeType::PoolRevokeOpId, - 8 => EnvelopeType::ContractId, - 9 => EnvelopeType::SorobanAuthorization, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: EnvelopeType) -> Self { - e as Self - } -} - -impl ReadXdr for EnvelopeType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for EnvelopeType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// BucketListType is an XDR Enum defined as: -/// -/// ```text -/// enum BucketListType -/// { -/// LIVE = 0, -/// HOT_ARCHIVE = 1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum BucketListType { - #[cfg_attr(feature = "alloc", default)] - Live = 0, - HotArchive = 1, -} - -impl BucketListType { - const _VARIANTS: &[BucketListType] = &[BucketListType::Live, BucketListType::HotArchive]; - pub const VARIANTS: [BucketListType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Live", "HotArchive"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Live => "Live", - Self::HotArchive => "HotArchive", - } - } - - #[must_use] - pub const fn variants() -> [BucketListType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for BucketListType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for BucketListType { - fn variants() -> slice::Iter<'static, BucketListType> { - Self::VARIANTS.iter() - } -} - -impl Enum for BucketListType {} - -impl fmt::Display for BucketListType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for BucketListType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => BucketListType::Live, - 1 => BucketListType::HotArchive, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: BucketListType) -> Self { - e as Self - } -} - -impl ReadXdr for BucketListType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for BucketListType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// BucketEntryType is an XDR Enum defined as: -/// -/// ```text -/// enum BucketEntryType -/// { -/// METAENTRY = -/// -1, // At-and-after protocol 11: bucket metadata, should come first. -/// LIVEENTRY = 0, // Before protocol 11: created-or-updated; -/// // At-and-after protocol 11: only updated. -/// DEADENTRY = 1, -/// INITENTRY = 2 // At-and-after protocol 11: only created. -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum BucketEntryType { - #[cfg_attr(feature = "alloc", default)] - Metaentry = -1, - Liveentry = 0, - Deadentry = 1, - Initentry = 2, -} - -impl BucketEntryType { - const _VARIANTS: &[BucketEntryType] = &[ - BucketEntryType::Metaentry, - BucketEntryType::Liveentry, - BucketEntryType::Deadentry, - BucketEntryType::Initentry, - ]; - pub const VARIANTS: [BucketEntryType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Metaentry", "Liveentry", "Deadentry", "Initentry"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Metaentry => "Metaentry", - Self::Liveentry => "Liveentry", - Self::Deadentry => "Deadentry", - Self::Initentry => "Initentry", - } - } - - #[must_use] - pub const fn variants() -> [BucketEntryType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for BucketEntryType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for BucketEntryType { - fn variants() -> slice::Iter<'static, BucketEntryType> { - Self::VARIANTS.iter() - } -} - -impl Enum for BucketEntryType {} - -impl fmt::Display for BucketEntryType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for BucketEntryType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - -1 => BucketEntryType::Metaentry, - 0 => BucketEntryType::Liveentry, - 1 => BucketEntryType::Deadentry, - 2 => BucketEntryType::Initentry, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: BucketEntryType) -> Self { - e as Self - } -} - -impl ReadXdr for BucketEntryType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for BucketEntryType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// HotArchiveBucketEntryType is an XDR Enum defined as: -/// -/// ```text -/// enum HotArchiveBucketEntryType -/// { -/// HOT_ARCHIVE_METAENTRY = -1, // Bucket metadata, should come first. -/// HOT_ARCHIVE_ARCHIVED = 0, // Entry is Archived -/// HOT_ARCHIVE_LIVE = 1 // Entry was previously HOT_ARCHIVE_ARCHIVED, but -/// // has been added back to the live BucketList. -/// // Does not need to be persisted. -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum HotArchiveBucketEntryType { - #[cfg_attr(feature = "alloc", default)] - Metaentry = -1, - Archived = 0, - Live = 1, -} - -impl HotArchiveBucketEntryType { - const _VARIANTS: &[HotArchiveBucketEntryType] = &[ - HotArchiveBucketEntryType::Metaentry, - HotArchiveBucketEntryType::Archived, - HotArchiveBucketEntryType::Live, - ]; - pub const VARIANTS: [HotArchiveBucketEntryType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Metaentry", "Archived", "Live"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Metaentry => "Metaentry", - Self::Archived => "Archived", - Self::Live => "Live", - } - } - - #[must_use] - pub const fn variants() -> [HotArchiveBucketEntryType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for HotArchiveBucketEntryType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for HotArchiveBucketEntryType { - fn variants() -> slice::Iter<'static, HotArchiveBucketEntryType> { - Self::VARIANTS.iter() - } -} - -impl Enum for HotArchiveBucketEntryType {} - -impl fmt::Display for HotArchiveBucketEntryType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for HotArchiveBucketEntryType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - -1 => HotArchiveBucketEntryType::Metaentry, - 0 => HotArchiveBucketEntryType::Archived, - 1 => HotArchiveBucketEntryType::Live, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: HotArchiveBucketEntryType) -> Self { - e as Self - } -} - -impl ReadXdr for HotArchiveBucketEntryType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for HotArchiveBucketEntryType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// BucketMetadataExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// BucketListType bucketListType; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum BucketMetadataExt { - V0, - V1(BucketListType), -} - -#[cfg(feature = "alloc")] -impl Default for BucketMetadataExt { - fn default() -> Self { - Self::V0 - } -} - -impl BucketMetadataExt { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for BucketMetadataExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for BucketMetadataExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for BucketMetadataExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for BucketMetadataExt {} - -impl ReadXdr for BucketMetadataExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 1 => Self::V1(BucketListType::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for BucketMetadataExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// BucketMetadata is an XDR Struct defined as: -/// -/// ```text -/// struct BucketMetadata -/// { -/// // Indicates the protocol version used to create / merge this bucket. -/// uint32 ledgerVersion; -/// -/// // reserved for future use -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// BucketListType bucketListType; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct BucketMetadata { - pub ledger_version: u32, - pub ext: BucketMetadataExt, -} - -impl ReadXdr for BucketMetadata { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ledger_version: u32::read_xdr(r)?, - ext: BucketMetadataExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for BucketMetadata { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ledger_version.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// BucketEntry is an XDR Union defined as: -/// -/// ```text -/// union BucketEntry switch (BucketEntryType type) -/// { -/// case LIVEENTRY: -/// case INITENTRY: -/// LedgerEntry liveEntry; -/// -/// case DEADENTRY: -/// LedgerKey deadEntry; -/// case METAENTRY: -/// BucketMetadata metaEntry; -/// }; -/// ``` -/// -// union with discriminant BucketEntryType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum BucketEntry { - Liveentry(LedgerEntry), - Initentry(LedgerEntry), - Deadentry(LedgerKey), - Metaentry(BucketMetadata), -} - -#[cfg(feature = "alloc")] -impl Default for BucketEntry { - fn default() -> Self { - Self::Liveentry(LedgerEntry::default()) - } -} - -impl BucketEntry { - const _VARIANTS: &[BucketEntryType] = &[ - BucketEntryType::Liveentry, - BucketEntryType::Initentry, - BucketEntryType::Deadentry, - BucketEntryType::Metaentry, - ]; - pub const VARIANTS: [BucketEntryType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Liveentry", "Initentry", "Deadentry", "Metaentry"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Liveentry(_) => "Liveentry", - Self::Initentry(_) => "Initentry", - Self::Deadentry(_) => "Deadentry", - Self::Metaentry(_) => "Metaentry", - } - } - - #[must_use] - pub const fn discriminant(&self) -> BucketEntryType { - #[allow(clippy::match_same_arms)] - match self { - Self::Liveentry(_) => BucketEntryType::Liveentry, - Self::Initentry(_) => BucketEntryType::Initentry, - Self::Deadentry(_) => BucketEntryType::Deadentry, - Self::Metaentry(_) => BucketEntryType::Metaentry, - } - } - - #[must_use] - pub const fn variants() -> [BucketEntryType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for BucketEntry { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for BucketEntry { - #[must_use] - fn discriminant(&self) -> BucketEntryType { - Self::discriminant(self) - } -} - -impl Variants for BucketEntry { - fn variants() -> slice::Iter<'static, BucketEntryType> { - Self::VARIANTS.iter() - } -} - -impl Union for BucketEntry {} - -impl ReadXdr for BucketEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: BucketEntryType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - BucketEntryType::Liveentry => Self::Liveentry(LedgerEntry::read_xdr(r)?), - BucketEntryType::Initentry => Self::Initentry(LedgerEntry::read_xdr(r)?), - BucketEntryType::Deadentry => Self::Deadentry(LedgerKey::read_xdr(r)?), - BucketEntryType::Metaentry => Self::Metaentry(BucketMetadata::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for BucketEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Liveentry(v) => v.write_xdr(w)?, - Self::Initentry(v) => v.write_xdr(w)?, - Self::Deadentry(v) => v.write_xdr(w)?, - Self::Metaentry(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// HotArchiveBucketEntry is an XDR Union defined as: -/// -/// ```text -/// union HotArchiveBucketEntry switch (HotArchiveBucketEntryType type) -/// { -/// case HOT_ARCHIVE_ARCHIVED: -/// LedgerEntry archivedEntry; -/// -/// case HOT_ARCHIVE_LIVE: -/// LedgerKey key; -/// case HOT_ARCHIVE_METAENTRY: -/// BucketMetadata metaEntry; -/// }; -/// ``` -/// -// union with discriminant HotArchiveBucketEntryType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum HotArchiveBucketEntry { - Archived(LedgerEntry), - Live(LedgerKey), - Metaentry(BucketMetadata), -} - -#[cfg(feature = "alloc")] -impl Default for HotArchiveBucketEntry { - fn default() -> Self { - Self::Archived(LedgerEntry::default()) - } -} - -impl HotArchiveBucketEntry { - const _VARIANTS: &[HotArchiveBucketEntryType] = &[ - HotArchiveBucketEntryType::Archived, - HotArchiveBucketEntryType::Live, - HotArchiveBucketEntryType::Metaentry, - ]; - pub const VARIANTS: [HotArchiveBucketEntryType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Archived", "Live", "Metaentry"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Archived(_) => "Archived", - Self::Live(_) => "Live", - Self::Metaentry(_) => "Metaentry", - } - } - - #[must_use] - pub const fn discriminant(&self) -> HotArchiveBucketEntryType { - #[allow(clippy::match_same_arms)] - match self { - Self::Archived(_) => HotArchiveBucketEntryType::Archived, - Self::Live(_) => HotArchiveBucketEntryType::Live, - Self::Metaentry(_) => HotArchiveBucketEntryType::Metaentry, - } - } - - #[must_use] - pub const fn variants() -> [HotArchiveBucketEntryType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for HotArchiveBucketEntry { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for HotArchiveBucketEntry { - #[must_use] - fn discriminant(&self) -> HotArchiveBucketEntryType { - Self::discriminant(self) - } -} - -impl Variants for HotArchiveBucketEntry { - fn variants() -> slice::Iter<'static, HotArchiveBucketEntryType> { - Self::VARIANTS.iter() - } -} - -impl Union for HotArchiveBucketEntry {} - -impl ReadXdr for HotArchiveBucketEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: HotArchiveBucketEntryType = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - HotArchiveBucketEntryType::Archived => Self::Archived(LedgerEntry::read_xdr(r)?), - HotArchiveBucketEntryType::Live => Self::Live(LedgerKey::read_xdr(r)?), - HotArchiveBucketEntryType::Metaentry => { - Self::Metaentry(BucketMetadata::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for HotArchiveBucketEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Archived(v) => v.write_xdr(w)?, - Self::Live(v) => v.write_xdr(w)?, - Self::Metaentry(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// UpgradeType is an XDR Typedef defined as: -/// -/// ```text -/// typedef opaque UpgradeType<128>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct UpgradeType(pub BytesM<128>); - -impl From for BytesM<128> { - #[must_use] - fn from(x: UpgradeType) -> Self { - x.0 - } -} - -impl From> for UpgradeType { - #[must_use] - fn from(x: BytesM<128>) -> Self { - UpgradeType(x) - } -} - -impl AsRef> for UpgradeType { - #[must_use] - fn as_ref(&self) -> &BytesM<128> { - &self.0 - } -} - -impl ReadXdr for UpgradeType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = BytesM::<128>::read_xdr(r)?; - let v = UpgradeType(i); - Ok(v) - }) - } -} - -impl WriteXdr for UpgradeType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for UpgradeType { - type Target = BytesM<128>; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: UpgradeType) -> Self { - x.0 .0 - } -} - -impl TryFrom> for UpgradeType { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(UpgradeType(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for UpgradeType { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(UpgradeType(x.try_into()?)) - } -} - -impl AsRef> for UpgradeType { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[u8]> for UpgradeType { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0 .0 - } -} - -/// StellarValueType is an XDR Enum defined as: -/// -/// ```text -/// enum StellarValueType -/// { -/// STELLAR_VALUE_BASIC = 0, -/// STELLAR_VALUE_SIGNED = 1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum StellarValueType { - #[cfg_attr(feature = "alloc", default)] - Basic = 0, - Signed = 1, -} - -impl StellarValueType { - const _VARIANTS: &[StellarValueType] = &[StellarValueType::Basic, StellarValueType::Signed]; - pub const VARIANTS: [StellarValueType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Basic", "Signed"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Basic => "Basic", - Self::Signed => "Signed", - } - } - - #[must_use] - pub const fn variants() -> [StellarValueType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for StellarValueType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for StellarValueType { - fn variants() -> slice::Iter<'static, StellarValueType> { - Self::VARIANTS.iter() - } -} - -impl Enum for StellarValueType {} - -impl fmt::Display for StellarValueType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for StellarValueType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => StellarValueType::Basic, - 1 => StellarValueType::Signed, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: StellarValueType) -> Self { - e as Self - } -} - -impl ReadXdr for StellarValueType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for StellarValueType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// LedgerCloseValueSignature is an XDR Struct defined as: -/// -/// ```text -/// struct LedgerCloseValueSignature -/// { -/// NodeID nodeID; // which node introduced the value -/// Signature signature; // nodeID's signature -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerCloseValueSignature { - pub node_id: NodeId, - pub signature: Signature, -} - -impl ReadXdr for LedgerCloseValueSignature { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - node_id: NodeId::read_xdr(r)?, - signature: Signature::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerCloseValueSignature { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.node_id.write_xdr(w)?; - self.signature.write_xdr(w)?; - Ok(()) - }) - } -} - -/// StellarValueExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (StellarValueType v) -/// { -/// case STELLAR_VALUE_BASIC: -/// void; -/// case STELLAR_VALUE_SIGNED: -/// LedgerCloseValueSignature lcValueSignature; -/// } -/// ``` -/// -// union with discriminant StellarValueType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum StellarValueExt { - Basic, - Signed(LedgerCloseValueSignature), -} - -#[cfg(feature = "alloc")] -impl Default for StellarValueExt { - fn default() -> Self { - Self::Basic - } -} - -impl StellarValueExt { - const _VARIANTS: &[StellarValueType] = &[StellarValueType::Basic, StellarValueType::Signed]; - pub const VARIANTS: [StellarValueType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Basic", "Signed"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Basic => "Basic", - Self::Signed(_) => "Signed", - } - } - - #[must_use] - pub const fn discriminant(&self) -> StellarValueType { - #[allow(clippy::match_same_arms)] - match self { - Self::Basic => StellarValueType::Basic, - Self::Signed(_) => StellarValueType::Signed, - } - } - - #[must_use] - pub const fn variants() -> [StellarValueType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for StellarValueExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for StellarValueExt { - #[must_use] - fn discriminant(&self) -> StellarValueType { - Self::discriminant(self) - } -} - -impl Variants for StellarValueExt { - fn variants() -> slice::Iter<'static, StellarValueType> { - Self::VARIANTS.iter() - } -} - -impl Union for StellarValueExt {} - -impl ReadXdr for StellarValueExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: StellarValueType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - StellarValueType::Basic => Self::Basic, - StellarValueType::Signed => Self::Signed(LedgerCloseValueSignature::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for StellarValueExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Basic => ().write_xdr(w)?, - Self::Signed(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// StellarValue is an XDR Struct defined as: -/// -/// ```text -/// struct StellarValue -/// { -/// Hash txSetHash; // transaction set to apply to previous ledger -/// TimePoint closeTime; // network close time -/// -/// // upgrades to apply to the previous ledger (usually empty) -/// // this is a vector of encoded 'LedgerUpgrade' so that nodes can drop -/// // unknown steps during consensus if needed. -/// // see notes below on 'LedgerUpgrade' for more detail -/// // max size is dictated by number of upgrade types (+ room for future) -/// UpgradeType upgrades<6>; -/// -/// // reserved for future use -/// union switch (StellarValueType v) -/// { -/// case STELLAR_VALUE_BASIC: -/// void; -/// case STELLAR_VALUE_SIGNED: -/// LedgerCloseValueSignature lcValueSignature; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct StellarValue { - pub tx_set_hash: Hash, - pub close_time: TimePoint, - pub upgrades: VecM, - pub ext: StellarValueExt, -} - -impl ReadXdr for StellarValue { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - tx_set_hash: Hash::read_xdr(r)?, - close_time: TimePoint::read_xdr(r)?, - upgrades: VecM::::read_xdr(r)?, - ext: StellarValueExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for StellarValue { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.tx_set_hash.write_xdr(w)?; - self.close_time.write_xdr(w)?; - self.upgrades.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// MaskLedgerHeaderFlags is an XDR Const defined as: -/// -/// ```text -/// const MASK_LEDGER_HEADER_FLAGS = 0x7; -/// ``` -/// -pub const MASK_LEDGER_HEADER_FLAGS: u64 = 0x7; - -/// LedgerHeaderFlags is an XDR Enum defined as: -/// -/// ```text -/// enum LedgerHeaderFlags -/// { -/// DISABLE_LIQUIDITY_POOL_TRADING_FLAG = 0x1, -/// DISABLE_LIQUIDITY_POOL_DEPOSIT_FLAG = 0x2, -/// DISABLE_LIQUIDITY_POOL_WITHDRAWAL_FLAG = 0x4 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum LedgerHeaderFlags { - #[cfg_attr(feature = "alloc", default)] - TradingFlag = 1, - DepositFlag = 2, - WithdrawalFlag = 4, -} - -impl LedgerHeaderFlags { - const _VARIANTS: &[LedgerHeaderFlags] = &[ - LedgerHeaderFlags::TradingFlag, - LedgerHeaderFlags::DepositFlag, - LedgerHeaderFlags::WithdrawalFlag, - ]; - pub const VARIANTS: [LedgerHeaderFlags; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["TradingFlag", "DepositFlag", "WithdrawalFlag"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::TradingFlag => "TradingFlag", - Self::DepositFlag => "DepositFlag", - Self::WithdrawalFlag => "WithdrawalFlag", - } - } - - #[must_use] - pub const fn variants() -> [LedgerHeaderFlags; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerHeaderFlags { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for LedgerHeaderFlags { - fn variants() -> slice::Iter<'static, LedgerHeaderFlags> { - Self::VARIANTS.iter() - } -} - -impl Enum for LedgerHeaderFlags {} - -impl fmt::Display for LedgerHeaderFlags { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for LedgerHeaderFlags { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 1 => LedgerHeaderFlags::TradingFlag, - 2 => LedgerHeaderFlags::DepositFlag, - 4 => LedgerHeaderFlags::WithdrawalFlag, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: LedgerHeaderFlags) -> Self { - e as Self - } -} - -impl ReadXdr for LedgerHeaderFlags { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerHeaderFlags { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// LedgerHeaderExtensionV1Ext is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LedgerHeaderExtensionV1Ext { - V0, -} - -#[cfg(feature = "alloc")] -impl Default for LedgerHeaderExtensionV1Ext { - fn default() -> Self { - Self::V0 - } -} - -impl LedgerHeaderExtensionV1Ext { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerHeaderExtensionV1Ext { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LedgerHeaderExtensionV1Ext { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for LedgerHeaderExtensionV1Ext { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for LedgerHeaderExtensionV1Ext {} - -impl ReadXdr for LedgerHeaderExtensionV1Ext { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerHeaderExtensionV1Ext { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// LedgerHeaderExtensionV1 is an XDR Struct defined as: -/// -/// ```text -/// struct LedgerHeaderExtensionV1 -/// { -/// uint32 flags; // LedgerHeaderFlags -/// -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerHeaderExtensionV1 { - pub flags: u32, - pub ext: LedgerHeaderExtensionV1Ext, -} - -impl ReadXdr for LedgerHeaderExtensionV1 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - flags: u32::read_xdr(r)?, - ext: LedgerHeaderExtensionV1Ext::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerHeaderExtensionV1 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.flags.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerHeaderExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// LedgerHeaderExtensionV1 v1; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LedgerHeaderExt { - V0, - V1(LedgerHeaderExtensionV1), -} - -#[cfg(feature = "alloc")] -impl Default for LedgerHeaderExt { - fn default() -> Self { - Self::V0 - } -} - -impl LedgerHeaderExt { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerHeaderExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LedgerHeaderExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for LedgerHeaderExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for LedgerHeaderExt {} - -impl ReadXdr for LedgerHeaderExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 1 => Self::V1(LedgerHeaderExtensionV1::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerHeaderExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// LedgerHeader is an XDR Struct defined as: -/// -/// ```text -/// struct LedgerHeader -/// { -/// uint32 ledgerVersion; // the protocol version of the ledger -/// Hash previousLedgerHash; // hash of the previous ledger header -/// StellarValue scpValue; // what consensus agreed to -/// Hash txSetResultHash; // the TransactionResultSet that led to this ledger -/// Hash bucketListHash; // hash of the ledger state -/// -/// uint32 ledgerSeq; // sequence number of this ledger -/// -/// int64 totalCoins; // total number of stroops in existence. -/// // 10,000,000 stroops in 1 XLM -/// -/// int64 feePool; // fees burned since last inflation run -/// uint32 inflationSeq; // inflation sequence number -/// -/// uint64 idPool; // last used global ID, used for generating objects -/// -/// uint32 baseFee; // base fee per operation in stroops -/// uint32 baseReserve; // account base reserve in stroops -/// -/// uint32 maxTxSetSize; // maximum size a transaction set can be -/// -/// Hash skipList[4]; // hashes of ledgers in the past. allows you to jump back -/// // in time without walking the chain back ledger by ledger -/// // each slot contains the oldest ledger that is mod of -/// // either 50 5000 50000 or 500000 depending on index -/// // skipList[0] mod(50), skipList[1] mod(5000), etc -/// -/// // reserved for future use -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// LedgerHeaderExtensionV1 v1; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerHeader { - pub ledger_version: u32, - pub previous_ledger_hash: Hash, - pub scp_value: StellarValue, - pub tx_set_result_hash: Hash, - pub bucket_list_hash: Hash, - pub ledger_seq: u32, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub total_coins: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub fee_pool: i64, - pub inflation_seq: u32, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub id_pool: u64, - pub base_fee: u32, - pub base_reserve: u32, - pub max_tx_set_size: u32, - pub skip_list: [Hash; 4], - pub ext: LedgerHeaderExt, -} - -impl ReadXdr for LedgerHeader { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ledger_version: u32::read_xdr(r)?, - previous_ledger_hash: Hash::read_xdr(r)?, - scp_value: StellarValue::read_xdr(r)?, - tx_set_result_hash: Hash::read_xdr(r)?, - bucket_list_hash: Hash::read_xdr(r)?, - ledger_seq: u32::read_xdr(r)?, - total_coins: i64::read_xdr(r)?, - fee_pool: i64::read_xdr(r)?, - inflation_seq: u32::read_xdr(r)?, - id_pool: u64::read_xdr(r)?, - base_fee: u32::read_xdr(r)?, - base_reserve: u32::read_xdr(r)?, - max_tx_set_size: u32::read_xdr(r)?, - skip_list: <[Hash; 4]>::read_xdr(r)?, - ext: LedgerHeaderExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerHeader { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ledger_version.write_xdr(w)?; - self.previous_ledger_hash.write_xdr(w)?; - self.scp_value.write_xdr(w)?; - self.tx_set_result_hash.write_xdr(w)?; - self.bucket_list_hash.write_xdr(w)?; - self.ledger_seq.write_xdr(w)?; - self.total_coins.write_xdr(w)?; - self.fee_pool.write_xdr(w)?; - self.inflation_seq.write_xdr(w)?; - self.id_pool.write_xdr(w)?; - self.base_fee.write_xdr(w)?; - self.base_reserve.write_xdr(w)?; - self.max_tx_set_size.write_xdr(w)?; - self.skip_list.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerUpgradeType is an XDR Enum defined as: -/// -/// ```text -/// enum LedgerUpgradeType -/// { -/// LEDGER_UPGRADE_VERSION = 1, -/// LEDGER_UPGRADE_BASE_FEE = 2, -/// LEDGER_UPGRADE_MAX_TX_SET_SIZE = 3, -/// LEDGER_UPGRADE_BASE_RESERVE = 4, -/// LEDGER_UPGRADE_FLAGS = 5, -/// LEDGER_UPGRADE_CONFIG = 6, -/// LEDGER_UPGRADE_MAX_SOROBAN_TX_SET_SIZE = 7 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum LedgerUpgradeType { - #[cfg_attr(feature = "alloc", default)] - Version = 1, - BaseFee = 2, - MaxTxSetSize = 3, - BaseReserve = 4, - Flags = 5, - Config = 6, - MaxSorobanTxSetSize = 7, -} - -impl LedgerUpgradeType { - const _VARIANTS: &[LedgerUpgradeType] = &[ - LedgerUpgradeType::Version, - LedgerUpgradeType::BaseFee, - LedgerUpgradeType::MaxTxSetSize, - LedgerUpgradeType::BaseReserve, - LedgerUpgradeType::Flags, - LedgerUpgradeType::Config, - LedgerUpgradeType::MaxSorobanTxSetSize, - ]; - pub const VARIANTS: [LedgerUpgradeType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Version", - "BaseFee", - "MaxTxSetSize", - "BaseReserve", - "Flags", - "Config", - "MaxSorobanTxSetSize", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Version => "Version", - Self::BaseFee => "BaseFee", - Self::MaxTxSetSize => "MaxTxSetSize", - Self::BaseReserve => "BaseReserve", - Self::Flags => "Flags", - Self::Config => "Config", - Self::MaxSorobanTxSetSize => "MaxSorobanTxSetSize", - } - } - - #[must_use] - pub const fn variants() -> [LedgerUpgradeType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerUpgradeType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for LedgerUpgradeType { - fn variants() -> slice::Iter<'static, LedgerUpgradeType> { - Self::VARIANTS.iter() - } -} - -impl Enum for LedgerUpgradeType {} - -impl fmt::Display for LedgerUpgradeType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for LedgerUpgradeType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 1 => LedgerUpgradeType::Version, - 2 => LedgerUpgradeType::BaseFee, - 3 => LedgerUpgradeType::MaxTxSetSize, - 4 => LedgerUpgradeType::BaseReserve, - 5 => LedgerUpgradeType::Flags, - 6 => LedgerUpgradeType::Config, - 7 => LedgerUpgradeType::MaxSorobanTxSetSize, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: LedgerUpgradeType) -> Self { - e as Self - } -} - -impl ReadXdr for LedgerUpgradeType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerUpgradeType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ConfigUpgradeSetKey is an XDR Struct defined as: -/// -/// ```text -/// struct ConfigUpgradeSetKey { -/// ContractID contractID; -/// Hash contentHash; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ConfigUpgradeSetKey { - pub contract_id: ContractId, - pub content_hash: Hash, -} - -impl ReadXdr for ConfigUpgradeSetKey { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - contract_id: ContractId::read_xdr(r)?, - content_hash: Hash::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ConfigUpgradeSetKey { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.contract_id.write_xdr(w)?; - self.content_hash.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerUpgrade is an XDR Union defined as: -/// -/// ```text -/// union LedgerUpgrade switch (LedgerUpgradeType type) -/// { -/// case LEDGER_UPGRADE_VERSION: -/// uint32 newLedgerVersion; // update ledgerVersion -/// case LEDGER_UPGRADE_BASE_FEE: -/// uint32 newBaseFee; // update baseFee -/// case LEDGER_UPGRADE_MAX_TX_SET_SIZE: -/// uint32 newMaxTxSetSize; // update maxTxSetSize -/// case LEDGER_UPGRADE_BASE_RESERVE: -/// uint32 newBaseReserve; // update baseReserve -/// case LEDGER_UPGRADE_FLAGS: -/// uint32 newFlags; // update flags -/// case LEDGER_UPGRADE_CONFIG: -/// // Update arbitrary `ConfigSetting` entries identified by the key. -/// ConfigUpgradeSetKey newConfig; -/// case LEDGER_UPGRADE_MAX_SOROBAN_TX_SET_SIZE: -/// // Update ConfigSettingContractExecutionLanesV0.ledgerMaxTxCount without -/// // using `LEDGER_UPGRADE_CONFIG`. -/// uint32 newMaxSorobanTxSetSize; -/// }; -/// ``` -/// -// union with discriminant LedgerUpgradeType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LedgerUpgrade { - Version(u32), - BaseFee(u32), - MaxTxSetSize(u32), - BaseReserve(u32), - Flags(u32), - Config(ConfigUpgradeSetKey), - MaxSorobanTxSetSize(u32), -} - -#[cfg(feature = "alloc")] -impl Default for LedgerUpgrade { - fn default() -> Self { - Self::Version(u32::default()) - } -} - -impl LedgerUpgrade { - const _VARIANTS: &[LedgerUpgradeType] = &[ - LedgerUpgradeType::Version, - LedgerUpgradeType::BaseFee, - LedgerUpgradeType::MaxTxSetSize, - LedgerUpgradeType::BaseReserve, - LedgerUpgradeType::Flags, - LedgerUpgradeType::Config, - LedgerUpgradeType::MaxSorobanTxSetSize, - ]; - pub const VARIANTS: [LedgerUpgradeType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Version", - "BaseFee", - "MaxTxSetSize", - "BaseReserve", - "Flags", - "Config", - "MaxSorobanTxSetSize", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Version(_) => "Version", - Self::BaseFee(_) => "BaseFee", - Self::MaxTxSetSize(_) => "MaxTxSetSize", - Self::BaseReserve(_) => "BaseReserve", - Self::Flags(_) => "Flags", - Self::Config(_) => "Config", - Self::MaxSorobanTxSetSize(_) => "MaxSorobanTxSetSize", - } - } - - #[must_use] - pub const fn discriminant(&self) -> LedgerUpgradeType { - #[allow(clippy::match_same_arms)] - match self { - Self::Version(_) => LedgerUpgradeType::Version, - Self::BaseFee(_) => LedgerUpgradeType::BaseFee, - Self::MaxTxSetSize(_) => LedgerUpgradeType::MaxTxSetSize, - Self::BaseReserve(_) => LedgerUpgradeType::BaseReserve, - Self::Flags(_) => LedgerUpgradeType::Flags, - Self::Config(_) => LedgerUpgradeType::Config, - Self::MaxSorobanTxSetSize(_) => LedgerUpgradeType::MaxSorobanTxSetSize, - } - } - - #[must_use] - pub const fn variants() -> [LedgerUpgradeType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerUpgrade { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LedgerUpgrade { - #[must_use] - fn discriminant(&self) -> LedgerUpgradeType { - Self::discriminant(self) - } -} - -impl Variants for LedgerUpgrade { - fn variants() -> slice::Iter<'static, LedgerUpgradeType> { - Self::VARIANTS.iter() - } -} - -impl Union for LedgerUpgrade {} - -impl ReadXdr for LedgerUpgrade { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: LedgerUpgradeType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - LedgerUpgradeType::Version => Self::Version(u32::read_xdr(r)?), - LedgerUpgradeType::BaseFee => Self::BaseFee(u32::read_xdr(r)?), - LedgerUpgradeType::MaxTxSetSize => Self::MaxTxSetSize(u32::read_xdr(r)?), - LedgerUpgradeType::BaseReserve => Self::BaseReserve(u32::read_xdr(r)?), - LedgerUpgradeType::Flags => Self::Flags(u32::read_xdr(r)?), - LedgerUpgradeType::Config => Self::Config(ConfigUpgradeSetKey::read_xdr(r)?), - LedgerUpgradeType::MaxSorobanTxSetSize => { - Self::MaxSorobanTxSetSize(u32::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerUpgrade { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Version(v) => v.write_xdr(w)?, - Self::BaseFee(v) => v.write_xdr(w)?, - Self::MaxTxSetSize(v) => v.write_xdr(w)?, - Self::BaseReserve(v) => v.write_xdr(w)?, - Self::Flags(v) => v.write_xdr(w)?, - Self::Config(v) => v.write_xdr(w)?, - Self::MaxSorobanTxSetSize(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ConfigUpgradeSet is an XDR Struct defined as: -/// -/// ```text -/// struct ConfigUpgradeSet { -/// ConfigSettingEntry updatedEntry<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ConfigUpgradeSet { - pub updated_entry: VecM, -} - -impl ReadXdr for ConfigUpgradeSet { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - updated_entry: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ConfigUpgradeSet { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.updated_entry.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TxSetComponentType is an XDR Enum defined as: -/// -/// ```text -/// enum TxSetComponentType -/// { -/// // txs with effective fee <= bid derived from a base fee (if any). -/// // If base fee is not specified, no discount is applied. -/// TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE = 0 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum TxSetComponentType { - #[cfg_attr(feature = "alloc", default)] - TxsetCompTxsMaybeDiscountedFee = 0, -} - -impl TxSetComponentType { - const _VARIANTS: &[TxSetComponentType] = &[TxSetComponentType::TxsetCompTxsMaybeDiscountedFee]; - pub const VARIANTS: [TxSetComponentType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["TxsetCompTxsMaybeDiscountedFee"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::TxsetCompTxsMaybeDiscountedFee => "TxsetCompTxsMaybeDiscountedFee", - } - } - - #[must_use] - pub const fn variants() -> [TxSetComponentType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TxSetComponentType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for TxSetComponentType { - fn variants() -> slice::Iter<'static, TxSetComponentType> { - Self::VARIANTS.iter() - } -} - -impl Enum for TxSetComponentType {} - -impl fmt::Display for TxSetComponentType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for TxSetComponentType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => TxSetComponentType::TxsetCompTxsMaybeDiscountedFee, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: TxSetComponentType) -> Self { - e as Self - } -} - -impl ReadXdr for TxSetComponentType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for TxSetComponentType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// DependentTxCluster is an XDR Typedef defined as: -/// -/// ```text -/// typedef TransactionEnvelope DependentTxCluster<>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct DependentTxCluster(pub VecM); - -impl From for VecM { - #[must_use] - fn from(x: DependentTxCluster) -> Self { - x.0 - } -} - -impl From> for DependentTxCluster { - #[must_use] - fn from(x: VecM) -> Self { - DependentTxCluster(x) - } -} - -impl AsRef> for DependentTxCluster { - #[must_use] - fn as_ref(&self) -> &VecM { - &self.0 - } -} - -impl ReadXdr for DependentTxCluster { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = VecM::::read_xdr(r)?; - let v = DependentTxCluster(i); - Ok(v) - }) - } -} - -impl WriteXdr for DependentTxCluster { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for DependentTxCluster { - type Target = VecM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: DependentTxCluster) -> Self { - x.0 .0 - } -} - -impl TryFrom> for DependentTxCluster { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(DependentTxCluster(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for DependentTxCluster { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(DependentTxCluster(x.try_into()?)) - } -} - -impl AsRef> for DependentTxCluster { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[TransactionEnvelope]> for DependentTxCluster { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[TransactionEnvelope] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[TransactionEnvelope] { - self.0 .0 - } -} - -/// ParallelTxExecutionStage is an XDR Typedef defined as: -/// -/// ```text -/// typedef DependentTxCluster ParallelTxExecutionStage<>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct ParallelTxExecutionStage(pub VecM); - -impl From for VecM { - #[must_use] - fn from(x: ParallelTxExecutionStage) -> Self { - x.0 - } -} - -impl From> for ParallelTxExecutionStage { - #[must_use] - fn from(x: VecM) -> Self { - ParallelTxExecutionStage(x) - } -} - -impl AsRef> for ParallelTxExecutionStage { - #[must_use] - fn as_ref(&self) -> &VecM { - &self.0 - } -} - -impl ReadXdr for ParallelTxExecutionStage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = VecM::::read_xdr(r)?; - let v = ParallelTxExecutionStage(i); - Ok(v) - }) - } -} - -impl WriteXdr for ParallelTxExecutionStage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for ParallelTxExecutionStage { - type Target = VecM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: ParallelTxExecutionStage) -> Self { - x.0 .0 - } -} - -impl TryFrom> for ParallelTxExecutionStage { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(ParallelTxExecutionStage(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for ParallelTxExecutionStage { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(ParallelTxExecutionStage(x.try_into()?)) - } -} - -impl AsRef> for ParallelTxExecutionStage { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[DependentTxCluster]> for ParallelTxExecutionStage { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[DependentTxCluster] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[DependentTxCluster] { - self.0 .0 - } -} - -/// ParallelTxsComponent is an XDR Struct defined as: -/// -/// ```text -/// struct ParallelTxsComponent -/// { -/// int64* baseFee; -/// // A sequence of stages that *may* have arbitrary data dependencies between -/// // each other, i.e. in a general case the stage execution order may not be -/// // arbitrarily shuffled without affecting the end result. -/// ParallelTxExecutionStage executionStages<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ParallelTxsComponent { - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "Option") - )] - pub base_fee: Option, - pub execution_stages: VecM, -} - -impl ReadXdr for ParallelTxsComponent { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - base_fee: Option::::read_xdr(r)?, - execution_stages: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ParallelTxsComponent { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.base_fee.write_xdr(w)?; - self.execution_stages.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// int64* baseFee; -/// TransactionEnvelope txs<>; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TxSetComponentTxsMaybeDiscountedFee { - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "Option") - )] - pub base_fee: Option, - pub txs: VecM, -} - -impl ReadXdr for TxSetComponentTxsMaybeDiscountedFee { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - base_fee: Option::::read_xdr(r)?, - txs: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TxSetComponentTxsMaybeDiscountedFee { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.base_fee.write_xdr(w)?; - self.txs.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TxSetComponent is an XDR Union defined as: -/// -/// ```text -/// union TxSetComponent switch (TxSetComponentType type) -/// { -/// case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: -/// struct -/// { -/// int64* baseFee; -/// TransactionEnvelope txs<>; -/// } txsMaybeDiscountedFee; -/// }; -/// ``` -/// -// union with discriminant TxSetComponentType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TxSetComponent { - TxsetCompTxsMaybeDiscountedFee(TxSetComponentTxsMaybeDiscountedFee), -} - -#[cfg(feature = "alloc")] -impl Default for TxSetComponent { - fn default() -> Self { - Self::TxsetCompTxsMaybeDiscountedFee(TxSetComponentTxsMaybeDiscountedFee::default()) - } -} - -impl TxSetComponent { - const _VARIANTS: &[TxSetComponentType] = &[TxSetComponentType::TxsetCompTxsMaybeDiscountedFee]; - pub const VARIANTS: [TxSetComponentType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["TxsetCompTxsMaybeDiscountedFee"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::TxsetCompTxsMaybeDiscountedFee(_) => "TxsetCompTxsMaybeDiscountedFee", - } - } - - #[must_use] - pub const fn discriminant(&self) -> TxSetComponentType { - #[allow(clippy::match_same_arms)] - match self { - Self::TxsetCompTxsMaybeDiscountedFee(_) => { - TxSetComponentType::TxsetCompTxsMaybeDiscountedFee - } - } - } - - #[must_use] - pub const fn variants() -> [TxSetComponentType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TxSetComponent { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TxSetComponent { - #[must_use] - fn discriminant(&self) -> TxSetComponentType { - Self::discriminant(self) - } -} - -impl Variants for TxSetComponent { - fn variants() -> slice::Iter<'static, TxSetComponentType> { - Self::VARIANTS.iter() - } -} - -impl Union for TxSetComponent {} - -impl ReadXdr for TxSetComponent { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: TxSetComponentType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - TxSetComponentType::TxsetCompTxsMaybeDiscountedFee => { - Self::TxsetCompTxsMaybeDiscountedFee( - TxSetComponentTxsMaybeDiscountedFee::read_xdr(r)?, - ) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TxSetComponent { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::TxsetCompTxsMaybeDiscountedFee(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TransactionPhase is an XDR Union defined as: -/// -/// ```text -/// union TransactionPhase switch (int v) -/// { -/// case 0: -/// TxSetComponent v0Components<>; -/// case 1: -/// ParallelTxsComponent parallelTxsComponent; -/// }; -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TransactionPhase { - V0(VecM), - V1(ParallelTxsComponent), -} - -#[cfg(feature = "alloc")] -impl Default for TransactionPhase { - fn default() -> Self { - Self::V0(VecM::::default()) - } -} - -impl TransactionPhase { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0(_) => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0(_) => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TransactionPhase { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TransactionPhase { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for TransactionPhase { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for TransactionPhase {} - -impl ReadXdr for TransactionPhase { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0(VecM::::read_xdr(r)?), - 1 => Self::V1(ParallelTxsComponent::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TransactionPhase { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0(v) => v.write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TransactionSet is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionSet -/// { -/// Hash previousLedgerHash; -/// TransactionEnvelope txs<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionSet { - pub previous_ledger_hash: Hash, - pub txs: VecM, -} - -impl ReadXdr for TransactionSet { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - previous_ledger_hash: Hash::read_xdr(r)?, - txs: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionSet { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.previous_ledger_hash.write_xdr(w)?; - self.txs.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionSetV1 is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionSetV1 -/// { -/// Hash previousLedgerHash; -/// TransactionPhase phases<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionSetV1 { - pub previous_ledger_hash: Hash, - pub phases: VecM, -} - -impl ReadXdr for TransactionSetV1 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - previous_ledger_hash: Hash::read_xdr(r)?, - phases: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionSetV1 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.previous_ledger_hash.write_xdr(w)?; - self.phases.write_xdr(w)?; - Ok(()) - }) - } -} - -/// GeneralizedTransactionSet is an XDR Union defined as: -/// -/// ```text -/// union GeneralizedTransactionSet switch (int v) -/// { -/// // We consider the legacy TransactionSet to be v0. -/// case 1: -/// TransactionSetV1 v1TxSet; -/// }; -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum GeneralizedTransactionSet { - V1(TransactionSetV1), -} - -#[cfg(feature = "alloc")] -impl Default for GeneralizedTransactionSet { - fn default() -> Self { - Self::V1(TransactionSetV1::default()) - } -} - -impl GeneralizedTransactionSet { - const _VARIANTS: &[i32] = &[1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for GeneralizedTransactionSet { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for GeneralizedTransactionSet { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for GeneralizedTransactionSet { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for GeneralizedTransactionSet {} - -impl ReadXdr for GeneralizedTransactionSet { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 1 => Self::V1(TransactionSetV1::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for GeneralizedTransactionSet { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TransactionResultPair is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionResultPair -/// { -/// Hash transactionHash; -/// TransactionResult result; // result for the transaction -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionResultPair { - pub transaction_hash: Hash, - pub result: TransactionResult, -} - -impl ReadXdr for TransactionResultPair { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - transaction_hash: Hash::read_xdr(r)?, - result: TransactionResult::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionResultPair { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.transaction_hash.write_xdr(w)?; - self.result.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionResultSet is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionResultSet -/// { -/// TransactionResultPair results<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionResultSet { - pub results: VecM, -} - -impl ReadXdr for TransactionResultSet { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - results: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionResultSet { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.results.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionHistoryEntryExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// GeneralizedTransactionSet generalizedTxSet; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TransactionHistoryEntryExt { - V0, - V1(GeneralizedTransactionSet), -} - -#[cfg(feature = "alloc")] -impl Default for TransactionHistoryEntryExt { - fn default() -> Self { - Self::V0 - } -} - -impl TransactionHistoryEntryExt { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TransactionHistoryEntryExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TransactionHistoryEntryExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for TransactionHistoryEntryExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for TransactionHistoryEntryExt {} - -impl ReadXdr for TransactionHistoryEntryExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 1 => Self::V1(GeneralizedTransactionSet::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TransactionHistoryEntryExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TransactionHistoryEntry is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionHistoryEntry -/// { -/// uint32 ledgerSeq; -/// TransactionSet txSet; -/// -/// // when v != 0, txSet must be empty -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// GeneralizedTransactionSet generalizedTxSet; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionHistoryEntry { - pub ledger_seq: u32, - pub tx_set: TransactionSet, - pub ext: TransactionHistoryEntryExt, -} - -impl ReadXdr for TransactionHistoryEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ledger_seq: u32::read_xdr(r)?, - tx_set: TransactionSet::read_xdr(r)?, - ext: TransactionHistoryEntryExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionHistoryEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ledger_seq.write_xdr(w)?; - self.tx_set.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionHistoryResultEntryExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TransactionHistoryResultEntryExt { - V0, -} - -#[cfg(feature = "alloc")] -impl Default for TransactionHistoryResultEntryExt { - fn default() -> Self { - Self::V0 - } -} - -impl TransactionHistoryResultEntryExt { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TransactionHistoryResultEntryExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TransactionHistoryResultEntryExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for TransactionHistoryResultEntryExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for TransactionHistoryResultEntryExt {} - -impl ReadXdr for TransactionHistoryResultEntryExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TransactionHistoryResultEntryExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TransactionHistoryResultEntry is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionHistoryResultEntry -/// { -/// uint32 ledgerSeq; -/// TransactionResultSet txResultSet; -/// -/// // reserved for future use -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionHistoryResultEntry { - pub ledger_seq: u32, - pub tx_result_set: TransactionResultSet, - pub ext: TransactionHistoryResultEntryExt, -} - -impl ReadXdr for TransactionHistoryResultEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ledger_seq: u32::read_xdr(r)?, - tx_result_set: TransactionResultSet::read_xdr(r)?, - ext: TransactionHistoryResultEntryExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionHistoryResultEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ledger_seq.write_xdr(w)?; - self.tx_result_set.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerHeaderHistoryEntryExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LedgerHeaderHistoryEntryExt { - V0, -} - -#[cfg(feature = "alloc")] -impl Default for LedgerHeaderHistoryEntryExt { - fn default() -> Self { - Self::V0 - } -} - -impl LedgerHeaderHistoryEntryExt { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerHeaderHistoryEntryExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LedgerHeaderHistoryEntryExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for LedgerHeaderHistoryEntryExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for LedgerHeaderHistoryEntryExt {} - -impl ReadXdr for LedgerHeaderHistoryEntryExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerHeaderHistoryEntryExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// LedgerHeaderHistoryEntry is an XDR Struct defined as: -/// -/// ```text -/// struct LedgerHeaderHistoryEntry -/// { -/// Hash hash; -/// LedgerHeader header; -/// -/// // reserved for future use -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerHeaderHistoryEntry { - pub hash: Hash, - pub header: LedgerHeader, - pub ext: LedgerHeaderHistoryEntryExt, -} - -impl ReadXdr for LedgerHeaderHistoryEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - hash: Hash::read_xdr(r)?, - header: LedgerHeader::read_xdr(r)?, - ext: LedgerHeaderHistoryEntryExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerHeaderHistoryEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.hash.write_xdr(w)?; - self.header.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerScpMessages is an XDR Struct defined as: -/// -/// ```text -/// struct LedgerSCPMessages -/// { -/// uint32 ledgerSeq; -/// SCPEnvelope messages<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerScpMessages { - pub ledger_seq: u32, - pub messages: VecM, -} - -impl ReadXdr for LedgerScpMessages { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ledger_seq: u32::read_xdr(r)?, - messages: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerScpMessages { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ledger_seq.write_xdr(w)?; - self.messages.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScpHistoryEntryV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SCPHistoryEntryV0 -/// { -/// SCPQuorumSet quorumSets<>; // additional quorum sets used by ledgerMessages -/// LedgerSCPMessages ledgerMessages; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ScpHistoryEntryV0 { - pub quorum_sets: VecM, - pub ledger_messages: LedgerScpMessages, -} - -impl ReadXdr for ScpHistoryEntryV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - quorum_sets: VecM::::read_xdr(r)?, - ledger_messages: LedgerScpMessages::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ScpHistoryEntryV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.quorum_sets.write_xdr(w)?; - self.ledger_messages.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ScpHistoryEntry is an XDR Union defined as: -/// -/// ```text -/// union SCPHistoryEntry switch (int v) -/// { -/// case 0: -/// SCPHistoryEntryV0 v0; -/// }; -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ScpHistoryEntry { - V0(ScpHistoryEntryV0), -} - -#[cfg(feature = "alloc")] -impl Default for ScpHistoryEntry { - fn default() -> Self { - Self::V0(ScpHistoryEntryV0::default()) - } -} - -impl ScpHistoryEntry { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0(_) => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0(_) => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ScpHistoryEntry { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ScpHistoryEntry { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for ScpHistoryEntry { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for ScpHistoryEntry {} - -impl ReadXdr for ScpHistoryEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0(ScpHistoryEntryV0::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ScpHistoryEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// LedgerEntryChangeType is an XDR Enum defined as: -/// -/// ```text -/// enum LedgerEntryChangeType -/// { -/// LEDGER_ENTRY_CREATED = 0, // entry was added to the ledger -/// LEDGER_ENTRY_UPDATED = 1, // entry was modified in the ledger -/// LEDGER_ENTRY_REMOVED = 2, // entry was removed from the ledger -/// LEDGER_ENTRY_STATE = 3, // value of the entry -/// LEDGER_ENTRY_RESTORED = 4 // archived entry was restored in the ledger -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum LedgerEntryChangeType { - #[cfg_attr(feature = "alloc", default)] - Created = 0, - Updated = 1, - Removed = 2, - State = 3, - Restored = 4, -} - -impl LedgerEntryChangeType { - const _VARIANTS: &[LedgerEntryChangeType] = &[ - LedgerEntryChangeType::Created, - LedgerEntryChangeType::Updated, - LedgerEntryChangeType::Removed, - LedgerEntryChangeType::State, - LedgerEntryChangeType::Restored, - ]; - pub const VARIANTS: [LedgerEntryChangeType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Removed", "State", "Restored"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Created => "Created", - Self::Updated => "Updated", - Self::Removed => "Removed", - Self::State => "State", - Self::Restored => "Restored", - } - } - - #[must_use] - pub const fn variants() -> [LedgerEntryChangeType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerEntryChangeType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for LedgerEntryChangeType { - fn variants() -> slice::Iter<'static, LedgerEntryChangeType> { - Self::VARIANTS.iter() - } -} - -impl Enum for LedgerEntryChangeType {} - -impl fmt::Display for LedgerEntryChangeType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for LedgerEntryChangeType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => LedgerEntryChangeType::Created, - 1 => LedgerEntryChangeType::Updated, - 2 => LedgerEntryChangeType::Removed, - 3 => LedgerEntryChangeType::State, - 4 => LedgerEntryChangeType::Restored, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: LedgerEntryChangeType) -> Self { - e as Self - } -} - -impl ReadXdr for LedgerEntryChangeType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerEntryChangeType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// LedgerEntryChange is an XDR Union defined as: -/// -/// ```text -/// union LedgerEntryChange switch (LedgerEntryChangeType type) -/// { -/// case LEDGER_ENTRY_CREATED: -/// LedgerEntry created; -/// case LEDGER_ENTRY_UPDATED: -/// LedgerEntry updated; -/// case LEDGER_ENTRY_REMOVED: -/// LedgerKey removed; -/// case LEDGER_ENTRY_STATE: -/// LedgerEntry state; -/// case LEDGER_ENTRY_RESTORED: -/// LedgerEntry restored; -/// }; -/// ``` -/// -// union with discriminant LedgerEntryChangeType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LedgerEntryChange { - Created(LedgerEntry), - Updated(LedgerEntry), - Removed(LedgerKey), - State(LedgerEntry), - Restored(LedgerEntry), -} - -#[cfg(feature = "alloc")] -impl Default for LedgerEntryChange { - fn default() -> Self { - Self::Created(LedgerEntry::default()) - } -} - -impl LedgerEntryChange { - const _VARIANTS: &[LedgerEntryChangeType] = &[ - LedgerEntryChangeType::Created, - LedgerEntryChangeType::Updated, - LedgerEntryChangeType::Removed, - LedgerEntryChangeType::State, - LedgerEntryChangeType::Restored, - ]; - pub const VARIANTS: [LedgerEntryChangeType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Removed", "State", "Restored"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Created(_) => "Created", - Self::Updated(_) => "Updated", - Self::Removed(_) => "Removed", - Self::State(_) => "State", - Self::Restored(_) => "Restored", - } - } - - #[must_use] - pub const fn discriminant(&self) -> LedgerEntryChangeType { - #[allow(clippy::match_same_arms)] - match self { - Self::Created(_) => LedgerEntryChangeType::Created, - Self::Updated(_) => LedgerEntryChangeType::Updated, - Self::Removed(_) => LedgerEntryChangeType::Removed, - Self::State(_) => LedgerEntryChangeType::State, - Self::Restored(_) => LedgerEntryChangeType::Restored, - } - } - - #[must_use] - pub const fn variants() -> [LedgerEntryChangeType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerEntryChange { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LedgerEntryChange { - #[must_use] - fn discriminant(&self) -> LedgerEntryChangeType { - Self::discriminant(self) - } -} - -impl Variants for LedgerEntryChange { - fn variants() -> slice::Iter<'static, LedgerEntryChangeType> { - Self::VARIANTS.iter() - } -} - -impl Union for LedgerEntryChange {} - -impl ReadXdr for LedgerEntryChange { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: LedgerEntryChangeType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - LedgerEntryChangeType::Created => Self::Created(LedgerEntry::read_xdr(r)?), - LedgerEntryChangeType::Updated => Self::Updated(LedgerEntry::read_xdr(r)?), - LedgerEntryChangeType::Removed => Self::Removed(LedgerKey::read_xdr(r)?), - LedgerEntryChangeType::State => Self::State(LedgerEntry::read_xdr(r)?), - LedgerEntryChangeType::Restored => Self::Restored(LedgerEntry::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerEntryChange { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Created(v) => v.write_xdr(w)?, - Self::Updated(v) => v.write_xdr(w)?, - Self::Removed(v) => v.write_xdr(w)?, - Self::State(v) => v.write_xdr(w)?, - Self::Restored(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// LedgerEntryChanges is an XDR Typedef defined as: -/// -/// ```text -/// typedef LedgerEntryChange LedgerEntryChanges<>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct LedgerEntryChanges(pub VecM); - -impl From for VecM { - #[must_use] - fn from(x: LedgerEntryChanges) -> Self { - x.0 - } -} - -impl From> for LedgerEntryChanges { - #[must_use] - fn from(x: VecM) -> Self { - LedgerEntryChanges(x) - } -} - -impl AsRef> for LedgerEntryChanges { - #[must_use] - fn as_ref(&self) -> &VecM { - &self.0 - } -} - -impl ReadXdr for LedgerEntryChanges { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = VecM::::read_xdr(r)?; - let v = LedgerEntryChanges(i); - Ok(v) - }) - } -} - -impl WriteXdr for LedgerEntryChanges { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for LedgerEntryChanges { - type Target = VecM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: LedgerEntryChanges) -> Self { - x.0 .0 - } -} - -impl TryFrom> for LedgerEntryChanges { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(LedgerEntryChanges(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for LedgerEntryChanges { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(LedgerEntryChanges(x.try_into()?)) - } -} - -impl AsRef> for LedgerEntryChanges { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[LedgerEntryChange]> for LedgerEntryChanges { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[LedgerEntryChange] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[LedgerEntryChange] { - self.0 .0 - } -} - -/// OperationMeta is an XDR Struct defined as: -/// -/// ```text -/// struct OperationMeta -/// { -/// LedgerEntryChanges changes; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct OperationMeta { - pub changes: LedgerEntryChanges, -} - -impl ReadXdr for OperationMeta { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - changes: LedgerEntryChanges::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for OperationMeta { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.changes.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionMetaV1 is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionMetaV1 -/// { -/// LedgerEntryChanges txChanges; // tx level changes if any -/// OperationMeta operations<>; // meta for each operation -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionMetaV1 { - pub tx_changes: LedgerEntryChanges, - pub operations: VecM, -} - -impl ReadXdr for TransactionMetaV1 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - tx_changes: LedgerEntryChanges::read_xdr(r)?, - operations: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionMetaV1 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.tx_changes.write_xdr(w)?; - self.operations.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionMetaV2 is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionMetaV2 -/// { -/// LedgerEntryChanges txChangesBefore; // tx level changes before operations -/// // are applied if any -/// OperationMeta operations<>; // meta for each operation -/// LedgerEntryChanges txChangesAfter; // tx level changes after operations are -/// // applied if any -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionMetaV2 { - pub tx_changes_before: LedgerEntryChanges, - pub operations: VecM, - pub tx_changes_after: LedgerEntryChanges, -} - -impl ReadXdr for TransactionMetaV2 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - tx_changes_before: LedgerEntryChanges::read_xdr(r)?, - operations: VecM::::read_xdr(r)?, - tx_changes_after: LedgerEntryChanges::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionMetaV2 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.tx_changes_before.write_xdr(w)?; - self.operations.write_xdr(w)?; - self.tx_changes_after.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ContractEventType is an XDR Enum defined as: -/// -/// ```text -/// enum ContractEventType -/// { -/// SYSTEM = 0, -/// CONTRACT = 1, -/// DIAGNOSTIC = 2 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ContractEventType { - #[cfg_attr(feature = "alloc", default)] - System = 0, - Contract = 1, - Diagnostic = 2, -} - -impl ContractEventType { - const _VARIANTS: &[ContractEventType] = &[ - ContractEventType::System, - ContractEventType::Contract, - ContractEventType::Diagnostic, - ]; - pub const VARIANTS: [ContractEventType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["System", "Contract", "Diagnostic"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::System => "System", - Self::Contract => "Contract", - Self::Diagnostic => "Diagnostic", - } - } - - #[must_use] - pub const fn variants() -> [ContractEventType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ContractEventType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ContractEventType { - fn variants() -> slice::Iter<'static, ContractEventType> { - Self::VARIANTS.iter() - } -} - -impl Enum for ContractEventType {} - -impl fmt::Display for ContractEventType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ContractEventType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ContractEventType::System, - 1 => ContractEventType::Contract, - 2 => ContractEventType::Diagnostic, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ContractEventType) -> Self { - e as Self - } -} - -impl ReadXdr for ContractEventType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ContractEventType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ContractEventV0 is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// SCVal topics<>; -/// SCVal data; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ContractEventV0 { - pub topics: VecM, - pub data: ScVal, -} - -impl ReadXdr for ContractEventV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - topics: VecM::::read_xdr(r)?, - data: ScVal::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ContractEventV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.topics.write_xdr(w)?; - self.data.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ContractEventBody is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// struct -/// { -/// SCVal topics<>; -/// SCVal data; -/// } v0; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ContractEventBody { - V0(ContractEventV0), -} - -#[cfg(feature = "alloc")] -impl Default for ContractEventBody { - fn default() -> Self { - Self::V0(ContractEventV0::default()) - } -} - -impl ContractEventBody { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0(_) => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0(_) => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ContractEventBody { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ContractEventBody { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for ContractEventBody { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for ContractEventBody {} - -impl ReadXdr for ContractEventBody { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0(ContractEventV0::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ContractEventBody { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ContractEvent is an XDR Struct defined as: -/// -/// ```text -/// struct ContractEvent -/// { -/// // We can use this to add more fields, or because it -/// // is first, to change ContractEvent into a union. -/// ExtensionPoint ext; -/// -/// ContractID* contractID; -/// ContractEventType type; -/// -/// union switch (int v) -/// { -/// case 0: -/// struct -/// { -/// SCVal topics<>; -/// SCVal data; -/// } v0; -/// } -/// body; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ContractEvent { - pub ext: ExtensionPoint, - pub contract_id: Option, - pub type_: ContractEventType, - pub body: ContractEventBody, -} - -impl ReadXdr for ContractEvent { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, - contract_id: Option::::read_xdr(r)?, - type_: ContractEventType::read_xdr(r)?, - body: ContractEventBody::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ContractEvent { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.contract_id.write_xdr(w)?; - self.type_.write_xdr(w)?; - self.body.write_xdr(w)?; - Ok(()) - }) - } -} - -/// DiagnosticEvent is an XDR Struct defined as: -/// -/// ```text -/// struct DiagnosticEvent -/// { -/// bool inSuccessfulContractCall; -/// ContractEvent event; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct DiagnosticEvent { - pub in_successful_contract_call: bool, - pub event: ContractEvent, -} - -impl ReadXdr for DiagnosticEvent { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - in_successful_contract_call: bool::read_xdr(r)?, - event: ContractEvent::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for DiagnosticEvent { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.in_successful_contract_call.write_xdr(w)?; - self.event.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SorobanTransactionMetaExtV1 is an XDR Struct defined as: -/// -/// ```text -/// struct SorobanTransactionMetaExtV1 -/// { -/// ExtensionPoint ext; -/// -/// // The following are the components of the overall Soroban resource fee -/// // charged for the transaction. -/// // The following relation holds: -/// // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` -/// // where `resourceFeeCharged` is the overall fee charged for the -/// // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` -/// // i.e.we never charge more than the declared resource fee. -/// // The inclusion fee for charged the Soroban transaction can be found using -/// // the following equation: -/// // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`. -/// -/// // Total amount (in stroops) that has been charged for non-refundable -/// // Soroban resources. -/// // Non-refundable resources are charged based on the usage declared in -/// // the transaction envelope (such as `instructions`, `readBytes` etc.) and -/// // is charged regardless of the success of the transaction. -/// int64 totalNonRefundableResourceFeeCharged; -/// // Total amount (in stroops) that has been charged for refundable -/// // Soroban resource fees. -/// // Currently this comprises the rent fee (`rentFeeCharged`) and the -/// // fee for the events and return value. -/// // Refundable resources are charged based on the actual resources usage. -/// // Since currently refundable resources are only used for the successful -/// // transactions, this will be `0` for failed transactions. -/// int64 totalRefundableResourceFeeCharged; -/// // Amount (in stroops) that has been charged for rent. -/// // This is a part of `totalNonRefundableResourceFeeCharged`. -/// int64 rentFeeCharged; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SorobanTransactionMetaExtV1 { - pub ext: ExtensionPoint, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub total_non_refundable_resource_fee_charged: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub total_refundable_resource_fee_charged: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub rent_fee_charged: i64, -} - -impl ReadXdr for SorobanTransactionMetaExtV1 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, - total_non_refundable_resource_fee_charged: i64::read_xdr(r)?, - total_refundable_resource_fee_charged: i64::read_xdr(r)?, - rent_fee_charged: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SorobanTransactionMetaExtV1 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.total_non_refundable_resource_fee_charged - .write_xdr(w)?; - self.total_refundable_resource_fee_charged.write_xdr(w)?; - self.rent_fee_charged.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SorobanTransactionMetaExt is an XDR Union defined as: -/// -/// ```text -/// union SorobanTransactionMetaExt switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// SorobanTransactionMetaExtV1 v1; -/// }; -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum SorobanTransactionMetaExt { - V0, - V1(SorobanTransactionMetaExtV1), -} - -#[cfg(feature = "alloc")] -impl Default for SorobanTransactionMetaExt { - fn default() -> Self { - Self::V0 - } -} - -impl SorobanTransactionMetaExt { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SorobanTransactionMetaExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for SorobanTransactionMetaExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for SorobanTransactionMetaExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for SorobanTransactionMetaExt {} - -impl ReadXdr for SorobanTransactionMetaExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 1 => Self::V1(SorobanTransactionMetaExtV1::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for SorobanTransactionMetaExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// SorobanTransactionMeta is an XDR Struct defined as: -/// -/// ```text -/// struct SorobanTransactionMeta -/// { -/// SorobanTransactionMetaExt ext; -/// -/// ContractEvent events<>; // custom events populated by the -/// // contracts themselves. -/// SCVal returnValue; // return value of the host fn invocation -/// -/// // Diagnostics events that are not hashed. -/// // This will contain all contract and diagnostic events. Even ones -/// // that were emitted in a failed contract call. -/// DiagnosticEvent diagnosticEvents<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SorobanTransactionMeta { - pub ext: SorobanTransactionMetaExt, - pub events: VecM, - pub return_value: ScVal, - pub diagnostic_events: VecM, -} - -impl ReadXdr for SorobanTransactionMeta { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: SorobanTransactionMetaExt::read_xdr(r)?, - events: VecM::::read_xdr(r)?, - return_value: ScVal::read_xdr(r)?, - diagnostic_events: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SorobanTransactionMeta { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.events.write_xdr(w)?; - self.return_value.write_xdr(w)?; - self.diagnostic_events.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionMetaV3 is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionMetaV3 -/// { -/// ExtensionPoint ext; -/// -/// LedgerEntryChanges txChangesBefore; // tx level changes before operations -/// // are applied if any -/// OperationMeta operations<>; // meta for each operation -/// LedgerEntryChanges txChangesAfter; // tx level changes after operations are -/// // applied if any -/// SorobanTransactionMeta* sorobanMeta; // Soroban-specific meta (only for -/// // Soroban transactions). -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionMetaV3 { - pub ext: ExtensionPoint, - pub tx_changes_before: LedgerEntryChanges, - pub operations: VecM, - pub tx_changes_after: LedgerEntryChanges, - pub soroban_meta: Option, -} - -impl ReadXdr for TransactionMetaV3 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, - tx_changes_before: LedgerEntryChanges::read_xdr(r)?, - operations: VecM::::read_xdr(r)?, - tx_changes_after: LedgerEntryChanges::read_xdr(r)?, - soroban_meta: Option::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionMetaV3 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.tx_changes_before.write_xdr(w)?; - self.operations.write_xdr(w)?; - self.tx_changes_after.write_xdr(w)?; - self.soroban_meta.write_xdr(w)?; - Ok(()) - }) - } -} - -/// OperationMetaV2 is an XDR Struct defined as: -/// -/// ```text -/// struct OperationMetaV2 -/// { -/// ExtensionPoint ext; -/// -/// LedgerEntryChanges changes; -/// -/// ContractEvent events<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct OperationMetaV2 { - pub ext: ExtensionPoint, - pub changes: LedgerEntryChanges, - pub events: VecM, -} - -impl ReadXdr for OperationMetaV2 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, - changes: LedgerEntryChanges::read_xdr(r)?, - events: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for OperationMetaV2 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.changes.write_xdr(w)?; - self.events.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SorobanTransactionMetaV2 is an XDR Struct defined as: -/// -/// ```text -/// struct SorobanTransactionMetaV2 -/// { -/// SorobanTransactionMetaExt ext; -/// -/// SCVal* returnValue; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SorobanTransactionMetaV2 { - pub ext: SorobanTransactionMetaExt, - pub return_value: Option, -} - -impl ReadXdr for SorobanTransactionMetaV2 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: SorobanTransactionMetaExt::read_xdr(r)?, - return_value: Option::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SorobanTransactionMetaV2 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.return_value.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionEventStage is an XDR Enum defined as: -/// -/// ```text -/// enum TransactionEventStage { -/// // The event has happened before any one of the transactions has its -/// // operations applied. -/// TRANSACTION_EVENT_STAGE_BEFORE_ALL_TXS = 0, -/// // The event has happened immediately after operations of the transaction -/// // have been applied. -/// TRANSACTION_EVENT_STAGE_AFTER_TX = 1, -/// // The event has happened after every transaction had its operations -/// // applied. -/// TRANSACTION_EVENT_STAGE_AFTER_ALL_TXS = 2 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum TransactionEventStage { - #[cfg_attr(feature = "alloc", default)] - BeforeAllTxs = 0, - AfterTx = 1, - AfterAllTxs = 2, -} - -impl TransactionEventStage { - const _VARIANTS: &[TransactionEventStage] = &[ - TransactionEventStage::BeforeAllTxs, - TransactionEventStage::AfterTx, - TransactionEventStage::AfterAllTxs, - ]; - pub const VARIANTS: [TransactionEventStage; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["BeforeAllTxs", "AfterTx", "AfterAllTxs"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::BeforeAllTxs => "BeforeAllTxs", - Self::AfterTx => "AfterTx", - Self::AfterAllTxs => "AfterAllTxs", - } - } - - #[must_use] - pub const fn variants() -> [TransactionEventStage; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TransactionEventStage { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for TransactionEventStage { - fn variants() -> slice::Iter<'static, TransactionEventStage> { - Self::VARIANTS.iter() - } -} - -impl Enum for TransactionEventStage {} - -impl fmt::Display for TransactionEventStage { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for TransactionEventStage { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => TransactionEventStage::BeforeAllTxs, - 1 => TransactionEventStage::AfterTx, - 2 => TransactionEventStage::AfterAllTxs, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: TransactionEventStage) -> Self { - e as Self - } -} - -impl ReadXdr for TransactionEventStage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for TransactionEventStage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// TransactionEvent is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionEvent { -/// TransactionEventStage stage; // Stage at which an event has occurred. -/// ContractEvent event; // The contract event that has occurred. -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionEvent { - pub stage: TransactionEventStage, - pub event: ContractEvent, -} - -impl ReadXdr for TransactionEvent { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - stage: TransactionEventStage::read_xdr(r)?, - event: ContractEvent::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionEvent { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.stage.write_xdr(w)?; - self.event.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionMetaV4 is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionMetaV4 -/// { -/// ExtensionPoint ext; -/// -/// LedgerEntryChanges txChangesBefore; // tx level changes before operations -/// // are applied if any -/// OperationMetaV2 operations<>; // meta for each operation -/// LedgerEntryChanges txChangesAfter; // tx level changes after operations are -/// // applied if any -/// SorobanTransactionMetaV2* sorobanMeta; // Soroban-specific meta (only for -/// // Soroban transactions). -/// -/// TransactionEvent events<>; // Used for transaction-level events (like fee payment) -/// DiagnosticEvent diagnosticEvents<>; // Used for all diagnostic information -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionMetaV4 { - pub ext: ExtensionPoint, - pub tx_changes_before: LedgerEntryChanges, - pub operations: VecM, - pub tx_changes_after: LedgerEntryChanges, - pub soroban_meta: Option, - pub events: VecM, - pub diagnostic_events: VecM, -} - -impl ReadXdr for TransactionMetaV4 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, - tx_changes_before: LedgerEntryChanges::read_xdr(r)?, - operations: VecM::::read_xdr(r)?, - tx_changes_after: LedgerEntryChanges::read_xdr(r)?, - soroban_meta: Option::::read_xdr(r)?, - events: VecM::::read_xdr(r)?, - diagnostic_events: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionMetaV4 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.tx_changes_before.write_xdr(w)?; - self.operations.write_xdr(w)?; - self.tx_changes_after.write_xdr(w)?; - self.soroban_meta.write_xdr(w)?; - self.events.write_xdr(w)?; - self.diagnostic_events.write_xdr(w)?; - Ok(()) - }) - } -} - -/// InvokeHostFunctionSuccessPreImage is an XDR Struct defined as: -/// -/// ```text -/// struct InvokeHostFunctionSuccessPreImage -/// { -/// SCVal returnValue; -/// ContractEvent events<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct InvokeHostFunctionSuccessPreImage { - pub return_value: ScVal, - pub events: VecM, -} - -impl ReadXdr for InvokeHostFunctionSuccessPreImage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - return_value: ScVal::read_xdr(r)?, - events: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for InvokeHostFunctionSuccessPreImage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.return_value.write_xdr(w)?; - self.events.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionMeta is an XDR Union defined as: -/// -/// ```text -/// union TransactionMeta switch (int v) -/// { -/// case 0: -/// OperationMeta operations<>; -/// case 1: -/// TransactionMetaV1 v1; -/// case 2: -/// TransactionMetaV2 v2; -/// case 3: -/// TransactionMetaV3 v3; -/// case 4: -/// TransactionMetaV4 v4; -/// }; -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TransactionMeta { - V0(VecM), - V1(TransactionMetaV1), - V2(TransactionMetaV2), - V3(TransactionMetaV3), - V4(TransactionMetaV4), -} - -#[cfg(feature = "alloc")] -impl Default for TransactionMeta { - fn default() -> Self { - Self::V0(VecM::::default()) - } -} - -impl TransactionMeta { - const _VARIANTS: &[i32] = &[0, 1, 2, 3, 4]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1", "V2", "V3", "V4"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0(_) => "V0", - Self::V1(_) => "V1", - Self::V2(_) => "V2", - Self::V3(_) => "V3", - Self::V4(_) => "V4", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0(_) => 0, - Self::V1(_) => 1, - Self::V2(_) => 2, - Self::V3(_) => 3, - Self::V4(_) => 4, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TransactionMeta { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TransactionMeta { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for TransactionMeta { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for TransactionMeta {} - -impl ReadXdr for TransactionMeta { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0(VecM::::read_xdr(r)?), - 1 => Self::V1(TransactionMetaV1::read_xdr(r)?), - 2 => Self::V2(TransactionMetaV2::read_xdr(r)?), - 3 => Self::V3(TransactionMetaV3::read_xdr(r)?), - 4 => Self::V4(TransactionMetaV4::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TransactionMeta { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0(v) => v.write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - Self::V2(v) => v.write_xdr(w)?, - Self::V3(v) => v.write_xdr(w)?, - Self::V4(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TransactionResultMeta is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionResultMeta -/// { -/// TransactionResultPair result; -/// LedgerEntryChanges feeProcessing; -/// TransactionMeta txApplyProcessing; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionResultMeta { - pub result: TransactionResultPair, - pub fee_processing: LedgerEntryChanges, - pub tx_apply_processing: TransactionMeta, -} - -impl ReadXdr for TransactionResultMeta { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - result: TransactionResultPair::read_xdr(r)?, - fee_processing: LedgerEntryChanges::read_xdr(r)?, - tx_apply_processing: TransactionMeta::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionResultMeta { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.result.write_xdr(w)?; - self.fee_processing.write_xdr(w)?; - self.tx_apply_processing.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionResultMetaV1 is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionResultMetaV1 -/// { -/// ExtensionPoint ext; -/// -/// TransactionResultPair result; -/// LedgerEntryChanges feeProcessing; -/// TransactionMeta txApplyProcessing; -/// -/// LedgerEntryChanges postTxApplyFeeProcessing; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionResultMetaV1 { - pub ext: ExtensionPoint, - pub result: TransactionResultPair, - pub fee_processing: LedgerEntryChanges, - pub tx_apply_processing: TransactionMeta, - pub post_tx_apply_fee_processing: LedgerEntryChanges, -} - -impl ReadXdr for TransactionResultMetaV1 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, - result: TransactionResultPair::read_xdr(r)?, - fee_processing: LedgerEntryChanges::read_xdr(r)?, - tx_apply_processing: TransactionMeta::read_xdr(r)?, - post_tx_apply_fee_processing: LedgerEntryChanges::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionResultMetaV1 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.result.write_xdr(w)?; - self.fee_processing.write_xdr(w)?; - self.tx_apply_processing.write_xdr(w)?; - self.post_tx_apply_fee_processing.write_xdr(w)?; - Ok(()) - }) - } -} - -/// UpgradeEntryMeta is an XDR Struct defined as: -/// -/// ```text -/// struct UpgradeEntryMeta -/// { -/// LedgerUpgrade upgrade; -/// LedgerEntryChanges changes; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct UpgradeEntryMeta { - pub upgrade: LedgerUpgrade, - pub changes: LedgerEntryChanges, -} - -impl ReadXdr for UpgradeEntryMeta { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - upgrade: LedgerUpgrade::read_xdr(r)?, - changes: LedgerEntryChanges::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for UpgradeEntryMeta { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.upgrade.write_xdr(w)?; - self.changes.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerCloseMetaV0 is an XDR Struct defined as: -/// -/// ```text -/// struct LedgerCloseMetaV0 -/// { -/// LedgerHeaderHistoryEntry ledgerHeader; -/// // NB: txSet is sorted in "Hash order" -/// TransactionSet txSet; -/// -/// // NB: transactions are sorted in apply order here -/// // fees for all transactions are processed first -/// // followed by applying transactions -/// TransactionResultMeta txProcessing<>; -/// -/// // upgrades are applied last -/// UpgradeEntryMeta upgradesProcessing<>; -/// -/// // other misc information attached to the ledger close -/// SCPHistoryEntry scpInfo<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerCloseMetaV0 { - pub ledger_header: LedgerHeaderHistoryEntry, - pub tx_set: TransactionSet, - pub tx_processing: VecM, - pub upgrades_processing: VecM, - pub scp_info: VecM, -} - -impl ReadXdr for LedgerCloseMetaV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ledger_header: LedgerHeaderHistoryEntry::read_xdr(r)?, - tx_set: TransactionSet::read_xdr(r)?, - tx_processing: VecM::::read_xdr(r)?, - upgrades_processing: VecM::::read_xdr(r)?, - scp_info: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerCloseMetaV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ledger_header.write_xdr(w)?; - self.tx_set.write_xdr(w)?; - self.tx_processing.write_xdr(w)?; - self.upgrades_processing.write_xdr(w)?; - self.scp_info.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerCloseMetaExtV1 is an XDR Struct defined as: -/// -/// ```text -/// struct LedgerCloseMetaExtV1 -/// { -/// ExtensionPoint ext; -/// int64 sorobanFeeWrite1KB; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerCloseMetaExtV1 { - pub ext: ExtensionPoint, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub soroban_fee_write1_kb: i64, -} - -impl ReadXdr for LedgerCloseMetaExtV1 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, - soroban_fee_write1_kb: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerCloseMetaExtV1 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.soroban_fee_write1_kb.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerCloseMetaExt is an XDR Union defined as: -/// -/// ```text -/// union LedgerCloseMetaExt switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// LedgerCloseMetaExtV1 v1; -/// }; -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LedgerCloseMetaExt { - V0, - V1(LedgerCloseMetaExtV1), -} - -#[cfg(feature = "alloc")] -impl Default for LedgerCloseMetaExt { - fn default() -> Self { - Self::V0 - } -} - -impl LedgerCloseMetaExt { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerCloseMetaExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LedgerCloseMetaExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for LedgerCloseMetaExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for LedgerCloseMetaExt {} - -impl ReadXdr for LedgerCloseMetaExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 1 => Self::V1(LedgerCloseMetaExtV1::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerCloseMetaExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// LedgerCloseMetaV1 is an XDR Struct defined as: -/// -/// ```text -/// struct LedgerCloseMetaV1 -/// { -/// LedgerCloseMetaExt ext; -/// -/// LedgerHeaderHistoryEntry ledgerHeader; -/// -/// GeneralizedTransactionSet txSet; -/// -/// // NB: transactions are sorted in apply order here -/// // fees for all transactions are processed first -/// // followed by applying transactions -/// TransactionResultMeta txProcessing<>; -/// -/// // upgrades are applied last -/// UpgradeEntryMeta upgradesProcessing<>; -/// -/// // other misc information attached to the ledger close -/// SCPHistoryEntry scpInfo<>; -/// -/// // Size in bytes of live Soroban state, to support downstream -/// // systems calculating storage fees correctly. -/// uint64 totalByteSizeOfLiveSorobanState; -/// -/// // TTL and data/code keys that have been evicted at this ledger. -/// LedgerKey evictedKeys<>; -/// -/// // Maintained for backwards compatibility, should never be populated. -/// LedgerEntry unused<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerCloseMetaV1 { - pub ext: LedgerCloseMetaExt, - pub ledger_header: LedgerHeaderHistoryEntry, - pub tx_set: GeneralizedTransactionSet, - pub tx_processing: VecM, - pub upgrades_processing: VecM, - pub scp_info: VecM, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub total_byte_size_of_live_soroban_state: u64, - pub evicted_keys: VecM, - pub unused: VecM, -} - -impl ReadXdr for LedgerCloseMetaV1 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: LedgerCloseMetaExt::read_xdr(r)?, - ledger_header: LedgerHeaderHistoryEntry::read_xdr(r)?, - tx_set: GeneralizedTransactionSet::read_xdr(r)?, - tx_processing: VecM::::read_xdr(r)?, - upgrades_processing: VecM::::read_xdr(r)?, - scp_info: VecM::::read_xdr(r)?, - total_byte_size_of_live_soroban_state: u64::read_xdr(r)?, - evicted_keys: VecM::::read_xdr(r)?, - unused: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerCloseMetaV1 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.ledger_header.write_xdr(w)?; - self.tx_set.write_xdr(w)?; - self.tx_processing.write_xdr(w)?; - self.upgrades_processing.write_xdr(w)?; - self.scp_info.write_xdr(w)?; - self.total_byte_size_of_live_soroban_state.write_xdr(w)?; - self.evicted_keys.write_xdr(w)?; - self.unused.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerCloseMetaV2 is an XDR Struct defined as: -/// -/// ```text -/// struct LedgerCloseMetaV2 -/// { -/// LedgerCloseMetaExt ext; -/// -/// LedgerHeaderHistoryEntry ledgerHeader; -/// -/// GeneralizedTransactionSet txSet; -/// -/// // NB: transactions are sorted in apply order here -/// // fees for all transactions are processed first -/// // followed by applying transactions -/// TransactionResultMetaV1 txProcessing<>; -/// -/// // upgrades are applied last -/// UpgradeEntryMeta upgradesProcessing<>; -/// -/// // other misc information attached to the ledger close -/// SCPHistoryEntry scpInfo<>; -/// -/// // Size in bytes of live Soroban state, to support downstream -/// // systems calculating storage fees correctly. -/// uint64 totalByteSizeOfLiveSorobanState; -/// -/// // TTL and data/code keys that have been evicted at this ledger. -/// LedgerKey evictedKeys<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerCloseMetaV2 { - pub ext: LedgerCloseMetaExt, - pub ledger_header: LedgerHeaderHistoryEntry, - pub tx_set: GeneralizedTransactionSet, - pub tx_processing: VecM, - pub upgrades_processing: VecM, - pub scp_info: VecM, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub total_byte_size_of_live_soroban_state: u64, - pub evicted_keys: VecM, -} - -impl ReadXdr for LedgerCloseMetaV2 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: LedgerCloseMetaExt::read_xdr(r)?, - ledger_header: LedgerHeaderHistoryEntry::read_xdr(r)?, - tx_set: GeneralizedTransactionSet::read_xdr(r)?, - tx_processing: VecM::::read_xdr(r)?, - upgrades_processing: VecM::::read_xdr(r)?, - scp_info: VecM::::read_xdr(r)?, - total_byte_size_of_live_soroban_state: u64::read_xdr(r)?, - evicted_keys: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerCloseMetaV2 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.ledger_header.write_xdr(w)?; - self.tx_set.write_xdr(w)?; - self.tx_processing.write_xdr(w)?; - self.upgrades_processing.write_xdr(w)?; - self.scp_info.write_xdr(w)?; - self.total_byte_size_of_live_soroban_state.write_xdr(w)?; - self.evicted_keys.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerCloseMeta is an XDR Union defined as: -/// -/// ```text -/// union LedgerCloseMeta switch (int v) -/// { -/// case 0: -/// LedgerCloseMetaV0 v0; -/// case 1: -/// LedgerCloseMetaV1 v1; -/// case 2: -/// LedgerCloseMetaV2 v2; -/// }; -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LedgerCloseMeta { - V0(LedgerCloseMetaV0), - V1(LedgerCloseMetaV1), - V2(LedgerCloseMetaV2), -} - -#[cfg(feature = "alloc")] -impl Default for LedgerCloseMeta { - fn default() -> Self { - Self::V0(LedgerCloseMetaV0::default()) - } -} - -impl LedgerCloseMeta { - const _VARIANTS: &[i32] = &[0, 1, 2]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1", "V2"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0(_) => "V0", - Self::V1(_) => "V1", - Self::V2(_) => "V2", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0(_) => 0, - Self::V1(_) => 1, - Self::V2(_) => 2, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LedgerCloseMeta { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LedgerCloseMeta { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for LedgerCloseMeta { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for LedgerCloseMeta {} - -impl ReadXdr for LedgerCloseMeta { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0(LedgerCloseMetaV0::read_xdr(r)?), - 1 => Self::V1(LedgerCloseMetaV1::read_xdr(r)?), - 2 => Self::V2(LedgerCloseMetaV2::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LedgerCloseMeta { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0(v) => v.write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - Self::V2(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ErrorCode is an XDR Enum defined as: -/// -/// ```text -/// enum ErrorCode -/// { -/// ERR_MISC = 0, // Unspecific error -/// ERR_DATA = 1, // Malformed data -/// ERR_CONF = 2, // Misconfiguration error -/// ERR_AUTH = 3, // Authentication failure -/// ERR_LOAD = 4 // System overloaded -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ErrorCode { - #[cfg_attr(feature = "alloc", default)] - Misc = 0, - Data = 1, - Conf = 2, - Auth = 3, - Load = 4, -} - -impl ErrorCode { - const _VARIANTS: &[ErrorCode] = &[ - ErrorCode::Misc, - ErrorCode::Data, - ErrorCode::Conf, - ErrorCode::Auth, - ErrorCode::Load, - ]; - pub const VARIANTS: [ErrorCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Misc", "Data", "Conf", "Auth", "Load"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Misc => "Misc", - Self::Data => "Data", - Self::Conf => "Conf", - Self::Auth => "Auth", - Self::Load => "Load", - } - } - - #[must_use] - pub const fn variants() -> [ErrorCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ErrorCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ErrorCode { - fn variants() -> slice::Iter<'static, ErrorCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for ErrorCode {} - -impl fmt::Display for ErrorCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ErrorCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ErrorCode::Misc, - 1 => ErrorCode::Data, - 2 => ErrorCode::Conf, - 3 => ErrorCode::Auth, - 4 => ErrorCode::Load, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ErrorCode) -> Self { - e as Self - } -} - -impl ReadXdr for ErrorCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ErrorCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// SError is an XDR Struct defined as: -/// -/// ```text -/// struct Error -/// { -/// ErrorCode code; -/// string msg<100>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SError { - pub code: ErrorCode, - pub msg: StringM<100>, -} - -impl ReadXdr for SError { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - code: ErrorCode::read_xdr(r)?, - msg: StringM::<100>::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SError { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.code.write_xdr(w)?; - self.msg.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SendMore is an XDR Struct defined as: -/// -/// ```text -/// struct SendMore -/// { -/// uint32 numMessages; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SendMore { - pub num_messages: u32, -} - -impl ReadXdr for SendMore { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - num_messages: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SendMore { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.num_messages.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SendMoreExtended is an XDR Struct defined as: -/// -/// ```text -/// struct SendMoreExtended -/// { -/// uint32 numMessages; -/// uint32 numBytes; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SendMoreExtended { - pub num_messages: u32, - pub num_bytes: u32, -} - -impl ReadXdr for SendMoreExtended { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - num_messages: u32::read_xdr(r)?, - num_bytes: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SendMoreExtended { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.num_messages.write_xdr(w)?; - self.num_bytes.write_xdr(w)?; - Ok(()) - }) - } -} - -/// AuthCert is an XDR Struct defined as: -/// -/// ```text -/// struct AuthCert -/// { -/// Curve25519Public pubkey; -/// uint64 expiration; -/// Signature sig; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct AuthCert { - pub pubkey: Curve25519Public, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub expiration: u64, - pub sig: Signature, -} - -impl ReadXdr for AuthCert { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - pubkey: Curve25519Public::read_xdr(r)?, - expiration: u64::read_xdr(r)?, - sig: Signature::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for AuthCert { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.pubkey.write_xdr(w)?; - self.expiration.write_xdr(w)?; - self.sig.write_xdr(w)?; - Ok(()) - }) - } -} - -/// Hello is an XDR Struct defined as: -/// -/// ```text -/// struct Hello -/// { -/// uint32 ledgerVersion; -/// uint32 overlayVersion; -/// uint32 overlayMinVersion; -/// Hash networkID; -/// string versionStr<100>; -/// int listeningPort; -/// NodeID peerID; -/// AuthCert cert; -/// uint256 nonce; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct Hello { - pub ledger_version: u32, - pub overlay_version: u32, - pub overlay_min_version: u32, - pub network_id: Hash, - pub version_str: StringM<100>, - pub listening_port: i32, - pub peer_id: NodeId, - pub cert: AuthCert, - pub nonce: Uint256, -} - -impl ReadXdr for Hello { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ledger_version: u32::read_xdr(r)?, - overlay_version: u32::read_xdr(r)?, - overlay_min_version: u32::read_xdr(r)?, - network_id: Hash::read_xdr(r)?, - version_str: StringM::<100>::read_xdr(r)?, - listening_port: i32::read_xdr(r)?, - peer_id: NodeId::read_xdr(r)?, - cert: AuthCert::read_xdr(r)?, - nonce: Uint256::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for Hello { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ledger_version.write_xdr(w)?; - self.overlay_version.write_xdr(w)?; - self.overlay_min_version.write_xdr(w)?; - self.network_id.write_xdr(w)?; - self.version_str.write_xdr(w)?; - self.listening_port.write_xdr(w)?; - self.peer_id.write_xdr(w)?; - self.cert.write_xdr(w)?; - self.nonce.write_xdr(w)?; - Ok(()) - }) - } -} - -/// AuthMsgFlagFlowControlBytesRequested is an XDR Const defined as: -/// -/// ```text -/// const AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED = 200; -/// ``` -/// -pub const AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED: u64 = 200; - -/// Auth is an XDR Struct defined as: -/// -/// ```text -/// struct Auth -/// { -/// int flags; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct Auth { - pub flags: i32, -} - -impl ReadXdr for Auth { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - flags: i32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for Auth { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.flags.write_xdr(w)?; - Ok(()) - }) - } -} - -/// IpAddrType is an XDR Enum defined as: -/// -/// ```text -/// enum IPAddrType -/// { -/// IPv4 = 0, -/// IPv6 = 1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum IpAddrType { - #[cfg_attr(feature = "alloc", default)] - IPv4 = 0, - IPv6 = 1, -} - -impl IpAddrType { - const _VARIANTS: &[IpAddrType] = &[IpAddrType::IPv4, IpAddrType::IPv6]; - pub const VARIANTS: [IpAddrType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["IPv4", "IPv6"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::IPv4 => "IPv4", - Self::IPv6 => "IPv6", - } - } - - #[must_use] - pub const fn variants() -> [IpAddrType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for IpAddrType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for IpAddrType { - fn variants() -> slice::Iter<'static, IpAddrType> { - Self::VARIANTS.iter() - } -} - -impl Enum for IpAddrType {} - -impl fmt::Display for IpAddrType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for IpAddrType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => IpAddrType::IPv4, - 1 => IpAddrType::IPv6, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: IpAddrType) -> Self { - e as Self - } -} - -impl ReadXdr for IpAddrType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for IpAddrType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// PeerAddressIp is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (IPAddrType type) -/// { -/// case IPv4: -/// opaque ipv4[4]; -/// case IPv6: -/// opaque ipv6[16]; -/// } -/// ``` -/// -// union with discriminant IpAddrType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum PeerAddressIp { - IPv4([u8; 4]), - IPv6([u8; 16]), -} - -#[cfg(feature = "alloc")] -impl Default for PeerAddressIp { - fn default() -> Self { - Self::IPv4(<[u8; 4]>::default()) - } -} - -impl PeerAddressIp { - const _VARIANTS: &[IpAddrType] = &[IpAddrType::IPv4, IpAddrType::IPv6]; - pub const VARIANTS: [IpAddrType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["IPv4", "IPv6"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::IPv4(_) => "IPv4", - Self::IPv6(_) => "IPv6", - } - } - - #[must_use] - pub const fn discriminant(&self) -> IpAddrType { - #[allow(clippy::match_same_arms)] - match self { - Self::IPv4(_) => IpAddrType::IPv4, - Self::IPv6(_) => IpAddrType::IPv6, - } - } - - #[must_use] - pub const fn variants() -> [IpAddrType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for PeerAddressIp { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for PeerAddressIp { - #[must_use] - fn discriminant(&self) -> IpAddrType { - Self::discriminant(self) - } -} - -impl Variants for PeerAddressIp { - fn variants() -> slice::Iter<'static, IpAddrType> { - Self::VARIANTS.iter() - } -} - -impl Union for PeerAddressIp {} - -impl ReadXdr for PeerAddressIp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: IpAddrType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - IpAddrType::IPv4 => Self::IPv4(<[u8; 4]>::read_xdr(r)?), - IpAddrType::IPv6 => Self::IPv6(<[u8; 16]>::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for PeerAddressIp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::IPv4(v) => v.write_xdr(w)?, - Self::IPv6(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// PeerAddress is an XDR Struct defined as: -/// -/// ```text -/// struct PeerAddress -/// { -/// union switch (IPAddrType type) -/// { -/// case IPv4: -/// opaque ipv4[4]; -/// case IPv6: -/// opaque ipv6[16]; -/// } -/// ip; -/// uint32 port; -/// uint32 numFailures; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct PeerAddress { - pub ip: PeerAddressIp, - pub port: u32, - pub num_failures: u32, -} - -impl ReadXdr for PeerAddress { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ip: PeerAddressIp::read_xdr(r)?, - port: u32::read_xdr(r)?, - num_failures: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for PeerAddress { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ip.write_xdr(w)?; - self.port.write_xdr(w)?; - self.num_failures.write_xdr(w)?; - Ok(()) - }) - } -} - -/// MessageType is an XDR Enum defined as: -/// -/// ```text -/// enum MessageType -/// { -/// ERROR_MSG = 0, -/// AUTH = 2, -/// DONT_HAVE = 3, -/// // GET_PEERS (4) is deprecated -/// -/// PEERS = 5, -/// -/// GET_TX_SET = 6, // gets a particular txset by hash -/// TX_SET = 7, -/// GENERALIZED_TX_SET = 17, -/// -/// TRANSACTION = 8, // pass on a tx you have heard about -/// -/// // SCP -/// GET_SCP_QUORUMSET = 9, -/// SCP_QUORUMSET = 10, -/// SCP_MESSAGE = 11, -/// GET_SCP_STATE = 12, -/// -/// // new messages -/// HELLO = 13, -/// -/// // SURVEY_REQUEST (14) removed and replaced by TIME_SLICED_SURVEY_REQUEST -/// // SURVEY_RESPONSE (15) removed and replaced by TIME_SLICED_SURVEY_RESPONSE -/// -/// SEND_MORE = 16, -/// SEND_MORE_EXTENDED = 20, -/// -/// FLOOD_ADVERT = 18, -/// FLOOD_DEMAND = 19, -/// -/// TIME_SLICED_SURVEY_REQUEST = 21, -/// TIME_SLICED_SURVEY_RESPONSE = 22, -/// TIME_SLICED_SURVEY_START_COLLECTING = 23, -/// TIME_SLICED_SURVEY_STOP_COLLECTING = 24 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum MessageType { - #[cfg_attr(feature = "alloc", default)] - ErrorMsg = 0, - Auth = 2, - DontHave = 3, - Peers = 5, - GetTxSet = 6, - TxSet = 7, - GeneralizedTxSet = 17, - Transaction = 8, - GetScpQuorumset = 9, - ScpQuorumset = 10, - ScpMessage = 11, - GetScpState = 12, - Hello = 13, - SendMore = 16, - SendMoreExtended = 20, - FloodAdvert = 18, - FloodDemand = 19, - TimeSlicedSurveyRequest = 21, - TimeSlicedSurveyResponse = 22, - TimeSlicedSurveyStartCollecting = 23, - TimeSlicedSurveyStopCollecting = 24, -} - -impl MessageType { - const _VARIANTS: &[MessageType] = &[ - MessageType::ErrorMsg, - MessageType::Auth, - MessageType::DontHave, - MessageType::Peers, - MessageType::GetTxSet, - MessageType::TxSet, - MessageType::GeneralizedTxSet, - MessageType::Transaction, - MessageType::GetScpQuorumset, - MessageType::ScpQuorumset, - MessageType::ScpMessage, - MessageType::GetScpState, - MessageType::Hello, - MessageType::SendMore, - MessageType::SendMoreExtended, - MessageType::FloodAdvert, - MessageType::FloodDemand, - MessageType::TimeSlicedSurveyRequest, - MessageType::TimeSlicedSurveyResponse, - MessageType::TimeSlicedSurveyStartCollecting, - MessageType::TimeSlicedSurveyStopCollecting, - ]; - pub const VARIANTS: [MessageType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "ErrorMsg", - "Auth", - "DontHave", - "Peers", - "GetTxSet", - "TxSet", - "GeneralizedTxSet", - "Transaction", - "GetScpQuorumset", - "ScpQuorumset", - "ScpMessage", - "GetScpState", - "Hello", - "SendMore", - "SendMoreExtended", - "FloodAdvert", - "FloodDemand", - "TimeSlicedSurveyRequest", - "TimeSlicedSurveyResponse", - "TimeSlicedSurveyStartCollecting", - "TimeSlicedSurveyStopCollecting", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ErrorMsg => "ErrorMsg", - Self::Auth => "Auth", - Self::DontHave => "DontHave", - Self::Peers => "Peers", - Self::GetTxSet => "GetTxSet", - Self::TxSet => "TxSet", - Self::GeneralizedTxSet => "GeneralizedTxSet", - Self::Transaction => "Transaction", - Self::GetScpQuorumset => "GetScpQuorumset", - Self::ScpQuorumset => "ScpQuorumset", - Self::ScpMessage => "ScpMessage", - Self::GetScpState => "GetScpState", - Self::Hello => "Hello", - Self::SendMore => "SendMore", - Self::SendMoreExtended => "SendMoreExtended", - Self::FloodAdvert => "FloodAdvert", - Self::FloodDemand => "FloodDemand", - Self::TimeSlicedSurveyRequest => "TimeSlicedSurveyRequest", - Self::TimeSlicedSurveyResponse => "TimeSlicedSurveyResponse", - Self::TimeSlicedSurveyStartCollecting => "TimeSlicedSurveyStartCollecting", - Self::TimeSlicedSurveyStopCollecting => "TimeSlicedSurveyStopCollecting", - } - } - - #[must_use] - pub const fn variants() -> [MessageType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for MessageType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for MessageType { - fn variants() -> slice::Iter<'static, MessageType> { - Self::VARIANTS.iter() - } -} - -impl Enum for MessageType {} - -impl fmt::Display for MessageType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for MessageType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => MessageType::ErrorMsg, - 2 => MessageType::Auth, - 3 => MessageType::DontHave, - 5 => MessageType::Peers, - 6 => MessageType::GetTxSet, - 7 => MessageType::TxSet, - 17 => MessageType::GeneralizedTxSet, - 8 => MessageType::Transaction, - 9 => MessageType::GetScpQuorumset, - 10 => MessageType::ScpQuorumset, - 11 => MessageType::ScpMessage, - 12 => MessageType::GetScpState, - 13 => MessageType::Hello, - 16 => MessageType::SendMore, - 20 => MessageType::SendMoreExtended, - 18 => MessageType::FloodAdvert, - 19 => MessageType::FloodDemand, - 21 => MessageType::TimeSlicedSurveyRequest, - 22 => MessageType::TimeSlicedSurveyResponse, - 23 => MessageType::TimeSlicedSurveyStartCollecting, - 24 => MessageType::TimeSlicedSurveyStopCollecting, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: MessageType) -> Self { - e as Self - } -} - -impl ReadXdr for MessageType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for MessageType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// DontHave is an XDR Struct defined as: -/// -/// ```text -/// struct DontHave -/// { -/// MessageType type; -/// uint256 reqHash; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct DontHave { - pub type_: MessageType, - pub req_hash: Uint256, -} - -impl ReadXdr for DontHave { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - type_: MessageType::read_xdr(r)?, - req_hash: Uint256::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for DontHave { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.type_.write_xdr(w)?; - self.req_hash.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SurveyMessageCommandType is an XDR Enum defined as: -/// -/// ```text -/// enum SurveyMessageCommandType -/// { -/// TIME_SLICED_SURVEY_TOPOLOGY = 1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum SurveyMessageCommandType { - #[cfg_attr(feature = "alloc", default)] - TimeSlicedSurveyTopology = 1, -} - -impl SurveyMessageCommandType { - const _VARIANTS: &[SurveyMessageCommandType] = - &[SurveyMessageCommandType::TimeSlicedSurveyTopology]; - pub const VARIANTS: [SurveyMessageCommandType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["TimeSlicedSurveyTopology"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::TimeSlicedSurveyTopology => "TimeSlicedSurveyTopology", - } - } - - #[must_use] - pub const fn variants() -> [SurveyMessageCommandType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SurveyMessageCommandType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for SurveyMessageCommandType { - fn variants() -> slice::Iter<'static, SurveyMessageCommandType> { - Self::VARIANTS.iter() - } -} - -impl Enum for SurveyMessageCommandType {} - -impl fmt::Display for SurveyMessageCommandType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for SurveyMessageCommandType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 1 => SurveyMessageCommandType::TimeSlicedSurveyTopology, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: SurveyMessageCommandType) -> Self { - e as Self - } -} - -impl ReadXdr for SurveyMessageCommandType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for SurveyMessageCommandType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// SurveyMessageResponseType is an XDR Enum defined as: -/// -/// ```text -/// enum SurveyMessageResponseType -/// { -/// SURVEY_TOPOLOGY_RESPONSE_V2 = 2 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum SurveyMessageResponseType { - #[cfg_attr(feature = "alloc", default)] - SurveyTopologyResponseV2 = 2, -} - -impl SurveyMessageResponseType { - const _VARIANTS: &[SurveyMessageResponseType] = - &[SurveyMessageResponseType::SurveyTopologyResponseV2]; - pub const VARIANTS: [SurveyMessageResponseType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["SurveyTopologyResponseV2"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::SurveyTopologyResponseV2 => "SurveyTopologyResponseV2", - } - } - - #[must_use] - pub const fn variants() -> [SurveyMessageResponseType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SurveyMessageResponseType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for SurveyMessageResponseType { - fn variants() -> slice::Iter<'static, SurveyMessageResponseType> { - Self::VARIANTS.iter() - } -} - -impl Enum for SurveyMessageResponseType {} - -impl fmt::Display for SurveyMessageResponseType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for SurveyMessageResponseType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 2 => SurveyMessageResponseType::SurveyTopologyResponseV2, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: SurveyMessageResponseType) -> Self { - e as Self - } -} - -impl ReadXdr for SurveyMessageResponseType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for SurveyMessageResponseType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// TimeSlicedSurveyStartCollectingMessage is an XDR Struct defined as: -/// -/// ```text -/// struct TimeSlicedSurveyStartCollectingMessage -/// { -/// NodeID surveyorID; -/// uint32 nonce; -/// uint32 ledgerNum; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TimeSlicedSurveyStartCollectingMessage { - pub surveyor_id: NodeId, - pub nonce: u32, - pub ledger_num: u32, -} - -impl ReadXdr for TimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - surveyor_id: NodeId::read_xdr(r)?, - nonce: u32::read_xdr(r)?, - ledger_num: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.surveyor_id.write_xdr(w)?; - self.nonce.write_xdr(w)?; - self.ledger_num.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SignedTimeSlicedSurveyStartCollectingMessage is an XDR Struct defined as: -/// -/// ```text -/// struct SignedTimeSlicedSurveyStartCollectingMessage -/// { -/// Signature signature; -/// TimeSlicedSurveyStartCollectingMessage startCollecting; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SignedTimeSlicedSurveyStartCollectingMessage { - pub signature: Signature, - pub start_collecting: TimeSlicedSurveyStartCollectingMessage, -} - -impl ReadXdr for SignedTimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - signature: Signature::read_xdr(r)?, - start_collecting: TimeSlicedSurveyStartCollectingMessage::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SignedTimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.signature.write_xdr(w)?; - self.start_collecting.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TimeSlicedSurveyStopCollectingMessage is an XDR Struct defined as: -/// -/// ```text -/// struct TimeSlicedSurveyStopCollectingMessage -/// { -/// NodeID surveyorID; -/// uint32 nonce; -/// uint32 ledgerNum; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TimeSlicedSurveyStopCollectingMessage { - pub surveyor_id: NodeId, - pub nonce: u32, - pub ledger_num: u32, -} - -impl ReadXdr for TimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - surveyor_id: NodeId::read_xdr(r)?, - nonce: u32::read_xdr(r)?, - ledger_num: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.surveyor_id.write_xdr(w)?; - self.nonce.write_xdr(w)?; - self.ledger_num.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SignedTimeSlicedSurveyStopCollectingMessage is an XDR Struct defined as: -/// -/// ```text -/// struct SignedTimeSlicedSurveyStopCollectingMessage -/// { -/// Signature signature; -/// TimeSlicedSurveyStopCollectingMessage stopCollecting; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SignedTimeSlicedSurveyStopCollectingMessage { - pub signature: Signature, - pub stop_collecting: TimeSlicedSurveyStopCollectingMessage, -} - -impl ReadXdr for SignedTimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - signature: Signature::read_xdr(r)?, - stop_collecting: TimeSlicedSurveyStopCollectingMessage::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SignedTimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.signature.write_xdr(w)?; - self.stop_collecting.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SurveyRequestMessage is an XDR Struct defined as: -/// -/// ```text -/// struct SurveyRequestMessage -/// { -/// NodeID surveyorPeerID; -/// NodeID surveyedPeerID; -/// uint32 ledgerNum; -/// Curve25519Public encryptionKey; -/// SurveyMessageCommandType commandType; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SurveyRequestMessage { - pub surveyor_peer_id: NodeId, - pub surveyed_peer_id: NodeId, - pub ledger_num: u32, - pub encryption_key: Curve25519Public, - pub command_type: SurveyMessageCommandType, -} - -impl ReadXdr for SurveyRequestMessage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - surveyor_peer_id: NodeId::read_xdr(r)?, - surveyed_peer_id: NodeId::read_xdr(r)?, - ledger_num: u32::read_xdr(r)?, - encryption_key: Curve25519Public::read_xdr(r)?, - command_type: SurveyMessageCommandType::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SurveyRequestMessage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.surveyor_peer_id.write_xdr(w)?; - self.surveyed_peer_id.write_xdr(w)?; - self.ledger_num.write_xdr(w)?; - self.encryption_key.write_xdr(w)?; - self.command_type.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TimeSlicedSurveyRequestMessage is an XDR Struct defined as: -/// -/// ```text -/// struct TimeSlicedSurveyRequestMessage -/// { -/// SurveyRequestMessage request; -/// uint32 nonce; -/// uint32 inboundPeersIndex; -/// uint32 outboundPeersIndex; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TimeSlicedSurveyRequestMessage { - pub request: SurveyRequestMessage, - pub nonce: u32, - pub inbound_peers_index: u32, - pub outbound_peers_index: u32, -} - -impl ReadXdr for TimeSlicedSurveyRequestMessage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - request: SurveyRequestMessage::read_xdr(r)?, - nonce: u32::read_xdr(r)?, - inbound_peers_index: u32::read_xdr(r)?, - outbound_peers_index: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TimeSlicedSurveyRequestMessage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.request.write_xdr(w)?; - self.nonce.write_xdr(w)?; - self.inbound_peers_index.write_xdr(w)?; - self.outbound_peers_index.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SignedTimeSlicedSurveyRequestMessage is an XDR Struct defined as: -/// -/// ```text -/// struct SignedTimeSlicedSurveyRequestMessage -/// { -/// Signature requestSignature; -/// TimeSlicedSurveyRequestMessage request; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SignedTimeSlicedSurveyRequestMessage { - pub request_signature: Signature, - pub request: TimeSlicedSurveyRequestMessage, -} - -impl ReadXdr for SignedTimeSlicedSurveyRequestMessage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - request_signature: Signature::read_xdr(r)?, - request: TimeSlicedSurveyRequestMessage::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SignedTimeSlicedSurveyRequestMessage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.request_signature.write_xdr(w)?; - self.request.write_xdr(w)?; - Ok(()) - }) - } -} - -/// EncryptedBody is an XDR Typedef defined as: -/// -/// ```text -/// typedef opaque EncryptedBody<64000>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct EncryptedBody(pub BytesM<64000>); - -impl From for BytesM<64000> { - #[must_use] - fn from(x: EncryptedBody) -> Self { - x.0 - } -} - -impl From> for EncryptedBody { - #[must_use] - fn from(x: BytesM<64000>) -> Self { - EncryptedBody(x) - } -} - -impl AsRef> for EncryptedBody { - #[must_use] - fn as_ref(&self) -> &BytesM<64000> { - &self.0 - } -} - -impl ReadXdr for EncryptedBody { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = BytesM::<64000>::read_xdr(r)?; - let v = EncryptedBody(i); - Ok(v) - }) - } -} - -impl WriteXdr for EncryptedBody { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for EncryptedBody { - type Target = BytesM<64000>; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: EncryptedBody) -> Self { - x.0 .0 - } -} - -impl TryFrom> for EncryptedBody { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(EncryptedBody(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for EncryptedBody { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(EncryptedBody(x.try_into()?)) - } -} - -impl AsRef> for EncryptedBody { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[u8]> for EncryptedBody { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0 .0 - } -} - -/// SurveyResponseMessage is an XDR Struct defined as: -/// -/// ```text -/// struct SurveyResponseMessage -/// { -/// NodeID surveyorPeerID; -/// NodeID surveyedPeerID; -/// uint32 ledgerNum; -/// SurveyMessageCommandType commandType; -/// EncryptedBody encryptedBody; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SurveyResponseMessage { - pub surveyor_peer_id: NodeId, - pub surveyed_peer_id: NodeId, - pub ledger_num: u32, - pub command_type: SurveyMessageCommandType, - pub encrypted_body: EncryptedBody, -} - -impl ReadXdr for SurveyResponseMessage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - surveyor_peer_id: NodeId::read_xdr(r)?, - surveyed_peer_id: NodeId::read_xdr(r)?, - ledger_num: u32::read_xdr(r)?, - command_type: SurveyMessageCommandType::read_xdr(r)?, - encrypted_body: EncryptedBody::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SurveyResponseMessage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.surveyor_peer_id.write_xdr(w)?; - self.surveyed_peer_id.write_xdr(w)?; - self.ledger_num.write_xdr(w)?; - self.command_type.write_xdr(w)?; - self.encrypted_body.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TimeSlicedSurveyResponseMessage is an XDR Struct defined as: -/// -/// ```text -/// struct TimeSlicedSurveyResponseMessage -/// { -/// SurveyResponseMessage response; -/// uint32 nonce; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TimeSlicedSurveyResponseMessage { - pub response: SurveyResponseMessage, - pub nonce: u32, -} - -impl ReadXdr for TimeSlicedSurveyResponseMessage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - response: SurveyResponseMessage::read_xdr(r)?, - nonce: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TimeSlicedSurveyResponseMessage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.response.write_xdr(w)?; - self.nonce.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SignedTimeSlicedSurveyResponseMessage is an XDR Struct defined as: -/// -/// ```text -/// struct SignedTimeSlicedSurveyResponseMessage -/// { -/// Signature responseSignature; -/// TimeSlicedSurveyResponseMessage response; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SignedTimeSlicedSurveyResponseMessage { - pub response_signature: Signature, - pub response: TimeSlicedSurveyResponseMessage, -} - -impl ReadXdr for SignedTimeSlicedSurveyResponseMessage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - response_signature: Signature::read_xdr(r)?, - response: TimeSlicedSurveyResponseMessage::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SignedTimeSlicedSurveyResponseMessage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.response_signature.write_xdr(w)?; - self.response.write_xdr(w)?; - Ok(()) - }) - } -} - -/// PeerStats is an XDR Struct defined as: -/// -/// ```text -/// struct PeerStats -/// { -/// NodeID id; -/// string versionStr<100>; -/// uint64 messagesRead; -/// uint64 messagesWritten; -/// uint64 bytesRead; -/// uint64 bytesWritten; -/// uint64 secondsConnected; -/// -/// uint64 uniqueFloodBytesRecv; -/// uint64 duplicateFloodBytesRecv; -/// uint64 uniqueFetchBytesRecv; -/// uint64 duplicateFetchBytesRecv; -/// -/// uint64 uniqueFloodMessageRecv; -/// uint64 duplicateFloodMessageRecv; -/// uint64 uniqueFetchMessageRecv; -/// uint64 duplicateFetchMessageRecv; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct PeerStats { - pub id: NodeId, - pub version_str: StringM<100>, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub messages_read: u64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub messages_written: u64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub bytes_read: u64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub bytes_written: u64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub seconds_connected: u64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub unique_flood_bytes_recv: u64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub duplicate_flood_bytes_recv: u64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub unique_fetch_bytes_recv: u64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub duplicate_fetch_bytes_recv: u64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub unique_flood_message_recv: u64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub duplicate_flood_message_recv: u64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub unique_fetch_message_recv: u64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub duplicate_fetch_message_recv: u64, -} - -impl ReadXdr for PeerStats { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - id: NodeId::read_xdr(r)?, - version_str: StringM::<100>::read_xdr(r)?, - messages_read: u64::read_xdr(r)?, - messages_written: u64::read_xdr(r)?, - bytes_read: u64::read_xdr(r)?, - bytes_written: u64::read_xdr(r)?, - seconds_connected: u64::read_xdr(r)?, - unique_flood_bytes_recv: u64::read_xdr(r)?, - duplicate_flood_bytes_recv: u64::read_xdr(r)?, - unique_fetch_bytes_recv: u64::read_xdr(r)?, - duplicate_fetch_bytes_recv: u64::read_xdr(r)?, - unique_flood_message_recv: u64::read_xdr(r)?, - duplicate_flood_message_recv: u64::read_xdr(r)?, - unique_fetch_message_recv: u64::read_xdr(r)?, - duplicate_fetch_message_recv: u64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for PeerStats { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.id.write_xdr(w)?; - self.version_str.write_xdr(w)?; - self.messages_read.write_xdr(w)?; - self.messages_written.write_xdr(w)?; - self.bytes_read.write_xdr(w)?; - self.bytes_written.write_xdr(w)?; - self.seconds_connected.write_xdr(w)?; - self.unique_flood_bytes_recv.write_xdr(w)?; - self.duplicate_flood_bytes_recv.write_xdr(w)?; - self.unique_fetch_bytes_recv.write_xdr(w)?; - self.duplicate_fetch_bytes_recv.write_xdr(w)?; - self.unique_flood_message_recv.write_xdr(w)?; - self.duplicate_flood_message_recv.write_xdr(w)?; - self.unique_fetch_message_recv.write_xdr(w)?; - self.duplicate_fetch_message_recv.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TimeSlicedNodeData is an XDR Struct defined as: -/// -/// ```text -/// struct TimeSlicedNodeData -/// { -/// uint32 addedAuthenticatedPeers; -/// uint32 droppedAuthenticatedPeers; -/// uint32 totalInboundPeerCount; -/// uint32 totalOutboundPeerCount; -/// -/// // SCP stats -/// uint32 p75SCPFirstToSelfLatencyMs; -/// uint32 p75SCPSelfToOtherLatencyMs; -/// -/// // How many times the node lost sync in the time slice -/// uint32 lostSyncCount; -/// -/// // Config data -/// bool isValidator; -/// uint32 maxInboundPeerCount; -/// uint32 maxOutboundPeerCount; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TimeSlicedNodeData { - pub added_authenticated_peers: u32, - pub dropped_authenticated_peers: u32, - pub total_inbound_peer_count: u32, - pub total_outbound_peer_count: u32, - pub p75_scp_first_to_self_latency_ms: u32, - pub p75_scp_self_to_other_latency_ms: u32, - pub lost_sync_count: u32, - pub is_validator: bool, - pub max_inbound_peer_count: u32, - pub max_outbound_peer_count: u32, -} - -impl ReadXdr for TimeSlicedNodeData { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - added_authenticated_peers: u32::read_xdr(r)?, - dropped_authenticated_peers: u32::read_xdr(r)?, - total_inbound_peer_count: u32::read_xdr(r)?, - total_outbound_peer_count: u32::read_xdr(r)?, - p75_scp_first_to_self_latency_ms: u32::read_xdr(r)?, - p75_scp_self_to_other_latency_ms: u32::read_xdr(r)?, - lost_sync_count: u32::read_xdr(r)?, - is_validator: bool::read_xdr(r)?, - max_inbound_peer_count: u32::read_xdr(r)?, - max_outbound_peer_count: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TimeSlicedNodeData { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.added_authenticated_peers.write_xdr(w)?; - self.dropped_authenticated_peers.write_xdr(w)?; - self.total_inbound_peer_count.write_xdr(w)?; - self.total_outbound_peer_count.write_xdr(w)?; - self.p75_scp_first_to_self_latency_ms.write_xdr(w)?; - self.p75_scp_self_to_other_latency_ms.write_xdr(w)?; - self.lost_sync_count.write_xdr(w)?; - self.is_validator.write_xdr(w)?; - self.max_inbound_peer_count.write_xdr(w)?; - self.max_outbound_peer_count.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TimeSlicedPeerData is an XDR Struct defined as: -/// -/// ```text -/// struct TimeSlicedPeerData -/// { -/// PeerStats peerStats; -/// uint32 averageLatencyMs; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TimeSlicedPeerData { - pub peer_stats: PeerStats, - pub average_latency_ms: u32, -} - -impl ReadXdr for TimeSlicedPeerData { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - peer_stats: PeerStats::read_xdr(r)?, - average_latency_ms: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TimeSlicedPeerData { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.peer_stats.write_xdr(w)?; - self.average_latency_ms.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TimeSlicedPeerDataList is an XDR Typedef defined as: -/// -/// ```text -/// typedef TimeSlicedPeerData TimeSlicedPeerDataList<25>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct TimeSlicedPeerDataList(pub VecM); - -impl From for VecM { - #[must_use] - fn from(x: TimeSlicedPeerDataList) -> Self { - x.0 - } -} - -impl From> for TimeSlicedPeerDataList { - #[must_use] - fn from(x: VecM) -> Self { - TimeSlicedPeerDataList(x) - } -} - -impl AsRef> for TimeSlicedPeerDataList { - #[must_use] - fn as_ref(&self) -> &VecM { - &self.0 - } -} - -impl ReadXdr for TimeSlicedPeerDataList { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = VecM::::read_xdr(r)?; - let v = TimeSlicedPeerDataList(i); - Ok(v) - }) - } -} - -impl WriteXdr for TimeSlicedPeerDataList { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for TimeSlicedPeerDataList { - type Target = VecM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: TimeSlicedPeerDataList) -> Self { - x.0 .0 - } -} - -impl TryFrom> for TimeSlicedPeerDataList { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(TimeSlicedPeerDataList(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for TimeSlicedPeerDataList { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(TimeSlicedPeerDataList(x.try_into()?)) - } -} - -impl AsRef> for TimeSlicedPeerDataList { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[TimeSlicedPeerData]> for TimeSlicedPeerDataList { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[TimeSlicedPeerData] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[TimeSlicedPeerData] { - self.0 .0 - } -} - -/// TopologyResponseBodyV2 is an XDR Struct defined as: -/// -/// ```text -/// struct TopologyResponseBodyV2 -/// { -/// TimeSlicedPeerDataList inboundPeers; -/// TimeSlicedPeerDataList outboundPeers; -/// TimeSlicedNodeData nodeData; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TopologyResponseBodyV2 { - pub inbound_peers: TimeSlicedPeerDataList, - pub outbound_peers: TimeSlicedPeerDataList, - pub node_data: TimeSlicedNodeData, -} - -impl ReadXdr for TopologyResponseBodyV2 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - inbound_peers: TimeSlicedPeerDataList::read_xdr(r)?, - outbound_peers: TimeSlicedPeerDataList::read_xdr(r)?, - node_data: TimeSlicedNodeData::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TopologyResponseBodyV2 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.inbound_peers.write_xdr(w)?; - self.outbound_peers.write_xdr(w)?; - self.node_data.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SurveyResponseBody is an XDR Union defined as: -/// -/// ```text -/// union SurveyResponseBody switch (SurveyMessageResponseType type) -/// { -/// case SURVEY_TOPOLOGY_RESPONSE_V2: -/// TopologyResponseBodyV2 topologyResponseBodyV2; -/// }; -/// ``` -/// -// union with discriminant SurveyMessageResponseType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum SurveyResponseBody { - SurveyTopologyResponseV2(TopologyResponseBodyV2), -} - -#[cfg(feature = "alloc")] -impl Default for SurveyResponseBody { - fn default() -> Self { - Self::SurveyTopologyResponseV2(TopologyResponseBodyV2::default()) - } -} - -impl SurveyResponseBody { - const _VARIANTS: &[SurveyMessageResponseType] = - &[SurveyMessageResponseType::SurveyTopologyResponseV2]; - pub const VARIANTS: [SurveyMessageResponseType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["SurveyTopologyResponseV2"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::SurveyTopologyResponseV2(_) => "SurveyTopologyResponseV2", - } - } - - #[must_use] - pub const fn discriminant(&self) -> SurveyMessageResponseType { - #[allow(clippy::match_same_arms)] - match self { - Self::SurveyTopologyResponseV2(_) => { - SurveyMessageResponseType::SurveyTopologyResponseV2 - } - } - } - - #[must_use] - pub const fn variants() -> [SurveyMessageResponseType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SurveyResponseBody { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for SurveyResponseBody { - #[must_use] - fn discriminant(&self) -> SurveyMessageResponseType { - Self::discriminant(self) - } -} - -impl Variants for SurveyResponseBody { - fn variants() -> slice::Iter<'static, SurveyMessageResponseType> { - Self::VARIANTS.iter() - } -} - -impl Union for SurveyResponseBody {} - -impl ReadXdr for SurveyResponseBody { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: SurveyMessageResponseType = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - SurveyMessageResponseType::SurveyTopologyResponseV2 => { - Self::SurveyTopologyResponseV2(TopologyResponseBodyV2::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for SurveyResponseBody { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::SurveyTopologyResponseV2(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TxAdvertVectorMaxSize is an XDR Const defined as: -/// -/// ```text -/// const TX_ADVERT_VECTOR_MAX_SIZE = 1000; -/// ``` -/// -pub const TX_ADVERT_VECTOR_MAX_SIZE: u64 = 1000; - -/// TxAdvertVector is an XDR Typedef defined as: -/// -/// ```text -/// typedef Hash TxAdvertVector; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct TxAdvertVector(pub VecM); - -impl From for VecM { - #[must_use] - fn from(x: TxAdvertVector) -> Self { - x.0 - } -} - -impl From> for TxAdvertVector { - #[must_use] - fn from(x: VecM) -> Self { - TxAdvertVector(x) - } -} - -impl AsRef> for TxAdvertVector { - #[must_use] - fn as_ref(&self) -> &VecM { - &self.0 - } -} - -impl ReadXdr for TxAdvertVector { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = VecM::::read_xdr(r)?; - let v = TxAdvertVector(i); - Ok(v) - }) - } -} - -impl WriteXdr for TxAdvertVector { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for TxAdvertVector { - type Target = VecM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: TxAdvertVector) -> Self { - x.0 .0 - } -} - -impl TryFrom> for TxAdvertVector { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(TxAdvertVector(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for TxAdvertVector { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(TxAdvertVector(x.try_into()?)) - } -} - -impl AsRef> for TxAdvertVector { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[Hash]> for TxAdvertVector { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[Hash] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[Hash] { - self.0 .0 - } -} - -/// FloodAdvert is an XDR Struct defined as: -/// -/// ```text -/// struct FloodAdvert -/// { -/// TxAdvertVector txHashes; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct FloodAdvert { - pub tx_hashes: TxAdvertVector, -} - -impl ReadXdr for FloodAdvert { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - tx_hashes: TxAdvertVector::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for FloodAdvert { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.tx_hashes.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TxDemandVectorMaxSize is an XDR Const defined as: -/// -/// ```text -/// const TX_DEMAND_VECTOR_MAX_SIZE = 1000; -/// ``` -/// -pub const TX_DEMAND_VECTOR_MAX_SIZE: u64 = 1000; - -/// TxDemandVector is an XDR Typedef defined as: -/// -/// ```text -/// typedef Hash TxDemandVector; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct TxDemandVector(pub VecM); - -impl From for VecM { - #[must_use] - fn from(x: TxDemandVector) -> Self { - x.0 - } -} - -impl From> for TxDemandVector { - #[must_use] - fn from(x: VecM) -> Self { - TxDemandVector(x) - } -} - -impl AsRef> for TxDemandVector { - #[must_use] - fn as_ref(&self) -> &VecM { - &self.0 - } -} - -impl ReadXdr for TxDemandVector { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = VecM::::read_xdr(r)?; - let v = TxDemandVector(i); - Ok(v) - }) - } -} - -impl WriteXdr for TxDemandVector { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for TxDemandVector { - type Target = VecM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: TxDemandVector) -> Self { - x.0 .0 - } -} - -impl TryFrom> for TxDemandVector { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(TxDemandVector(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for TxDemandVector { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(TxDemandVector(x.try_into()?)) - } -} - -impl AsRef> for TxDemandVector { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[Hash]> for TxDemandVector { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[Hash] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[Hash] { - self.0 .0 - } -} - -/// FloodDemand is an XDR Struct defined as: -/// -/// ```text -/// struct FloodDemand -/// { -/// TxDemandVector txHashes; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct FloodDemand { - pub tx_hashes: TxDemandVector, -} - -impl ReadXdr for FloodDemand { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - tx_hashes: TxDemandVector::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for FloodDemand { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.tx_hashes.write_xdr(w)?; - Ok(()) - }) - } -} - -/// StellarMessage is an XDR Union defined as: -/// -/// ```text -/// union StellarMessage switch (MessageType type) -/// { -/// case ERROR_MSG: -/// Error error; -/// case HELLO: -/// Hello hello; -/// case AUTH: -/// Auth auth; -/// case DONT_HAVE: -/// DontHave dontHave; -/// case PEERS: -/// PeerAddress peers<100>; -/// -/// case GET_TX_SET: -/// uint256 txSetHash; -/// case TX_SET: -/// TransactionSet txSet; -/// case GENERALIZED_TX_SET: -/// GeneralizedTransactionSet generalizedTxSet; -/// -/// case TRANSACTION: -/// TransactionEnvelope transaction; -/// -/// case TIME_SLICED_SURVEY_REQUEST: -/// SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage; -/// -/// case TIME_SLICED_SURVEY_RESPONSE: -/// SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage; -/// -/// case TIME_SLICED_SURVEY_START_COLLECTING: -/// SignedTimeSlicedSurveyStartCollectingMessage -/// signedTimeSlicedSurveyStartCollectingMessage; -/// -/// case TIME_SLICED_SURVEY_STOP_COLLECTING: -/// SignedTimeSlicedSurveyStopCollectingMessage -/// signedTimeSlicedSurveyStopCollectingMessage; -/// -/// // SCP -/// case GET_SCP_QUORUMSET: -/// uint256 qSetHash; -/// case SCP_QUORUMSET: -/// SCPQuorumSet qSet; -/// case SCP_MESSAGE: -/// SCPEnvelope envelope; -/// case GET_SCP_STATE: -/// uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest -/// case SEND_MORE: -/// SendMore sendMoreMessage; -/// case SEND_MORE_EXTENDED: -/// SendMoreExtended sendMoreExtendedMessage; -/// // Pull mode -/// case FLOOD_ADVERT: -/// FloodAdvert floodAdvert; -/// case FLOOD_DEMAND: -/// FloodDemand floodDemand; -/// }; -/// ``` -/// -// union with discriminant MessageType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum StellarMessage { - ErrorMsg(SError), - Hello(Hello), - Auth(Auth), - DontHave(DontHave), - Peers(VecM), - GetTxSet(Uint256), - TxSet(TransactionSet), - GeneralizedTxSet(GeneralizedTransactionSet), - Transaction(TransactionEnvelope), - TimeSlicedSurveyRequest(SignedTimeSlicedSurveyRequestMessage), - TimeSlicedSurveyResponse(SignedTimeSlicedSurveyResponseMessage), - TimeSlicedSurveyStartCollecting(SignedTimeSlicedSurveyStartCollectingMessage), - TimeSlicedSurveyStopCollecting(SignedTimeSlicedSurveyStopCollectingMessage), - GetScpQuorumset(Uint256), - ScpQuorumset(ScpQuorumSet), - ScpMessage(ScpEnvelope), - GetScpState(u32), - SendMore(SendMore), - SendMoreExtended(SendMoreExtended), - FloodAdvert(FloodAdvert), - FloodDemand(FloodDemand), -} - -#[cfg(feature = "alloc")] -impl Default for StellarMessage { - fn default() -> Self { - Self::ErrorMsg(SError::default()) - } -} - -impl StellarMessage { - const _VARIANTS: &[MessageType] = &[ - MessageType::ErrorMsg, - MessageType::Hello, - MessageType::Auth, - MessageType::DontHave, - MessageType::Peers, - MessageType::GetTxSet, - MessageType::TxSet, - MessageType::GeneralizedTxSet, - MessageType::Transaction, - MessageType::TimeSlicedSurveyRequest, - MessageType::TimeSlicedSurveyResponse, - MessageType::TimeSlicedSurveyStartCollecting, - MessageType::TimeSlicedSurveyStopCollecting, - MessageType::GetScpQuorumset, - MessageType::ScpQuorumset, - MessageType::ScpMessage, - MessageType::GetScpState, - MessageType::SendMore, - MessageType::SendMoreExtended, - MessageType::FloodAdvert, - MessageType::FloodDemand, - ]; - pub const VARIANTS: [MessageType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "ErrorMsg", - "Hello", - "Auth", - "DontHave", - "Peers", - "GetTxSet", - "TxSet", - "GeneralizedTxSet", - "Transaction", - "TimeSlicedSurveyRequest", - "TimeSlicedSurveyResponse", - "TimeSlicedSurveyStartCollecting", - "TimeSlicedSurveyStopCollecting", - "GetScpQuorumset", - "ScpQuorumset", - "ScpMessage", - "GetScpState", - "SendMore", - "SendMoreExtended", - "FloodAdvert", - "FloodDemand", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ErrorMsg(_) => "ErrorMsg", - Self::Hello(_) => "Hello", - Self::Auth(_) => "Auth", - Self::DontHave(_) => "DontHave", - Self::Peers(_) => "Peers", - Self::GetTxSet(_) => "GetTxSet", - Self::TxSet(_) => "TxSet", - Self::GeneralizedTxSet(_) => "GeneralizedTxSet", - Self::Transaction(_) => "Transaction", - Self::TimeSlicedSurveyRequest(_) => "TimeSlicedSurveyRequest", - Self::TimeSlicedSurveyResponse(_) => "TimeSlicedSurveyResponse", - Self::TimeSlicedSurveyStartCollecting(_) => "TimeSlicedSurveyStartCollecting", - Self::TimeSlicedSurveyStopCollecting(_) => "TimeSlicedSurveyStopCollecting", - Self::GetScpQuorumset(_) => "GetScpQuorumset", - Self::ScpQuorumset(_) => "ScpQuorumset", - Self::ScpMessage(_) => "ScpMessage", - Self::GetScpState(_) => "GetScpState", - Self::SendMore(_) => "SendMore", - Self::SendMoreExtended(_) => "SendMoreExtended", - Self::FloodAdvert(_) => "FloodAdvert", - Self::FloodDemand(_) => "FloodDemand", - } - } - - #[must_use] - pub const fn discriminant(&self) -> MessageType { - #[allow(clippy::match_same_arms)] - match self { - Self::ErrorMsg(_) => MessageType::ErrorMsg, - Self::Hello(_) => MessageType::Hello, - Self::Auth(_) => MessageType::Auth, - Self::DontHave(_) => MessageType::DontHave, - Self::Peers(_) => MessageType::Peers, - Self::GetTxSet(_) => MessageType::GetTxSet, - Self::TxSet(_) => MessageType::TxSet, - Self::GeneralizedTxSet(_) => MessageType::GeneralizedTxSet, - Self::Transaction(_) => MessageType::Transaction, - Self::TimeSlicedSurveyRequest(_) => MessageType::TimeSlicedSurveyRequest, - Self::TimeSlicedSurveyResponse(_) => MessageType::TimeSlicedSurveyResponse, - Self::TimeSlicedSurveyStartCollecting(_) => { - MessageType::TimeSlicedSurveyStartCollecting - } - Self::TimeSlicedSurveyStopCollecting(_) => MessageType::TimeSlicedSurveyStopCollecting, - Self::GetScpQuorumset(_) => MessageType::GetScpQuorumset, - Self::ScpQuorumset(_) => MessageType::ScpQuorumset, - Self::ScpMessage(_) => MessageType::ScpMessage, - Self::GetScpState(_) => MessageType::GetScpState, - Self::SendMore(_) => MessageType::SendMore, - Self::SendMoreExtended(_) => MessageType::SendMoreExtended, - Self::FloodAdvert(_) => MessageType::FloodAdvert, - Self::FloodDemand(_) => MessageType::FloodDemand, - } - } - - #[must_use] - pub const fn variants() -> [MessageType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for StellarMessage { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for StellarMessage { - #[must_use] - fn discriminant(&self) -> MessageType { - Self::discriminant(self) - } -} - -impl Variants for StellarMessage { - fn variants() -> slice::Iter<'static, MessageType> { - Self::VARIANTS.iter() - } -} - -impl Union for StellarMessage {} - -impl ReadXdr for StellarMessage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: MessageType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - MessageType::ErrorMsg => Self::ErrorMsg(SError::read_xdr(r)?), - MessageType::Hello => Self::Hello(Hello::read_xdr(r)?), - MessageType::Auth => Self::Auth(Auth::read_xdr(r)?), - MessageType::DontHave => Self::DontHave(DontHave::read_xdr(r)?), - MessageType::Peers => Self::Peers(VecM::::read_xdr(r)?), - MessageType::GetTxSet => Self::GetTxSet(Uint256::read_xdr(r)?), - MessageType::TxSet => Self::TxSet(TransactionSet::read_xdr(r)?), - MessageType::GeneralizedTxSet => { - Self::GeneralizedTxSet(GeneralizedTransactionSet::read_xdr(r)?) - } - MessageType::Transaction => Self::Transaction(TransactionEnvelope::read_xdr(r)?), - MessageType::TimeSlicedSurveyRequest => Self::TimeSlicedSurveyRequest( - SignedTimeSlicedSurveyRequestMessage::read_xdr(r)?, - ), - MessageType::TimeSlicedSurveyResponse => Self::TimeSlicedSurveyResponse( - SignedTimeSlicedSurveyResponseMessage::read_xdr(r)?, - ), - MessageType::TimeSlicedSurveyStartCollecting => { - Self::TimeSlicedSurveyStartCollecting( - SignedTimeSlicedSurveyStartCollectingMessage::read_xdr(r)?, - ) - } - MessageType::TimeSlicedSurveyStopCollecting => { - Self::TimeSlicedSurveyStopCollecting( - SignedTimeSlicedSurveyStopCollectingMessage::read_xdr(r)?, - ) - } - MessageType::GetScpQuorumset => Self::GetScpQuorumset(Uint256::read_xdr(r)?), - MessageType::ScpQuorumset => Self::ScpQuorumset(ScpQuorumSet::read_xdr(r)?), - MessageType::ScpMessage => Self::ScpMessage(ScpEnvelope::read_xdr(r)?), - MessageType::GetScpState => Self::GetScpState(u32::read_xdr(r)?), - MessageType::SendMore => Self::SendMore(SendMore::read_xdr(r)?), - MessageType::SendMoreExtended => { - Self::SendMoreExtended(SendMoreExtended::read_xdr(r)?) - } - MessageType::FloodAdvert => Self::FloodAdvert(FloodAdvert::read_xdr(r)?), - MessageType::FloodDemand => Self::FloodDemand(FloodDemand::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for StellarMessage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::ErrorMsg(v) => v.write_xdr(w)?, - Self::Hello(v) => v.write_xdr(w)?, - Self::Auth(v) => v.write_xdr(w)?, - Self::DontHave(v) => v.write_xdr(w)?, - Self::Peers(v) => v.write_xdr(w)?, - Self::GetTxSet(v) => v.write_xdr(w)?, - Self::TxSet(v) => v.write_xdr(w)?, - Self::GeneralizedTxSet(v) => v.write_xdr(w)?, - Self::Transaction(v) => v.write_xdr(w)?, - Self::TimeSlicedSurveyRequest(v) => v.write_xdr(w)?, - Self::TimeSlicedSurveyResponse(v) => v.write_xdr(w)?, - Self::TimeSlicedSurveyStartCollecting(v) => v.write_xdr(w)?, - Self::TimeSlicedSurveyStopCollecting(v) => v.write_xdr(w)?, - Self::GetScpQuorumset(v) => v.write_xdr(w)?, - Self::ScpQuorumset(v) => v.write_xdr(w)?, - Self::ScpMessage(v) => v.write_xdr(w)?, - Self::GetScpState(v) => v.write_xdr(w)?, - Self::SendMore(v) => v.write_xdr(w)?, - Self::SendMoreExtended(v) => v.write_xdr(w)?, - Self::FloodAdvert(v) => v.write_xdr(w)?, - Self::FloodDemand(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// AuthenticatedMessageV0 is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// uint64 sequence; -/// StellarMessage message; -/// HmacSha256Mac mac; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct AuthenticatedMessageV0 { - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub sequence: u64, - pub message: StellarMessage, - pub mac: HmacSha256Mac, -} - -impl ReadXdr for AuthenticatedMessageV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - sequence: u64::read_xdr(r)?, - message: StellarMessage::read_xdr(r)?, - mac: HmacSha256Mac::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for AuthenticatedMessageV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.sequence.write_xdr(w)?; - self.message.write_xdr(w)?; - self.mac.write_xdr(w)?; - Ok(()) - }) - } -} - -/// AuthenticatedMessage is an XDR Union defined as: -/// -/// ```text -/// union AuthenticatedMessage switch (uint32 v) -/// { -/// case 0: -/// struct -/// { -/// uint64 sequence; -/// StellarMessage message; -/// HmacSha256Mac mac; -/// } v0; -/// }; -/// ``` -/// -// union with discriminant u32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum AuthenticatedMessage { - V0(AuthenticatedMessageV0), -} - -#[cfg(feature = "alloc")] -impl Default for AuthenticatedMessage { - fn default() -> Self { - Self::V0(AuthenticatedMessageV0::default()) - } -} - -impl AuthenticatedMessage { - const _VARIANTS: &[u32] = &[0]; - pub const VARIANTS: [u32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0(_) => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> u32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0(_) => 0, - } - } - - #[must_use] - pub const fn variants() -> [u32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for AuthenticatedMessage { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for AuthenticatedMessage { - #[must_use] - fn discriminant(&self) -> u32 { - Self::discriminant(self) - } -} - -impl Variants for AuthenticatedMessage { - fn variants() -> slice::Iter<'static, u32> { - Self::VARIANTS.iter() - } -} - -impl Union for AuthenticatedMessage {} - -impl ReadXdr for AuthenticatedMessage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: u32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0(AuthenticatedMessageV0::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for AuthenticatedMessage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// MaxOpsPerTx is an XDR Const defined as: -/// -/// ```text -/// const MAX_OPS_PER_TX = 100; -/// ``` -/// -pub const MAX_OPS_PER_TX: u64 = 100; - -/// LiquidityPoolParameters is an XDR Union defined as: -/// -/// ```text -/// union LiquidityPoolParameters switch (LiquidityPoolType type) -/// { -/// case LIQUIDITY_POOL_CONSTANT_PRODUCT: -/// LiquidityPoolConstantProductParameters constantProduct; -/// }; -/// ``` -/// -// union with discriminant LiquidityPoolType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LiquidityPoolParameters { - LiquidityPoolConstantProduct(LiquidityPoolConstantProductParameters), -} - -#[cfg(feature = "alloc")] -impl Default for LiquidityPoolParameters { - fn default() -> Self { - Self::LiquidityPoolConstantProduct(LiquidityPoolConstantProductParameters::default()) - } -} - -impl LiquidityPoolParameters { - const _VARIANTS: &[LiquidityPoolType] = &[LiquidityPoolType::LiquidityPoolConstantProduct]; - pub const VARIANTS: [LiquidityPoolType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["LiquidityPoolConstantProduct"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::LiquidityPoolConstantProduct(_) => "LiquidityPoolConstantProduct", - } - } - - #[must_use] - pub const fn discriminant(&self) -> LiquidityPoolType { - #[allow(clippy::match_same_arms)] - match self { - Self::LiquidityPoolConstantProduct(_) => { - LiquidityPoolType::LiquidityPoolConstantProduct - } - } - } - - #[must_use] - pub const fn variants() -> [LiquidityPoolType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LiquidityPoolParameters { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LiquidityPoolParameters { - #[must_use] - fn discriminant(&self) -> LiquidityPoolType { - Self::discriminant(self) - } -} - -impl Variants for LiquidityPoolParameters { - fn variants() -> slice::Iter<'static, LiquidityPoolType> { - Self::VARIANTS.iter() - } -} - -impl Union for LiquidityPoolParameters {} - -impl ReadXdr for LiquidityPoolParameters { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: LiquidityPoolType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - LiquidityPoolType::LiquidityPoolConstantProduct => { - Self::LiquidityPoolConstantProduct( - LiquidityPoolConstantProductParameters::read_xdr(r)?, - ) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LiquidityPoolParameters { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::LiquidityPoolConstantProduct(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// MuxedAccountMed25519 is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// uint64 id; -/// uint256 ed25519; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay) -)] -pub struct MuxedAccountMed25519 { - pub id: u64, - pub ed25519: Uint256, -} - -impl ReadXdr for MuxedAccountMed25519 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - id: u64::read_xdr(r)?, - ed25519: Uint256::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for MuxedAccountMed25519 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.id.write_xdr(w)?; - self.ed25519.write_xdr(w)?; - Ok(()) - }) - } -} -#[cfg(all(feature = "serde", feature = "alloc"))] -impl<'de> serde::Deserialize<'de> for MuxedAccountMed25519 { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - use serde::Deserialize; - #[derive(Deserialize)] - struct MuxedAccountMed25519 { - id: u64, - ed25519: Uint256, - } - #[derive(Deserialize)] - #[serde(untagged)] - enum MuxedAccountMed25519OrString<'a> { - Str(&'a str), - String(String), - MuxedAccountMed25519(MuxedAccountMed25519), - } - match MuxedAccountMed25519OrString::deserialize(deserializer)? { - MuxedAccountMed25519OrString::Str(s) => s.parse().map_err(serde::de::Error::custom), - MuxedAccountMed25519OrString::String(s) => s.parse().map_err(serde::de::Error::custom), - MuxedAccountMed25519OrString::MuxedAccountMed25519(MuxedAccountMed25519 { - id, - ed25519, - }) => Ok(self::MuxedAccountMed25519 { id, ed25519 }), - } - } -} - -/// MuxedAccount is an XDR Union defined as: -/// -/// ```text -/// union MuxedAccount switch (CryptoKeyType type) -/// { -/// case KEY_TYPE_ED25519: -/// uint256 ed25519; -/// case KEY_TYPE_MUXED_ED25519: -/// struct -/// { -/// uint64 id; -/// uint256 ed25519; -/// } med25519; -/// }; -/// ``` -/// -// union with discriminant CryptoKeyType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -#[allow(clippy::large_enum_variant)] -pub enum MuxedAccount { - Ed25519(Uint256), - MuxedEd25519(MuxedAccountMed25519), -} - -#[cfg(feature = "alloc")] -impl Default for MuxedAccount { - fn default() -> Self { - Self::Ed25519(Uint256::default()) - } -} - -impl MuxedAccount { - const _VARIANTS: &[CryptoKeyType] = &[CryptoKeyType::Ed25519, CryptoKeyType::MuxedEd25519]; - pub const VARIANTS: [CryptoKeyType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Ed25519", "MuxedEd25519"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Ed25519(_) => "Ed25519", - Self::MuxedEd25519(_) => "MuxedEd25519", - } - } - - #[must_use] - pub const fn discriminant(&self) -> CryptoKeyType { - #[allow(clippy::match_same_arms)] - match self { - Self::Ed25519(_) => CryptoKeyType::Ed25519, - Self::MuxedEd25519(_) => CryptoKeyType::MuxedEd25519, - } - } - - #[must_use] - pub const fn variants() -> [CryptoKeyType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for MuxedAccount { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for MuxedAccount { - #[must_use] - fn discriminant(&self) -> CryptoKeyType { - Self::discriminant(self) - } -} - -impl Variants for MuxedAccount { - fn variants() -> slice::Iter<'static, CryptoKeyType> { - Self::VARIANTS.iter() - } -} - -impl Union for MuxedAccount {} - -impl ReadXdr for MuxedAccount { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: CryptoKeyType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - CryptoKeyType::Ed25519 => Self::Ed25519(Uint256::read_xdr(r)?), - CryptoKeyType::MuxedEd25519 => { - Self::MuxedEd25519(MuxedAccountMed25519::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for MuxedAccount { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Ed25519(v) => v.write_xdr(w)?, - Self::MuxedEd25519(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// DecoratedSignature is an XDR Struct defined as: -/// -/// ```text -/// struct DecoratedSignature -/// { -/// SignatureHint hint; // last 4 bytes of the public key, used as a hint -/// Signature signature; // actual signature -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct DecoratedSignature { - pub hint: SignatureHint, - pub signature: Signature, -} - -impl ReadXdr for DecoratedSignature { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - hint: SignatureHint::read_xdr(r)?, - signature: Signature::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for DecoratedSignature { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.hint.write_xdr(w)?; - self.signature.write_xdr(w)?; - Ok(()) - }) - } -} - -/// OperationType is an XDR Enum defined as: -/// -/// ```text -/// enum OperationType -/// { -/// CREATE_ACCOUNT = 0, -/// PAYMENT = 1, -/// PATH_PAYMENT_STRICT_RECEIVE = 2, -/// MANAGE_SELL_OFFER = 3, -/// CREATE_PASSIVE_SELL_OFFER = 4, -/// SET_OPTIONS = 5, -/// CHANGE_TRUST = 6, -/// ALLOW_TRUST = 7, -/// ACCOUNT_MERGE = 8, -/// INFLATION = 9, -/// MANAGE_DATA = 10, -/// BUMP_SEQUENCE = 11, -/// MANAGE_BUY_OFFER = 12, -/// PATH_PAYMENT_STRICT_SEND = 13, -/// CREATE_CLAIMABLE_BALANCE = 14, -/// CLAIM_CLAIMABLE_BALANCE = 15, -/// BEGIN_SPONSORING_FUTURE_RESERVES = 16, -/// END_SPONSORING_FUTURE_RESERVES = 17, -/// REVOKE_SPONSORSHIP = 18, -/// CLAWBACK = 19, -/// CLAWBACK_CLAIMABLE_BALANCE = 20, -/// SET_TRUST_LINE_FLAGS = 21, -/// LIQUIDITY_POOL_DEPOSIT = 22, -/// LIQUIDITY_POOL_WITHDRAW = 23, -/// INVOKE_HOST_FUNCTION = 24, -/// EXTEND_FOOTPRINT_TTL = 25, -/// RESTORE_FOOTPRINT = 26 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum OperationType { - #[cfg_attr(feature = "alloc", default)] - CreateAccount = 0, - Payment = 1, - PathPaymentStrictReceive = 2, - ManageSellOffer = 3, - CreatePassiveSellOffer = 4, - SetOptions = 5, - ChangeTrust = 6, - AllowTrust = 7, - AccountMerge = 8, - Inflation = 9, - ManageData = 10, - BumpSequence = 11, - ManageBuyOffer = 12, - PathPaymentStrictSend = 13, - CreateClaimableBalance = 14, - ClaimClaimableBalance = 15, - BeginSponsoringFutureReserves = 16, - EndSponsoringFutureReserves = 17, - RevokeSponsorship = 18, - Clawback = 19, - ClawbackClaimableBalance = 20, - SetTrustLineFlags = 21, - LiquidityPoolDeposit = 22, - LiquidityPoolWithdraw = 23, - InvokeHostFunction = 24, - ExtendFootprintTtl = 25, - RestoreFootprint = 26, -} - -impl OperationType { - const _VARIANTS: &[OperationType] = &[ - OperationType::CreateAccount, - OperationType::Payment, - OperationType::PathPaymentStrictReceive, - OperationType::ManageSellOffer, - OperationType::CreatePassiveSellOffer, - OperationType::SetOptions, - OperationType::ChangeTrust, - OperationType::AllowTrust, - OperationType::AccountMerge, - OperationType::Inflation, - OperationType::ManageData, - OperationType::BumpSequence, - OperationType::ManageBuyOffer, - OperationType::PathPaymentStrictSend, - OperationType::CreateClaimableBalance, - OperationType::ClaimClaimableBalance, - OperationType::BeginSponsoringFutureReserves, - OperationType::EndSponsoringFutureReserves, - OperationType::RevokeSponsorship, - OperationType::Clawback, - OperationType::ClawbackClaimableBalance, - OperationType::SetTrustLineFlags, - OperationType::LiquidityPoolDeposit, - OperationType::LiquidityPoolWithdraw, - OperationType::InvokeHostFunction, - OperationType::ExtendFootprintTtl, - OperationType::RestoreFootprint, - ]; - pub const VARIANTS: [OperationType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "CreateAccount", - "Payment", - "PathPaymentStrictReceive", - "ManageSellOffer", - "CreatePassiveSellOffer", - "SetOptions", - "ChangeTrust", - "AllowTrust", - "AccountMerge", - "Inflation", - "ManageData", - "BumpSequence", - "ManageBuyOffer", - "PathPaymentStrictSend", - "CreateClaimableBalance", - "ClaimClaimableBalance", - "BeginSponsoringFutureReserves", - "EndSponsoringFutureReserves", - "RevokeSponsorship", - "Clawback", - "ClawbackClaimableBalance", - "SetTrustLineFlags", - "LiquidityPoolDeposit", - "LiquidityPoolWithdraw", - "InvokeHostFunction", - "ExtendFootprintTtl", - "RestoreFootprint", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::CreateAccount => "CreateAccount", - Self::Payment => "Payment", - Self::PathPaymentStrictReceive => "PathPaymentStrictReceive", - Self::ManageSellOffer => "ManageSellOffer", - Self::CreatePassiveSellOffer => "CreatePassiveSellOffer", - Self::SetOptions => "SetOptions", - Self::ChangeTrust => "ChangeTrust", - Self::AllowTrust => "AllowTrust", - Self::AccountMerge => "AccountMerge", - Self::Inflation => "Inflation", - Self::ManageData => "ManageData", - Self::BumpSequence => "BumpSequence", - Self::ManageBuyOffer => "ManageBuyOffer", - Self::PathPaymentStrictSend => "PathPaymentStrictSend", - Self::CreateClaimableBalance => "CreateClaimableBalance", - Self::ClaimClaimableBalance => "ClaimClaimableBalance", - Self::BeginSponsoringFutureReserves => "BeginSponsoringFutureReserves", - Self::EndSponsoringFutureReserves => "EndSponsoringFutureReserves", - Self::RevokeSponsorship => "RevokeSponsorship", - Self::Clawback => "Clawback", - Self::ClawbackClaimableBalance => "ClawbackClaimableBalance", - Self::SetTrustLineFlags => "SetTrustLineFlags", - Self::LiquidityPoolDeposit => "LiquidityPoolDeposit", - Self::LiquidityPoolWithdraw => "LiquidityPoolWithdraw", - Self::InvokeHostFunction => "InvokeHostFunction", - Self::ExtendFootprintTtl => "ExtendFootprintTtl", - Self::RestoreFootprint => "RestoreFootprint", - } - } - - #[must_use] - pub const fn variants() -> [OperationType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for OperationType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for OperationType { - fn variants() -> slice::Iter<'static, OperationType> { - Self::VARIANTS.iter() - } -} - -impl Enum for OperationType {} - -impl fmt::Display for OperationType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for OperationType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => OperationType::CreateAccount, - 1 => OperationType::Payment, - 2 => OperationType::PathPaymentStrictReceive, - 3 => OperationType::ManageSellOffer, - 4 => OperationType::CreatePassiveSellOffer, - 5 => OperationType::SetOptions, - 6 => OperationType::ChangeTrust, - 7 => OperationType::AllowTrust, - 8 => OperationType::AccountMerge, - 9 => OperationType::Inflation, - 10 => OperationType::ManageData, - 11 => OperationType::BumpSequence, - 12 => OperationType::ManageBuyOffer, - 13 => OperationType::PathPaymentStrictSend, - 14 => OperationType::CreateClaimableBalance, - 15 => OperationType::ClaimClaimableBalance, - 16 => OperationType::BeginSponsoringFutureReserves, - 17 => OperationType::EndSponsoringFutureReserves, - 18 => OperationType::RevokeSponsorship, - 19 => OperationType::Clawback, - 20 => OperationType::ClawbackClaimableBalance, - 21 => OperationType::SetTrustLineFlags, - 22 => OperationType::LiquidityPoolDeposit, - 23 => OperationType::LiquidityPoolWithdraw, - 24 => OperationType::InvokeHostFunction, - 25 => OperationType::ExtendFootprintTtl, - 26 => OperationType::RestoreFootprint, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: OperationType) -> Self { - e as Self - } -} - -impl ReadXdr for OperationType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for OperationType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// CreateAccountOp is an XDR Struct defined as: -/// -/// ```text -/// struct CreateAccountOp -/// { -/// AccountID destination; // account to create -/// int64 startingBalance; // amount they end up with -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct CreateAccountOp { - pub destination: AccountId, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub starting_balance: i64, -} - -impl ReadXdr for CreateAccountOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - destination: AccountId::read_xdr(r)?, - starting_balance: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for CreateAccountOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.destination.write_xdr(w)?; - self.starting_balance.write_xdr(w)?; - Ok(()) - }) - } -} - -/// PaymentOp is an XDR Struct defined as: -/// -/// ```text -/// struct PaymentOp -/// { -/// MuxedAccount destination; // recipient of the payment -/// Asset asset; // what they end up with -/// int64 amount; // amount they end up with -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct PaymentOp { - pub destination: MuxedAccount, - pub asset: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount: i64, -} - -impl ReadXdr for PaymentOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - destination: MuxedAccount::read_xdr(r)?, - asset: Asset::read_xdr(r)?, - amount: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for PaymentOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.destination.write_xdr(w)?; - self.asset.write_xdr(w)?; - self.amount.write_xdr(w)?; - Ok(()) - }) - } -} - -/// PathPaymentStrictReceiveOp is an XDR Struct defined as: -/// -/// ```text -/// struct PathPaymentStrictReceiveOp -/// { -/// Asset sendAsset; // asset we pay with -/// int64 sendMax; // the maximum amount of sendAsset to -/// // send (excluding fees). -/// // The operation will fail if can't be met -/// -/// MuxedAccount destination; // recipient of the payment -/// Asset destAsset; // what they end up with -/// int64 destAmount; // amount they end up with -/// -/// Asset path<5>; // additional hops it must go through to get there -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct PathPaymentStrictReceiveOp { - pub send_asset: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub send_max: i64, - pub destination: MuxedAccount, - pub dest_asset: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub dest_amount: i64, - pub path: VecM, -} - -impl ReadXdr for PathPaymentStrictReceiveOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - send_asset: Asset::read_xdr(r)?, - send_max: i64::read_xdr(r)?, - destination: MuxedAccount::read_xdr(r)?, - dest_asset: Asset::read_xdr(r)?, - dest_amount: i64::read_xdr(r)?, - path: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for PathPaymentStrictReceiveOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.send_asset.write_xdr(w)?; - self.send_max.write_xdr(w)?; - self.destination.write_xdr(w)?; - self.dest_asset.write_xdr(w)?; - self.dest_amount.write_xdr(w)?; - self.path.write_xdr(w)?; - Ok(()) - }) - } -} - -/// PathPaymentStrictSendOp is an XDR Struct defined as: -/// -/// ```text -/// struct PathPaymentStrictSendOp -/// { -/// Asset sendAsset; // asset we pay with -/// int64 sendAmount; // amount of sendAsset to send (excluding fees) -/// -/// MuxedAccount destination; // recipient of the payment -/// Asset destAsset; // what they end up with -/// int64 destMin; // the minimum amount of dest asset to -/// // be received -/// // The operation will fail if it can't be met -/// -/// Asset path<5>; // additional hops it must go through to get there -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct PathPaymentStrictSendOp { - pub send_asset: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub send_amount: i64, - pub destination: MuxedAccount, - pub dest_asset: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub dest_min: i64, - pub path: VecM, -} - -impl ReadXdr for PathPaymentStrictSendOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - send_asset: Asset::read_xdr(r)?, - send_amount: i64::read_xdr(r)?, - destination: MuxedAccount::read_xdr(r)?, - dest_asset: Asset::read_xdr(r)?, - dest_min: i64::read_xdr(r)?, - path: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for PathPaymentStrictSendOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.send_asset.write_xdr(w)?; - self.send_amount.write_xdr(w)?; - self.destination.write_xdr(w)?; - self.dest_asset.write_xdr(w)?; - self.dest_min.write_xdr(w)?; - self.path.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ManageSellOfferOp is an XDR Struct defined as: -/// -/// ```text -/// struct ManageSellOfferOp -/// { -/// Asset selling; -/// Asset buying; -/// int64 amount; // amount being sold. if set to 0, delete the offer -/// Price price; // price of thing being sold in terms of what you are buying -/// -/// // 0=create a new offer, otherwise edit an existing offer -/// int64 offerID; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ManageSellOfferOp { - pub selling: Asset, - pub buying: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount: i64, - pub price: Price, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub offer_id: i64, -} - -impl ReadXdr for ManageSellOfferOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - selling: Asset::read_xdr(r)?, - buying: Asset::read_xdr(r)?, - amount: i64::read_xdr(r)?, - price: Price::read_xdr(r)?, - offer_id: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ManageSellOfferOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.selling.write_xdr(w)?; - self.buying.write_xdr(w)?; - self.amount.write_xdr(w)?; - self.price.write_xdr(w)?; - self.offer_id.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ManageBuyOfferOp is an XDR Struct defined as: -/// -/// ```text -/// struct ManageBuyOfferOp -/// { -/// Asset selling; -/// Asset buying; -/// int64 buyAmount; // amount being bought. if set to 0, delete the offer -/// Price price; // price of thing being bought in terms of what you are -/// // selling -/// -/// // 0=create a new offer, otherwise edit an existing offer -/// int64 offerID; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ManageBuyOfferOp { - pub selling: Asset, - pub buying: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub buy_amount: i64, - pub price: Price, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub offer_id: i64, -} - -impl ReadXdr for ManageBuyOfferOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - selling: Asset::read_xdr(r)?, - buying: Asset::read_xdr(r)?, - buy_amount: i64::read_xdr(r)?, - price: Price::read_xdr(r)?, - offer_id: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ManageBuyOfferOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.selling.write_xdr(w)?; - self.buying.write_xdr(w)?; - self.buy_amount.write_xdr(w)?; - self.price.write_xdr(w)?; - self.offer_id.write_xdr(w)?; - Ok(()) - }) - } -} - -/// CreatePassiveSellOfferOp is an XDR Struct defined as: -/// -/// ```text -/// struct CreatePassiveSellOfferOp -/// { -/// Asset selling; // A -/// Asset buying; // B -/// int64 amount; // amount taker gets -/// Price price; // cost of A in terms of B -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct CreatePassiveSellOfferOp { - pub selling: Asset, - pub buying: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount: i64, - pub price: Price, -} - -impl ReadXdr for CreatePassiveSellOfferOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - selling: Asset::read_xdr(r)?, - buying: Asset::read_xdr(r)?, - amount: i64::read_xdr(r)?, - price: Price::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for CreatePassiveSellOfferOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.selling.write_xdr(w)?; - self.buying.write_xdr(w)?; - self.amount.write_xdr(w)?; - self.price.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SetOptionsOp is an XDR Struct defined as: -/// -/// ```text -/// struct SetOptionsOp -/// { -/// AccountID* inflationDest; // sets the inflation destination -/// -/// uint32* clearFlags; // which flags to clear -/// uint32* setFlags; // which flags to set -/// -/// // account threshold manipulation -/// uint32* masterWeight; // weight of the master account -/// uint32* lowThreshold; -/// uint32* medThreshold; -/// uint32* highThreshold; -/// -/// string32* homeDomain; // sets the home domain -/// -/// // Add, update or remove a signer for the account -/// // signer is deleted if the weight is 0 -/// Signer* signer; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SetOptionsOp { - pub inflation_dest: Option, - pub clear_flags: Option, - pub set_flags: Option, - pub master_weight: Option, - pub low_threshold: Option, - pub med_threshold: Option, - pub high_threshold: Option, - pub home_domain: Option, - pub signer: Option, -} - -impl ReadXdr for SetOptionsOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - inflation_dest: Option::::read_xdr(r)?, - clear_flags: Option::::read_xdr(r)?, - set_flags: Option::::read_xdr(r)?, - master_weight: Option::::read_xdr(r)?, - low_threshold: Option::::read_xdr(r)?, - med_threshold: Option::::read_xdr(r)?, - high_threshold: Option::::read_xdr(r)?, - home_domain: Option::::read_xdr(r)?, - signer: Option::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SetOptionsOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.inflation_dest.write_xdr(w)?; - self.clear_flags.write_xdr(w)?; - self.set_flags.write_xdr(w)?; - self.master_weight.write_xdr(w)?; - self.low_threshold.write_xdr(w)?; - self.med_threshold.write_xdr(w)?; - self.high_threshold.write_xdr(w)?; - self.home_domain.write_xdr(w)?; - self.signer.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ChangeTrustAsset is an XDR Union defined as: -/// -/// ```text -/// union ChangeTrustAsset switch (AssetType type) -/// { -/// case ASSET_TYPE_NATIVE: // Not credit -/// void; -/// -/// case ASSET_TYPE_CREDIT_ALPHANUM4: -/// AlphaNum4 alphaNum4; -/// -/// case ASSET_TYPE_CREDIT_ALPHANUM12: -/// AlphaNum12 alphaNum12; -/// -/// case ASSET_TYPE_POOL_SHARE: -/// LiquidityPoolParameters liquidityPool; -/// -/// // add other asset types here in the future -/// }; -/// ``` -/// -// union with discriminant AssetType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ChangeTrustAsset { - Native, - CreditAlphanum4(AlphaNum4), - CreditAlphanum12(AlphaNum12), - PoolShare(LiquidityPoolParameters), -} - -#[cfg(feature = "alloc")] -impl Default for ChangeTrustAsset { - fn default() -> Self { - Self::Native - } -} - -impl ChangeTrustAsset { - const _VARIANTS: &[AssetType] = &[ - AssetType::Native, - AssetType::CreditAlphanum4, - AssetType::CreditAlphanum12, - AssetType::PoolShare, - ]; - pub const VARIANTS: [AssetType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Native", "CreditAlphanum4", "CreditAlphanum12", "PoolShare"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Native => "Native", - Self::CreditAlphanum4(_) => "CreditAlphanum4", - Self::CreditAlphanum12(_) => "CreditAlphanum12", - Self::PoolShare(_) => "PoolShare", - } - } - - #[must_use] - pub const fn discriminant(&self) -> AssetType { - #[allow(clippy::match_same_arms)] - match self { - Self::Native => AssetType::Native, - Self::CreditAlphanum4(_) => AssetType::CreditAlphanum4, - Self::CreditAlphanum12(_) => AssetType::CreditAlphanum12, - Self::PoolShare(_) => AssetType::PoolShare, - } - } - - #[must_use] - pub const fn variants() -> [AssetType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ChangeTrustAsset { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ChangeTrustAsset { - #[must_use] - fn discriminant(&self) -> AssetType { - Self::discriminant(self) - } -} - -impl Variants for ChangeTrustAsset { - fn variants() -> slice::Iter<'static, AssetType> { - Self::VARIANTS.iter() - } -} - -impl Union for ChangeTrustAsset {} - -impl ReadXdr for ChangeTrustAsset { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: AssetType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - AssetType::Native => Self::Native, - AssetType::CreditAlphanum4 => Self::CreditAlphanum4(AlphaNum4::read_xdr(r)?), - AssetType::CreditAlphanum12 => Self::CreditAlphanum12(AlphaNum12::read_xdr(r)?), - AssetType::PoolShare => Self::PoolShare(LiquidityPoolParameters::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ChangeTrustAsset { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Native => ().write_xdr(w)?, - Self::CreditAlphanum4(v) => v.write_xdr(w)?, - Self::CreditAlphanum12(v) => v.write_xdr(w)?, - Self::PoolShare(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ChangeTrustOp is an XDR Struct defined as: -/// -/// ```text -/// struct ChangeTrustOp -/// { -/// ChangeTrustAsset line; -/// -/// // if limit is set to 0, deletes the trust line -/// int64 limit; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ChangeTrustOp { - pub line: ChangeTrustAsset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub limit: i64, -} - -impl ReadXdr for ChangeTrustOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - line: ChangeTrustAsset::read_xdr(r)?, - limit: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ChangeTrustOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.line.write_xdr(w)?; - self.limit.write_xdr(w)?; - Ok(()) - }) - } -} - -/// AllowTrustOp is an XDR Struct defined as: -/// -/// ```text -/// struct AllowTrustOp -/// { -/// AccountID trustor; -/// AssetCode asset; -/// -/// // One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG -/// uint32 authorize; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct AllowTrustOp { - pub trustor: AccountId, - pub asset: AssetCode, - pub authorize: u32, -} - -impl ReadXdr for AllowTrustOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - trustor: AccountId::read_xdr(r)?, - asset: AssetCode::read_xdr(r)?, - authorize: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for AllowTrustOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.trustor.write_xdr(w)?; - self.asset.write_xdr(w)?; - self.authorize.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ManageDataOp is an XDR Struct defined as: -/// -/// ```text -/// struct ManageDataOp -/// { -/// string64 dataName; -/// DataValue* dataValue; // set to null to clear -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ManageDataOp { - pub data_name: String64, - pub data_value: Option, -} - -impl ReadXdr for ManageDataOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - data_name: String64::read_xdr(r)?, - data_value: Option::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ManageDataOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.data_name.write_xdr(w)?; - self.data_value.write_xdr(w)?; - Ok(()) - }) - } -} - -/// BumpSequenceOp is an XDR Struct defined as: -/// -/// ```text -/// struct BumpSequenceOp -/// { -/// SequenceNumber bumpTo; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct BumpSequenceOp { - pub bump_to: SequenceNumber, -} - -impl ReadXdr for BumpSequenceOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - bump_to: SequenceNumber::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for BumpSequenceOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.bump_to.write_xdr(w)?; - Ok(()) - }) - } -} - -/// CreateClaimableBalanceOp is an XDR Struct defined as: -/// -/// ```text -/// struct CreateClaimableBalanceOp -/// { -/// Asset asset; -/// int64 amount; -/// Claimant claimants<10>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct CreateClaimableBalanceOp { - pub asset: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount: i64, - pub claimants: VecM, -} - -impl ReadXdr for CreateClaimableBalanceOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - asset: Asset::read_xdr(r)?, - amount: i64::read_xdr(r)?, - claimants: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for CreateClaimableBalanceOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.asset.write_xdr(w)?; - self.amount.write_xdr(w)?; - self.claimants.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ClaimClaimableBalanceOp is an XDR Struct defined as: -/// -/// ```text -/// struct ClaimClaimableBalanceOp -/// { -/// ClaimableBalanceID balanceID; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ClaimClaimableBalanceOp { - pub balance_id: ClaimableBalanceId, -} - -impl ReadXdr for ClaimClaimableBalanceOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - balance_id: ClaimableBalanceId::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ClaimClaimableBalanceOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.balance_id.write_xdr(w)?; - Ok(()) - }) - } -} - -/// BeginSponsoringFutureReservesOp is an XDR Struct defined as: -/// -/// ```text -/// struct BeginSponsoringFutureReservesOp -/// { -/// AccountID sponsoredID; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct BeginSponsoringFutureReservesOp { - pub sponsored_id: AccountId, -} - -impl ReadXdr for BeginSponsoringFutureReservesOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - sponsored_id: AccountId::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for BeginSponsoringFutureReservesOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.sponsored_id.write_xdr(w)?; - Ok(()) - }) - } -} - -/// RevokeSponsorshipType is an XDR Enum defined as: -/// -/// ```text -/// enum RevokeSponsorshipType -/// { -/// REVOKE_SPONSORSHIP_LEDGER_ENTRY = 0, -/// REVOKE_SPONSORSHIP_SIGNER = 1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum RevokeSponsorshipType { - #[cfg_attr(feature = "alloc", default)] - LedgerEntry = 0, - Signer = 1, -} - -impl RevokeSponsorshipType { - const _VARIANTS: &[RevokeSponsorshipType] = &[ - RevokeSponsorshipType::LedgerEntry, - RevokeSponsorshipType::Signer, - ]; - pub const VARIANTS: [RevokeSponsorshipType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["LedgerEntry", "Signer"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::LedgerEntry => "LedgerEntry", - Self::Signer => "Signer", - } - } - - #[must_use] - pub const fn variants() -> [RevokeSponsorshipType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for RevokeSponsorshipType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for RevokeSponsorshipType { - fn variants() -> slice::Iter<'static, RevokeSponsorshipType> { - Self::VARIANTS.iter() - } -} - -impl Enum for RevokeSponsorshipType {} - -impl fmt::Display for RevokeSponsorshipType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for RevokeSponsorshipType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => RevokeSponsorshipType::LedgerEntry, - 1 => RevokeSponsorshipType::Signer, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: RevokeSponsorshipType) -> Self { - e as Self - } -} - -impl ReadXdr for RevokeSponsorshipType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for RevokeSponsorshipType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// RevokeSponsorshipOpSigner is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// AccountID accountID; -/// SignerKey signerKey; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct RevokeSponsorshipOpSigner { - pub account_id: AccountId, - pub signer_key: SignerKey, -} - -impl ReadXdr for RevokeSponsorshipOpSigner { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - account_id: AccountId::read_xdr(r)?, - signer_key: SignerKey::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for RevokeSponsorshipOpSigner { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.account_id.write_xdr(w)?; - self.signer_key.write_xdr(w)?; - Ok(()) - }) - } -} - -/// RevokeSponsorshipOp is an XDR Union defined as: -/// -/// ```text -/// union RevokeSponsorshipOp switch (RevokeSponsorshipType type) -/// { -/// case REVOKE_SPONSORSHIP_LEDGER_ENTRY: -/// LedgerKey ledgerKey; -/// case REVOKE_SPONSORSHIP_SIGNER: -/// struct -/// { -/// AccountID accountID; -/// SignerKey signerKey; -/// } signer; -/// }; -/// ``` -/// -// union with discriminant RevokeSponsorshipType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum RevokeSponsorshipOp { - LedgerEntry(LedgerKey), - Signer(RevokeSponsorshipOpSigner), -} - -#[cfg(feature = "alloc")] -impl Default for RevokeSponsorshipOp { - fn default() -> Self { - Self::LedgerEntry(LedgerKey::default()) - } -} - -impl RevokeSponsorshipOp { - const _VARIANTS: &[RevokeSponsorshipType] = &[ - RevokeSponsorshipType::LedgerEntry, - RevokeSponsorshipType::Signer, - ]; - pub const VARIANTS: [RevokeSponsorshipType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["LedgerEntry", "Signer"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::LedgerEntry(_) => "LedgerEntry", - Self::Signer(_) => "Signer", - } - } - - #[must_use] - pub const fn discriminant(&self) -> RevokeSponsorshipType { - #[allow(clippy::match_same_arms)] - match self { - Self::LedgerEntry(_) => RevokeSponsorshipType::LedgerEntry, - Self::Signer(_) => RevokeSponsorshipType::Signer, - } - } - - #[must_use] - pub const fn variants() -> [RevokeSponsorshipType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for RevokeSponsorshipOp { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for RevokeSponsorshipOp { - #[must_use] - fn discriminant(&self) -> RevokeSponsorshipType { - Self::discriminant(self) - } -} - -impl Variants for RevokeSponsorshipOp { - fn variants() -> slice::Iter<'static, RevokeSponsorshipType> { - Self::VARIANTS.iter() - } -} - -impl Union for RevokeSponsorshipOp {} - -impl ReadXdr for RevokeSponsorshipOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: RevokeSponsorshipType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - RevokeSponsorshipType::LedgerEntry => Self::LedgerEntry(LedgerKey::read_xdr(r)?), - RevokeSponsorshipType::Signer => { - Self::Signer(RevokeSponsorshipOpSigner::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for RevokeSponsorshipOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::LedgerEntry(v) => v.write_xdr(w)?, - Self::Signer(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ClawbackOp is an XDR Struct defined as: -/// -/// ```text -/// struct ClawbackOp -/// { -/// Asset asset; -/// MuxedAccount from; -/// int64 amount; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ClawbackOp { - pub asset: Asset, - pub from: MuxedAccount, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount: i64, -} - -impl ReadXdr for ClawbackOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - asset: Asset::read_xdr(r)?, - from: MuxedAccount::read_xdr(r)?, - amount: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ClawbackOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.asset.write_xdr(w)?; - self.from.write_xdr(w)?; - self.amount.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ClawbackClaimableBalanceOp is an XDR Struct defined as: -/// -/// ```text -/// struct ClawbackClaimableBalanceOp -/// { -/// ClaimableBalanceID balanceID; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ClawbackClaimableBalanceOp { - pub balance_id: ClaimableBalanceId, -} - -impl ReadXdr for ClawbackClaimableBalanceOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - balance_id: ClaimableBalanceId::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ClawbackClaimableBalanceOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.balance_id.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SetTrustLineFlagsOp is an XDR Struct defined as: -/// -/// ```text -/// struct SetTrustLineFlagsOp -/// { -/// AccountID trustor; -/// Asset asset; -/// -/// uint32 clearFlags; // which flags to clear -/// uint32 setFlags; // which flags to set -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SetTrustLineFlagsOp { - pub trustor: AccountId, - pub asset: Asset, - pub clear_flags: u32, - pub set_flags: u32, -} - -impl ReadXdr for SetTrustLineFlagsOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - trustor: AccountId::read_xdr(r)?, - asset: Asset::read_xdr(r)?, - clear_flags: u32::read_xdr(r)?, - set_flags: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SetTrustLineFlagsOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.trustor.write_xdr(w)?; - self.asset.write_xdr(w)?; - self.clear_flags.write_xdr(w)?; - self.set_flags.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LiquidityPoolFeeV18 is an XDR Const defined as: -/// -/// ```text -/// const LIQUIDITY_POOL_FEE_V18 = 30; -/// ``` -/// -pub const LIQUIDITY_POOL_FEE_V18: u64 = 30; - -/// LiquidityPoolDepositOp is an XDR Struct defined as: -/// -/// ```text -/// struct LiquidityPoolDepositOp -/// { -/// PoolID liquidityPoolID; -/// int64 maxAmountA; // maximum amount of first asset to deposit -/// int64 maxAmountB; // maximum amount of second asset to deposit -/// Price minPrice; // minimum depositA/depositB -/// Price maxPrice; // maximum depositA/depositB -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LiquidityPoolDepositOp { - pub liquidity_pool_id: PoolId, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub max_amount_a: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub max_amount_b: i64, - pub min_price: Price, - pub max_price: Price, -} - -impl ReadXdr for LiquidityPoolDepositOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - liquidity_pool_id: PoolId::read_xdr(r)?, - max_amount_a: i64::read_xdr(r)?, - max_amount_b: i64::read_xdr(r)?, - min_price: Price::read_xdr(r)?, - max_price: Price::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LiquidityPoolDepositOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.liquidity_pool_id.write_xdr(w)?; - self.max_amount_a.write_xdr(w)?; - self.max_amount_b.write_xdr(w)?; - self.min_price.write_xdr(w)?; - self.max_price.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LiquidityPoolWithdrawOp is an XDR Struct defined as: -/// -/// ```text -/// struct LiquidityPoolWithdrawOp -/// { -/// PoolID liquidityPoolID; -/// int64 amount; // amount of pool shares to withdraw -/// int64 minAmountA; // minimum amount of first asset to withdraw -/// int64 minAmountB; // minimum amount of second asset to withdraw -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LiquidityPoolWithdrawOp { - pub liquidity_pool_id: PoolId, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub min_amount_a: i64, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub min_amount_b: i64, -} - -impl ReadXdr for LiquidityPoolWithdrawOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - liquidity_pool_id: PoolId::read_xdr(r)?, - amount: i64::read_xdr(r)?, - min_amount_a: i64::read_xdr(r)?, - min_amount_b: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LiquidityPoolWithdrawOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.liquidity_pool_id.write_xdr(w)?; - self.amount.write_xdr(w)?; - self.min_amount_a.write_xdr(w)?; - self.min_amount_b.write_xdr(w)?; - Ok(()) - }) - } -} - -/// HostFunctionType is an XDR Enum defined as: -/// -/// ```text -/// enum HostFunctionType -/// { -/// HOST_FUNCTION_TYPE_INVOKE_CONTRACT = 0, -/// HOST_FUNCTION_TYPE_CREATE_CONTRACT = 1, -/// HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2, -/// HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2 = 3 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum HostFunctionType { - #[cfg_attr(feature = "alloc", default)] - InvokeContract = 0, - CreateContract = 1, - UploadContractWasm = 2, - CreateContractV2 = 3, -} - -impl HostFunctionType { - const _VARIANTS: &[HostFunctionType] = &[ - HostFunctionType::InvokeContract, - HostFunctionType::CreateContract, - HostFunctionType::UploadContractWasm, - HostFunctionType::CreateContractV2, - ]; - pub const VARIANTS: [HostFunctionType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "InvokeContract", - "CreateContract", - "UploadContractWasm", - "CreateContractV2", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::InvokeContract => "InvokeContract", - Self::CreateContract => "CreateContract", - Self::UploadContractWasm => "UploadContractWasm", - Self::CreateContractV2 => "CreateContractV2", - } - } - - #[must_use] - pub const fn variants() -> [HostFunctionType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for HostFunctionType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for HostFunctionType { - fn variants() -> slice::Iter<'static, HostFunctionType> { - Self::VARIANTS.iter() - } -} - -impl Enum for HostFunctionType {} - -impl fmt::Display for HostFunctionType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for HostFunctionType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => HostFunctionType::InvokeContract, - 1 => HostFunctionType::CreateContract, - 2 => HostFunctionType::UploadContractWasm, - 3 => HostFunctionType::CreateContractV2, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: HostFunctionType) -> Self { - e as Self - } -} - -impl ReadXdr for HostFunctionType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for HostFunctionType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ContractIdPreimageType is an XDR Enum defined as: -/// -/// ```text -/// enum ContractIDPreimageType -/// { -/// CONTRACT_ID_PREIMAGE_FROM_ADDRESS = 0, -/// CONTRACT_ID_PREIMAGE_FROM_ASSET = 1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ContractIdPreimageType { - #[cfg_attr(feature = "alloc", default)] - Address = 0, - Asset = 1, -} - -impl ContractIdPreimageType { - const _VARIANTS: &[ContractIdPreimageType] = &[ - ContractIdPreimageType::Address, - ContractIdPreimageType::Asset, - ]; - pub const VARIANTS: [ContractIdPreimageType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Address", "Asset"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Address => "Address", - Self::Asset => "Asset", - } - } - - #[must_use] - pub const fn variants() -> [ContractIdPreimageType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ContractIdPreimageType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ContractIdPreimageType { - fn variants() -> slice::Iter<'static, ContractIdPreimageType> { - Self::VARIANTS.iter() - } -} - -impl Enum for ContractIdPreimageType {} - -impl fmt::Display for ContractIdPreimageType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ContractIdPreimageType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ContractIdPreimageType::Address, - 1 => ContractIdPreimageType::Asset, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ContractIdPreimageType) -> Self { - e as Self - } -} - -impl ReadXdr for ContractIdPreimageType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ContractIdPreimageType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ContractIdPreimageFromAddress is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// SCAddress address; -/// uint256 salt; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ContractIdPreimageFromAddress { - pub address: ScAddress, - pub salt: Uint256, -} - -impl ReadXdr for ContractIdPreimageFromAddress { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - address: ScAddress::read_xdr(r)?, - salt: Uint256::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ContractIdPreimageFromAddress { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.address.write_xdr(w)?; - self.salt.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ContractIdPreimage is an XDR Union defined as: -/// -/// ```text -/// union ContractIDPreimage switch (ContractIDPreimageType type) -/// { -/// case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: -/// struct -/// { -/// SCAddress address; -/// uint256 salt; -/// } fromAddress; -/// case CONTRACT_ID_PREIMAGE_FROM_ASSET: -/// Asset fromAsset; -/// }; -/// ``` -/// -// union with discriminant ContractIdPreimageType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ContractIdPreimage { - Address(ContractIdPreimageFromAddress), - Asset(Asset), -} - -#[cfg(feature = "alloc")] -impl Default for ContractIdPreimage { - fn default() -> Self { - Self::Address(ContractIdPreimageFromAddress::default()) - } -} - -impl ContractIdPreimage { - const _VARIANTS: &[ContractIdPreimageType] = &[ - ContractIdPreimageType::Address, - ContractIdPreimageType::Asset, - ]; - pub const VARIANTS: [ContractIdPreimageType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Address", "Asset"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Address(_) => "Address", - Self::Asset(_) => "Asset", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ContractIdPreimageType { - #[allow(clippy::match_same_arms)] - match self { - Self::Address(_) => ContractIdPreimageType::Address, - Self::Asset(_) => ContractIdPreimageType::Asset, - } - } - - #[must_use] - pub const fn variants() -> [ContractIdPreimageType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ContractIdPreimage { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ContractIdPreimage { - #[must_use] - fn discriminant(&self) -> ContractIdPreimageType { - Self::discriminant(self) - } -} - -impl Variants for ContractIdPreimage { - fn variants() -> slice::Iter<'static, ContractIdPreimageType> { - Self::VARIANTS.iter() - } -} - -impl Union for ContractIdPreimage {} - -impl ReadXdr for ContractIdPreimage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ContractIdPreimageType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ContractIdPreimageType::Address => { - Self::Address(ContractIdPreimageFromAddress::read_xdr(r)?) - } - ContractIdPreimageType::Asset => Self::Asset(Asset::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ContractIdPreimage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Address(v) => v.write_xdr(w)?, - Self::Asset(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// CreateContractArgs is an XDR Struct defined as: -/// -/// ```text -/// struct CreateContractArgs -/// { -/// ContractIDPreimage contractIDPreimage; -/// ContractExecutable executable; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct CreateContractArgs { - pub contract_id_preimage: ContractIdPreimage, - pub executable: ContractExecutable, -} - -impl ReadXdr for CreateContractArgs { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - contract_id_preimage: ContractIdPreimage::read_xdr(r)?, - executable: ContractExecutable::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for CreateContractArgs { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.contract_id_preimage.write_xdr(w)?; - self.executable.write_xdr(w)?; - Ok(()) - }) - } -} - -/// CreateContractArgsV2 is an XDR Struct defined as: -/// -/// ```text -/// struct CreateContractArgsV2 -/// { -/// ContractIDPreimage contractIDPreimage; -/// ContractExecutable executable; -/// // Arguments of the contract's constructor. -/// SCVal constructorArgs<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct CreateContractArgsV2 { - pub contract_id_preimage: ContractIdPreimage, - pub executable: ContractExecutable, - pub constructor_args: VecM, -} - -impl ReadXdr for CreateContractArgsV2 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - contract_id_preimage: ContractIdPreimage::read_xdr(r)?, - executable: ContractExecutable::read_xdr(r)?, - constructor_args: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for CreateContractArgsV2 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.contract_id_preimage.write_xdr(w)?; - self.executable.write_xdr(w)?; - self.constructor_args.write_xdr(w)?; - Ok(()) - }) - } -} - -/// InvokeContractArgs is an XDR Struct defined as: -/// -/// ```text -/// struct InvokeContractArgs { -/// SCAddress contractAddress; -/// SCSymbol functionName; -/// SCVal args<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct InvokeContractArgs { - pub contract_address: ScAddress, - pub function_name: ScSymbol, - pub args: VecM, -} - -impl ReadXdr for InvokeContractArgs { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - contract_address: ScAddress::read_xdr(r)?, - function_name: ScSymbol::read_xdr(r)?, - args: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for InvokeContractArgs { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.contract_address.write_xdr(w)?; - self.function_name.write_xdr(w)?; - self.args.write_xdr(w)?; - Ok(()) - }) - } -} - -/// HostFunction is an XDR Union defined as: -/// -/// ```text -/// union HostFunction switch (HostFunctionType type) -/// { -/// case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: -/// InvokeContractArgs invokeContract; -/// case HOST_FUNCTION_TYPE_CREATE_CONTRACT: -/// CreateContractArgs createContract; -/// case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: -/// opaque wasm<>; -/// case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: -/// CreateContractArgsV2 createContractV2; -/// }; -/// ``` -/// -// union with discriminant HostFunctionType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum HostFunction { - InvokeContract(InvokeContractArgs), - CreateContract(CreateContractArgs), - UploadContractWasm(BytesM), - CreateContractV2(CreateContractArgsV2), -} - -#[cfg(feature = "alloc")] -impl Default for HostFunction { - fn default() -> Self { - Self::InvokeContract(InvokeContractArgs::default()) - } -} - -impl HostFunction { - const _VARIANTS: &[HostFunctionType] = &[ - HostFunctionType::InvokeContract, - HostFunctionType::CreateContract, - HostFunctionType::UploadContractWasm, - HostFunctionType::CreateContractV2, - ]; - pub const VARIANTS: [HostFunctionType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "InvokeContract", - "CreateContract", - "UploadContractWasm", - "CreateContractV2", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::InvokeContract(_) => "InvokeContract", - Self::CreateContract(_) => "CreateContract", - Self::UploadContractWasm(_) => "UploadContractWasm", - Self::CreateContractV2(_) => "CreateContractV2", - } - } - - #[must_use] - pub const fn discriminant(&self) -> HostFunctionType { - #[allow(clippy::match_same_arms)] - match self { - Self::InvokeContract(_) => HostFunctionType::InvokeContract, - Self::CreateContract(_) => HostFunctionType::CreateContract, - Self::UploadContractWasm(_) => HostFunctionType::UploadContractWasm, - Self::CreateContractV2(_) => HostFunctionType::CreateContractV2, - } - } - - #[must_use] - pub const fn variants() -> [HostFunctionType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for HostFunction { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for HostFunction { - #[must_use] - fn discriminant(&self) -> HostFunctionType { - Self::discriminant(self) - } -} - -impl Variants for HostFunction { - fn variants() -> slice::Iter<'static, HostFunctionType> { - Self::VARIANTS.iter() - } -} - -impl Union for HostFunction {} - -impl ReadXdr for HostFunction { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: HostFunctionType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - HostFunctionType::InvokeContract => { - Self::InvokeContract(InvokeContractArgs::read_xdr(r)?) - } - HostFunctionType::CreateContract => { - Self::CreateContract(CreateContractArgs::read_xdr(r)?) - } - HostFunctionType::UploadContractWasm => { - Self::UploadContractWasm(BytesM::read_xdr(r)?) - } - HostFunctionType::CreateContractV2 => { - Self::CreateContractV2(CreateContractArgsV2::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for HostFunction { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::InvokeContract(v) => v.write_xdr(w)?, - Self::CreateContract(v) => v.write_xdr(w)?, - Self::UploadContractWasm(v) => v.write_xdr(w)?, - Self::CreateContractV2(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// SorobanAuthorizedFunctionType is an XDR Enum defined as: -/// -/// ```text -/// enum SorobanAuthorizedFunctionType -/// { -/// SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN = 0, -/// SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1, -/// SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN = 2 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum SorobanAuthorizedFunctionType { - #[cfg_attr(feature = "alloc", default)] - ContractFn = 0, - CreateContractHostFn = 1, - CreateContractV2HostFn = 2, -} - -impl SorobanAuthorizedFunctionType { - const _VARIANTS: &[SorobanAuthorizedFunctionType] = &[ - SorobanAuthorizedFunctionType::ContractFn, - SorobanAuthorizedFunctionType::CreateContractHostFn, - SorobanAuthorizedFunctionType::CreateContractV2HostFn, - ]; - pub const VARIANTS: [SorobanAuthorizedFunctionType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "ContractFn", - "CreateContractHostFn", - "CreateContractV2HostFn", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ContractFn => "ContractFn", - Self::CreateContractHostFn => "CreateContractHostFn", - Self::CreateContractV2HostFn => "CreateContractV2HostFn", - } - } - - #[must_use] - pub const fn variants() -> [SorobanAuthorizedFunctionType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SorobanAuthorizedFunctionType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for SorobanAuthorizedFunctionType { - fn variants() -> slice::Iter<'static, SorobanAuthorizedFunctionType> { - Self::VARIANTS.iter() - } -} - -impl Enum for SorobanAuthorizedFunctionType {} - -impl fmt::Display for SorobanAuthorizedFunctionType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for SorobanAuthorizedFunctionType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => SorobanAuthorizedFunctionType::ContractFn, - 1 => SorobanAuthorizedFunctionType::CreateContractHostFn, - 2 => SorobanAuthorizedFunctionType::CreateContractV2HostFn, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: SorobanAuthorizedFunctionType) -> Self { - e as Self - } -} - -impl ReadXdr for SorobanAuthorizedFunctionType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for SorobanAuthorizedFunctionType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// SorobanAuthorizedFunction is an XDR Union defined as: -/// -/// ```text -/// union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) -/// { -/// case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: -/// InvokeContractArgs contractFn; -/// // This variant of auth payload for creating new contract instances -/// // doesn't allow specifying the constructor arguments, creating contracts -/// // with constructors that take arguments is only possible by authorizing -/// // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` -/// // (protocol 22+). -/// case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: -/// CreateContractArgs createContractHostFn; -/// // This variant of auth payload for creating new contract instances -/// // is only accepted in and after protocol 22. It allows authorizing the -/// // contract constructor arguments. -/// case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: -/// CreateContractArgsV2 createContractV2HostFn; -/// }; -/// ``` -/// -// union with discriminant SorobanAuthorizedFunctionType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum SorobanAuthorizedFunction { - ContractFn(InvokeContractArgs), - CreateContractHostFn(CreateContractArgs), - CreateContractV2HostFn(CreateContractArgsV2), -} - -#[cfg(feature = "alloc")] -impl Default for SorobanAuthorizedFunction { - fn default() -> Self { - Self::ContractFn(InvokeContractArgs::default()) - } -} - -impl SorobanAuthorizedFunction { - const _VARIANTS: &[SorobanAuthorizedFunctionType] = &[ - SorobanAuthorizedFunctionType::ContractFn, - SorobanAuthorizedFunctionType::CreateContractHostFn, - SorobanAuthorizedFunctionType::CreateContractV2HostFn, - ]; - pub const VARIANTS: [SorobanAuthorizedFunctionType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "ContractFn", - "CreateContractHostFn", - "CreateContractV2HostFn", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ContractFn(_) => "ContractFn", - Self::CreateContractHostFn(_) => "CreateContractHostFn", - Self::CreateContractV2HostFn(_) => "CreateContractV2HostFn", - } - } - - #[must_use] - pub const fn discriminant(&self) -> SorobanAuthorizedFunctionType { - #[allow(clippy::match_same_arms)] - match self { - Self::ContractFn(_) => SorobanAuthorizedFunctionType::ContractFn, - Self::CreateContractHostFn(_) => SorobanAuthorizedFunctionType::CreateContractHostFn, - Self::CreateContractV2HostFn(_) => { - SorobanAuthorizedFunctionType::CreateContractV2HostFn - } - } - } - - #[must_use] - pub const fn variants() -> [SorobanAuthorizedFunctionType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SorobanAuthorizedFunction { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for SorobanAuthorizedFunction { - #[must_use] - fn discriminant(&self) -> SorobanAuthorizedFunctionType { - Self::discriminant(self) - } -} - -impl Variants for SorobanAuthorizedFunction { - fn variants() -> slice::Iter<'static, SorobanAuthorizedFunctionType> { - Self::VARIANTS.iter() - } -} - -impl Union for SorobanAuthorizedFunction {} - -impl ReadXdr for SorobanAuthorizedFunction { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: SorobanAuthorizedFunctionType = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - SorobanAuthorizedFunctionType::ContractFn => { - Self::ContractFn(InvokeContractArgs::read_xdr(r)?) - } - SorobanAuthorizedFunctionType::CreateContractHostFn => { - Self::CreateContractHostFn(CreateContractArgs::read_xdr(r)?) - } - SorobanAuthorizedFunctionType::CreateContractV2HostFn => { - Self::CreateContractV2HostFn(CreateContractArgsV2::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for SorobanAuthorizedFunction { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::ContractFn(v) => v.write_xdr(w)?, - Self::CreateContractHostFn(v) => v.write_xdr(w)?, - Self::CreateContractV2HostFn(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// SorobanAuthorizedInvocation is an XDR Struct defined as: -/// -/// ```text -/// struct SorobanAuthorizedInvocation -/// { -/// SorobanAuthorizedFunction function; -/// SorobanAuthorizedInvocation subInvocations<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SorobanAuthorizedInvocation { - pub function: SorobanAuthorizedFunction, - pub sub_invocations: VecM, -} - -impl ReadXdr for SorobanAuthorizedInvocation { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - function: SorobanAuthorizedFunction::read_xdr(r)?, - sub_invocations: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SorobanAuthorizedInvocation { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.function.write_xdr(w)?; - self.sub_invocations.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SorobanAddressCredentials is an XDR Struct defined as: -/// -/// ```text -/// struct SorobanAddressCredentials -/// { -/// SCAddress address; -/// int64 nonce; -/// uint32 signatureExpirationLedger; -/// SCVal signature; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SorobanAddressCredentials { - pub address: ScAddress, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub nonce: i64, - pub signature_expiration_ledger: u32, - pub signature: ScVal, -} - -impl ReadXdr for SorobanAddressCredentials { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - address: ScAddress::read_xdr(r)?, - nonce: i64::read_xdr(r)?, - signature_expiration_ledger: u32::read_xdr(r)?, - signature: ScVal::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SorobanAddressCredentials { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.address.write_xdr(w)?; - self.nonce.write_xdr(w)?; - self.signature_expiration_ledger.write_xdr(w)?; - self.signature.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SorobanCredentialsType is an XDR Enum defined as: -/// -/// ```text -/// enum SorobanCredentialsType -/// { -/// SOROBAN_CREDENTIALS_SOURCE_ACCOUNT = 0, -/// SOROBAN_CREDENTIALS_ADDRESS = 1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum SorobanCredentialsType { - #[cfg_attr(feature = "alloc", default)] - SourceAccount = 0, - Address = 1, -} - -impl SorobanCredentialsType { - const _VARIANTS: &[SorobanCredentialsType] = &[ - SorobanCredentialsType::SourceAccount, - SorobanCredentialsType::Address, - ]; - pub const VARIANTS: [SorobanCredentialsType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["SourceAccount", "Address"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::SourceAccount => "SourceAccount", - Self::Address => "Address", - } - } - - #[must_use] - pub const fn variants() -> [SorobanCredentialsType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SorobanCredentialsType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for SorobanCredentialsType { - fn variants() -> slice::Iter<'static, SorobanCredentialsType> { - Self::VARIANTS.iter() - } -} - -impl Enum for SorobanCredentialsType {} - -impl fmt::Display for SorobanCredentialsType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for SorobanCredentialsType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => SorobanCredentialsType::SourceAccount, - 1 => SorobanCredentialsType::Address, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: SorobanCredentialsType) -> Self { - e as Self - } -} - -impl ReadXdr for SorobanCredentialsType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for SorobanCredentialsType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// SorobanCredentials is an XDR Union defined as: -/// -/// ```text -/// union SorobanCredentials switch (SorobanCredentialsType type) -/// { -/// case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: -/// void; -/// case SOROBAN_CREDENTIALS_ADDRESS: -/// SorobanAddressCredentials address; -/// }; -/// ``` -/// -// union with discriminant SorobanCredentialsType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum SorobanCredentials { - SourceAccount, - Address(SorobanAddressCredentials), -} - -#[cfg(feature = "alloc")] -impl Default for SorobanCredentials { - fn default() -> Self { - Self::SourceAccount - } -} - -impl SorobanCredentials { - const _VARIANTS: &[SorobanCredentialsType] = &[ - SorobanCredentialsType::SourceAccount, - SorobanCredentialsType::Address, - ]; - pub const VARIANTS: [SorobanCredentialsType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["SourceAccount", "Address"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::SourceAccount => "SourceAccount", - Self::Address(_) => "Address", - } - } - - #[must_use] - pub const fn discriminant(&self) -> SorobanCredentialsType { - #[allow(clippy::match_same_arms)] - match self { - Self::SourceAccount => SorobanCredentialsType::SourceAccount, - Self::Address(_) => SorobanCredentialsType::Address, - } - } - - #[must_use] - pub const fn variants() -> [SorobanCredentialsType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SorobanCredentials { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for SorobanCredentials { - #[must_use] - fn discriminant(&self) -> SorobanCredentialsType { - Self::discriminant(self) - } -} - -impl Variants for SorobanCredentials { - fn variants() -> slice::Iter<'static, SorobanCredentialsType> { - Self::VARIANTS.iter() - } -} - -impl Union for SorobanCredentials {} - -impl ReadXdr for SorobanCredentials { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: SorobanCredentialsType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - SorobanCredentialsType::SourceAccount => Self::SourceAccount, - SorobanCredentialsType::Address => { - Self::Address(SorobanAddressCredentials::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for SorobanCredentials { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::SourceAccount => ().write_xdr(w)?, - Self::Address(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// SorobanAuthorizationEntry is an XDR Struct defined as: -/// -/// ```text -/// struct SorobanAuthorizationEntry -/// { -/// SorobanCredentials credentials; -/// SorobanAuthorizedInvocation rootInvocation; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SorobanAuthorizationEntry { - pub credentials: SorobanCredentials, - pub root_invocation: SorobanAuthorizedInvocation, -} - -impl ReadXdr for SorobanAuthorizationEntry { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - credentials: SorobanCredentials::read_xdr(r)?, - root_invocation: SorobanAuthorizedInvocation::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SorobanAuthorizationEntry { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.credentials.write_xdr(w)?; - self.root_invocation.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SorobanAuthorizationEntries is an XDR Typedef defined as: -/// -/// ```text -/// typedef SorobanAuthorizationEntry SorobanAuthorizationEntries<>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct SorobanAuthorizationEntries(pub VecM); - -impl From for VecM { - #[must_use] - fn from(x: SorobanAuthorizationEntries) -> Self { - x.0 - } -} - -impl From> for SorobanAuthorizationEntries { - #[must_use] - fn from(x: VecM) -> Self { - SorobanAuthorizationEntries(x) - } -} - -impl AsRef> for SorobanAuthorizationEntries { - #[must_use] - fn as_ref(&self) -> &VecM { - &self.0 - } -} - -impl ReadXdr for SorobanAuthorizationEntries { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = VecM::::read_xdr(r)?; - let v = SorobanAuthorizationEntries(i); - Ok(v) - }) - } -} - -impl WriteXdr for SorobanAuthorizationEntries { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for SorobanAuthorizationEntries { - type Target = VecM; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: SorobanAuthorizationEntries) -> Self { - x.0 .0 - } -} - -impl TryFrom> for SorobanAuthorizationEntries { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(SorobanAuthorizationEntries(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for SorobanAuthorizationEntries { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(SorobanAuthorizationEntries(x.try_into()?)) - } -} - -impl AsRef> for SorobanAuthorizationEntries { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[SorobanAuthorizationEntry]> for SorobanAuthorizationEntries { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[SorobanAuthorizationEntry] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[SorobanAuthorizationEntry] { - self.0 .0 - } -} - -/// InvokeHostFunctionOp is an XDR Struct defined as: -/// -/// ```text -/// struct InvokeHostFunctionOp -/// { -/// // Host function to invoke. -/// HostFunction hostFunction; -/// // Per-address authorizations for this host function. -/// SorobanAuthorizationEntry auth<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct InvokeHostFunctionOp { - pub host_function: HostFunction, - pub auth: VecM, -} - -impl ReadXdr for InvokeHostFunctionOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - host_function: HostFunction::read_xdr(r)?, - auth: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for InvokeHostFunctionOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.host_function.write_xdr(w)?; - self.auth.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ExtendFootprintTtlOp is an XDR Struct defined as: -/// -/// ```text -/// struct ExtendFootprintTTLOp -/// { -/// ExtensionPoint ext; -/// uint32 extendTo; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ExtendFootprintTtlOp { - pub ext: ExtensionPoint, - pub extend_to: u32, -} - -impl ReadXdr for ExtendFootprintTtlOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, - extend_to: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ExtendFootprintTtlOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.extend_to.write_xdr(w)?; - Ok(()) - }) - } -} - -/// RestoreFootprintOp is an XDR Struct defined as: -/// -/// ```text -/// struct RestoreFootprintOp -/// { -/// ExtensionPoint ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct RestoreFootprintOp { - pub ext: ExtensionPoint, -} - -impl ReadXdr for RestoreFootprintOp { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: ExtensionPoint::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for RestoreFootprintOp { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// OperationBody is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (OperationType type) -/// { -/// case CREATE_ACCOUNT: -/// CreateAccountOp createAccountOp; -/// case PAYMENT: -/// PaymentOp paymentOp; -/// case PATH_PAYMENT_STRICT_RECEIVE: -/// PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; -/// case MANAGE_SELL_OFFER: -/// ManageSellOfferOp manageSellOfferOp; -/// case CREATE_PASSIVE_SELL_OFFER: -/// CreatePassiveSellOfferOp createPassiveSellOfferOp; -/// case SET_OPTIONS: -/// SetOptionsOp setOptionsOp; -/// case CHANGE_TRUST: -/// ChangeTrustOp changeTrustOp; -/// case ALLOW_TRUST: -/// AllowTrustOp allowTrustOp; -/// case ACCOUNT_MERGE: -/// MuxedAccount destination; -/// case INFLATION: -/// void; -/// case MANAGE_DATA: -/// ManageDataOp manageDataOp; -/// case BUMP_SEQUENCE: -/// BumpSequenceOp bumpSequenceOp; -/// case MANAGE_BUY_OFFER: -/// ManageBuyOfferOp manageBuyOfferOp; -/// case PATH_PAYMENT_STRICT_SEND: -/// PathPaymentStrictSendOp pathPaymentStrictSendOp; -/// case CREATE_CLAIMABLE_BALANCE: -/// CreateClaimableBalanceOp createClaimableBalanceOp; -/// case CLAIM_CLAIMABLE_BALANCE: -/// ClaimClaimableBalanceOp claimClaimableBalanceOp; -/// case BEGIN_SPONSORING_FUTURE_RESERVES: -/// BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; -/// case END_SPONSORING_FUTURE_RESERVES: -/// void; -/// case REVOKE_SPONSORSHIP: -/// RevokeSponsorshipOp revokeSponsorshipOp; -/// case CLAWBACK: -/// ClawbackOp clawbackOp; -/// case CLAWBACK_CLAIMABLE_BALANCE: -/// ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; -/// case SET_TRUST_LINE_FLAGS: -/// SetTrustLineFlagsOp setTrustLineFlagsOp; -/// case LIQUIDITY_POOL_DEPOSIT: -/// LiquidityPoolDepositOp liquidityPoolDepositOp; -/// case LIQUIDITY_POOL_WITHDRAW: -/// LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; -/// case INVOKE_HOST_FUNCTION: -/// InvokeHostFunctionOp invokeHostFunctionOp; -/// case EXTEND_FOOTPRINT_TTL: -/// ExtendFootprintTTLOp extendFootprintTTLOp; -/// case RESTORE_FOOTPRINT: -/// RestoreFootprintOp restoreFootprintOp; -/// } -/// ``` -/// -// union with discriminant OperationType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum OperationBody { - CreateAccount(CreateAccountOp), - Payment(PaymentOp), - PathPaymentStrictReceive(PathPaymentStrictReceiveOp), - ManageSellOffer(ManageSellOfferOp), - CreatePassiveSellOffer(CreatePassiveSellOfferOp), - SetOptions(SetOptionsOp), - ChangeTrust(ChangeTrustOp), - AllowTrust(AllowTrustOp), - AccountMerge(MuxedAccount), - Inflation, - ManageData(ManageDataOp), - BumpSequence(BumpSequenceOp), - ManageBuyOffer(ManageBuyOfferOp), - PathPaymentStrictSend(PathPaymentStrictSendOp), - CreateClaimableBalance(CreateClaimableBalanceOp), - ClaimClaimableBalance(ClaimClaimableBalanceOp), - BeginSponsoringFutureReserves(BeginSponsoringFutureReservesOp), - EndSponsoringFutureReserves, - RevokeSponsorship(RevokeSponsorshipOp), - Clawback(ClawbackOp), - ClawbackClaimableBalance(ClawbackClaimableBalanceOp), - SetTrustLineFlags(SetTrustLineFlagsOp), - LiquidityPoolDeposit(LiquidityPoolDepositOp), - LiquidityPoolWithdraw(LiquidityPoolWithdrawOp), - InvokeHostFunction(InvokeHostFunctionOp), - ExtendFootprintTtl(ExtendFootprintTtlOp), - RestoreFootprint(RestoreFootprintOp), -} - -#[cfg(feature = "alloc")] -impl Default for OperationBody { - fn default() -> Self { - Self::CreateAccount(CreateAccountOp::default()) - } -} - -impl OperationBody { - const _VARIANTS: &[OperationType] = &[ - OperationType::CreateAccount, - OperationType::Payment, - OperationType::PathPaymentStrictReceive, - OperationType::ManageSellOffer, - OperationType::CreatePassiveSellOffer, - OperationType::SetOptions, - OperationType::ChangeTrust, - OperationType::AllowTrust, - OperationType::AccountMerge, - OperationType::Inflation, - OperationType::ManageData, - OperationType::BumpSequence, - OperationType::ManageBuyOffer, - OperationType::PathPaymentStrictSend, - OperationType::CreateClaimableBalance, - OperationType::ClaimClaimableBalance, - OperationType::BeginSponsoringFutureReserves, - OperationType::EndSponsoringFutureReserves, - OperationType::RevokeSponsorship, - OperationType::Clawback, - OperationType::ClawbackClaimableBalance, - OperationType::SetTrustLineFlags, - OperationType::LiquidityPoolDeposit, - OperationType::LiquidityPoolWithdraw, - OperationType::InvokeHostFunction, - OperationType::ExtendFootprintTtl, - OperationType::RestoreFootprint, - ]; - pub const VARIANTS: [OperationType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "CreateAccount", - "Payment", - "PathPaymentStrictReceive", - "ManageSellOffer", - "CreatePassiveSellOffer", - "SetOptions", - "ChangeTrust", - "AllowTrust", - "AccountMerge", - "Inflation", - "ManageData", - "BumpSequence", - "ManageBuyOffer", - "PathPaymentStrictSend", - "CreateClaimableBalance", - "ClaimClaimableBalance", - "BeginSponsoringFutureReserves", - "EndSponsoringFutureReserves", - "RevokeSponsorship", - "Clawback", - "ClawbackClaimableBalance", - "SetTrustLineFlags", - "LiquidityPoolDeposit", - "LiquidityPoolWithdraw", - "InvokeHostFunction", - "ExtendFootprintTtl", - "RestoreFootprint", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::CreateAccount(_) => "CreateAccount", - Self::Payment(_) => "Payment", - Self::PathPaymentStrictReceive(_) => "PathPaymentStrictReceive", - Self::ManageSellOffer(_) => "ManageSellOffer", - Self::CreatePassiveSellOffer(_) => "CreatePassiveSellOffer", - Self::SetOptions(_) => "SetOptions", - Self::ChangeTrust(_) => "ChangeTrust", - Self::AllowTrust(_) => "AllowTrust", - Self::AccountMerge(_) => "AccountMerge", - Self::Inflation => "Inflation", - Self::ManageData(_) => "ManageData", - Self::BumpSequence(_) => "BumpSequence", - Self::ManageBuyOffer(_) => "ManageBuyOffer", - Self::PathPaymentStrictSend(_) => "PathPaymentStrictSend", - Self::CreateClaimableBalance(_) => "CreateClaimableBalance", - Self::ClaimClaimableBalance(_) => "ClaimClaimableBalance", - Self::BeginSponsoringFutureReserves(_) => "BeginSponsoringFutureReserves", - Self::EndSponsoringFutureReserves => "EndSponsoringFutureReserves", - Self::RevokeSponsorship(_) => "RevokeSponsorship", - Self::Clawback(_) => "Clawback", - Self::ClawbackClaimableBalance(_) => "ClawbackClaimableBalance", - Self::SetTrustLineFlags(_) => "SetTrustLineFlags", - Self::LiquidityPoolDeposit(_) => "LiquidityPoolDeposit", - Self::LiquidityPoolWithdraw(_) => "LiquidityPoolWithdraw", - Self::InvokeHostFunction(_) => "InvokeHostFunction", - Self::ExtendFootprintTtl(_) => "ExtendFootprintTtl", - Self::RestoreFootprint(_) => "RestoreFootprint", - } - } - - #[must_use] - pub const fn discriminant(&self) -> OperationType { - #[allow(clippy::match_same_arms)] - match self { - Self::CreateAccount(_) => OperationType::CreateAccount, - Self::Payment(_) => OperationType::Payment, - Self::PathPaymentStrictReceive(_) => OperationType::PathPaymentStrictReceive, - Self::ManageSellOffer(_) => OperationType::ManageSellOffer, - Self::CreatePassiveSellOffer(_) => OperationType::CreatePassiveSellOffer, - Self::SetOptions(_) => OperationType::SetOptions, - Self::ChangeTrust(_) => OperationType::ChangeTrust, - Self::AllowTrust(_) => OperationType::AllowTrust, - Self::AccountMerge(_) => OperationType::AccountMerge, - Self::Inflation => OperationType::Inflation, - Self::ManageData(_) => OperationType::ManageData, - Self::BumpSequence(_) => OperationType::BumpSequence, - Self::ManageBuyOffer(_) => OperationType::ManageBuyOffer, - Self::PathPaymentStrictSend(_) => OperationType::PathPaymentStrictSend, - Self::CreateClaimableBalance(_) => OperationType::CreateClaimableBalance, - Self::ClaimClaimableBalance(_) => OperationType::ClaimClaimableBalance, - Self::BeginSponsoringFutureReserves(_) => OperationType::BeginSponsoringFutureReserves, - Self::EndSponsoringFutureReserves => OperationType::EndSponsoringFutureReserves, - Self::RevokeSponsorship(_) => OperationType::RevokeSponsorship, - Self::Clawback(_) => OperationType::Clawback, - Self::ClawbackClaimableBalance(_) => OperationType::ClawbackClaimableBalance, - Self::SetTrustLineFlags(_) => OperationType::SetTrustLineFlags, - Self::LiquidityPoolDeposit(_) => OperationType::LiquidityPoolDeposit, - Self::LiquidityPoolWithdraw(_) => OperationType::LiquidityPoolWithdraw, - Self::InvokeHostFunction(_) => OperationType::InvokeHostFunction, - Self::ExtendFootprintTtl(_) => OperationType::ExtendFootprintTtl, - Self::RestoreFootprint(_) => OperationType::RestoreFootprint, - } - } - - #[must_use] - pub const fn variants() -> [OperationType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for OperationBody { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for OperationBody { - #[must_use] - fn discriminant(&self) -> OperationType { - Self::discriminant(self) - } -} - -impl Variants for OperationBody { - fn variants() -> slice::Iter<'static, OperationType> { - Self::VARIANTS.iter() - } -} - -impl Union for OperationBody {} - -impl ReadXdr for OperationBody { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: OperationType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - OperationType::CreateAccount => Self::CreateAccount(CreateAccountOp::read_xdr(r)?), - OperationType::Payment => Self::Payment(PaymentOp::read_xdr(r)?), - OperationType::PathPaymentStrictReceive => { - Self::PathPaymentStrictReceive(PathPaymentStrictReceiveOp::read_xdr(r)?) - } - OperationType::ManageSellOffer => { - Self::ManageSellOffer(ManageSellOfferOp::read_xdr(r)?) - } - OperationType::CreatePassiveSellOffer => { - Self::CreatePassiveSellOffer(CreatePassiveSellOfferOp::read_xdr(r)?) - } - OperationType::SetOptions => Self::SetOptions(SetOptionsOp::read_xdr(r)?), - OperationType::ChangeTrust => Self::ChangeTrust(ChangeTrustOp::read_xdr(r)?), - OperationType::AllowTrust => Self::AllowTrust(AllowTrustOp::read_xdr(r)?), - OperationType::AccountMerge => Self::AccountMerge(MuxedAccount::read_xdr(r)?), - OperationType::Inflation => Self::Inflation, - OperationType::ManageData => Self::ManageData(ManageDataOp::read_xdr(r)?), - OperationType::BumpSequence => Self::BumpSequence(BumpSequenceOp::read_xdr(r)?), - OperationType::ManageBuyOffer => { - Self::ManageBuyOffer(ManageBuyOfferOp::read_xdr(r)?) - } - OperationType::PathPaymentStrictSend => { - Self::PathPaymentStrictSend(PathPaymentStrictSendOp::read_xdr(r)?) - } - OperationType::CreateClaimableBalance => { - Self::CreateClaimableBalance(CreateClaimableBalanceOp::read_xdr(r)?) - } - OperationType::ClaimClaimableBalance => { - Self::ClaimClaimableBalance(ClaimClaimableBalanceOp::read_xdr(r)?) - } - OperationType::BeginSponsoringFutureReserves => { - Self::BeginSponsoringFutureReserves(BeginSponsoringFutureReservesOp::read_xdr( - r, - )?) - } - OperationType::EndSponsoringFutureReserves => Self::EndSponsoringFutureReserves, - OperationType::RevokeSponsorship => { - Self::RevokeSponsorship(RevokeSponsorshipOp::read_xdr(r)?) - } - OperationType::Clawback => Self::Clawback(ClawbackOp::read_xdr(r)?), - OperationType::ClawbackClaimableBalance => { - Self::ClawbackClaimableBalance(ClawbackClaimableBalanceOp::read_xdr(r)?) - } - OperationType::SetTrustLineFlags => { - Self::SetTrustLineFlags(SetTrustLineFlagsOp::read_xdr(r)?) - } - OperationType::LiquidityPoolDeposit => { - Self::LiquidityPoolDeposit(LiquidityPoolDepositOp::read_xdr(r)?) - } - OperationType::LiquidityPoolWithdraw => { - Self::LiquidityPoolWithdraw(LiquidityPoolWithdrawOp::read_xdr(r)?) - } - OperationType::InvokeHostFunction => { - Self::InvokeHostFunction(InvokeHostFunctionOp::read_xdr(r)?) - } - OperationType::ExtendFootprintTtl => { - Self::ExtendFootprintTtl(ExtendFootprintTtlOp::read_xdr(r)?) - } - OperationType::RestoreFootprint => { - Self::RestoreFootprint(RestoreFootprintOp::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for OperationBody { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::CreateAccount(v) => v.write_xdr(w)?, - Self::Payment(v) => v.write_xdr(w)?, - Self::PathPaymentStrictReceive(v) => v.write_xdr(w)?, - Self::ManageSellOffer(v) => v.write_xdr(w)?, - Self::CreatePassiveSellOffer(v) => v.write_xdr(w)?, - Self::SetOptions(v) => v.write_xdr(w)?, - Self::ChangeTrust(v) => v.write_xdr(w)?, - Self::AllowTrust(v) => v.write_xdr(w)?, - Self::AccountMerge(v) => v.write_xdr(w)?, - Self::Inflation => ().write_xdr(w)?, - Self::ManageData(v) => v.write_xdr(w)?, - Self::BumpSequence(v) => v.write_xdr(w)?, - Self::ManageBuyOffer(v) => v.write_xdr(w)?, - Self::PathPaymentStrictSend(v) => v.write_xdr(w)?, - Self::CreateClaimableBalance(v) => v.write_xdr(w)?, - Self::ClaimClaimableBalance(v) => v.write_xdr(w)?, - Self::BeginSponsoringFutureReserves(v) => v.write_xdr(w)?, - Self::EndSponsoringFutureReserves => ().write_xdr(w)?, - Self::RevokeSponsorship(v) => v.write_xdr(w)?, - Self::Clawback(v) => v.write_xdr(w)?, - Self::ClawbackClaimableBalance(v) => v.write_xdr(w)?, - Self::SetTrustLineFlags(v) => v.write_xdr(w)?, - Self::LiquidityPoolDeposit(v) => v.write_xdr(w)?, - Self::LiquidityPoolWithdraw(v) => v.write_xdr(w)?, - Self::InvokeHostFunction(v) => v.write_xdr(w)?, - Self::ExtendFootprintTtl(v) => v.write_xdr(w)?, - Self::RestoreFootprint(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// Operation is an XDR Struct defined as: -/// -/// ```text -/// struct Operation -/// { -/// // sourceAccount is the account used to run the operation -/// // if not set, the runtime defaults to "sourceAccount" specified at -/// // the transaction level -/// MuxedAccount* sourceAccount; -/// -/// union switch (OperationType type) -/// { -/// case CREATE_ACCOUNT: -/// CreateAccountOp createAccountOp; -/// case PAYMENT: -/// PaymentOp paymentOp; -/// case PATH_PAYMENT_STRICT_RECEIVE: -/// PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; -/// case MANAGE_SELL_OFFER: -/// ManageSellOfferOp manageSellOfferOp; -/// case CREATE_PASSIVE_SELL_OFFER: -/// CreatePassiveSellOfferOp createPassiveSellOfferOp; -/// case SET_OPTIONS: -/// SetOptionsOp setOptionsOp; -/// case CHANGE_TRUST: -/// ChangeTrustOp changeTrustOp; -/// case ALLOW_TRUST: -/// AllowTrustOp allowTrustOp; -/// case ACCOUNT_MERGE: -/// MuxedAccount destination; -/// case INFLATION: -/// void; -/// case MANAGE_DATA: -/// ManageDataOp manageDataOp; -/// case BUMP_SEQUENCE: -/// BumpSequenceOp bumpSequenceOp; -/// case MANAGE_BUY_OFFER: -/// ManageBuyOfferOp manageBuyOfferOp; -/// case PATH_PAYMENT_STRICT_SEND: -/// PathPaymentStrictSendOp pathPaymentStrictSendOp; -/// case CREATE_CLAIMABLE_BALANCE: -/// CreateClaimableBalanceOp createClaimableBalanceOp; -/// case CLAIM_CLAIMABLE_BALANCE: -/// ClaimClaimableBalanceOp claimClaimableBalanceOp; -/// case BEGIN_SPONSORING_FUTURE_RESERVES: -/// BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; -/// case END_SPONSORING_FUTURE_RESERVES: -/// void; -/// case REVOKE_SPONSORSHIP: -/// RevokeSponsorshipOp revokeSponsorshipOp; -/// case CLAWBACK: -/// ClawbackOp clawbackOp; -/// case CLAWBACK_CLAIMABLE_BALANCE: -/// ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; -/// case SET_TRUST_LINE_FLAGS: -/// SetTrustLineFlagsOp setTrustLineFlagsOp; -/// case LIQUIDITY_POOL_DEPOSIT: -/// LiquidityPoolDepositOp liquidityPoolDepositOp; -/// case LIQUIDITY_POOL_WITHDRAW: -/// LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; -/// case INVOKE_HOST_FUNCTION: -/// InvokeHostFunctionOp invokeHostFunctionOp; -/// case EXTEND_FOOTPRINT_TTL: -/// ExtendFootprintTTLOp extendFootprintTTLOp; -/// case RESTORE_FOOTPRINT: -/// RestoreFootprintOp restoreFootprintOp; -/// } -/// body; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct Operation { - pub source_account: Option, - pub body: OperationBody, -} - -impl ReadXdr for Operation { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - source_account: Option::::read_xdr(r)?, - body: OperationBody::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for Operation { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.source_account.write_xdr(w)?; - self.body.write_xdr(w)?; - Ok(()) - }) - } -} - -/// HashIdPreimageOperationId is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// AccountID sourceAccount; -/// SequenceNumber seqNum; -/// uint32 opNum; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct HashIdPreimageOperationId { - pub source_account: AccountId, - pub seq_num: SequenceNumber, - pub op_num: u32, -} - -impl ReadXdr for HashIdPreimageOperationId { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - source_account: AccountId::read_xdr(r)?, - seq_num: SequenceNumber::read_xdr(r)?, - op_num: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for HashIdPreimageOperationId { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.source_account.write_xdr(w)?; - self.seq_num.write_xdr(w)?; - self.op_num.write_xdr(w)?; - Ok(()) - }) - } -} - -/// HashIdPreimageRevokeId is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// AccountID sourceAccount; -/// SequenceNumber seqNum; -/// uint32 opNum; -/// PoolID liquidityPoolID; -/// Asset asset; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct HashIdPreimageRevokeId { - pub source_account: AccountId, - pub seq_num: SequenceNumber, - pub op_num: u32, - pub liquidity_pool_id: PoolId, - pub asset: Asset, -} - -impl ReadXdr for HashIdPreimageRevokeId { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - source_account: AccountId::read_xdr(r)?, - seq_num: SequenceNumber::read_xdr(r)?, - op_num: u32::read_xdr(r)?, - liquidity_pool_id: PoolId::read_xdr(r)?, - asset: Asset::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for HashIdPreimageRevokeId { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.source_account.write_xdr(w)?; - self.seq_num.write_xdr(w)?; - self.op_num.write_xdr(w)?; - self.liquidity_pool_id.write_xdr(w)?; - self.asset.write_xdr(w)?; - Ok(()) - }) - } -} - -/// HashIdPreimageContractId is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// Hash networkID; -/// ContractIDPreimage contractIDPreimage; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct HashIdPreimageContractId { - pub network_id: Hash, - pub contract_id_preimage: ContractIdPreimage, -} - -impl ReadXdr for HashIdPreimageContractId { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - network_id: Hash::read_xdr(r)?, - contract_id_preimage: ContractIdPreimage::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for HashIdPreimageContractId { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.network_id.write_xdr(w)?; - self.contract_id_preimage.write_xdr(w)?; - Ok(()) - }) - } -} - -/// HashIdPreimageSorobanAuthorization is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// Hash networkID; -/// int64 nonce; -/// uint32 signatureExpirationLedger; -/// SorobanAuthorizedInvocation invocation; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct HashIdPreimageSorobanAuthorization { - pub network_id: Hash, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub nonce: i64, - pub signature_expiration_ledger: u32, - pub invocation: SorobanAuthorizedInvocation, -} - -impl ReadXdr for HashIdPreimageSorobanAuthorization { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - network_id: Hash::read_xdr(r)?, - nonce: i64::read_xdr(r)?, - signature_expiration_ledger: u32::read_xdr(r)?, - invocation: SorobanAuthorizedInvocation::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for HashIdPreimageSorobanAuthorization { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.network_id.write_xdr(w)?; - self.nonce.write_xdr(w)?; - self.signature_expiration_ledger.write_xdr(w)?; - self.invocation.write_xdr(w)?; - Ok(()) - }) - } -} - -/// HashIdPreimage is an XDR Union defined as: -/// -/// ```text -/// union HashIDPreimage switch (EnvelopeType type) -/// { -/// case ENVELOPE_TYPE_OP_ID: -/// struct -/// { -/// AccountID sourceAccount; -/// SequenceNumber seqNum; -/// uint32 opNum; -/// } operationID; -/// case ENVELOPE_TYPE_POOL_REVOKE_OP_ID: -/// struct -/// { -/// AccountID sourceAccount; -/// SequenceNumber seqNum; -/// uint32 opNum; -/// PoolID liquidityPoolID; -/// Asset asset; -/// } revokeID; -/// case ENVELOPE_TYPE_CONTRACT_ID: -/// struct -/// { -/// Hash networkID; -/// ContractIDPreimage contractIDPreimage; -/// } contractID; -/// case ENVELOPE_TYPE_SOROBAN_AUTHORIZATION: -/// struct -/// { -/// Hash networkID; -/// int64 nonce; -/// uint32 signatureExpirationLedger; -/// SorobanAuthorizedInvocation invocation; -/// } sorobanAuthorization; -/// }; -/// ``` -/// -// union with discriminant EnvelopeType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum HashIdPreimage { - OpId(HashIdPreimageOperationId), - PoolRevokeOpId(HashIdPreimageRevokeId), - ContractId(HashIdPreimageContractId), - SorobanAuthorization(HashIdPreimageSorobanAuthorization), -} - -#[cfg(feature = "alloc")] -impl Default for HashIdPreimage { - fn default() -> Self { - Self::OpId(HashIdPreimageOperationId::default()) - } -} - -impl HashIdPreimage { - const _VARIANTS: &[EnvelopeType] = &[ - EnvelopeType::OpId, - EnvelopeType::PoolRevokeOpId, - EnvelopeType::ContractId, - EnvelopeType::SorobanAuthorization, - ]; - pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "OpId", - "PoolRevokeOpId", - "ContractId", - "SorobanAuthorization", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::OpId(_) => "OpId", - Self::PoolRevokeOpId(_) => "PoolRevokeOpId", - Self::ContractId(_) => "ContractId", - Self::SorobanAuthorization(_) => "SorobanAuthorization", - } - } - - #[must_use] - pub const fn discriminant(&self) -> EnvelopeType { - #[allow(clippy::match_same_arms)] - match self { - Self::OpId(_) => EnvelopeType::OpId, - Self::PoolRevokeOpId(_) => EnvelopeType::PoolRevokeOpId, - Self::ContractId(_) => EnvelopeType::ContractId, - Self::SorobanAuthorization(_) => EnvelopeType::SorobanAuthorization, - } - } - - #[must_use] - pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for HashIdPreimage { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for HashIdPreimage { - #[must_use] - fn discriminant(&self) -> EnvelopeType { - Self::discriminant(self) - } -} - -impl Variants for HashIdPreimage { - fn variants() -> slice::Iter<'static, EnvelopeType> { - Self::VARIANTS.iter() - } -} - -impl Union for HashIdPreimage {} - -impl ReadXdr for HashIdPreimage { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: EnvelopeType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - EnvelopeType::OpId => Self::OpId(HashIdPreimageOperationId::read_xdr(r)?), - EnvelopeType::PoolRevokeOpId => { - Self::PoolRevokeOpId(HashIdPreimageRevokeId::read_xdr(r)?) - } - EnvelopeType::ContractId => { - Self::ContractId(HashIdPreimageContractId::read_xdr(r)?) - } - EnvelopeType::SorobanAuthorization => { - Self::SorobanAuthorization(HashIdPreimageSorobanAuthorization::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for HashIdPreimage { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::OpId(v) => v.write_xdr(w)?, - Self::PoolRevokeOpId(v) => v.write_xdr(w)?, - Self::ContractId(v) => v.write_xdr(w)?, - Self::SorobanAuthorization(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// MemoType is an XDR Enum defined as: -/// -/// ```text -/// enum MemoType -/// { -/// MEMO_NONE = 0, -/// MEMO_TEXT = 1, -/// MEMO_ID = 2, -/// MEMO_HASH = 3, -/// MEMO_RETURN = 4 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum MemoType { - #[cfg_attr(feature = "alloc", default)] - None = 0, - Text = 1, - Id = 2, - Hash = 3, - Return = 4, -} - -impl MemoType { - const _VARIANTS: &[MemoType] = &[ - MemoType::None, - MemoType::Text, - MemoType::Id, - MemoType::Hash, - MemoType::Return, - ]; - pub const VARIANTS: [MemoType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["None", "Text", "Id", "Hash", "Return"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::None => "None", - Self::Text => "Text", - Self::Id => "Id", - Self::Hash => "Hash", - Self::Return => "Return", - } - } - - #[must_use] - pub const fn variants() -> [MemoType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for MemoType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for MemoType { - fn variants() -> slice::Iter<'static, MemoType> { - Self::VARIANTS.iter() - } -} - -impl Enum for MemoType {} - -impl fmt::Display for MemoType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for MemoType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => MemoType::None, - 1 => MemoType::Text, - 2 => MemoType::Id, - 3 => MemoType::Hash, - 4 => MemoType::Return, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: MemoType) -> Self { - e as Self - } -} - -impl ReadXdr for MemoType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for MemoType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// Memo is an XDR Union defined as: -/// -/// ```text -/// union Memo switch (MemoType type) -/// { -/// case MEMO_NONE: -/// void; -/// case MEMO_TEXT: -/// string text<28>; -/// case MEMO_ID: -/// uint64 id; -/// case MEMO_HASH: -/// Hash hash; // the hash of what to pull from the content server -/// case MEMO_RETURN: -/// Hash retHash; // the hash of the tx you are rejecting -/// }; -/// ``` -/// -// union with discriminant MemoType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum Memo { - None, - Text(StringM<28>), - Id( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - u64, - ), - Hash(Hash), - Return(Hash), -} - -#[cfg(feature = "alloc")] -impl Default for Memo { - fn default() -> Self { - Self::None - } -} - -impl Memo { - const _VARIANTS: &[MemoType] = &[ - MemoType::None, - MemoType::Text, - MemoType::Id, - MemoType::Hash, - MemoType::Return, - ]; - pub const VARIANTS: [MemoType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["None", "Text", "Id", "Hash", "Return"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::None => "None", - Self::Text(_) => "Text", - Self::Id(_) => "Id", - Self::Hash(_) => "Hash", - Self::Return(_) => "Return", - } - } - - #[must_use] - pub const fn discriminant(&self) -> MemoType { - #[allow(clippy::match_same_arms)] - match self { - Self::None => MemoType::None, - Self::Text(_) => MemoType::Text, - Self::Id(_) => MemoType::Id, - Self::Hash(_) => MemoType::Hash, - Self::Return(_) => MemoType::Return, - } - } - - #[must_use] - pub const fn variants() -> [MemoType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for Memo { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for Memo { - #[must_use] - fn discriminant(&self) -> MemoType { - Self::discriminant(self) - } -} - -impl Variants for Memo { - fn variants() -> slice::Iter<'static, MemoType> { - Self::VARIANTS.iter() - } -} - -impl Union for Memo {} - -impl ReadXdr for Memo { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: MemoType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - MemoType::None => Self::None, - MemoType::Text => Self::Text(StringM::<28>::read_xdr(r)?), - MemoType::Id => Self::Id(u64::read_xdr(r)?), - MemoType::Hash => Self::Hash(Hash::read_xdr(r)?), - MemoType::Return => Self::Return(Hash::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for Memo { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::None => ().write_xdr(w)?, - Self::Text(v) => v.write_xdr(w)?, - Self::Id(v) => v.write_xdr(w)?, - Self::Hash(v) => v.write_xdr(w)?, - Self::Return(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TimeBounds is an XDR Struct defined as: -/// -/// ```text -/// struct TimeBounds -/// { -/// TimePoint minTime; -/// TimePoint maxTime; // 0 here means no maxTime -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TimeBounds { - pub min_time: TimePoint, - pub max_time: TimePoint, -} - -impl ReadXdr for TimeBounds { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - min_time: TimePoint::read_xdr(r)?, - max_time: TimePoint::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TimeBounds { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.min_time.write_xdr(w)?; - self.max_time.write_xdr(w)?; - Ok(()) - }) - } -} - -/// LedgerBounds is an XDR Struct defined as: -/// -/// ```text -/// struct LedgerBounds -/// { -/// uint32 minLedger; -/// uint32 maxLedger; // 0 here means no maxLedger -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerBounds { - pub min_ledger: u32, - pub max_ledger: u32, -} - -impl ReadXdr for LedgerBounds { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - min_ledger: u32::read_xdr(r)?, - max_ledger: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerBounds { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.min_ledger.write_xdr(w)?; - self.max_ledger.write_xdr(w)?; - Ok(()) - }) - } -} - -/// PreconditionsV2 is an XDR Struct defined as: -/// -/// ```text -/// struct PreconditionsV2 -/// { -/// TimeBounds* timeBounds; -/// -/// // Transaction only valid for ledger numbers n such that -/// // minLedger <= n < maxLedger (if maxLedger == 0, then -/// // only minLedger is checked) -/// LedgerBounds* ledgerBounds; -/// -/// // If NULL, only valid when sourceAccount's sequence number -/// // is seqNum - 1. Otherwise, valid when sourceAccount's -/// // sequence number n satisfies minSeqNum <= n < tx.seqNum. -/// // Note that after execution the account's sequence number -/// // is always raised to tx.seqNum, and a transaction is not -/// // valid if tx.seqNum is too high to ensure replay protection. -/// SequenceNumber* minSeqNum; -/// -/// // For the transaction to be valid, the current ledger time must -/// // be at least minSeqAge greater than sourceAccount's seqTime. -/// Duration minSeqAge; -/// -/// // For the transaction to be valid, the current ledger number -/// // must be at least minSeqLedgerGap greater than sourceAccount's -/// // seqLedger. -/// uint32 minSeqLedgerGap; -/// -/// // For the transaction to be valid, there must be a signature -/// // corresponding to every Signer in this array, even if the -/// // signature is not otherwise required by the sourceAccount or -/// // operations. -/// SignerKey extraSigners<2>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct PreconditionsV2 { - pub time_bounds: Option, - pub ledger_bounds: Option, - pub min_seq_num: Option, - pub min_seq_age: Duration, - pub min_seq_ledger_gap: u32, - pub extra_signers: VecM, -} - -impl ReadXdr for PreconditionsV2 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - time_bounds: Option::::read_xdr(r)?, - ledger_bounds: Option::::read_xdr(r)?, - min_seq_num: Option::::read_xdr(r)?, - min_seq_age: Duration::read_xdr(r)?, - min_seq_ledger_gap: u32::read_xdr(r)?, - extra_signers: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for PreconditionsV2 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.time_bounds.write_xdr(w)?; - self.ledger_bounds.write_xdr(w)?; - self.min_seq_num.write_xdr(w)?; - self.min_seq_age.write_xdr(w)?; - self.min_seq_ledger_gap.write_xdr(w)?; - self.extra_signers.write_xdr(w)?; - Ok(()) - }) - } -} - -/// PreconditionType is an XDR Enum defined as: -/// -/// ```text -/// enum PreconditionType -/// { -/// PRECOND_NONE = 0, -/// PRECOND_TIME = 1, -/// PRECOND_V2 = 2 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum PreconditionType { - #[cfg_attr(feature = "alloc", default)] - None = 0, - Time = 1, - V2 = 2, -} - -impl PreconditionType { - const _VARIANTS: &[PreconditionType] = &[ - PreconditionType::None, - PreconditionType::Time, - PreconditionType::V2, - ]; - pub const VARIANTS: [PreconditionType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["None", "Time", "V2"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::None => "None", - Self::Time => "Time", - Self::V2 => "V2", - } - } - - #[must_use] - pub const fn variants() -> [PreconditionType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for PreconditionType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for PreconditionType { - fn variants() -> slice::Iter<'static, PreconditionType> { - Self::VARIANTS.iter() - } -} - -impl Enum for PreconditionType {} - -impl fmt::Display for PreconditionType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for PreconditionType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => PreconditionType::None, - 1 => PreconditionType::Time, - 2 => PreconditionType::V2, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: PreconditionType) -> Self { - e as Self - } -} - -impl ReadXdr for PreconditionType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for PreconditionType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// Preconditions is an XDR Union defined as: -/// -/// ```text -/// union Preconditions switch (PreconditionType type) -/// { -/// case PRECOND_NONE: -/// void; -/// case PRECOND_TIME: -/// TimeBounds timeBounds; -/// case PRECOND_V2: -/// PreconditionsV2 v2; -/// }; -/// ``` -/// -// union with discriminant PreconditionType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum Preconditions { - None, - Time(TimeBounds), - V2(PreconditionsV2), -} - -#[cfg(feature = "alloc")] -impl Default for Preconditions { - fn default() -> Self { - Self::None - } -} - -impl Preconditions { - const _VARIANTS: &[PreconditionType] = &[ - PreconditionType::None, - PreconditionType::Time, - PreconditionType::V2, - ]; - pub const VARIANTS: [PreconditionType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["None", "Time", "V2"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::None => "None", - Self::Time(_) => "Time", - Self::V2(_) => "V2", - } - } - - #[must_use] - pub const fn discriminant(&self) -> PreconditionType { - #[allow(clippy::match_same_arms)] - match self { - Self::None => PreconditionType::None, - Self::Time(_) => PreconditionType::Time, - Self::V2(_) => PreconditionType::V2, - } - } - - #[must_use] - pub const fn variants() -> [PreconditionType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for Preconditions { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for Preconditions { - #[must_use] - fn discriminant(&self) -> PreconditionType { - Self::discriminant(self) - } -} - -impl Variants for Preconditions { - fn variants() -> slice::Iter<'static, PreconditionType> { - Self::VARIANTS.iter() - } -} - -impl Union for Preconditions {} - -impl ReadXdr for Preconditions { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: PreconditionType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - PreconditionType::None => Self::None, - PreconditionType::Time => Self::Time(TimeBounds::read_xdr(r)?), - PreconditionType::V2 => Self::V2(PreconditionsV2::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for Preconditions { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::None => ().write_xdr(w)?, - Self::Time(v) => v.write_xdr(w)?, - Self::V2(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// LedgerFootprint is an XDR Struct defined as: -/// -/// ```text -/// struct LedgerFootprint -/// { -/// LedgerKey readOnly<>; -/// LedgerKey readWrite<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct LedgerFootprint { - pub read_only: VecM, - pub read_write: VecM, -} - -impl ReadXdr for LedgerFootprint { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - read_only: VecM::::read_xdr(r)?, - read_write: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for LedgerFootprint { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.read_only.write_xdr(w)?; - self.read_write.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SorobanResources is an XDR Struct defined as: -/// -/// ```text -/// struct SorobanResources -/// { -/// // The ledger footprint of the transaction. -/// LedgerFootprint footprint; -/// // The maximum number of instructions this transaction can use -/// uint32 instructions; -/// -/// // The maximum number of bytes this transaction can read from disk backed entries -/// uint32 diskReadBytes; -/// // The maximum number of bytes this transaction can write to ledger -/// uint32 writeBytes; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SorobanResources { - pub footprint: LedgerFootprint, - pub instructions: u32, - pub disk_read_bytes: u32, - pub write_bytes: u32, -} - -impl ReadXdr for SorobanResources { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - footprint: LedgerFootprint::read_xdr(r)?, - instructions: u32::read_xdr(r)?, - disk_read_bytes: u32::read_xdr(r)?, - write_bytes: u32::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SorobanResources { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.footprint.write_xdr(w)?; - self.instructions.write_xdr(w)?; - self.disk_read_bytes.write_xdr(w)?; - self.write_bytes.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SorobanResourcesExtV0 is an XDR Struct defined as: -/// -/// ```text -/// struct SorobanResourcesExtV0 -/// { -/// // Vector of indices representing what Soroban -/// // entries in the footprint are archived, based on the -/// // order of keys provided in the readWrite footprint. -/// uint32 archivedSorobanEntries<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SorobanResourcesExtV0 { - pub archived_soroban_entries: VecM, -} - -impl ReadXdr for SorobanResourcesExtV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - archived_soroban_entries: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SorobanResourcesExtV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.archived_soroban_entries.write_xdr(w)?; - Ok(()) - }) - } -} - -/// SorobanTransactionDataExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// SorobanResourcesExtV0 resourceExt; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum SorobanTransactionDataExt { - V0, - V1(SorobanResourcesExtV0), -} - -#[cfg(feature = "alloc")] -impl Default for SorobanTransactionDataExt { - fn default() -> Self { - Self::V0 - } -} - -impl SorobanTransactionDataExt { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SorobanTransactionDataExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for SorobanTransactionDataExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for SorobanTransactionDataExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for SorobanTransactionDataExt {} - -impl ReadXdr for SorobanTransactionDataExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 1 => Self::V1(SorobanResourcesExtV0::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for SorobanTransactionDataExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// SorobanTransactionData is an XDR Struct defined as: -/// -/// ```text -/// struct SorobanTransactionData -/// { -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// SorobanResourcesExtV0 resourceExt; -/// } ext; -/// SorobanResources resources; -/// // Amount of the transaction `fee` allocated to the Soroban resource fees. -/// // The fraction of `resourceFee` corresponding to `resources` specified -/// // above is *not* refundable (i.e. fees for instructions, ledger I/O), as -/// // well as fees for the transaction size. -/// // The remaining part of the fee is refundable and the charged value is -/// // based on the actual consumption of refundable resources (events, ledger -/// // rent bumps). -/// // The `inclusionFee` used for prioritization of the transaction is defined -/// // as `tx.fee - resourceFee`. -/// int64 resourceFee; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SorobanTransactionData { - pub ext: SorobanTransactionDataExt, - pub resources: SorobanResources, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub resource_fee: i64, -} - -impl ReadXdr for SorobanTransactionData { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ext: SorobanTransactionDataExt::read_xdr(r)?, - resources: SorobanResources::read_xdr(r)?, - resource_fee: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SorobanTransactionData { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ext.write_xdr(w)?; - self.resources.write_xdr(w)?; - self.resource_fee.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionV0Ext is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TransactionV0Ext { - V0, -} - -#[cfg(feature = "alloc")] -impl Default for TransactionV0Ext { - fn default() -> Self { - Self::V0 - } -} - -impl TransactionV0Ext { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TransactionV0Ext { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TransactionV0Ext { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for TransactionV0Ext { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for TransactionV0Ext {} - -impl ReadXdr for TransactionV0Ext { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TransactionV0Ext { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TransactionV0 is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionV0 -/// { -/// uint256 sourceAccountEd25519; -/// uint32 fee; -/// SequenceNumber seqNum; -/// TimeBounds* timeBounds; -/// Memo memo; -/// Operation operations; -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionV0 { - pub source_account_ed25519: Uint256, - pub fee: u32, - pub seq_num: SequenceNumber, - pub time_bounds: Option, - pub memo: Memo, - pub operations: VecM, - pub ext: TransactionV0Ext, -} - -impl ReadXdr for TransactionV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - source_account_ed25519: Uint256::read_xdr(r)?, - fee: u32::read_xdr(r)?, - seq_num: SequenceNumber::read_xdr(r)?, - time_bounds: Option::::read_xdr(r)?, - memo: Memo::read_xdr(r)?, - operations: VecM::::read_xdr(r)?, - ext: TransactionV0Ext::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.source_account_ed25519.write_xdr(w)?; - self.fee.write_xdr(w)?; - self.seq_num.write_xdr(w)?; - self.time_bounds.write_xdr(w)?; - self.memo.write_xdr(w)?; - self.operations.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionV0Envelope is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionV0Envelope -/// { -/// TransactionV0 tx; -/// /* Each decorated signature is a signature over the SHA256 hash of -/// * a TransactionSignaturePayload */ -/// DecoratedSignature signatures<20>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionV0Envelope { - pub tx: TransactionV0, - pub signatures: VecM, -} - -impl ReadXdr for TransactionV0Envelope { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - tx: TransactionV0::read_xdr(r)?, - signatures: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionV0Envelope { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.tx.write_xdr(w)?; - self.signatures.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// SorobanTransactionData sorobanData; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TransactionExt { - V0, - V1(SorobanTransactionData), -} - -#[cfg(feature = "alloc")] -impl Default for TransactionExt { - fn default() -> Self { - Self::V0 - } -} - -impl TransactionExt { - const _VARIANTS: &[i32] = &[0, 1]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "V1"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::V1(_) => "V1", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - Self::V1(_) => 1, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TransactionExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TransactionExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for TransactionExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for TransactionExt {} - -impl ReadXdr for TransactionExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - 1 => Self::V1(SorobanTransactionData::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TransactionExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - Self::V1(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// Transaction is an XDR Struct defined as: -/// -/// ```text -/// struct Transaction -/// { -/// // account used to run the transaction -/// MuxedAccount sourceAccount; -/// -/// // the fee the sourceAccount will pay -/// uint32 fee; -/// -/// // sequence number to consume in the account -/// SequenceNumber seqNum; -/// -/// // validity conditions -/// Preconditions cond; -/// -/// Memo memo; -/// -/// Operation operations; -/// -/// union switch (int v) -/// { -/// case 0: -/// void; -/// case 1: -/// SorobanTransactionData sorobanData; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct Transaction { - pub source_account: MuxedAccount, - pub fee: u32, - pub seq_num: SequenceNumber, - pub cond: Preconditions, - pub memo: Memo, - pub operations: VecM, - pub ext: TransactionExt, -} - -impl ReadXdr for Transaction { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - source_account: MuxedAccount::read_xdr(r)?, - fee: u32::read_xdr(r)?, - seq_num: SequenceNumber::read_xdr(r)?, - cond: Preconditions::read_xdr(r)?, - memo: Memo::read_xdr(r)?, - operations: VecM::::read_xdr(r)?, - ext: TransactionExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for Transaction { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.source_account.write_xdr(w)?; - self.fee.write_xdr(w)?; - self.seq_num.write_xdr(w)?; - self.cond.write_xdr(w)?; - self.memo.write_xdr(w)?; - self.operations.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionV1Envelope is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionV1Envelope -/// { -/// Transaction tx; -/// /* Each decorated signature is a signature over the SHA256 hash of -/// * a TransactionSignaturePayload */ -/// DecoratedSignature signatures<20>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionV1Envelope { - pub tx: Transaction, - pub signatures: VecM, -} - -impl ReadXdr for TransactionV1Envelope { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - tx: Transaction::read_xdr(r)?, - signatures: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionV1Envelope { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.tx.write_xdr(w)?; - self.signatures.write_xdr(w)?; - Ok(()) - }) - } -} - -/// FeeBumpTransactionInnerTx is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (EnvelopeType type) -/// { -/// case ENVELOPE_TYPE_TX: -/// TransactionV1Envelope v1; -/// } -/// ``` -/// -// union with discriminant EnvelopeType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum FeeBumpTransactionInnerTx { - Tx(TransactionV1Envelope), -} - -#[cfg(feature = "alloc")] -impl Default for FeeBumpTransactionInnerTx { - fn default() -> Self { - Self::Tx(TransactionV1Envelope::default()) - } -} - -impl FeeBumpTransactionInnerTx { - const _VARIANTS: &[EnvelopeType] = &[EnvelopeType::Tx]; - pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Tx"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Tx(_) => "Tx", - } - } - - #[must_use] - pub const fn discriminant(&self) -> EnvelopeType { - #[allow(clippy::match_same_arms)] - match self { - Self::Tx(_) => EnvelopeType::Tx, - } - } - - #[must_use] - pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for FeeBumpTransactionInnerTx { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for FeeBumpTransactionInnerTx { - #[must_use] - fn discriminant(&self) -> EnvelopeType { - Self::discriminant(self) - } -} - -impl Variants for FeeBumpTransactionInnerTx { - fn variants() -> slice::Iter<'static, EnvelopeType> { - Self::VARIANTS.iter() - } -} - -impl Union for FeeBumpTransactionInnerTx {} - -impl ReadXdr for FeeBumpTransactionInnerTx { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: EnvelopeType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - EnvelopeType::Tx => Self::Tx(TransactionV1Envelope::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for FeeBumpTransactionInnerTx { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Tx(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// FeeBumpTransactionExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum FeeBumpTransactionExt { - V0, -} - -#[cfg(feature = "alloc")] -impl Default for FeeBumpTransactionExt { - fn default() -> Self { - Self::V0 - } -} - -impl FeeBumpTransactionExt { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for FeeBumpTransactionExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for FeeBumpTransactionExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for FeeBumpTransactionExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for FeeBumpTransactionExt {} - -impl ReadXdr for FeeBumpTransactionExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for FeeBumpTransactionExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// FeeBumpTransaction is an XDR Struct defined as: -/// -/// ```text -/// struct FeeBumpTransaction -/// { -/// MuxedAccount feeSource; -/// int64 fee; -/// union switch (EnvelopeType type) -/// { -/// case ENVELOPE_TYPE_TX: -/// TransactionV1Envelope v1; -/// } -/// innerTx; -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct FeeBumpTransaction { - pub fee_source: MuxedAccount, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub fee: i64, - pub inner_tx: FeeBumpTransactionInnerTx, - pub ext: FeeBumpTransactionExt, -} - -impl ReadXdr for FeeBumpTransaction { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - fee_source: MuxedAccount::read_xdr(r)?, - fee: i64::read_xdr(r)?, - inner_tx: FeeBumpTransactionInnerTx::read_xdr(r)?, - ext: FeeBumpTransactionExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for FeeBumpTransaction { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.fee_source.write_xdr(w)?; - self.fee.write_xdr(w)?; - self.inner_tx.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// FeeBumpTransactionEnvelope is an XDR Struct defined as: -/// -/// ```text -/// struct FeeBumpTransactionEnvelope -/// { -/// FeeBumpTransaction tx; -/// /* Each decorated signature is a signature over the SHA256 hash of -/// * a TransactionSignaturePayload */ -/// DecoratedSignature signatures<20>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct FeeBumpTransactionEnvelope { - pub tx: FeeBumpTransaction, - pub signatures: VecM, -} - -impl ReadXdr for FeeBumpTransactionEnvelope { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - tx: FeeBumpTransaction::read_xdr(r)?, - signatures: VecM::::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for FeeBumpTransactionEnvelope { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.tx.write_xdr(w)?; - self.signatures.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionEnvelope is an XDR Union defined as: -/// -/// ```text -/// union TransactionEnvelope switch (EnvelopeType type) -/// { -/// case ENVELOPE_TYPE_TX_V0: -/// TransactionV0Envelope v0; -/// case ENVELOPE_TYPE_TX: -/// TransactionV1Envelope v1; -/// case ENVELOPE_TYPE_TX_FEE_BUMP: -/// FeeBumpTransactionEnvelope feeBump; -/// }; -/// ``` -/// -// union with discriminant EnvelopeType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TransactionEnvelope { - TxV0(TransactionV0Envelope), - Tx(TransactionV1Envelope), - TxFeeBump(FeeBumpTransactionEnvelope), -} - -impl TransactionEnvelope { - const _VARIANTS: &[EnvelopeType] = &[ - EnvelopeType::TxV0, - EnvelopeType::Tx, - EnvelopeType::TxFeeBump, - ]; - pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["TxV0", "Tx", "TxFeeBump"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::TxV0(_) => "TxV0", - Self::Tx(_) => "Tx", - Self::TxFeeBump(_) => "TxFeeBump", - } - } - - #[must_use] - pub const fn discriminant(&self) -> EnvelopeType { - #[allow(clippy::match_same_arms)] - match self { - Self::TxV0(_) => EnvelopeType::TxV0, - Self::Tx(_) => EnvelopeType::Tx, - Self::TxFeeBump(_) => EnvelopeType::TxFeeBump, - } - } - - #[must_use] - pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TransactionEnvelope { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TransactionEnvelope { - #[must_use] - fn discriminant(&self) -> EnvelopeType { - Self::discriminant(self) - } -} - -impl Variants for TransactionEnvelope { - fn variants() -> slice::Iter<'static, EnvelopeType> { - Self::VARIANTS.iter() - } -} - -impl Union for TransactionEnvelope {} - -impl ReadXdr for TransactionEnvelope { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: EnvelopeType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - EnvelopeType::TxV0 => Self::TxV0(TransactionV0Envelope::read_xdr(r)?), - EnvelopeType::Tx => Self::Tx(TransactionV1Envelope::read_xdr(r)?), - EnvelopeType::TxFeeBump => { - Self::TxFeeBump(FeeBumpTransactionEnvelope::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TransactionEnvelope { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::TxV0(v) => v.write_xdr(w)?, - Self::Tx(v) => v.write_xdr(w)?, - Self::TxFeeBump(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TransactionSignaturePayloadTaggedTransaction is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (EnvelopeType type) -/// { -/// // Backwards Compatibility: Use ENVELOPE_TYPE_TX to sign ENVELOPE_TYPE_TX_V0 -/// case ENVELOPE_TYPE_TX: -/// Transaction tx; -/// case ENVELOPE_TYPE_TX_FEE_BUMP: -/// FeeBumpTransaction feeBump; -/// } -/// ``` -/// -// union with discriminant EnvelopeType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TransactionSignaturePayloadTaggedTransaction { - Tx(Transaction), - TxFeeBump(FeeBumpTransaction), -} - -#[cfg(feature = "alloc")] -impl Default for TransactionSignaturePayloadTaggedTransaction { - fn default() -> Self { - Self::Tx(Transaction::default()) - } -} - -impl TransactionSignaturePayloadTaggedTransaction { - const _VARIANTS: &[EnvelopeType] = &[EnvelopeType::Tx, EnvelopeType::TxFeeBump]; - pub const VARIANTS: [EnvelopeType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Tx", "TxFeeBump"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Tx(_) => "Tx", - Self::TxFeeBump(_) => "TxFeeBump", - } - } - - #[must_use] - pub const fn discriminant(&self) -> EnvelopeType { - #[allow(clippy::match_same_arms)] - match self { - Self::Tx(_) => EnvelopeType::Tx, - Self::TxFeeBump(_) => EnvelopeType::TxFeeBump, - } - } - - #[must_use] - pub const fn variants() -> [EnvelopeType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TransactionSignaturePayloadTaggedTransaction { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TransactionSignaturePayloadTaggedTransaction { - #[must_use] - fn discriminant(&self) -> EnvelopeType { - Self::discriminant(self) - } -} - -impl Variants for TransactionSignaturePayloadTaggedTransaction { - fn variants() -> slice::Iter<'static, EnvelopeType> { - Self::VARIANTS.iter() - } -} - -impl Union for TransactionSignaturePayloadTaggedTransaction {} - -impl ReadXdr for TransactionSignaturePayloadTaggedTransaction { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: EnvelopeType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - EnvelopeType::Tx => Self::Tx(Transaction::read_xdr(r)?), - EnvelopeType::TxFeeBump => Self::TxFeeBump(FeeBumpTransaction::read_xdr(r)?), - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TransactionSignaturePayloadTaggedTransaction { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Tx(v) => v.write_xdr(w)?, - Self::TxFeeBump(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TransactionSignaturePayload is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionSignaturePayload -/// { -/// Hash networkId; -/// union switch (EnvelopeType type) -/// { -/// // Backwards Compatibility: Use ENVELOPE_TYPE_TX to sign ENVELOPE_TYPE_TX_V0 -/// case ENVELOPE_TYPE_TX: -/// Transaction tx; -/// case ENVELOPE_TYPE_TX_FEE_BUMP: -/// FeeBumpTransaction feeBump; -/// } -/// taggedTransaction; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionSignaturePayload { - pub network_id: Hash, - pub tagged_transaction: TransactionSignaturePayloadTaggedTransaction, -} - -impl ReadXdr for TransactionSignaturePayload { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - network_id: Hash::read_xdr(r)?, - tagged_transaction: TransactionSignaturePayloadTaggedTransaction::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionSignaturePayload { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.network_id.write_xdr(w)?; - self.tagged_transaction.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ClaimAtomType is an XDR Enum defined as: -/// -/// ```text -/// enum ClaimAtomType -/// { -/// CLAIM_ATOM_TYPE_V0 = 0, -/// CLAIM_ATOM_TYPE_ORDER_BOOK = 1, -/// CLAIM_ATOM_TYPE_LIQUIDITY_POOL = 2 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ClaimAtomType { - #[cfg_attr(feature = "alloc", default)] - V0 = 0, - OrderBook = 1, - LiquidityPool = 2, -} - -impl ClaimAtomType { - const _VARIANTS: &[ClaimAtomType] = &[ - ClaimAtomType::V0, - ClaimAtomType::OrderBook, - ClaimAtomType::LiquidityPool, - ]; - pub const VARIANTS: [ClaimAtomType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "OrderBook", "LiquidityPool"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - Self::OrderBook => "OrderBook", - Self::LiquidityPool => "LiquidityPool", - } - } - - #[must_use] - pub const fn variants() -> [ClaimAtomType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClaimAtomType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ClaimAtomType { - fn variants() -> slice::Iter<'static, ClaimAtomType> { - Self::VARIANTS.iter() - } -} - -impl Enum for ClaimAtomType {} - -impl fmt::Display for ClaimAtomType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ClaimAtomType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ClaimAtomType::V0, - 1 => ClaimAtomType::OrderBook, - 2 => ClaimAtomType::LiquidityPool, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ClaimAtomType) -> Self { - e as Self - } -} - -impl ReadXdr for ClaimAtomType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ClaimAtomType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ClaimOfferAtomV0 is an XDR Struct defined as: -/// -/// ```text -/// struct ClaimOfferAtomV0 -/// { -/// // emitted to identify the offer -/// uint256 sellerEd25519; // Account that owns the offer -/// int64 offerID; -/// -/// // amount and asset taken from the owner -/// Asset assetSold; -/// int64 amountSold; -/// -/// // amount and asset sent to the owner -/// Asset assetBought; -/// int64 amountBought; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ClaimOfferAtomV0 { - pub seller_ed25519: Uint256, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub offer_id: i64, - pub asset_sold: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount_sold: i64, - pub asset_bought: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount_bought: i64, -} - -impl ReadXdr for ClaimOfferAtomV0 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - seller_ed25519: Uint256::read_xdr(r)?, - offer_id: i64::read_xdr(r)?, - asset_sold: Asset::read_xdr(r)?, - amount_sold: i64::read_xdr(r)?, - asset_bought: Asset::read_xdr(r)?, - amount_bought: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ClaimOfferAtomV0 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.seller_ed25519.write_xdr(w)?; - self.offer_id.write_xdr(w)?; - self.asset_sold.write_xdr(w)?; - self.amount_sold.write_xdr(w)?; - self.asset_bought.write_xdr(w)?; - self.amount_bought.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ClaimOfferAtom is an XDR Struct defined as: -/// -/// ```text -/// struct ClaimOfferAtom -/// { -/// // emitted to identify the offer -/// AccountID sellerID; // Account that owns the offer -/// int64 offerID; -/// -/// // amount and asset taken from the owner -/// Asset assetSold; -/// int64 amountSold; -/// -/// // amount and asset sent to the owner -/// Asset assetBought; -/// int64 amountBought; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ClaimOfferAtom { - pub seller_id: AccountId, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub offer_id: i64, - pub asset_sold: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount_sold: i64, - pub asset_bought: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount_bought: i64, -} - -impl ReadXdr for ClaimOfferAtom { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - seller_id: AccountId::read_xdr(r)?, - offer_id: i64::read_xdr(r)?, - asset_sold: Asset::read_xdr(r)?, - amount_sold: i64::read_xdr(r)?, - asset_bought: Asset::read_xdr(r)?, - amount_bought: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ClaimOfferAtom { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.seller_id.write_xdr(w)?; - self.offer_id.write_xdr(w)?; - self.asset_sold.write_xdr(w)?; - self.amount_sold.write_xdr(w)?; - self.asset_bought.write_xdr(w)?; - self.amount_bought.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ClaimLiquidityAtom is an XDR Struct defined as: -/// -/// ```text -/// struct ClaimLiquidityAtom -/// { -/// PoolID liquidityPoolID; -/// -/// // amount and asset taken from the pool -/// Asset assetSold; -/// int64 amountSold; -/// -/// // amount and asset sent to the pool -/// Asset assetBought; -/// int64 amountBought; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ClaimLiquidityAtom { - pub liquidity_pool_id: PoolId, - pub asset_sold: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount_sold: i64, - pub asset_bought: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount_bought: i64, -} - -impl ReadXdr for ClaimLiquidityAtom { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - liquidity_pool_id: PoolId::read_xdr(r)?, - asset_sold: Asset::read_xdr(r)?, - amount_sold: i64::read_xdr(r)?, - asset_bought: Asset::read_xdr(r)?, - amount_bought: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ClaimLiquidityAtom { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.liquidity_pool_id.write_xdr(w)?; - self.asset_sold.write_xdr(w)?; - self.amount_sold.write_xdr(w)?; - self.asset_bought.write_xdr(w)?; - self.amount_bought.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ClaimAtom is an XDR Union defined as: -/// -/// ```text -/// union ClaimAtom switch (ClaimAtomType type) -/// { -/// case CLAIM_ATOM_TYPE_V0: -/// ClaimOfferAtomV0 v0; -/// case CLAIM_ATOM_TYPE_ORDER_BOOK: -/// ClaimOfferAtom orderBook; -/// case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: -/// ClaimLiquidityAtom liquidityPool; -/// }; -/// ``` -/// -// union with discriminant ClaimAtomType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ClaimAtom { - V0(ClaimOfferAtomV0), - OrderBook(ClaimOfferAtom), - LiquidityPool(ClaimLiquidityAtom), -} - -#[cfg(feature = "alloc")] -impl Default for ClaimAtom { - fn default() -> Self { - Self::V0(ClaimOfferAtomV0::default()) - } -} - -impl ClaimAtom { - const _VARIANTS: &[ClaimAtomType] = &[ - ClaimAtomType::V0, - ClaimAtomType::OrderBook, - ClaimAtomType::LiquidityPool, - ]; - pub const VARIANTS: [ClaimAtomType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0", "OrderBook", "LiquidityPool"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0(_) => "V0", - Self::OrderBook(_) => "OrderBook", - Self::LiquidityPool(_) => "LiquidityPool", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ClaimAtomType { - #[allow(clippy::match_same_arms)] - match self { - Self::V0(_) => ClaimAtomType::V0, - Self::OrderBook(_) => ClaimAtomType::OrderBook, - Self::LiquidityPool(_) => ClaimAtomType::LiquidityPool, - } - } - - #[must_use] - pub const fn variants() -> [ClaimAtomType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClaimAtom { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ClaimAtom { - #[must_use] - fn discriminant(&self) -> ClaimAtomType { - Self::discriminant(self) - } -} - -impl Variants for ClaimAtom { - fn variants() -> slice::Iter<'static, ClaimAtomType> { - Self::VARIANTS.iter() - } -} - -impl Union for ClaimAtom {} - -impl ReadXdr for ClaimAtom { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ClaimAtomType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ClaimAtomType::V0 => Self::V0(ClaimOfferAtomV0::read_xdr(r)?), - ClaimAtomType::OrderBook => Self::OrderBook(ClaimOfferAtom::read_xdr(r)?), - ClaimAtomType::LiquidityPool => { - Self::LiquidityPool(ClaimLiquidityAtom::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ClaimAtom { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0(v) => v.write_xdr(w)?, - Self::OrderBook(v) => v.write_xdr(w)?, - Self::LiquidityPool(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// CreateAccountResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum CreateAccountResultCode -/// { -/// // codes considered as "success" for the operation -/// CREATE_ACCOUNT_SUCCESS = 0, // account was created -/// -/// // codes considered as "failure" for the operation -/// CREATE_ACCOUNT_MALFORMED = -1, // invalid destination -/// CREATE_ACCOUNT_UNDERFUNDED = -2, // not enough funds in source account -/// CREATE_ACCOUNT_LOW_RESERVE = -/// -3, // would create an account below the min reserve -/// CREATE_ACCOUNT_ALREADY_EXIST = -4 // account already exists -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum CreateAccountResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - Underfunded = -2, - LowReserve = -3, - AlreadyExist = -4, -} - -impl CreateAccountResultCode { - const _VARIANTS: &[CreateAccountResultCode] = &[ - CreateAccountResultCode::Success, - CreateAccountResultCode::Malformed, - CreateAccountResultCode::Underfunded, - CreateAccountResultCode::LowReserve, - CreateAccountResultCode::AlreadyExist, - ]; - pub const VARIANTS: [CreateAccountResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "Underfunded", - "LowReserve", - "AlreadyExist", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::Underfunded => "Underfunded", - Self::LowReserve => "LowReserve", - Self::AlreadyExist => "AlreadyExist", - } - } - - #[must_use] - pub const fn variants() -> [CreateAccountResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for CreateAccountResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for CreateAccountResultCode { - fn variants() -> slice::Iter<'static, CreateAccountResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for CreateAccountResultCode {} - -impl fmt::Display for CreateAccountResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for CreateAccountResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => CreateAccountResultCode::Success, - -1 => CreateAccountResultCode::Malformed, - -2 => CreateAccountResultCode::Underfunded, - -3 => CreateAccountResultCode::LowReserve, - -4 => CreateAccountResultCode::AlreadyExist, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: CreateAccountResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for CreateAccountResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for CreateAccountResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// CreateAccountResult is an XDR Union defined as: -/// -/// ```text -/// union CreateAccountResult switch (CreateAccountResultCode code) -/// { -/// case CREATE_ACCOUNT_SUCCESS: -/// void; -/// case CREATE_ACCOUNT_MALFORMED: -/// case CREATE_ACCOUNT_UNDERFUNDED: -/// case CREATE_ACCOUNT_LOW_RESERVE: -/// case CREATE_ACCOUNT_ALREADY_EXIST: -/// void; -/// }; -/// ``` -/// -// union with discriminant CreateAccountResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum CreateAccountResult { - Success, - Malformed, - Underfunded, - LowReserve, - AlreadyExist, -} - -#[cfg(feature = "alloc")] -impl Default for CreateAccountResult { - fn default() -> Self { - Self::Success - } -} - -impl CreateAccountResult { - const _VARIANTS: &[CreateAccountResultCode] = &[ - CreateAccountResultCode::Success, - CreateAccountResultCode::Malformed, - CreateAccountResultCode::Underfunded, - CreateAccountResultCode::LowReserve, - CreateAccountResultCode::AlreadyExist, - ]; - pub const VARIANTS: [CreateAccountResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "Underfunded", - "LowReserve", - "AlreadyExist", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::Underfunded => "Underfunded", - Self::LowReserve => "LowReserve", - Self::AlreadyExist => "AlreadyExist", - } - } - - #[must_use] - pub const fn discriminant(&self) -> CreateAccountResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => CreateAccountResultCode::Success, - Self::Malformed => CreateAccountResultCode::Malformed, - Self::Underfunded => CreateAccountResultCode::Underfunded, - Self::LowReserve => CreateAccountResultCode::LowReserve, - Self::AlreadyExist => CreateAccountResultCode::AlreadyExist, - } - } - - #[must_use] - pub const fn variants() -> [CreateAccountResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for CreateAccountResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for CreateAccountResult { - #[must_use] - fn discriminant(&self) -> CreateAccountResultCode { - Self::discriminant(self) - } -} - -impl Variants for CreateAccountResult { - fn variants() -> slice::Iter<'static, CreateAccountResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for CreateAccountResult {} - -impl ReadXdr for CreateAccountResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: CreateAccountResultCode = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - CreateAccountResultCode::Success => Self::Success, - CreateAccountResultCode::Malformed => Self::Malformed, - CreateAccountResultCode::Underfunded => Self::Underfunded, - CreateAccountResultCode::LowReserve => Self::LowReserve, - CreateAccountResultCode::AlreadyExist => Self::AlreadyExist, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for CreateAccountResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::Underfunded => ().write_xdr(w)?, - Self::LowReserve => ().write_xdr(w)?, - Self::AlreadyExist => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// PaymentResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum PaymentResultCode -/// { -/// // codes considered as "success" for the operation -/// PAYMENT_SUCCESS = 0, // payment successfully completed -/// -/// // codes considered as "failure" for the operation -/// PAYMENT_MALFORMED = -1, // bad input -/// PAYMENT_UNDERFUNDED = -2, // not enough funds in source account -/// PAYMENT_SRC_NO_TRUST = -3, // no trust line on source account -/// PAYMENT_SRC_NOT_AUTHORIZED = -4, // source not authorized to transfer -/// PAYMENT_NO_DESTINATION = -5, // destination account does not exist -/// PAYMENT_NO_TRUST = -6, // destination missing a trust line for asset -/// PAYMENT_NOT_AUTHORIZED = -7, // destination not authorized to hold asset -/// PAYMENT_LINE_FULL = -8, // destination would go above their limit -/// PAYMENT_NO_ISSUER = -9 // missing issuer on asset -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum PaymentResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - Underfunded = -2, - SrcNoTrust = -3, - SrcNotAuthorized = -4, - NoDestination = -5, - NoTrust = -6, - NotAuthorized = -7, - LineFull = -8, - NoIssuer = -9, -} - -impl PaymentResultCode { - const _VARIANTS: &[PaymentResultCode] = &[ - PaymentResultCode::Success, - PaymentResultCode::Malformed, - PaymentResultCode::Underfunded, - PaymentResultCode::SrcNoTrust, - PaymentResultCode::SrcNotAuthorized, - PaymentResultCode::NoDestination, - PaymentResultCode::NoTrust, - PaymentResultCode::NotAuthorized, - PaymentResultCode::LineFull, - PaymentResultCode::NoIssuer, - ]; - pub const VARIANTS: [PaymentResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "Underfunded", - "SrcNoTrust", - "SrcNotAuthorized", - "NoDestination", - "NoTrust", - "NotAuthorized", - "LineFull", - "NoIssuer", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::Underfunded => "Underfunded", - Self::SrcNoTrust => "SrcNoTrust", - Self::SrcNotAuthorized => "SrcNotAuthorized", - Self::NoDestination => "NoDestination", - Self::NoTrust => "NoTrust", - Self::NotAuthorized => "NotAuthorized", - Self::LineFull => "LineFull", - Self::NoIssuer => "NoIssuer", - } - } - - #[must_use] - pub const fn variants() -> [PaymentResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for PaymentResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for PaymentResultCode { - fn variants() -> slice::Iter<'static, PaymentResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for PaymentResultCode {} - -impl fmt::Display for PaymentResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for PaymentResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => PaymentResultCode::Success, - -1 => PaymentResultCode::Malformed, - -2 => PaymentResultCode::Underfunded, - -3 => PaymentResultCode::SrcNoTrust, - -4 => PaymentResultCode::SrcNotAuthorized, - -5 => PaymentResultCode::NoDestination, - -6 => PaymentResultCode::NoTrust, - -7 => PaymentResultCode::NotAuthorized, - -8 => PaymentResultCode::LineFull, - -9 => PaymentResultCode::NoIssuer, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: PaymentResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for PaymentResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for PaymentResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// PaymentResult is an XDR Union defined as: -/// -/// ```text -/// union PaymentResult switch (PaymentResultCode code) -/// { -/// case PAYMENT_SUCCESS: -/// void; -/// case PAYMENT_MALFORMED: -/// case PAYMENT_UNDERFUNDED: -/// case PAYMENT_SRC_NO_TRUST: -/// case PAYMENT_SRC_NOT_AUTHORIZED: -/// case PAYMENT_NO_DESTINATION: -/// case PAYMENT_NO_TRUST: -/// case PAYMENT_NOT_AUTHORIZED: -/// case PAYMENT_LINE_FULL: -/// case PAYMENT_NO_ISSUER: -/// void; -/// }; -/// ``` -/// -// union with discriminant PaymentResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum PaymentResult { - Success, - Malformed, - Underfunded, - SrcNoTrust, - SrcNotAuthorized, - NoDestination, - NoTrust, - NotAuthorized, - LineFull, - NoIssuer, -} - -#[cfg(feature = "alloc")] -impl Default for PaymentResult { - fn default() -> Self { - Self::Success - } -} - -impl PaymentResult { - const _VARIANTS: &[PaymentResultCode] = &[ - PaymentResultCode::Success, - PaymentResultCode::Malformed, - PaymentResultCode::Underfunded, - PaymentResultCode::SrcNoTrust, - PaymentResultCode::SrcNotAuthorized, - PaymentResultCode::NoDestination, - PaymentResultCode::NoTrust, - PaymentResultCode::NotAuthorized, - PaymentResultCode::LineFull, - PaymentResultCode::NoIssuer, - ]; - pub const VARIANTS: [PaymentResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "Underfunded", - "SrcNoTrust", - "SrcNotAuthorized", - "NoDestination", - "NoTrust", - "NotAuthorized", - "LineFull", - "NoIssuer", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::Underfunded => "Underfunded", - Self::SrcNoTrust => "SrcNoTrust", - Self::SrcNotAuthorized => "SrcNotAuthorized", - Self::NoDestination => "NoDestination", - Self::NoTrust => "NoTrust", - Self::NotAuthorized => "NotAuthorized", - Self::LineFull => "LineFull", - Self::NoIssuer => "NoIssuer", - } - } - - #[must_use] - pub const fn discriminant(&self) -> PaymentResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => PaymentResultCode::Success, - Self::Malformed => PaymentResultCode::Malformed, - Self::Underfunded => PaymentResultCode::Underfunded, - Self::SrcNoTrust => PaymentResultCode::SrcNoTrust, - Self::SrcNotAuthorized => PaymentResultCode::SrcNotAuthorized, - Self::NoDestination => PaymentResultCode::NoDestination, - Self::NoTrust => PaymentResultCode::NoTrust, - Self::NotAuthorized => PaymentResultCode::NotAuthorized, - Self::LineFull => PaymentResultCode::LineFull, - Self::NoIssuer => PaymentResultCode::NoIssuer, - } - } - - #[must_use] - pub const fn variants() -> [PaymentResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for PaymentResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for PaymentResult { - #[must_use] - fn discriminant(&self) -> PaymentResultCode { - Self::discriminant(self) - } -} - -impl Variants for PaymentResult { - fn variants() -> slice::Iter<'static, PaymentResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for PaymentResult {} - -impl ReadXdr for PaymentResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: PaymentResultCode = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - PaymentResultCode::Success => Self::Success, - PaymentResultCode::Malformed => Self::Malformed, - PaymentResultCode::Underfunded => Self::Underfunded, - PaymentResultCode::SrcNoTrust => Self::SrcNoTrust, - PaymentResultCode::SrcNotAuthorized => Self::SrcNotAuthorized, - PaymentResultCode::NoDestination => Self::NoDestination, - PaymentResultCode::NoTrust => Self::NoTrust, - PaymentResultCode::NotAuthorized => Self::NotAuthorized, - PaymentResultCode::LineFull => Self::LineFull, - PaymentResultCode::NoIssuer => Self::NoIssuer, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for PaymentResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::Underfunded => ().write_xdr(w)?, - Self::SrcNoTrust => ().write_xdr(w)?, - Self::SrcNotAuthorized => ().write_xdr(w)?, - Self::NoDestination => ().write_xdr(w)?, - Self::NoTrust => ().write_xdr(w)?, - Self::NotAuthorized => ().write_xdr(w)?, - Self::LineFull => ().write_xdr(w)?, - Self::NoIssuer => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// PathPaymentStrictReceiveResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum PathPaymentStrictReceiveResultCode -/// { -/// // codes considered as "success" for the operation -/// PATH_PAYMENT_STRICT_RECEIVE_SUCCESS = 0, // success -/// -/// // codes considered as "failure" for the operation -/// PATH_PAYMENT_STRICT_RECEIVE_MALFORMED = -1, // bad input -/// PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED = -/// -2, // not enough funds in source account -/// PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST = -/// -3, // no trust line on source account -/// PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED = -/// -4, // source not authorized to transfer -/// PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION = -/// -5, // destination account does not exist -/// PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST = -/// -6, // dest missing a trust line for asset -/// PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED = -/// -7, // dest not authorized to hold asset -/// PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL = -/// -8, // dest would go above their limit -/// PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER = -9, // missing issuer on one asset -/// PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS = -/// -10, // not enough offers to satisfy path -/// PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF = -/// -11, // would cross one of its own offers -/// PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX = -12 // could not satisfy sendmax -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum PathPaymentStrictReceiveResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - Underfunded = -2, - SrcNoTrust = -3, - SrcNotAuthorized = -4, - NoDestination = -5, - NoTrust = -6, - NotAuthorized = -7, - LineFull = -8, - NoIssuer = -9, - TooFewOffers = -10, - OfferCrossSelf = -11, - OverSendmax = -12, -} - -impl PathPaymentStrictReceiveResultCode { - const _VARIANTS: &[PathPaymentStrictReceiveResultCode] = &[ - PathPaymentStrictReceiveResultCode::Success, - PathPaymentStrictReceiveResultCode::Malformed, - PathPaymentStrictReceiveResultCode::Underfunded, - PathPaymentStrictReceiveResultCode::SrcNoTrust, - PathPaymentStrictReceiveResultCode::SrcNotAuthorized, - PathPaymentStrictReceiveResultCode::NoDestination, - PathPaymentStrictReceiveResultCode::NoTrust, - PathPaymentStrictReceiveResultCode::NotAuthorized, - PathPaymentStrictReceiveResultCode::LineFull, - PathPaymentStrictReceiveResultCode::NoIssuer, - PathPaymentStrictReceiveResultCode::TooFewOffers, - PathPaymentStrictReceiveResultCode::OfferCrossSelf, - PathPaymentStrictReceiveResultCode::OverSendmax, - ]; - pub const VARIANTS: [PathPaymentStrictReceiveResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "Underfunded", - "SrcNoTrust", - "SrcNotAuthorized", - "NoDestination", - "NoTrust", - "NotAuthorized", - "LineFull", - "NoIssuer", - "TooFewOffers", - "OfferCrossSelf", - "OverSendmax", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::Underfunded => "Underfunded", - Self::SrcNoTrust => "SrcNoTrust", - Self::SrcNotAuthorized => "SrcNotAuthorized", - Self::NoDestination => "NoDestination", - Self::NoTrust => "NoTrust", - Self::NotAuthorized => "NotAuthorized", - Self::LineFull => "LineFull", - Self::NoIssuer => "NoIssuer", - Self::TooFewOffers => "TooFewOffers", - Self::OfferCrossSelf => "OfferCrossSelf", - Self::OverSendmax => "OverSendmax", - } - } - - #[must_use] - pub const fn variants() -> [PathPaymentStrictReceiveResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for PathPaymentStrictReceiveResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for PathPaymentStrictReceiveResultCode { - fn variants() -> slice::Iter<'static, PathPaymentStrictReceiveResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for PathPaymentStrictReceiveResultCode {} - -impl fmt::Display for PathPaymentStrictReceiveResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for PathPaymentStrictReceiveResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => PathPaymentStrictReceiveResultCode::Success, - -1 => PathPaymentStrictReceiveResultCode::Malformed, - -2 => PathPaymentStrictReceiveResultCode::Underfunded, - -3 => PathPaymentStrictReceiveResultCode::SrcNoTrust, - -4 => PathPaymentStrictReceiveResultCode::SrcNotAuthorized, - -5 => PathPaymentStrictReceiveResultCode::NoDestination, - -6 => PathPaymentStrictReceiveResultCode::NoTrust, - -7 => PathPaymentStrictReceiveResultCode::NotAuthorized, - -8 => PathPaymentStrictReceiveResultCode::LineFull, - -9 => PathPaymentStrictReceiveResultCode::NoIssuer, - -10 => PathPaymentStrictReceiveResultCode::TooFewOffers, - -11 => PathPaymentStrictReceiveResultCode::OfferCrossSelf, - -12 => PathPaymentStrictReceiveResultCode::OverSendmax, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: PathPaymentStrictReceiveResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for PathPaymentStrictReceiveResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for PathPaymentStrictReceiveResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// SimplePaymentResult is an XDR Struct defined as: -/// -/// ```text -/// struct SimplePaymentResult -/// { -/// AccountID destination; -/// Asset asset; -/// int64 amount; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SimplePaymentResult { - pub destination: AccountId, - pub asset: Asset, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount: i64, -} - -impl ReadXdr for SimplePaymentResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - destination: AccountId::read_xdr(r)?, - asset: Asset::read_xdr(r)?, - amount: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SimplePaymentResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.destination.write_xdr(w)?; - self.asset.write_xdr(w)?; - self.amount.write_xdr(w)?; - Ok(()) - }) - } -} - -/// PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// ClaimAtom offers<>; -/// SimplePaymentResult last; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct PathPaymentStrictReceiveResultSuccess { - pub offers: VecM, - pub last: SimplePaymentResult, -} - -impl ReadXdr for PathPaymentStrictReceiveResultSuccess { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - offers: VecM::::read_xdr(r)?, - last: SimplePaymentResult::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for PathPaymentStrictReceiveResultSuccess { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.offers.write_xdr(w)?; - self.last.write_xdr(w)?; - Ok(()) - }) - } -} - -/// PathPaymentStrictReceiveResult is an XDR Union defined as: -/// -/// ```text -/// union PathPaymentStrictReceiveResult switch ( -/// PathPaymentStrictReceiveResultCode code) -/// { -/// case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: -/// struct -/// { -/// ClaimAtom offers<>; -/// SimplePaymentResult last; -/// } success; -/// case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: -/// case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: -/// case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: -/// case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: -/// case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: -/// case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: -/// case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: -/// case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: -/// void; -/// case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: -/// Asset noIssuer; // the asset that caused the error -/// case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: -/// case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: -/// case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: -/// void; -/// }; -/// ``` -/// -// union with discriminant PathPaymentStrictReceiveResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum PathPaymentStrictReceiveResult { - Success(PathPaymentStrictReceiveResultSuccess), - Malformed, - Underfunded, - SrcNoTrust, - SrcNotAuthorized, - NoDestination, - NoTrust, - NotAuthorized, - LineFull, - NoIssuer(Asset), - TooFewOffers, - OfferCrossSelf, - OverSendmax, -} - -#[cfg(feature = "alloc")] -impl Default for PathPaymentStrictReceiveResult { - fn default() -> Self { - Self::Success(PathPaymentStrictReceiveResultSuccess::default()) - } -} - -impl PathPaymentStrictReceiveResult { - const _VARIANTS: &[PathPaymentStrictReceiveResultCode] = &[ - PathPaymentStrictReceiveResultCode::Success, - PathPaymentStrictReceiveResultCode::Malformed, - PathPaymentStrictReceiveResultCode::Underfunded, - PathPaymentStrictReceiveResultCode::SrcNoTrust, - PathPaymentStrictReceiveResultCode::SrcNotAuthorized, - PathPaymentStrictReceiveResultCode::NoDestination, - PathPaymentStrictReceiveResultCode::NoTrust, - PathPaymentStrictReceiveResultCode::NotAuthorized, - PathPaymentStrictReceiveResultCode::LineFull, - PathPaymentStrictReceiveResultCode::NoIssuer, - PathPaymentStrictReceiveResultCode::TooFewOffers, - PathPaymentStrictReceiveResultCode::OfferCrossSelf, - PathPaymentStrictReceiveResultCode::OverSendmax, - ]; - pub const VARIANTS: [PathPaymentStrictReceiveResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "Underfunded", - "SrcNoTrust", - "SrcNotAuthorized", - "NoDestination", - "NoTrust", - "NotAuthorized", - "LineFull", - "NoIssuer", - "TooFewOffers", - "OfferCrossSelf", - "OverSendmax", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success(_) => "Success", - Self::Malformed => "Malformed", - Self::Underfunded => "Underfunded", - Self::SrcNoTrust => "SrcNoTrust", - Self::SrcNotAuthorized => "SrcNotAuthorized", - Self::NoDestination => "NoDestination", - Self::NoTrust => "NoTrust", - Self::NotAuthorized => "NotAuthorized", - Self::LineFull => "LineFull", - Self::NoIssuer(_) => "NoIssuer", - Self::TooFewOffers => "TooFewOffers", - Self::OfferCrossSelf => "OfferCrossSelf", - Self::OverSendmax => "OverSendmax", - } - } - - #[must_use] - pub const fn discriminant(&self) -> PathPaymentStrictReceiveResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success(_) => PathPaymentStrictReceiveResultCode::Success, - Self::Malformed => PathPaymentStrictReceiveResultCode::Malformed, - Self::Underfunded => PathPaymentStrictReceiveResultCode::Underfunded, - Self::SrcNoTrust => PathPaymentStrictReceiveResultCode::SrcNoTrust, - Self::SrcNotAuthorized => PathPaymentStrictReceiveResultCode::SrcNotAuthorized, - Self::NoDestination => PathPaymentStrictReceiveResultCode::NoDestination, - Self::NoTrust => PathPaymentStrictReceiveResultCode::NoTrust, - Self::NotAuthorized => PathPaymentStrictReceiveResultCode::NotAuthorized, - Self::LineFull => PathPaymentStrictReceiveResultCode::LineFull, - Self::NoIssuer(_) => PathPaymentStrictReceiveResultCode::NoIssuer, - Self::TooFewOffers => PathPaymentStrictReceiveResultCode::TooFewOffers, - Self::OfferCrossSelf => PathPaymentStrictReceiveResultCode::OfferCrossSelf, - Self::OverSendmax => PathPaymentStrictReceiveResultCode::OverSendmax, - } - } - - #[must_use] - pub const fn variants() -> [PathPaymentStrictReceiveResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for PathPaymentStrictReceiveResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for PathPaymentStrictReceiveResult { - #[must_use] - fn discriminant(&self) -> PathPaymentStrictReceiveResultCode { - Self::discriminant(self) - } -} - -impl Variants for PathPaymentStrictReceiveResult { - fn variants() -> slice::Iter<'static, PathPaymentStrictReceiveResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for PathPaymentStrictReceiveResult {} - -impl ReadXdr for PathPaymentStrictReceiveResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: PathPaymentStrictReceiveResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - PathPaymentStrictReceiveResultCode::Success => { - Self::Success(PathPaymentStrictReceiveResultSuccess::read_xdr(r)?) - } - PathPaymentStrictReceiveResultCode::Malformed => Self::Malformed, - PathPaymentStrictReceiveResultCode::Underfunded => Self::Underfunded, - PathPaymentStrictReceiveResultCode::SrcNoTrust => Self::SrcNoTrust, - PathPaymentStrictReceiveResultCode::SrcNotAuthorized => Self::SrcNotAuthorized, - PathPaymentStrictReceiveResultCode::NoDestination => Self::NoDestination, - PathPaymentStrictReceiveResultCode::NoTrust => Self::NoTrust, - PathPaymentStrictReceiveResultCode::NotAuthorized => Self::NotAuthorized, - PathPaymentStrictReceiveResultCode::LineFull => Self::LineFull, - PathPaymentStrictReceiveResultCode::NoIssuer => Self::NoIssuer(Asset::read_xdr(r)?), - PathPaymentStrictReceiveResultCode::TooFewOffers => Self::TooFewOffers, - PathPaymentStrictReceiveResultCode::OfferCrossSelf => Self::OfferCrossSelf, - PathPaymentStrictReceiveResultCode::OverSendmax => Self::OverSendmax, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for PathPaymentStrictReceiveResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success(v) => v.write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::Underfunded => ().write_xdr(w)?, - Self::SrcNoTrust => ().write_xdr(w)?, - Self::SrcNotAuthorized => ().write_xdr(w)?, - Self::NoDestination => ().write_xdr(w)?, - Self::NoTrust => ().write_xdr(w)?, - Self::NotAuthorized => ().write_xdr(w)?, - Self::LineFull => ().write_xdr(w)?, - Self::NoIssuer(v) => v.write_xdr(w)?, - Self::TooFewOffers => ().write_xdr(w)?, - Self::OfferCrossSelf => ().write_xdr(w)?, - Self::OverSendmax => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// PathPaymentStrictSendResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum PathPaymentStrictSendResultCode -/// { -/// // codes considered as "success" for the operation -/// PATH_PAYMENT_STRICT_SEND_SUCCESS = 0, // success -/// -/// // codes considered as "failure" for the operation -/// PATH_PAYMENT_STRICT_SEND_MALFORMED = -1, // bad input -/// PATH_PAYMENT_STRICT_SEND_UNDERFUNDED = -/// -2, // not enough funds in source account -/// PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST = -/// -3, // no trust line on source account -/// PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED = -/// -4, // source not authorized to transfer -/// PATH_PAYMENT_STRICT_SEND_NO_DESTINATION = -/// -5, // destination account does not exist -/// PATH_PAYMENT_STRICT_SEND_NO_TRUST = -/// -6, // dest missing a trust line for asset -/// PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED = -/// -7, // dest not authorized to hold asset -/// PATH_PAYMENT_STRICT_SEND_LINE_FULL = -8, // dest would go above their limit -/// PATH_PAYMENT_STRICT_SEND_NO_ISSUER = -9, // missing issuer on one asset -/// PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS = -/// -10, // not enough offers to satisfy path -/// PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF = -/// -11, // would cross one of its own offers -/// PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN = -12 // could not satisfy destMin -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum PathPaymentStrictSendResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - Underfunded = -2, - SrcNoTrust = -3, - SrcNotAuthorized = -4, - NoDestination = -5, - NoTrust = -6, - NotAuthorized = -7, - LineFull = -8, - NoIssuer = -9, - TooFewOffers = -10, - OfferCrossSelf = -11, - UnderDestmin = -12, -} - -impl PathPaymentStrictSendResultCode { - const _VARIANTS: &[PathPaymentStrictSendResultCode] = &[ - PathPaymentStrictSendResultCode::Success, - PathPaymentStrictSendResultCode::Malformed, - PathPaymentStrictSendResultCode::Underfunded, - PathPaymentStrictSendResultCode::SrcNoTrust, - PathPaymentStrictSendResultCode::SrcNotAuthorized, - PathPaymentStrictSendResultCode::NoDestination, - PathPaymentStrictSendResultCode::NoTrust, - PathPaymentStrictSendResultCode::NotAuthorized, - PathPaymentStrictSendResultCode::LineFull, - PathPaymentStrictSendResultCode::NoIssuer, - PathPaymentStrictSendResultCode::TooFewOffers, - PathPaymentStrictSendResultCode::OfferCrossSelf, - PathPaymentStrictSendResultCode::UnderDestmin, - ]; - pub const VARIANTS: [PathPaymentStrictSendResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "Underfunded", - "SrcNoTrust", - "SrcNotAuthorized", - "NoDestination", - "NoTrust", - "NotAuthorized", - "LineFull", - "NoIssuer", - "TooFewOffers", - "OfferCrossSelf", - "UnderDestmin", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::Underfunded => "Underfunded", - Self::SrcNoTrust => "SrcNoTrust", - Self::SrcNotAuthorized => "SrcNotAuthorized", - Self::NoDestination => "NoDestination", - Self::NoTrust => "NoTrust", - Self::NotAuthorized => "NotAuthorized", - Self::LineFull => "LineFull", - Self::NoIssuer => "NoIssuer", - Self::TooFewOffers => "TooFewOffers", - Self::OfferCrossSelf => "OfferCrossSelf", - Self::UnderDestmin => "UnderDestmin", - } - } - - #[must_use] - pub const fn variants() -> [PathPaymentStrictSendResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for PathPaymentStrictSendResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for PathPaymentStrictSendResultCode { - fn variants() -> slice::Iter<'static, PathPaymentStrictSendResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for PathPaymentStrictSendResultCode {} - -impl fmt::Display for PathPaymentStrictSendResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for PathPaymentStrictSendResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => PathPaymentStrictSendResultCode::Success, - -1 => PathPaymentStrictSendResultCode::Malformed, - -2 => PathPaymentStrictSendResultCode::Underfunded, - -3 => PathPaymentStrictSendResultCode::SrcNoTrust, - -4 => PathPaymentStrictSendResultCode::SrcNotAuthorized, - -5 => PathPaymentStrictSendResultCode::NoDestination, - -6 => PathPaymentStrictSendResultCode::NoTrust, - -7 => PathPaymentStrictSendResultCode::NotAuthorized, - -8 => PathPaymentStrictSendResultCode::LineFull, - -9 => PathPaymentStrictSendResultCode::NoIssuer, - -10 => PathPaymentStrictSendResultCode::TooFewOffers, - -11 => PathPaymentStrictSendResultCode::OfferCrossSelf, - -12 => PathPaymentStrictSendResultCode::UnderDestmin, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: PathPaymentStrictSendResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for PathPaymentStrictSendResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for PathPaymentStrictSendResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// ClaimAtom offers<>; -/// SimplePaymentResult last; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct PathPaymentStrictSendResultSuccess { - pub offers: VecM, - pub last: SimplePaymentResult, -} - -impl ReadXdr for PathPaymentStrictSendResultSuccess { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - offers: VecM::::read_xdr(r)?, - last: SimplePaymentResult::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for PathPaymentStrictSendResultSuccess { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.offers.write_xdr(w)?; - self.last.write_xdr(w)?; - Ok(()) - }) - } -} - -/// PathPaymentStrictSendResult is an XDR Union defined as: -/// -/// ```text -/// union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) -/// { -/// case PATH_PAYMENT_STRICT_SEND_SUCCESS: -/// struct -/// { -/// ClaimAtom offers<>; -/// SimplePaymentResult last; -/// } success; -/// case PATH_PAYMENT_STRICT_SEND_MALFORMED: -/// case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: -/// case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: -/// case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: -/// case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: -/// case PATH_PAYMENT_STRICT_SEND_NO_TRUST: -/// case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: -/// case PATH_PAYMENT_STRICT_SEND_LINE_FULL: -/// void; -/// case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: -/// Asset noIssuer; // the asset that caused the error -/// case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: -/// case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: -/// case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: -/// void; -/// }; -/// ``` -/// -// union with discriminant PathPaymentStrictSendResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum PathPaymentStrictSendResult { - Success(PathPaymentStrictSendResultSuccess), - Malformed, - Underfunded, - SrcNoTrust, - SrcNotAuthorized, - NoDestination, - NoTrust, - NotAuthorized, - LineFull, - NoIssuer(Asset), - TooFewOffers, - OfferCrossSelf, - UnderDestmin, -} - -#[cfg(feature = "alloc")] -impl Default for PathPaymentStrictSendResult { - fn default() -> Self { - Self::Success(PathPaymentStrictSendResultSuccess::default()) - } -} - -impl PathPaymentStrictSendResult { - const _VARIANTS: &[PathPaymentStrictSendResultCode] = &[ - PathPaymentStrictSendResultCode::Success, - PathPaymentStrictSendResultCode::Malformed, - PathPaymentStrictSendResultCode::Underfunded, - PathPaymentStrictSendResultCode::SrcNoTrust, - PathPaymentStrictSendResultCode::SrcNotAuthorized, - PathPaymentStrictSendResultCode::NoDestination, - PathPaymentStrictSendResultCode::NoTrust, - PathPaymentStrictSendResultCode::NotAuthorized, - PathPaymentStrictSendResultCode::LineFull, - PathPaymentStrictSendResultCode::NoIssuer, - PathPaymentStrictSendResultCode::TooFewOffers, - PathPaymentStrictSendResultCode::OfferCrossSelf, - PathPaymentStrictSendResultCode::UnderDestmin, - ]; - pub const VARIANTS: [PathPaymentStrictSendResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "Underfunded", - "SrcNoTrust", - "SrcNotAuthorized", - "NoDestination", - "NoTrust", - "NotAuthorized", - "LineFull", - "NoIssuer", - "TooFewOffers", - "OfferCrossSelf", - "UnderDestmin", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success(_) => "Success", - Self::Malformed => "Malformed", - Self::Underfunded => "Underfunded", - Self::SrcNoTrust => "SrcNoTrust", - Self::SrcNotAuthorized => "SrcNotAuthorized", - Self::NoDestination => "NoDestination", - Self::NoTrust => "NoTrust", - Self::NotAuthorized => "NotAuthorized", - Self::LineFull => "LineFull", - Self::NoIssuer(_) => "NoIssuer", - Self::TooFewOffers => "TooFewOffers", - Self::OfferCrossSelf => "OfferCrossSelf", - Self::UnderDestmin => "UnderDestmin", - } - } - - #[must_use] - pub const fn discriminant(&self) -> PathPaymentStrictSendResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success(_) => PathPaymentStrictSendResultCode::Success, - Self::Malformed => PathPaymentStrictSendResultCode::Malformed, - Self::Underfunded => PathPaymentStrictSendResultCode::Underfunded, - Self::SrcNoTrust => PathPaymentStrictSendResultCode::SrcNoTrust, - Self::SrcNotAuthorized => PathPaymentStrictSendResultCode::SrcNotAuthorized, - Self::NoDestination => PathPaymentStrictSendResultCode::NoDestination, - Self::NoTrust => PathPaymentStrictSendResultCode::NoTrust, - Self::NotAuthorized => PathPaymentStrictSendResultCode::NotAuthorized, - Self::LineFull => PathPaymentStrictSendResultCode::LineFull, - Self::NoIssuer(_) => PathPaymentStrictSendResultCode::NoIssuer, - Self::TooFewOffers => PathPaymentStrictSendResultCode::TooFewOffers, - Self::OfferCrossSelf => PathPaymentStrictSendResultCode::OfferCrossSelf, - Self::UnderDestmin => PathPaymentStrictSendResultCode::UnderDestmin, - } - } - - #[must_use] - pub const fn variants() -> [PathPaymentStrictSendResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for PathPaymentStrictSendResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for PathPaymentStrictSendResult { - #[must_use] - fn discriminant(&self) -> PathPaymentStrictSendResultCode { - Self::discriminant(self) - } -} - -impl Variants for PathPaymentStrictSendResult { - fn variants() -> slice::Iter<'static, PathPaymentStrictSendResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for PathPaymentStrictSendResult {} - -impl ReadXdr for PathPaymentStrictSendResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: PathPaymentStrictSendResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - PathPaymentStrictSendResultCode::Success => { - Self::Success(PathPaymentStrictSendResultSuccess::read_xdr(r)?) - } - PathPaymentStrictSendResultCode::Malformed => Self::Malformed, - PathPaymentStrictSendResultCode::Underfunded => Self::Underfunded, - PathPaymentStrictSendResultCode::SrcNoTrust => Self::SrcNoTrust, - PathPaymentStrictSendResultCode::SrcNotAuthorized => Self::SrcNotAuthorized, - PathPaymentStrictSendResultCode::NoDestination => Self::NoDestination, - PathPaymentStrictSendResultCode::NoTrust => Self::NoTrust, - PathPaymentStrictSendResultCode::NotAuthorized => Self::NotAuthorized, - PathPaymentStrictSendResultCode::LineFull => Self::LineFull, - PathPaymentStrictSendResultCode::NoIssuer => Self::NoIssuer(Asset::read_xdr(r)?), - PathPaymentStrictSendResultCode::TooFewOffers => Self::TooFewOffers, - PathPaymentStrictSendResultCode::OfferCrossSelf => Self::OfferCrossSelf, - PathPaymentStrictSendResultCode::UnderDestmin => Self::UnderDestmin, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for PathPaymentStrictSendResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success(v) => v.write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::Underfunded => ().write_xdr(w)?, - Self::SrcNoTrust => ().write_xdr(w)?, - Self::SrcNotAuthorized => ().write_xdr(w)?, - Self::NoDestination => ().write_xdr(w)?, - Self::NoTrust => ().write_xdr(w)?, - Self::NotAuthorized => ().write_xdr(w)?, - Self::LineFull => ().write_xdr(w)?, - Self::NoIssuer(v) => v.write_xdr(w)?, - Self::TooFewOffers => ().write_xdr(w)?, - Self::OfferCrossSelf => ().write_xdr(w)?, - Self::UnderDestmin => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ManageSellOfferResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum ManageSellOfferResultCode -/// { -/// // codes considered as "success" for the operation -/// MANAGE_SELL_OFFER_SUCCESS = 0, -/// -/// // codes considered as "failure" for the operation -/// MANAGE_SELL_OFFER_MALFORMED = -1, // generated offer would be invalid -/// MANAGE_SELL_OFFER_SELL_NO_TRUST = -/// -2, // no trust line for what we're selling -/// MANAGE_SELL_OFFER_BUY_NO_TRUST = -3, // no trust line for what we're buying -/// MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell -/// MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED = -5, // not authorized to buy -/// MANAGE_SELL_OFFER_LINE_FULL = -6, // can't receive more of what it's buying -/// MANAGE_SELL_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell -/// MANAGE_SELL_OFFER_CROSS_SELF = -/// -8, // would cross an offer from the same user -/// MANAGE_SELL_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling -/// MANAGE_SELL_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying -/// -/// // update errors -/// MANAGE_SELL_OFFER_NOT_FOUND = -/// -11, // offerID does not match an existing offer -/// -/// MANAGE_SELL_OFFER_LOW_RESERVE = -/// -12 // not enough funds to create a new Offer -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ManageSellOfferResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - SellNoTrust = -2, - BuyNoTrust = -3, - SellNotAuthorized = -4, - BuyNotAuthorized = -5, - LineFull = -6, - Underfunded = -7, - CrossSelf = -8, - SellNoIssuer = -9, - BuyNoIssuer = -10, - NotFound = -11, - LowReserve = -12, -} - -impl ManageSellOfferResultCode { - const _VARIANTS: &[ManageSellOfferResultCode] = &[ - ManageSellOfferResultCode::Success, - ManageSellOfferResultCode::Malformed, - ManageSellOfferResultCode::SellNoTrust, - ManageSellOfferResultCode::BuyNoTrust, - ManageSellOfferResultCode::SellNotAuthorized, - ManageSellOfferResultCode::BuyNotAuthorized, - ManageSellOfferResultCode::LineFull, - ManageSellOfferResultCode::Underfunded, - ManageSellOfferResultCode::CrossSelf, - ManageSellOfferResultCode::SellNoIssuer, - ManageSellOfferResultCode::BuyNoIssuer, - ManageSellOfferResultCode::NotFound, - ManageSellOfferResultCode::LowReserve, - ]; - pub const VARIANTS: [ManageSellOfferResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "SellNoTrust", - "BuyNoTrust", - "SellNotAuthorized", - "BuyNotAuthorized", - "LineFull", - "Underfunded", - "CrossSelf", - "SellNoIssuer", - "BuyNoIssuer", - "NotFound", - "LowReserve", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::SellNoTrust => "SellNoTrust", - Self::BuyNoTrust => "BuyNoTrust", - Self::SellNotAuthorized => "SellNotAuthorized", - Self::BuyNotAuthorized => "BuyNotAuthorized", - Self::LineFull => "LineFull", - Self::Underfunded => "Underfunded", - Self::CrossSelf => "CrossSelf", - Self::SellNoIssuer => "SellNoIssuer", - Self::BuyNoIssuer => "BuyNoIssuer", - Self::NotFound => "NotFound", - Self::LowReserve => "LowReserve", - } - } - - #[must_use] - pub const fn variants() -> [ManageSellOfferResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ManageSellOfferResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ManageSellOfferResultCode { - fn variants() -> slice::Iter<'static, ManageSellOfferResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for ManageSellOfferResultCode {} - -impl fmt::Display for ManageSellOfferResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ManageSellOfferResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ManageSellOfferResultCode::Success, - -1 => ManageSellOfferResultCode::Malformed, - -2 => ManageSellOfferResultCode::SellNoTrust, - -3 => ManageSellOfferResultCode::BuyNoTrust, - -4 => ManageSellOfferResultCode::SellNotAuthorized, - -5 => ManageSellOfferResultCode::BuyNotAuthorized, - -6 => ManageSellOfferResultCode::LineFull, - -7 => ManageSellOfferResultCode::Underfunded, - -8 => ManageSellOfferResultCode::CrossSelf, - -9 => ManageSellOfferResultCode::SellNoIssuer, - -10 => ManageSellOfferResultCode::BuyNoIssuer, - -11 => ManageSellOfferResultCode::NotFound, - -12 => ManageSellOfferResultCode::LowReserve, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ManageSellOfferResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for ManageSellOfferResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ManageSellOfferResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ManageOfferEffect is an XDR Enum defined as: -/// -/// ```text -/// enum ManageOfferEffect -/// { -/// MANAGE_OFFER_CREATED = 0, -/// MANAGE_OFFER_UPDATED = 1, -/// MANAGE_OFFER_DELETED = 2 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ManageOfferEffect { - #[cfg_attr(feature = "alloc", default)] - Created = 0, - Updated = 1, - Deleted = 2, -} - -impl ManageOfferEffect { - const _VARIANTS: &[ManageOfferEffect] = &[ - ManageOfferEffect::Created, - ManageOfferEffect::Updated, - ManageOfferEffect::Deleted, - ]; - pub const VARIANTS: [ManageOfferEffect; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Deleted"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Created => "Created", - Self::Updated => "Updated", - Self::Deleted => "Deleted", - } - } - - #[must_use] - pub const fn variants() -> [ManageOfferEffect; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ManageOfferEffect { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ManageOfferEffect { - fn variants() -> slice::Iter<'static, ManageOfferEffect> { - Self::VARIANTS.iter() - } -} - -impl Enum for ManageOfferEffect {} - -impl fmt::Display for ManageOfferEffect { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ManageOfferEffect { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ManageOfferEffect::Created, - 1 => ManageOfferEffect::Updated, - 2 => ManageOfferEffect::Deleted, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ManageOfferEffect) -> Self { - e as Self - } -} - -impl ReadXdr for ManageOfferEffect { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ManageOfferEffect { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ManageOfferSuccessResultOffer is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (ManageOfferEffect effect) -/// { -/// case MANAGE_OFFER_CREATED: -/// case MANAGE_OFFER_UPDATED: -/// OfferEntry offer; -/// case MANAGE_OFFER_DELETED: -/// void; -/// } -/// ``` -/// -// union with discriminant ManageOfferEffect -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ManageOfferSuccessResultOffer { - Created(OfferEntry), - Updated(OfferEntry), - Deleted, -} - -#[cfg(feature = "alloc")] -impl Default for ManageOfferSuccessResultOffer { - fn default() -> Self { - Self::Created(OfferEntry::default()) - } -} - -impl ManageOfferSuccessResultOffer { - const _VARIANTS: &[ManageOfferEffect] = &[ - ManageOfferEffect::Created, - ManageOfferEffect::Updated, - ManageOfferEffect::Deleted, - ]; - pub const VARIANTS: [ManageOfferEffect; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Created", "Updated", "Deleted"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Created(_) => "Created", - Self::Updated(_) => "Updated", - Self::Deleted => "Deleted", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ManageOfferEffect { - #[allow(clippy::match_same_arms)] - match self { - Self::Created(_) => ManageOfferEffect::Created, - Self::Updated(_) => ManageOfferEffect::Updated, - Self::Deleted => ManageOfferEffect::Deleted, - } - } - - #[must_use] - pub const fn variants() -> [ManageOfferEffect; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ManageOfferSuccessResultOffer { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ManageOfferSuccessResultOffer { - #[must_use] - fn discriminant(&self) -> ManageOfferEffect { - Self::discriminant(self) - } -} - -impl Variants for ManageOfferSuccessResultOffer { - fn variants() -> slice::Iter<'static, ManageOfferEffect> { - Self::VARIANTS.iter() - } -} - -impl Union for ManageOfferSuccessResultOffer {} - -impl ReadXdr for ManageOfferSuccessResultOffer { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ManageOfferEffect = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ManageOfferEffect::Created => Self::Created(OfferEntry::read_xdr(r)?), - ManageOfferEffect::Updated => Self::Updated(OfferEntry::read_xdr(r)?), - ManageOfferEffect::Deleted => Self::Deleted, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ManageOfferSuccessResultOffer { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Created(v) => v.write_xdr(w)?, - Self::Updated(v) => v.write_xdr(w)?, - Self::Deleted => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ManageOfferSuccessResult is an XDR Struct defined as: -/// -/// ```text -/// struct ManageOfferSuccessResult -/// { -/// // offers that got claimed while creating this offer -/// ClaimAtom offersClaimed<>; -/// -/// union switch (ManageOfferEffect effect) -/// { -/// case MANAGE_OFFER_CREATED: -/// case MANAGE_OFFER_UPDATED: -/// OfferEntry offer; -/// case MANAGE_OFFER_DELETED: -/// void; -/// } -/// offer; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ManageOfferSuccessResult { - pub offers_claimed: VecM, - pub offer: ManageOfferSuccessResultOffer, -} - -impl ReadXdr for ManageOfferSuccessResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - offers_claimed: VecM::::read_xdr(r)?, - offer: ManageOfferSuccessResultOffer::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ManageOfferSuccessResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.offers_claimed.write_xdr(w)?; - self.offer.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ManageSellOfferResult is an XDR Union defined as: -/// -/// ```text -/// union ManageSellOfferResult switch (ManageSellOfferResultCode code) -/// { -/// case MANAGE_SELL_OFFER_SUCCESS: -/// ManageOfferSuccessResult success; -/// case MANAGE_SELL_OFFER_MALFORMED: -/// case MANAGE_SELL_OFFER_SELL_NO_TRUST: -/// case MANAGE_SELL_OFFER_BUY_NO_TRUST: -/// case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: -/// case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: -/// case MANAGE_SELL_OFFER_LINE_FULL: -/// case MANAGE_SELL_OFFER_UNDERFUNDED: -/// case MANAGE_SELL_OFFER_CROSS_SELF: -/// case MANAGE_SELL_OFFER_SELL_NO_ISSUER: -/// case MANAGE_SELL_OFFER_BUY_NO_ISSUER: -/// case MANAGE_SELL_OFFER_NOT_FOUND: -/// case MANAGE_SELL_OFFER_LOW_RESERVE: -/// void; -/// }; -/// ``` -/// -// union with discriminant ManageSellOfferResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ManageSellOfferResult { - Success(ManageOfferSuccessResult), - Malformed, - SellNoTrust, - BuyNoTrust, - SellNotAuthorized, - BuyNotAuthorized, - LineFull, - Underfunded, - CrossSelf, - SellNoIssuer, - BuyNoIssuer, - NotFound, - LowReserve, -} - -#[cfg(feature = "alloc")] -impl Default for ManageSellOfferResult { - fn default() -> Self { - Self::Success(ManageOfferSuccessResult::default()) - } -} - -impl ManageSellOfferResult { - const _VARIANTS: &[ManageSellOfferResultCode] = &[ - ManageSellOfferResultCode::Success, - ManageSellOfferResultCode::Malformed, - ManageSellOfferResultCode::SellNoTrust, - ManageSellOfferResultCode::BuyNoTrust, - ManageSellOfferResultCode::SellNotAuthorized, - ManageSellOfferResultCode::BuyNotAuthorized, - ManageSellOfferResultCode::LineFull, - ManageSellOfferResultCode::Underfunded, - ManageSellOfferResultCode::CrossSelf, - ManageSellOfferResultCode::SellNoIssuer, - ManageSellOfferResultCode::BuyNoIssuer, - ManageSellOfferResultCode::NotFound, - ManageSellOfferResultCode::LowReserve, - ]; - pub const VARIANTS: [ManageSellOfferResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "SellNoTrust", - "BuyNoTrust", - "SellNotAuthorized", - "BuyNotAuthorized", - "LineFull", - "Underfunded", - "CrossSelf", - "SellNoIssuer", - "BuyNoIssuer", - "NotFound", - "LowReserve", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success(_) => "Success", - Self::Malformed => "Malformed", - Self::SellNoTrust => "SellNoTrust", - Self::BuyNoTrust => "BuyNoTrust", - Self::SellNotAuthorized => "SellNotAuthorized", - Self::BuyNotAuthorized => "BuyNotAuthorized", - Self::LineFull => "LineFull", - Self::Underfunded => "Underfunded", - Self::CrossSelf => "CrossSelf", - Self::SellNoIssuer => "SellNoIssuer", - Self::BuyNoIssuer => "BuyNoIssuer", - Self::NotFound => "NotFound", - Self::LowReserve => "LowReserve", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ManageSellOfferResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success(_) => ManageSellOfferResultCode::Success, - Self::Malformed => ManageSellOfferResultCode::Malformed, - Self::SellNoTrust => ManageSellOfferResultCode::SellNoTrust, - Self::BuyNoTrust => ManageSellOfferResultCode::BuyNoTrust, - Self::SellNotAuthorized => ManageSellOfferResultCode::SellNotAuthorized, - Self::BuyNotAuthorized => ManageSellOfferResultCode::BuyNotAuthorized, - Self::LineFull => ManageSellOfferResultCode::LineFull, - Self::Underfunded => ManageSellOfferResultCode::Underfunded, - Self::CrossSelf => ManageSellOfferResultCode::CrossSelf, - Self::SellNoIssuer => ManageSellOfferResultCode::SellNoIssuer, - Self::BuyNoIssuer => ManageSellOfferResultCode::BuyNoIssuer, - Self::NotFound => ManageSellOfferResultCode::NotFound, - Self::LowReserve => ManageSellOfferResultCode::LowReserve, - } - } - - #[must_use] - pub const fn variants() -> [ManageSellOfferResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ManageSellOfferResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ManageSellOfferResult { - #[must_use] - fn discriminant(&self) -> ManageSellOfferResultCode { - Self::discriminant(self) - } -} - -impl Variants for ManageSellOfferResult { - fn variants() -> slice::Iter<'static, ManageSellOfferResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for ManageSellOfferResult {} - -impl ReadXdr for ManageSellOfferResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ManageSellOfferResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ManageSellOfferResultCode::Success => { - Self::Success(ManageOfferSuccessResult::read_xdr(r)?) - } - ManageSellOfferResultCode::Malformed => Self::Malformed, - ManageSellOfferResultCode::SellNoTrust => Self::SellNoTrust, - ManageSellOfferResultCode::BuyNoTrust => Self::BuyNoTrust, - ManageSellOfferResultCode::SellNotAuthorized => Self::SellNotAuthorized, - ManageSellOfferResultCode::BuyNotAuthorized => Self::BuyNotAuthorized, - ManageSellOfferResultCode::LineFull => Self::LineFull, - ManageSellOfferResultCode::Underfunded => Self::Underfunded, - ManageSellOfferResultCode::CrossSelf => Self::CrossSelf, - ManageSellOfferResultCode::SellNoIssuer => Self::SellNoIssuer, - ManageSellOfferResultCode::BuyNoIssuer => Self::BuyNoIssuer, - ManageSellOfferResultCode::NotFound => Self::NotFound, - ManageSellOfferResultCode::LowReserve => Self::LowReserve, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ManageSellOfferResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success(v) => v.write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::SellNoTrust => ().write_xdr(w)?, - Self::BuyNoTrust => ().write_xdr(w)?, - Self::SellNotAuthorized => ().write_xdr(w)?, - Self::BuyNotAuthorized => ().write_xdr(w)?, - Self::LineFull => ().write_xdr(w)?, - Self::Underfunded => ().write_xdr(w)?, - Self::CrossSelf => ().write_xdr(w)?, - Self::SellNoIssuer => ().write_xdr(w)?, - Self::BuyNoIssuer => ().write_xdr(w)?, - Self::NotFound => ().write_xdr(w)?, - Self::LowReserve => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ManageBuyOfferResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum ManageBuyOfferResultCode -/// { -/// // codes considered as "success" for the operation -/// MANAGE_BUY_OFFER_SUCCESS = 0, -/// -/// // codes considered as "failure" for the operation -/// MANAGE_BUY_OFFER_MALFORMED = -1, // generated offer would be invalid -/// MANAGE_BUY_OFFER_SELL_NO_TRUST = -2, // no trust line for what we're selling -/// MANAGE_BUY_OFFER_BUY_NO_TRUST = -3, // no trust line for what we're buying -/// MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell -/// MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED = -5, // not authorized to buy -/// MANAGE_BUY_OFFER_LINE_FULL = -6, // can't receive more of what it's buying -/// MANAGE_BUY_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell -/// MANAGE_BUY_OFFER_CROSS_SELF = -8, // would cross an offer from the same user -/// MANAGE_BUY_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling -/// MANAGE_BUY_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying -/// -/// // update errors -/// MANAGE_BUY_OFFER_NOT_FOUND = -/// -11, // offerID does not match an existing offer -/// -/// MANAGE_BUY_OFFER_LOW_RESERVE = -12 // not enough funds to create a new Offer -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ManageBuyOfferResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - SellNoTrust = -2, - BuyNoTrust = -3, - SellNotAuthorized = -4, - BuyNotAuthorized = -5, - LineFull = -6, - Underfunded = -7, - CrossSelf = -8, - SellNoIssuer = -9, - BuyNoIssuer = -10, - NotFound = -11, - LowReserve = -12, -} - -impl ManageBuyOfferResultCode { - const _VARIANTS: &[ManageBuyOfferResultCode] = &[ - ManageBuyOfferResultCode::Success, - ManageBuyOfferResultCode::Malformed, - ManageBuyOfferResultCode::SellNoTrust, - ManageBuyOfferResultCode::BuyNoTrust, - ManageBuyOfferResultCode::SellNotAuthorized, - ManageBuyOfferResultCode::BuyNotAuthorized, - ManageBuyOfferResultCode::LineFull, - ManageBuyOfferResultCode::Underfunded, - ManageBuyOfferResultCode::CrossSelf, - ManageBuyOfferResultCode::SellNoIssuer, - ManageBuyOfferResultCode::BuyNoIssuer, - ManageBuyOfferResultCode::NotFound, - ManageBuyOfferResultCode::LowReserve, - ]; - pub const VARIANTS: [ManageBuyOfferResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "SellNoTrust", - "BuyNoTrust", - "SellNotAuthorized", - "BuyNotAuthorized", - "LineFull", - "Underfunded", - "CrossSelf", - "SellNoIssuer", - "BuyNoIssuer", - "NotFound", - "LowReserve", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::SellNoTrust => "SellNoTrust", - Self::BuyNoTrust => "BuyNoTrust", - Self::SellNotAuthorized => "SellNotAuthorized", - Self::BuyNotAuthorized => "BuyNotAuthorized", - Self::LineFull => "LineFull", - Self::Underfunded => "Underfunded", - Self::CrossSelf => "CrossSelf", - Self::SellNoIssuer => "SellNoIssuer", - Self::BuyNoIssuer => "BuyNoIssuer", - Self::NotFound => "NotFound", - Self::LowReserve => "LowReserve", - } - } - - #[must_use] - pub const fn variants() -> [ManageBuyOfferResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ManageBuyOfferResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ManageBuyOfferResultCode { - fn variants() -> slice::Iter<'static, ManageBuyOfferResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for ManageBuyOfferResultCode {} - -impl fmt::Display for ManageBuyOfferResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ManageBuyOfferResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ManageBuyOfferResultCode::Success, - -1 => ManageBuyOfferResultCode::Malformed, - -2 => ManageBuyOfferResultCode::SellNoTrust, - -3 => ManageBuyOfferResultCode::BuyNoTrust, - -4 => ManageBuyOfferResultCode::SellNotAuthorized, - -5 => ManageBuyOfferResultCode::BuyNotAuthorized, - -6 => ManageBuyOfferResultCode::LineFull, - -7 => ManageBuyOfferResultCode::Underfunded, - -8 => ManageBuyOfferResultCode::CrossSelf, - -9 => ManageBuyOfferResultCode::SellNoIssuer, - -10 => ManageBuyOfferResultCode::BuyNoIssuer, - -11 => ManageBuyOfferResultCode::NotFound, - -12 => ManageBuyOfferResultCode::LowReserve, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ManageBuyOfferResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for ManageBuyOfferResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ManageBuyOfferResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ManageBuyOfferResult is an XDR Union defined as: -/// -/// ```text -/// union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) -/// { -/// case MANAGE_BUY_OFFER_SUCCESS: -/// ManageOfferSuccessResult success; -/// case MANAGE_BUY_OFFER_MALFORMED: -/// case MANAGE_BUY_OFFER_SELL_NO_TRUST: -/// case MANAGE_BUY_OFFER_BUY_NO_TRUST: -/// case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: -/// case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: -/// case MANAGE_BUY_OFFER_LINE_FULL: -/// case MANAGE_BUY_OFFER_UNDERFUNDED: -/// case MANAGE_BUY_OFFER_CROSS_SELF: -/// case MANAGE_BUY_OFFER_SELL_NO_ISSUER: -/// case MANAGE_BUY_OFFER_BUY_NO_ISSUER: -/// case MANAGE_BUY_OFFER_NOT_FOUND: -/// case MANAGE_BUY_OFFER_LOW_RESERVE: -/// void; -/// }; -/// ``` -/// -// union with discriminant ManageBuyOfferResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ManageBuyOfferResult { - Success(ManageOfferSuccessResult), - Malformed, - SellNoTrust, - BuyNoTrust, - SellNotAuthorized, - BuyNotAuthorized, - LineFull, - Underfunded, - CrossSelf, - SellNoIssuer, - BuyNoIssuer, - NotFound, - LowReserve, -} - -#[cfg(feature = "alloc")] -impl Default for ManageBuyOfferResult { - fn default() -> Self { - Self::Success(ManageOfferSuccessResult::default()) - } -} - -impl ManageBuyOfferResult { - const _VARIANTS: &[ManageBuyOfferResultCode] = &[ - ManageBuyOfferResultCode::Success, - ManageBuyOfferResultCode::Malformed, - ManageBuyOfferResultCode::SellNoTrust, - ManageBuyOfferResultCode::BuyNoTrust, - ManageBuyOfferResultCode::SellNotAuthorized, - ManageBuyOfferResultCode::BuyNotAuthorized, - ManageBuyOfferResultCode::LineFull, - ManageBuyOfferResultCode::Underfunded, - ManageBuyOfferResultCode::CrossSelf, - ManageBuyOfferResultCode::SellNoIssuer, - ManageBuyOfferResultCode::BuyNoIssuer, - ManageBuyOfferResultCode::NotFound, - ManageBuyOfferResultCode::LowReserve, - ]; - pub const VARIANTS: [ManageBuyOfferResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "SellNoTrust", - "BuyNoTrust", - "SellNotAuthorized", - "BuyNotAuthorized", - "LineFull", - "Underfunded", - "CrossSelf", - "SellNoIssuer", - "BuyNoIssuer", - "NotFound", - "LowReserve", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success(_) => "Success", - Self::Malformed => "Malformed", - Self::SellNoTrust => "SellNoTrust", - Self::BuyNoTrust => "BuyNoTrust", - Self::SellNotAuthorized => "SellNotAuthorized", - Self::BuyNotAuthorized => "BuyNotAuthorized", - Self::LineFull => "LineFull", - Self::Underfunded => "Underfunded", - Self::CrossSelf => "CrossSelf", - Self::SellNoIssuer => "SellNoIssuer", - Self::BuyNoIssuer => "BuyNoIssuer", - Self::NotFound => "NotFound", - Self::LowReserve => "LowReserve", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ManageBuyOfferResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success(_) => ManageBuyOfferResultCode::Success, - Self::Malformed => ManageBuyOfferResultCode::Malformed, - Self::SellNoTrust => ManageBuyOfferResultCode::SellNoTrust, - Self::BuyNoTrust => ManageBuyOfferResultCode::BuyNoTrust, - Self::SellNotAuthorized => ManageBuyOfferResultCode::SellNotAuthorized, - Self::BuyNotAuthorized => ManageBuyOfferResultCode::BuyNotAuthorized, - Self::LineFull => ManageBuyOfferResultCode::LineFull, - Self::Underfunded => ManageBuyOfferResultCode::Underfunded, - Self::CrossSelf => ManageBuyOfferResultCode::CrossSelf, - Self::SellNoIssuer => ManageBuyOfferResultCode::SellNoIssuer, - Self::BuyNoIssuer => ManageBuyOfferResultCode::BuyNoIssuer, - Self::NotFound => ManageBuyOfferResultCode::NotFound, - Self::LowReserve => ManageBuyOfferResultCode::LowReserve, - } - } - - #[must_use] - pub const fn variants() -> [ManageBuyOfferResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ManageBuyOfferResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ManageBuyOfferResult { - #[must_use] - fn discriminant(&self) -> ManageBuyOfferResultCode { - Self::discriminant(self) - } -} - -impl Variants for ManageBuyOfferResult { - fn variants() -> slice::Iter<'static, ManageBuyOfferResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for ManageBuyOfferResult {} - -impl ReadXdr for ManageBuyOfferResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ManageBuyOfferResultCode = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ManageBuyOfferResultCode::Success => { - Self::Success(ManageOfferSuccessResult::read_xdr(r)?) - } - ManageBuyOfferResultCode::Malformed => Self::Malformed, - ManageBuyOfferResultCode::SellNoTrust => Self::SellNoTrust, - ManageBuyOfferResultCode::BuyNoTrust => Self::BuyNoTrust, - ManageBuyOfferResultCode::SellNotAuthorized => Self::SellNotAuthorized, - ManageBuyOfferResultCode::BuyNotAuthorized => Self::BuyNotAuthorized, - ManageBuyOfferResultCode::LineFull => Self::LineFull, - ManageBuyOfferResultCode::Underfunded => Self::Underfunded, - ManageBuyOfferResultCode::CrossSelf => Self::CrossSelf, - ManageBuyOfferResultCode::SellNoIssuer => Self::SellNoIssuer, - ManageBuyOfferResultCode::BuyNoIssuer => Self::BuyNoIssuer, - ManageBuyOfferResultCode::NotFound => Self::NotFound, - ManageBuyOfferResultCode::LowReserve => Self::LowReserve, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ManageBuyOfferResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success(v) => v.write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::SellNoTrust => ().write_xdr(w)?, - Self::BuyNoTrust => ().write_xdr(w)?, - Self::SellNotAuthorized => ().write_xdr(w)?, - Self::BuyNotAuthorized => ().write_xdr(w)?, - Self::LineFull => ().write_xdr(w)?, - Self::Underfunded => ().write_xdr(w)?, - Self::CrossSelf => ().write_xdr(w)?, - Self::SellNoIssuer => ().write_xdr(w)?, - Self::BuyNoIssuer => ().write_xdr(w)?, - Self::NotFound => ().write_xdr(w)?, - Self::LowReserve => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// SetOptionsResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum SetOptionsResultCode -/// { -/// // codes considered as "success" for the operation -/// SET_OPTIONS_SUCCESS = 0, -/// // codes considered as "failure" for the operation -/// SET_OPTIONS_LOW_RESERVE = -1, // not enough funds to add a signer -/// SET_OPTIONS_TOO_MANY_SIGNERS = -2, // max number of signers already reached -/// SET_OPTIONS_BAD_FLAGS = -3, // invalid combination of clear/set flags -/// SET_OPTIONS_INVALID_INFLATION = -4, // inflation account does not exist -/// SET_OPTIONS_CANT_CHANGE = -5, // can no longer change this option -/// SET_OPTIONS_UNKNOWN_FLAG = -6, // can't set an unknown flag -/// SET_OPTIONS_THRESHOLD_OUT_OF_RANGE = -7, // bad value for weight/threshold -/// SET_OPTIONS_BAD_SIGNER = -8, // signer cannot be masterkey -/// SET_OPTIONS_INVALID_HOME_DOMAIN = -9, // malformed home domain -/// SET_OPTIONS_AUTH_REVOCABLE_REQUIRED = -/// -10 // auth revocable is required for clawback -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum SetOptionsResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - LowReserve = -1, - TooManySigners = -2, - BadFlags = -3, - InvalidInflation = -4, - CantChange = -5, - UnknownFlag = -6, - ThresholdOutOfRange = -7, - BadSigner = -8, - InvalidHomeDomain = -9, - AuthRevocableRequired = -10, -} - -impl SetOptionsResultCode { - const _VARIANTS: &[SetOptionsResultCode] = &[ - SetOptionsResultCode::Success, - SetOptionsResultCode::LowReserve, - SetOptionsResultCode::TooManySigners, - SetOptionsResultCode::BadFlags, - SetOptionsResultCode::InvalidInflation, - SetOptionsResultCode::CantChange, - SetOptionsResultCode::UnknownFlag, - SetOptionsResultCode::ThresholdOutOfRange, - SetOptionsResultCode::BadSigner, - SetOptionsResultCode::InvalidHomeDomain, - SetOptionsResultCode::AuthRevocableRequired, - ]; - pub const VARIANTS: [SetOptionsResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "LowReserve", - "TooManySigners", - "BadFlags", - "InvalidInflation", - "CantChange", - "UnknownFlag", - "ThresholdOutOfRange", - "BadSigner", - "InvalidHomeDomain", - "AuthRevocableRequired", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::LowReserve => "LowReserve", - Self::TooManySigners => "TooManySigners", - Self::BadFlags => "BadFlags", - Self::InvalidInflation => "InvalidInflation", - Self::CantChange => "CantChange", - Self::UnknownFlag => "UnknownFlag", - Self::ThresholdOutOfRange => "ThresholdOutOfRange", - Self::BadSigner => "BadSigner", - Self::InvalidHomeDomain => "InvalidHomeDomain", - Self::AuthRevocableRequired => "AuthRevocableRequired", - } - } - - #[must_use] - pub const fn variants() -> [SetOptionsResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SetOptionsResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for SetOptionsResultCode { - fn variants() -> slice::Iter<'static, SetOptionsResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for SetOptionsResultCode {} - -impl fmt::Display for SetOptionsResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for SetOptionsResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => SetOptionsResultCode::Success, - -1 => SetOptionsResultCode::LowReserve, - -2 => SetOptionsResultCode::TooManySigners, - -3 => SetOptionsResultCode::BadFlags, - -4 => SetOptionsResultCode::InvalidInflation, - -5 => SetOptionsResultCode::CantChange, - -6 => SetOptionsResultCode::UnknownFlag, - -7 => SetOptionsResultCode::ThresholdOutOfRange, - -8 => SetOptionsResultCode::BadSigner, - -9 => SetOptionsResultCode::InvalidHomeDomain, - -10 => SetOptionsResultCode::AuthRevocableRequired, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: SetOptionsResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for SetOptionsResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for SetOptionsResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// SetOptionsResult is an XDR Union defined as: -/// -/// ```text -/// union SetOptionsResult switch (SetOptionsResultCode code) -/// { -/// case SET_OPTIONS_SUCCESS: -/// void; -/// case SET_OPTIONS_LOW_RESERVE: -/// case SET_OPTIONS_TOO_MANY_SIGNERS: -/// case SET_OPTIONS_BAD_FLAGS: -/// case SET_OPTIONS_INVALID_INFLATION: -/// case SET_OPTIONS_CANT_CHANGE: -/// case SET_OPTIONS_UNKNOWN_FLAG: -/// case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: -/// case SET_OPTIONS_BAD_SIGNER: -/// case SET_OPTIONS_INVALID_HOME_DOMAIN: -/// case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: -/// void; -/// }; -/// ``` -/// -// union with discriminant SetOptionsResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum SetOptionsResult { - Success, - LowReserve, - TooManySigners, - BadFlags, - InvalidInflation, - CantChange, - UnknownFlag, - ThresholdOutOfRange, - BadSigner, - InvalidHomeDomain, - AuthRevocableRequired, -} - -#[cfg(feature = "alloc")] -impl Default for SetOptionsResult { - fn default() -> Self { - Self::Success - } -} - -impl SetOptionsResult { - const _VARIANTS: &[SetOptionsResultCode] = &[ - SetOptionsResultCode::Success, - SetOptionsResultCode::LowReserve, - SetOptionsResultCode::TooManySigners, - SetOptionsResultCode::BadFlags, - SetOptionsResultCode::InvalidInflation, - SetOptionsResultCode::CantChange, - SetOptionsResultCode::UnknownFlag, - SetOptionsResultCode::ThresholdOutOfRange, - SetOptionsResultCode::BadSigner, - SetOptionsResultCode::InvalidHomeDomain, - SetOptionsResultCode::AuthRevocableRequired, - ]; - pub const VARIANTS: [SetOptionsResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "LowReserve", - "TooManySigners", - "BadFlags", - "InvalidInflation", - "CantChange", - "UnknownFlag", - "ThresholdOutOfRange", - "BadSigner", - "InvalidHomeDomain", - "AuthRevocableRequired", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::LowReserve => "LowReserve", - Self::TooManySigners => "TooManySigners", - Self::BadFlags => "BadFlags", - Self::InvalidInflation => "InvalidInflation", - Self::CantChange => "CantChange", - Self::UnknownFlag => "UnknownFlag", - Self::ThresholdOutOfRange => "ThresholdOutOfRange", - Self::BadSigner => "BadSigner", - Self::InvalidHomeDomain => "InvalidHomeDomain", - Self::AuthRevocableRequired => "AuthRevocableRequired", - } - } - - #[must_use] - pub const fn discriminant(&self) -> SetOptionsResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => SetOptionsResultCode::Success, - Self::LowReserve => SetOptionsResultCode::LowReserve, - Self::TooManySigners => SetOptionsResultCode::TooManySigners, - Self::BadFlags => SetOptionsResultCode::BadFlags, - Self::InvalidInflation => SetOptionsResultCode::InvalidInflation, - Self::CantChange => SetOptionsResultCode::CantChange, - Self::UnknownFlag => SetOptionsResultCode::UnknownFlag, - Self::ThresholdOutOfRange => SetOptionsResultCode::ThresholdOutOfRange, - Self::BadSigner => SetOptionsResultCode::BadSigner, - Self::InvalidHomeDomain => SetOptionsResultCode::InvalidHomeDomain, - Self::AuthRevocableRequired => SetOptionsResultCode::AuthRevocableRequired, - } - } - - #[must_use] - pub const fn variants() -> [SetOptionsResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SetOptionsResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for SetOptionsResult { - #[must_use] - fn discriminant(&self) -> SetOptionsResultCode { - Self::discriminant(self) - } -} - -impl Variants for SetOptionsResult { - fn variants() -> slice::Iter<'static, SetOptionsResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for SetOptionsResult {} - -impl ReadXdr for SetOptionsResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: SetOptionsResultCode = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - SetOptionsResultCode::Success => Self::Success, - SetOptionsResultCode::LowReserve => Self::LowReserve, - SetOptionsResultCode::TooManySigners => Self::TooManySigners, - SetOptionsResultCode::BadFlags => Self::BadFlags, - SetOptionsResultCode::InvalidInflation => Self::InvalidInflation, - SetOptionsResultCode::CantChange => Self::CantChange, - SetOptionsResultCode::UnknownFlag => Self::UnknownFlag, - SetOptionsResultCode::ThresholdOutOfRange => Self::ThresholdOutOfRange, - SetOptionsResultCode::BadSigner => Self::BadSigner, - SetOptionsResultCode::InvalidHomeDomain => Self::InvalidHomeDomain, - SetOptionsResultCode::AuthRevocableRequired => Self::AuthRevocableRequired, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for SetOptionsResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::LowReserve => ().write_xdr(w)?, - Self::TooManySigners => ().write_xdr(w)?, - Self::BadFlags => ().write_xdr(w)?, - Self::InvalidInflation => ().write_xdr(w)?, - Self::CantChange => ().write_xdr(w)?, - Self::UnknownFlag => ().write_xdr(w)?, - Self::ThresholdOutOfRange => ().write_xdr(w)?, - Self::BadSigner => ().write_xdr(w)?, - Self::InvalidHomeDomain => ().write_xdr(w)?, - Self::AuthRevocableRequired => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ChangeTrustResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum ChangeTrustResultCode -/// { -/// // codes considered as "success" for the operation -/// CHANGE_TRUST_SUCCESS = 0, -/// // codes considered as "failure" for the operation -/// CHANGE_TRUST_MALFORMED = -1, // bad input -/// CHANGE_TRUST_NO_ISSUER = -2, // could not find issuer -/// CHANGE_TRUST_INVALID_LIMIT = -3, // cannot drop limit below balance -/// // cannot create with a limit of 0 -/// CHANGE_TRUST_LOW_RESERVE = -/// -4, // not enough funds to create a new trust line, -/// CHANGE_TRUST_SELF_NOT_ALLOWED = -5, // trusting self is not allowed -/// CHANGE_TRUST_TRUST_LINE_MISSING = -6, // Asset trustline is missing for pool -/// CHANGE_TRUST_CANNOT_DELETE = -/// -7, // Asset trustline is still referenced in a pool -/// CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES = -/// -8 // Asset trustline is deauthorized -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ChangeTrustResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - NoIssuer = -2, - InvalidLimit = -3, - LowReserve = -4, - SelfNotAllowed = -5, - TrustLineMissing = -6, - CannotDelete = -7, - NotAuthMaintainLiabilities = -8, -} - -impl ChangeTrustResultCode { - const _VARIANTS: &[ChangeTrustResultCode] = &[ - ChangeTrustResultCode::Success, - ChangeTrustResultCode::Malformed, - ChangeTrustResultCode::NoIssuer, - ChangeTrustResultCode::InvalidLimit, - ChangeTrustResultCode::LowReserve, - ChangeTrustResultCode::SelfNotAllowed, - ChangeTrustResultCode::TrustLineMissing, - ChangeTrustResultCode::CannotDelete, - ChangeTrustResultCode::NotAuthMaintainLiabilities, - ]; - pub const VARIANTS: [ChangeTrustResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "NoIssuer", - "InvalidLimit", - "LowReserve", - "SelfNotAllowed", - "TrustLineMissing", - "CannotDelete", - "NotAuthMaintainLiabilities", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::NoIssuer => "NoIssuer", - Self::InvalidLimit => "InvalidLimit", - Self::LowReserve => "LowReserve", - Self::SelfNotAllowed => "SelfNotAllowed", - Self::TrustLineMissing => "TrustLineMissing", - Self::CannotDelete => "CannotDelete", - Self::NotAuthMaintainLiabilities => "NotAuthMaintainLiabilities", - } - } - - #[must_use] - pub const fn variants() -> [ChangeTrustResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ChangeTrustResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ChangeTrustResultCode { - fn variants() -> slice::Iter<'static, ChangeTrustResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for ChangeTrustResultCode {} - -impl fmt::Display for ChangeTrustResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ChangeTrustResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ChangeTrustResultCode::Success, - -1 => ChangeTrustResultCode::Malformed, - -2 => ChangeTrustResultCode::NoIssuer, - -3 => ChangeTrustResultCode::InvalidLimit, - -4 => ChangeTrustResultCode::LowReserve, - -5 => ChangeTrustResultCode::SelfNotAllowed, - -6 => ChangeTrustResultCode::TrustLineMissing, - -7 => ChangeTrustResultCode::CannotDelete, - -8 => ChangeTrustResultCode::NotAuthMaintainLiabilities, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ChangeTrustResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for ChangeTrustResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ChangeTrustResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ChangeTrustResult is an XDR Union defined as: -/// -/// ```text -/// union ChangeTrustResult switch (ChangeTrustResultCode code) -/// { -/// case CHANGE_TRUST_SUCCESS: -/// void; -/// case CHANGE_TRUST_MALFORMED: -/// case CHANGE_TRUST_NO_ISSUER: -/// case CHANGE_TRUST_INVALID_LIMIT: -/// case CHANGE_TRUST_LOW_RESERVE: -/// case CHANGE_TRUST_SELF_NOT_ALLOWED: -/// case CHANGE_TRUST_TRUST_LINE_MISSING: -/// case CHANGE_TRUST_CANNOT_DELETE: -/// case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: -/// void; -/// }; -/// ``` -/// -// union with discriminant ChangeTrustResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ChangeTrustResult { - Success, - Malformed, - NoIssuer, - InvalidLimit, - LowReserve, - SelfNotAllowed, - TrustLineMissing, - CannotDelete, - NotAuthMaintainLiabilities, -} - -#[cfg(feature = "alloc")] -impl Default for ChangeTrustResult { - fn default() -> Self { - Self::Success - } -} - -impl ChangeTrustResult { - const _VARIANTS: &[ChangeTrustResultCode] = &[ - ChangeTrustResultCode::Success, - ChangeTrustResultCode::Malformed, - ChangeTrustResultCode::NoIssuer, - ChangeTrustResultCode::InvalidLimit, - ChangeTrustResultCode::LowReserve, - ChangeTrustResultCode::SelfNotAllowed, - ChangeTrustResultCode::TrustLineMissing, - ChangeTrustResultCode::CannotDelete, - ChangeTrustResultCode::NotAuthMaintainLiabilities, - ]; - pub const VARIANTS: [ChangeTrustResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "NoIssuer", - "InvalidLimit", - "LowReserve", - "SelfNotAllowed", - "TrustLineMissing", - "CannotDelete", - "NotAuthMaintainLiabilities", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::NoIssuer => "NoIssuer", - Self::InvalidLimit => "InvalidLimit", - Self::LowReserve => "LowReserve", - Self::SelfNotAllowed => "SelfNotAllowed", - Self::TrustLineMissing => "TrustLineMissing", - Self::CannotDelete => "CannotDelete", - Self::NotAuthMaintainLiabilities => "NotAuthMaintainLiabilities", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ChangeTrustResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ChangeTrustResultCode::Success, - Self::Malformed => ChangeTrustResultCode::Malformed, - Self::NoIssuer => ChangeTrustResultCode::NoIssuer, - Self::InvalidLimit => ChangeTrustResultCode::InvalidLimit, - Self::LowReserve => ChangeTrustResultCode::LowReserve, - Self::SelfNotAllowed => ChangeTrustResultCode::SelfNotAllowed, - Self::TrustLineMissing => ChangeTrustResultCode::TrustLineMissing, - Self::CannotDelete => ChangeTrustResultCode::CannotDelete, - Self::NotAuthMaintainLiabilities => ChangeTrustResultCode::NotAuthMaintainLiabilities, - } - } - - #[must_use] - pub const fn variants() -> [ChangeTrustResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ChangeTrustResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ChangeTrustResult { - #[must_use] - fn discriminant(&self) -> ChangeTrustResultCode { - Self::discriminant(self) - } -} - -impl Variants for ChangeTrustResult { - fn variants() -> slice::Iter<'static, ChangeTrustResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for ChangeTrustResult {} - -impl ReadXdr for ChangeTrustResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ChangeTrustResultCode = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ChangeTrustResultCode::Success => Self::Success, - ChangeTrustResultCode::Malformed => Self::Malformed, - ChangeTrustResultCode::NoIssuer => Self::NoIssuer, - ChangeTrustResultCode::InvalidLimit => Self::InvalidLimit, - ChangeTrustResultCode::LowReserve => Self::LowReserve, - ChangeTrustResultCode::SelfNotAllowed => Self::SelfNotAllowed, - ChangeTrustResultCode::TrustLineMissing => Self::TrustLineMissing, - ChangeTrustResultCode::CannotDelete => Self::CannotDelete, - ChangeTrustResultCode::NotAuthMaintainLiabilities => { - Self::NotAuthMaintainLiabilities - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ChangeTrustResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::NoIssuer => ().write_xdr(w)?, - Self::InvalidLimit => ().write_xdr(w)?, - Self::LowReserve => ().write_xdr(w)?, - Self::SelfNotAllowed => ().write_xdr(w)?, - Self::TrustLineMissing => ().write_xdr(w)?, - Self::CannotDelete => ().write_xdr(w)?, - Self::NotAuthMaintainLiabilities => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// AllowTrustResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum AllowTrustResultCode -/// { -/// // codes considered as "success" for the operation -/// ALLOW_TRUST_SUCCESS = 0, -/// // codes considered as "failure" for the operation -/// ALLOW_TRUST_MALFORMED = -1, // asset is not ASSET_TYPE_ALPHANUM -/// ALLOW_TRUST_NO_TRUST_LINE = -2, // trustor does not have a trustline -/// // source account does not require trust -/// ALLOW_TRUST_TRUST_NOT_REQUIRED = -3, -/// ALLOW_TRUST_CANT_REVOKE = -4, // source account can't revoke trust, -/// ALLOW_TRUST_SELF_NOT_ALLOWED = -5, // trusting self is not allowed -/// ALLOW_TRUST_LOW_RESERVE = -6 // claimable balances can't be created -/// // on revoke due to low reserves -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum AllowTrustResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - NoTrustLine = -2, - TrustNotRequired = -3, - CantRevoke = -4, - SelfNotAllowed = -5, - LowReserve = -6, -} - -impl AllowTrustResultCode { - const _VARIANTS: &[AllowTrustResultCode] = &[ - AllowTrustResultCode::Success, - AllowTrustResultCode::Malformed, - AllowTrustResultCode::NoTrustLine, - AllowTrustResultCode::TrustNotRequired, - AllowTrustResultCode::CantRevoke, - AllowTrustResultCode::SelfNotAllowed, - AllowTrustResultCode::LowReserve, - ]; - pub const VARIANTS: [AllowTrustResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "NoTrustLine", - "TrustNotRequired", - "CantRevoke", - "SelfNotAllowed", - "LowReserve", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::NoTrustLine => "NoTrustLine", - Self::TrustNotRequired => "TrustNotRequired", - Self::CantRevoke => "CantRevoke", - Self::SelfNotAllowed => "SelfNotAllowed", - Self::LowReserve => "LowReserve", - } - } - - #[must_use] - pub const fn variants() -> [AllowTrustResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for AllowTrustResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for AllowTrustResultCode { - fn variants() -> slice::Iter<'static, AllowTrustResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for AllowTrustResultCode {} - -impl fmt::Display for AllowTrustResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for AllowTrustResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => AllowTrustResultCode::Success, - -1 => AllowTrustResultCode::Malformed, - -2 => AllowTrustResultCode::NoTrustLine, - -3 => AllowTrustResultCode::TrustNotRequired, - -4 => AllowTrustResultCode::CantRevoke, - -5 => AllowTrustResultCode::SelfNotAllowed, - -6 => AllowTrustResultCode::LowReserve, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: AllowTrustResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for AllowTrustResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for AllowTrustResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// AllowTrustResult is an XDR Union defined as: -/// -/// ```text -/// union AllowTrustResult switch (AllowTrustResultCode code) -/// { -/// case ALLOW_TRUST_SUCCESS: -/// void; -/// case ALLOW_TRUST_MALFORMED: -/// case ALLOW_TRUST_NO_TRUST_LINE: -/// case ALLOW_TRUST_TRUST_NOT_REQUIRED: -/// case ALLOW_TRUST_CANT_REVOKE: -/// case ALLOW_TRUST_SELF_NOT_ALLOWED: -/// case ALLOW_TRUST_LOW_RESERVE: -/// void; -/// }; -/// ``` -/// -// union with discriminant AllowTrustResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum AllowTrustResult { - Success, - Malformed, - NoTrustLine, - TrustNotRequired, - CantRevoke, - SelfNotAllowed, - LowReserve, -} - -#[cfg(feature = "alloc")] -impl Default for AllowTrustResult { - fn default() -> Self { - Self::Success - } -} - -impl AllowTrustResult { - const _VARIANTS: &[AllowTrustResultCode] = &[ - AllowTrustResultCode::Success, - AllowTrustResultCode::Malformed, - AllowTrustResultCode::NoTrustLine, - AllowTrustResultCode::TrustNotRequired, - AllowTrustResultCode::CantRevoke, - AllowTrustResultCode::SelfNotAllowed, - AllowTrustResultCode::LowReserve, - ]; - pub const VARIANTS: [AllowTrustResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "NoTrustLine", - "TrustNotRequired", - "CantRevoke", - "SelfNotAllowed", - "LowReserve", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::NoTrustLine => "NoTrustLine", - Self::TrustNotRequired => "TrustNotRequired", - Self::CantRevoke => "CantRevoke", - Self::SelfNotAllowed => "SelfNotAllowed", - Self::LowReserve => "LowReserve", - } - } - - #[must_use] - pub const fn discriminant(&self) -> AllowTrustResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => AllowTrustResultCode::Success, - Self::Malformed => AllowTrustResultCode::Malformed, - Self::NoTrustLine => AllowTrustResultCode::NoTrustLine, - Self::TrustNotRequired => AllowTrustResultCode::TrustNotRequired, - Self::CantRevoke => AllowTrustResultCode::CantRevoke, - Self::SelfNotAllowed => AllowTrustResultCode::SelfNotAllowed, - Self::LowReserve => AllowTrustResultCode::LowReserve, - } - } - - #[must_use] - pub const fn variants() -> [AllowTrustResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for AllowTrustResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for AllowTrustResult { - #[must_use] - fn discriminant(&self) -> AllowTrustResultCode { - Self::discriminant(self) - } -} - -impl Variants for AllowTrustResult { - fn variants() -> slice::Iter<'static, AllowTrustResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for AllowTrustResult {} - -impl ReadXdr for AllowTrustResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: AllowTrustResultCode = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - AllowTrustResultCode::Success => Self::Success, - AllowTrustResultCode::Malformed => Self::Malformed, - AllowTrustResultCode::NoTrustLine => Self::NoTrustLine, - AllowTrustResultCode::TrustNotRequired => Self::TrustNotRequired, - AllowTrustResultCode::CantRevoke => Self::CantRevoke, - AllowTrustResultCode::SelfNotAllowed => Self::SelfNotAllowed, - AllowTrustResultCode::LowReserve => Self::LowReserve, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for AllowTrustResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::NoTrustLine => ().write_xdr(w)?, - Self::TrustNotRequired => ().write_xdr(w)?, - Self::CantRevoke => ().write_xdr(w)?, - Self::SelfNotAllowed => ().write_xdr(w)?, - Self::LowReserve => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// AccountMergeResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum AccountMergeResultCode -/// { -/// // codes considered as "success" for the operation -/// ACCOUNT_MERGE_SUCCESS = 0, -/// // codes considered as "failure" for the operation -/// ACCOUNT_MERGE_MALFORMED = -1, // can't merge onto itself -/// ACCOUNT_MERGE_NO_ACCOUNT = -2, // destination does not exist -/// ACCOUNT_MERGE_IMMUTABLE_SET = -3, // source account has AUTH_IMMUTABLE set -/// ACCOUNT_MERGE_HAS_SUB_ENTRIES = -4, // account has trust lines/offers -/// ACCOUNT_MERGE_SEQNUM_TOO_FAR = -5, // sequence number is over max allowed -/// ACCOUNT_MERGE_DEST_FULL = -6, // can't add source balance to -/// // destination balance -/// ACCOUNT_MERGE_IS_SPONSOR = -7 // can't merge account that is a sponsor -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum AccountMergeResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - NoAccount = -2, - ImmutableSet = -3, - HasSubEntries = -4, - SeqnumTooFar = -5, - DestFull = -6, - IsSponsor = -7, -} - -impl AccountMergeResultCode { - const _VARIANTS: &[AccountMergeResultCode] = &[ - AccountMergeResultCode::Success, - AccountMergeResultCode::Malformed, - AccountMergeResultCode::NoAccount, - AccountMergeResultCode::ImmutableSet, - AccountMergeResultCode::HasSubEntries, - AccountMergeResultCode::SeqnumTooFar, - AccountMergeResultCode::DestFull, - AccountMergeResultCode::IsSponsor, - ]; - pub const VARIANTS: [AccountMergeResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "NoAccount", - "ImmutableSet", - "HasSubEntries", - "SeqnumTooFar", - "DestFull", - "IsSponsor", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::NoAccount => "NoAccount", - Self::ImmutableSet => "ImmutableSet", - Self::HasSubEntries => "HasSubEntries", - Self::SeqnumTooFar => "SeqnumTooFar", - Self::DestFull => "DestFull", - Self::IsSponsor => "IsSponsor", - } - } - - #[must_use] - pub const fn variants() -> [AccountMergeResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for AccountMergeResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for AccountMergeResultCode { - fn variants() -> slice::Iter<'static, AccountMergeResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for AccountMergeResultCode {} - -impl fmt::Display for AccountMergeResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for AccountMergeResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => AccountMergeResultCode::Success, - -1 => AccountMergeResultCode::Malformed, - -2 => AccountMergeResultCode::NoAccount, - -3 => AccountMergeResultCode::ImmutableSet, - -4 => AccountMergeResultCode::HasSubEntries, - -5 => AccountMergeResultCode::SeqnumTooFar, - -6 => AccountMergeResultCode::DestFull, - -7 => AccountMergeResultCode::IsSponsor, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: AccountMergeResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for AccountMergeResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for AccountMergeResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// AccountMergeResult is an XDR Union defined as: -/// -/// ```text -/// union AccountMergeResult switch (AccountMergeResultCode code) -/// { -/// case ACCOUNT_MERGE_SUCCESS: -/// int64 sourceAccountBalance; // how much got transferred from source account -/// case ACCOUNT_MERGE_MALFORMED: -/// case ACCOUNT_MERGE_NO_ACCOUNT: -/// case ACCOUNT_MERGE_IMMUTABLE_SET: -/// case ACCOUNT_MERGE_HAS_SUB_ENTRIES: -/// case ACCOUNT_MERGE_SEQNUM_TOO_FAR: -/// case ACCOUNT_MERGE_DEST_FULL: -/// case ACCOUNT_MERGE_IS_SPONSOR: -/// void; -/// }; -/// ``` -/// -// union with discriminant AccountMergeResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum AccountMergeResult { - Success( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - i64, - ), - Malformed, - NoAccount, - ImmutableSet, - HasSubEntries, - SeqnumTooFar, - DestFull, - IsSponsor, -} - -#[cfg(feature = "alloc")] -impl Default for AccountMergeResult { - fn default() -> Self { - Self::Success(i64::default()) - } -} - -impl AccountMergeResult { - const _VARIANTS: &[AccountMergeResultCode] = &[ - AccountMergeResultCode::Success, - AccountMergeResultCode::Malformed, - AccountMergeResultCode::NoAccount, - AccountMergeResultCode::ImmutableSet, - AccountMergeResultCode::HasSubEntries, - AccountMergeResultCode::SeqnumTooFar, - AccountMergeResultCode::DestFull, - AccountMergeResultCode::IsSponsor, - ]; - pub const VARIANTS: [AccountMergeResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "NoAccount", - "ImmutableSet", - "HasSubEntries", - "SeqnumTooFar", - "DestFull", - "IsSponsor", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success(_) => "Success", - Self::Malformed => "Malformed", - Self::NoAccount => "NoAccount", - Self::ImmutableSet => "ImmutableSet", - Self::HasSubEntries => "HasSubEntries", - Self::SeqnumTooFar => "SeqnumTooFar", - Self::DestFull => "DestFull", - Self::IsSponsor => "IsSponsor", - } - } - - #[must_use] - pub const fn discriminant(&self) -> AccountMergeResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success(_) => AccountMergeResultCode::Success, - Self::Malformed => AccountMergeResultCode::Malformed, - Self::NoAccount => AccountMergeResultCode::NoAccount, - Self::ImmutableSet => AccountMergeResultCode::ImmutableSet, - Self::HasSubEntries => AccountMergeResultCode::HasSubEntries, - Self::SeqnumTooFar => AccountMergeResultCode::SeqnumTooFar, - Self::DestFull => AccountMergeResultCode::DestFull, - Self::IsSponsor => AccountMergeResultCode::IsSponsor, - } - } - - #[must_use] - pub const fn variants() -> [AccountMergeResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for AccountMergeResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for AccountMergeResult { - #[must_use] - fn discriminant(&self) -> AccountMergeResultCode { - Self::discriminant(self) - } -} - -impl Variants for AccountMergeResult { - fn variants() -> slice::Iter<'static, AccountMergeResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for AccountMergeResult {} - -impl ReadXdr for AccountMergeResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: AccountMergeResultCode = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - AccountMergeResultCode::Success => Self::Success(i64::read_xdr(r)?), - AccountMergeResultCode::Malformed => Self::Malformed, - AccountMergeResultCode::NoAccount => Self::NoAccount, - AccountMergeResultCode::ImmutableSet => Self::ImmutableSet, - AccountMergeResultCode::HasSubEntries => Self::HasSubEntries, - AccountMergeResultCode::SeqnumTooFar => Self::SeqnumTooFar, - AccountMergeResultCode::DestFull => Self::DestFull, - AccountMergeResultCode::IsSponsor => Self::IsSponsor, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for AccountMergeResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success(v) => v.write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::NoAccount => ().write_xdr(w)?, - Self::ImmutableSet => ().write_xdr(w)?, - Self::HasSubEntries => ().write_xdr(w)?, - Self::SeqnumTooFar => ().write_xdr(w)?, - Self::DestFull => ().write_xdr(w)?, - Self::IsSponsor => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// InflationResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum InflationResultCode -/// { -/// // codes considered as "success" for the operation -/// INFLATION_SUCCESS = 0, -/// // codes considered as "failure" for the operation -/// INFLATION_NOT_TIME = -1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum InflationResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - NotTime = -1, -} - -impl InflationResultCode { - const _VARIANTS: &[InflationResultCode] = - &[InflationResultCode::Success, InflationResultCode::NotTime]; - pub const VARIANTS: [InflationResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Success", "NotTime"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::NotTime => "NotTime", - } - } - - #[must_use] - pub const fn variants() -> [InflationResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for InflationResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for InflationResultCode { - fn variants() -> slice::Iter<'static, InflationResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for InflationResultCode {} - -impl fmt::Display for InflationResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for InflationResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => InflationResultCode::Success, - -1 => InflationResultCode::NotTime, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: InflationResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for InflationResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for InflationResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// InflationPayout is an XDR Struct defined as: -/// -/// ```text -/// struct InflationPayout // or use PaymentResultAtom to limit types? -/// { -/// AccountID destination; -/// int64 amount; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct InflationPayout { - pub destination: AccountId, - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub amount: i64, -} - -impl ReadXdr for InflationPayout { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - destination: AccountId::read_xdr(r)?, - amount: i64::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for InflationPayout { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.destination.write_xdr(w)?; - self.amount.write_xdr(w)?; - Ok(()) - }) - } -} - -/// InflationResult is an XDR Union defined as: -/// -/// ```text -/// union InflationResult switch (InflationResultCode code) -/// { -/// case INFLATION_SUCCESS: -/// InflationPayout payouts<>; -/// case INFLATION_NOT_TIME: -/// void; -/// }; -/// ``` -/// -// union with discriminant InflationResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum InflationResult { - Success(VecM), - NotTime, -} - -#[cfg(feature = "alloc")] -impl Default for InflationResult { - fn default() -> Self { - Self::Success(VecM::::default()) - } -} - -impl InflationResult { - const _VARIANTS: &[InflationResultCode] = - &[InflationResultCode::Success, InflationResultCode::NotTime]; - pub const VARIANTS: [InflationResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Success", "NotTime"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success(_) => "Success", - Self::NotTime => "NotTime", - } - } - - #[must_use] - pub const fn discriminant(&self) -> InflationResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success(_) => InflationResultCode::Success, - Self::NotTime => InflationResultCode::NotTime, - } - } - - #[must_use] - pub const fn variants() -> [InflationResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for InflationResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for InflationResult { - #[must_use] - fn discriminant(&self) -> InflationResultCode { - Self::discriminant(self) - } -} - -impl Variants for InflationResult { - fn variants() -> slice::Iter<'static, InflationResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for InflationResult {} - -impl ReadXdr for InflationResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: InflationResultCode = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - InflationResultCode::Success => { - Self::Success(VecM::::read_xdr(r)?) - } - InflationResultCode::NotTime => Self::NotTime, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for InflationResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success(v) => v.write_xdr(w)?, - Self::NotTime => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ManageDataResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum ManageDataResultCode -/// { -/// // codes considered as "success" for the operation -/// MANAGE_DATA_SUCCESS = 0, -/// // codes considered as "failure" for the operation -/// MANAGE_DATA_NOT_SUPPORTED_YET = -/// -1, // The network hasn't moved to this protocol change yet -/// MANAGE_DATA_NAME_NOT_FOUND = -/// -2, // Trying to remove a Data Entry that isn't there -/// MANAGE_DATA_LOW_RESERVE = -3, // not enough funds to create a new Data Entry -/// MANAGE_DATA_INVALID_NAME = -4 // Name not a valid string -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ManageDataResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - NotSupportedYet = -1, - NameNotFound = -2, - LowReserve = -3, - InvalidName = -4, -} - -impl ManageDataResultCode { - const _VARIANTS: &[ManageDataResultCode] = &[ - ManageDataResultCode::Success, - ManageDataResultCode::NotSupportedYet, - ManageDataResultCode::NameNotFound, - ManageDataResultCode::LowReserve, - ManageDataResultCode::InvalidName, - ]; - pub const VARIANTS: [ManageDataResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "NotSupportedYet", - "NameNotFound", - "LowReserve", - "InvalidName", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::NotSupportedYet => "NotSupportedYet", - Self::NameNotFound => "NameNotFound", - Self::LowReserve => "LowReserve", - Self::InvalidName => "InvalidName", - } - } - - #[must_use] - pub const fn variants() -> [ManageDataResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ManageDataResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ManageDataResultCode { - fn variants() -> slice::Iter<'static, ManageDataResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for ManageDataResultCode {} - -impl fmt::Display for ManageDataResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ManageDataResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ManageDataResultCode::Success, - -1 => ManageDataResultCode::NotSupportedYet, - -2 => ManageDataResultCode::NameNotFound, - -3 => ManageDataResultCode::LowReserve, - -4 => ManageDataResultCode::InvalidName, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ManageDataResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for ManageDataResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ManageDataResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ManageDataResult is an XDR Union defined as: -/// -/// ```text -/// union ManageDataResult switch (ManageDataResultCode code) -/// { -/// case MANAGE_DATA_SUCCESS: -/// void; -/// case MANAGE_DATA_NOT_SUPPORTED_YET: -/// case MANAGE_DATA_NAME_NOT_FOUND: -/// case MANAGE_DATA_LOW_RESERVE: -/// case MANAGE_DATA_INVALID_NAME: -/// void; -/// }; -/// ``` -/// -// union with discriminant ManageDataResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ManageDataResult { - Success, - NotSupportedYet, - NameNotFound, - LowReserve, - InvalidName, -} - -#[cfg(feature = "alloc")] -impl Default for ManageDataResult { - fn default() -> Self { - Self::Success - } -} - -impl ManageDataResult { - const _VARIANTS: &[ManageDataResultCode] = &[ - ManageDataResultCode::Success, - ManageDataResultCode::NotSupportedYet, - ManageDataResultCode::NameNotFound, - ManageDataResultCode::LowReserve, - ManageDataResultCode::InvalidName, - ]; - pub const VARIANTS: [ManageDataResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "NotSupportedYet", - "NameNotFound", - "LowReserve", - "InvalidName", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::NotSupportedYet => "NotSupportedYet", - Self::NameNotFound => "NameNotFound", - Self::LowReserve => "LowReserve", - Self::InvalidName => "InvalidName", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ManageDataResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ManageDataResultCode::Success, - Self::NotSupportedYet => ManageDataResultCode::NotSupportedYet, - Self::NameNotFound => ManageDataResultCode::NameNotFound, - Self::LowReserve => ManageDataResultCode::LowReserve, - Self::InvalidName => ManageDataResultCode::InvalidName, - } - } - - #[must_use] - pub const fn variants() -> [ManageDataResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ManageDataResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ManageDataResult { - #[must_use] - fn discriminant(&self) -> ManageDataResultCode { - Self::discriminant(self) - } -} - -impl Variants for ManageDataResult { - fn variants() -> slice::Iter<'static, ManageDataResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for ManageDataResult {} - -impl ReadXdr for ManageDataResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ManageDataResultCode = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ManageDataResultCode::Success => Self::Success, - ManageDataResultCode::NotSupportedYet => Self::NotSupportedYet, - ManageDataResultCode::NameNotFound => Self::NameNotFound, - ManageDataResultCode::LowReserve => Self::LowReserve, - ManageDataResultCode::InvalidName => Self::InvalidName, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ManageDataResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::NotSupportedYet => ().write_xdr(w)?, - Self::NameNotFound => ().write_xdr(w)?, - Self::LowReserve => ().write_xdr(w)?, - Self::InvalidName => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// BumpSequenceResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum BumpSequenceResultCode -/// { -/// // codes considered as "success" for the operation -/// BUMP_SEQUENCE_SUCCESS = 0, -/// // codes considered as "failure" for the operation -/// BUMP_SEQUENCE_BAD_SEQ = -1 // `bumpTo` is not within bounds -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum BumpSequenceResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - BadSeq = -1, -} - -impl BumpSequenceResultCode { - const _VARIANTS: &[BumpSequenceResultCode] = &[ - BumpSequenceResultCode::Success, - BumpSequenceResultCode::BadSeq, - ]; - pub const VARIANTS: [BumpSequenceResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Success", "BadSeq"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::BadSeq => "BadSeq", - } - } - - #[must_use] - pub const fn variants() -> [BumpSequenceResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for BumpSequenceResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for BumpSequenceResultCode { - fn variants() -> slice::Iter<'static, BumpSequenceResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for BumpSequenceResultCode {} - -impl fmt::Display for BumpSequenceResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for BumpSequenceResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => BumpSequenceResultCode::Success, - -1 => BumpSequenceResultCode::BadSeq, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: BumpSequenceResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for BumpSequenceResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for BumpSequenceResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// BumpSequenceResult is an XDR Union defined as: -/// -/// ```text -/// union BumpSequenceResult switch (BumpSequenceResultCode code) -/// { -/// case BUMP_SEQUENCE_SUCCESS: -/// void; -/// case BUMP_SEQUENCE_BAD_SEQ: -/// void; -/// }; -/// ``` -/// -// union with discriminant BumpSequenceResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum BumpSequenceResult { - Success, - BadSeq, -} - -#[cfg(feature = "alloc")] -impl Default for BumpSequenceResult { - fn default() -> Self { - Self::Success - } -} - -impl BumpSequenceResult { - const _VARIANTS: &[BumpSequenceResultCode] = &[ - BumpSequenceResultCode::Success, - BumpSequenceResultCode::BadSeq, - ]; - pub const VARIANTS: [BumpSequenceResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Success", "BadSeq"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::BadSeq => "BadSeq", - } - } - - #[must_use] - pub const fn discriminant(&self) -> BumpSequenceResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => BumpSequenceResultCode::Success, - Self::BadSeq => BumpSequenceResultCode::BadSeq, - } - } - - #[must_use] - pub const fn variants() -> [BumpSequenceResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for BumpSequenceResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for BumpSequenceResult { - #[must_use] - fn discriminant(&self) -> BumpSequenceResultCode { - Self::discriminant(self) - } -} - -impl Variants for BumpSequenceResult { - fn variants() -> slice::Iter<'static, BumpSequenceResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for BumpSequenceResult {} - -impl ReadXdr for BumpSequenceResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: BumpSequenceResultCode = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - BumpSequenceResultCode::Success => Self::Success, - BumpSequenceResultCode::BadSeq => Self::BadSeq, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for BumpSequenceResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::BadSeq => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// CreateClaimableBalanceResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum CreateClaimableBalanceResultCode -/// { -/// CREATE_CLAIMABLE_BALANCE_SUCCESS = 0, -/// CREATE_CLAIMABLE_BALANCE_MALFORMED = -1, -/// CREATE_CLAIMABLE_BALANCE_LOW_RESERVE = -2, -/// CREATE_CLAIMABLE_BALANCE_NO_TRUST = -3, -/// CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED = -4, -/// CREATE_CLAIMABLE_BALANCE_UNDERFUNDED = -5 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum CreateClaimableBalanceResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - LowReserve = -2, - NoTrust = -3, - NotAuthorized = -4, - Underfunded = -5, -} - -impl CreateClaimableBalanceResultCode { - const _VARIANTS: &[CreateClaimableBalanceResultCode] = &[ - CreateClaimableBalanceResultCode::Success, - CreateClaimableBalanceResultCode::Malformed, - CreateClaimableBalanceResultCode::LowReserve, - CreateClaimableBalanceResultCode::NoTrust, - CreateClaimableBalanceResultCode::NotAuthorized, - CreateClaimableBalanceResultCode::Underfunded, - ]; - pub const VARIANTS: [CreateClaimableBalanceResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "LowReserve", - "NoTrust", - "NotAuthorized", - "Underfunded", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::LowReserve => "LowReserve", - Self::NoTrust => "NoTrust", - Self::NotAuthorized => "NotAuthorized", - Self::Underfunded => "Underfunded", - } - } - - #[must_use] - pub const fn variants() -> [CreateClaimableBalanceResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for CreateClaimableBalanceResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for CreateClaimableBalanceResultCode { - fn variants() -> slice::Iter<'static, CreateClaimableBalanceResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for CreateClaimableBalanceResultCode {} - -impl fmt::Display for CreateClaimableBalanceResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for CreateClaimableBalanceResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => CreateClaimableBalanceResultCode::Success, - -1 => CreateClaimableBalanceResultCode::Malformed, - -2 => CreateClaimableBalanceResultCode::LowReserve, - -3 => CreateClaimableBalanceResultCode::NoTrust, - -4 => CreateClaimableBalanceResultCode::NotAuthorized, - -5 => CreateClaimableBalanceResultCode::Underfunded, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: CreateClaimableBalanceResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for CreateClaimableBalanceResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for CreateClaimableBalanceResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// CreateClaimableBalanceResult is an XDR Union defined as: -/// -/// ```text -/// union CreateClaimableBalanceResult switch ( -/// CreateClaimableBalanceResultCode code) -/// { -/// case CREATE_CLAIMABLE_BALANCE_SUCCESS: -/// ClaimableBalanceID balanceID; -/// case CREATE_CLAIMABLE_BALANCE_MALFORMED: -/// case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: -/// case CREATE_CLAIMABLE_BALANCE_NO_TRUST: -/// case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: -/// case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: -/// void; -/// }; -/// ``` -/// -// union with discriminant CreateClaimableBalanceResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum CreateClaimableBalanceResult { - Success(ClaimableBalanceId), - Malformed, - LowReserve, - NoTrust, - NotAuthorized, - Underfunded, -} - -#[cfg(feature = "alloc")] -impl Default for CreateClaimableBalanceResult { - fn default() -> Self { - Self::Success(ClaimableBalanceId::default()) - } -} - -impl CreateClaimableBalanceResult { - const _VARIANTS: &[CreateClaimableBalanceResultCode] = &[ - CreateClaimableBalanceResultCode::Success, - CreateClaimableBalanceResultCode::Malformed, - CreateClaimableBalanceResultCode::LowReserve, - CreateClaimableBalanceResultCode::NoTrust, - CreateClaimableBalanceResultCode::NotAuthorized, - CreateClaimableBalanceResultCode::Underfunded, - ]; - pub const VARIANTS: [CreateClaimableBalanceResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "LowReserve", - "NoTrust", - "NotAuthorized", - "Underfunded", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success(_) => "Success", - Self::Malformed => "Malformed", - Self::LowReserve => "LowReserve", - Self::NoTrust => "NoTrust", - Self::NotAuthorized => "NotAuthorized", - Self::Underfunded => "Underfunded", - } - } - - #[must_use] - pub const fn discriminant(&self) -> CreateClaimableBalanceResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success(_) => CreateClaimableBalanceResultCode::Success, - Self::Malformed => CreateClaimableBalanceResultCode::Malformed, - Self::LowReserve => CreateClaimableBalanceResultCode::LowReserve, - Self::NoTrust => CreateClaimableBalanceResultCode::NoTrust, - Self::NotAuthorized => CreateClaimableBalanceResultCode::NotAuthorized, - Self::Underfunded => CreateClaimableBalanceResultCode::Underfunded, - } - } - - #[must_use] - pub const fn variants() -> [CreateClaimableBalanceResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for CreateClaimableBalanceResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for CreateClaimableBalanceResult { - #[must_use] - fn discriminant(&self) -> CreateClaimableBalanceResultCode { - Self::discriminant(self) - } -} - -impl Variants for CreateClaimableBalanceResult { - fn variants() -> slice::Iter<'static, CreateClaimableBalanceResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for CreateClaimableBalanceResult {} - -impl ReadXdr for CreateClaimableBalanceResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: CreateClaimableBalanceResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - CreateClaimableBalanceResultCode::Success => { - Self::Success(ClaimableBalanceId::read_xdr(r)?) - } - CreateClaimableBalanceResultCode::Malformed => Self::Malformed, - CreateClaimableBalanceResultCode::LowReserve => Self::LowReserve, - CreateClaimableBalanceResultCode::NoTrust => Self::NoTrust, - CreateClaimableBalanceResultCode::NotAuthorized => Self::NotAuthorized, - CreateClaimableBalanceResultCode::Underfunded => Self::Underfunded, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for CreateClaimableBalanceResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success(v) => v.write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::LowReserve => ().write_xdr(w)?, - Self::NoTrust => ().write_xdr(w)?, - Self::NotAuthorized => ().write_xdr(w)?, - Self::Underfunded => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ClaimClaimableBalanceResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum ClaimClaimableBalanceResultCode -/// { -/// CLAIM_CLAIMABLE_BALANCE_SUCCESS = 0, -/// CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST = -1, -/// CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM = -2, -/// CLAIM_CLAIMABLE_BALANCE_LINE_FULL = -3, -/// CLAIM_CLAIMABLE_BALANCE_NO_TRUST = -4, -/// CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED = -5, -/// CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN = -6 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ClaimClaimableBalanceResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - DoesNotExist = -1, - CannotClaim = -2, - LineFull = -3, - NoTrust = -4, - NotAuthorized = -5, - TrustlineFrozen = -6, -} - -impl ClaimClaimableBalanceResultCode { - const _VARIANTS: &[ClaimClaimableBalanceResultCode] = &[ - ClaimClaimableBalanceResultCode::Success, - ClaimClaimableBalanceResultCode::DoesNotExist, - ClaimClaimableBalanceResultCode::CannotClaim, - ClaimClaimableBalanceResultCode::LineFull, - ClaimClaimableBalanceResultCode::NoTrust, - ClaimClaimableBalanceResultCode::NotAuthorized, - ClaimClaimableBalanceResultCode::TrustlineFrozen, - ]; - pub const VARIANTS: [ClaimClaimableBalanceResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "DoesNotExist", - "CannotClaim", - "LineFull", - "NoTrust", - "NotAuthorized", - "TrustlineFrozen", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::DoesNotExist => "DoesNotExist", - Self::CannotClaim => "CannotClaim", - Self::LineFull => "LineFull", - Self::NoTrust => "NoTrust", - Self::NotAuthorized => "NotAuthorized", - Self::TrustlineFrozen => "TrustlineFrozen", - } - } - - #[must_use] - pub const fn variants() -> [ClaimClaimableBalanceResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClaimClaimableBalanceResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ClaimClaimableBalanceResultCode { - fn variants() -> slice::Iter<'static, ClaimClaimableBalanceResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for ClaimClaimableBalanceResultCode {} - -impl fmt::Display for ClaimClaimableBalanceResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ClaimClaimableBalanceResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ClaimClaimableBalanceResultCode::Success, - -1 => ClaimClaimableBalanceResultCode::DoesNotExist, - -2 => ClaimClaimableBalanceResultCode::CannotClaim, - -3 => ClaimClaimableBalanceResultCode::LineFull, - -4 => ClaimClaimableBalanceResultCode::NoTrust, - -5 => ClaimClaimableBalanceResultCode::NotAuthorized, - -6 => ClaimClaimableBalanceResultCode::TrustlineFrozen, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ClaimClaimableBalanceResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for ClaimClaimableBalanceResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ClaimClaimableBalanceResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ClaimClaimableBalanceResult is an XDR Union defined as: -/// -/// ```text -/// union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) -/// { -/// case CLAIM_CLAIMABLE_BALANCE_SUCCESS: -/// void; -/// case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: -/// case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: -/// case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: -/// case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: -/// case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: -/// case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: -/// void; -/// }; -/// ``` -/// -// union with discriminant ClaimClaimableBalanceResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ClaimClaimableBalanceResult { - Success, - DoesNotExist, - CannotClaim, - LineFull, - NoTrust, - NotAuthorized, - TrustlineFrozen, -} - -#[cfg(feature = "alloc")] -impl Default for ClaimClaimableBalanceResult { - fn default() -> Self { - Self::Success - } -} - -impl ClaimClaimableBalanceResult { - const _VARIANTS: &[ClaimClaimableBalanceResultCode] = &[ - ClaimClaimableBalanceResultCode::Success, - ClaimClaimableBalanceResultCode::DoesNotExist, - ClaimClaimableBalanceResultCode::CannotClaim, - ClaimClaimableBalanceResultCode::LineFull, - ClaimClaimableBalanceResultCode::NoTrust, - ClaimClaimableBalanceResultCode::NotAuthorized, - ClaimClaimableBalanceResultCode::TrustlineFrozen, - ]; - pub const VARIANTS: [ClaimClaimableBalanceResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "DoesNotExist", - "CannotClaim", - "LineFull", - "NoTrust", - "NotAuthorized", - "TrustlineFrozen", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::DoesNotExist => "DoesNotExist", - Self::CannotClaim => "CannotClaim", - Self::LineFull => "LineFull", - Self::NoTrust => "NoTrust", - Self::NotAuthorized => "NotAuthorized", - Self::TrustlineFrozen => "TrustlineFrozen", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ClaimClaimableBalanceResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ClaimClaimableBalanceResultCode::Success, - Self::DoesNotExist => ClaimClaimableBalanceResultCode::DoesNotExist, - Self::CannotClaim => ClaimClaimableBalanceResultCode::CannotClaim, - Self::LineFull => ClaimClaimableBalanceResultCode::LineFull, - Self::NoTrust => ClaimClaimableBalanceResultCode::NoTrust, - Self::NotAuthorized => ClaimClaimableBalanceResultCode::NotAuthorized, - Self::TrustlineFrozen => ClaimClaimableBalanceResultCode::TrustlineFrozen, - } - } - - #[must_use] - pub const fn variants() -> [ClaimClaimableBalanceResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClaimClaimableBalanceResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ClaimClaimableBalanceResult { - #[must_use] - fn discriminant(&self) -> ClaimClaimableBalanceResultCode { - Self::discriminant(self) - } -} - -impl Variants for ClaimClaimableBalanceResult { - fn variants() -> slice::Iter<'static, ClaimClaimableBalanceResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for ClaimClaimableBalanceResult {} - -impl ReadXdr for ClaimClaimableBalanceResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ClaimClaimableBalanceResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ClaimClaimableBalanceResultCode::Success => Self::Success, - ClaimClaimableBalanceResultCode::DoesNotExist => Self::DoesNotExist, - ClaimClaimableBalanceResultCode::CannotClaim => Self::CannotClaim, - ClaimClaimableBalanceResultCode::LineFull => Self::LineFull, - ClaimClaimableBalanceResultCode::NoTrust => Self::NoTrust, - ClaimClaimableBalanceResultCode::NotAuthorized => Self::NotAuthorized, - ClaimClaimableBalanceResultCode::TrustlineFrozen => Self::TrustlineFrozen, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ClaimClaimableBalanceResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::DoesNotExist => ().write_xdr(w)?, - Self::CannotClaim => ().write_xdr(w)?, - Self::LineFull => ().write_xdr(w)?, - Self::NoTrust => ().write_xdr(w)?, - Self::NotAuthorized => ().write_xdr(w)?, - Self::TrustlineFrozen => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// BeginSponsoringFutureReservesResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum BeginSponsoringFutureReservesResultCode -/// { -/// // codes considered as "success" for the operation -/// BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS = 0, -/// -/// // codes considered as "failure" for the operation -/// BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED = -1, -/// BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED = -2, -/// BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE = -3 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum BeginSponsoringFutureReservesResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - AlreadySponsored = -2, - Recursive = -3, -} - -impl BeginSponsoringFutureReservesResultCode { - const _VARIANTS: &[BeginSponsoringFutureReservesResultCode] = &[ - BeginSponsoringFutureReservesResultCode::Success, - BeginSponsoringFutureReservesResultCode::Malformed, - BeginSponsoringFutureReservesResultCode::AlreadySponsored, - BeginSponsoringFutureReservesResultCode::Recursive, - ]; - pub const VARIANTS: [BeginSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Success", "Malformed", "AlreadySponsored", "Recursive"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::AlreadySponsored => "AlreadySponsored", - Self::Recursive => "Recursive", - } - } - - #[must_use] - pub const fn variants() -> [BeginSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for BeginSponsoringFutureReservesResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for BeginSponsoringFutureReservesResultCode { - fn variants() -> slice::Iter<'static, BeginSponsoringFutureReservesResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for BeginSponsoringFutureReservesResultCode {} - -impl fmt::Display for BeginSponsoringFutureReservesResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for BeginSponsoringFutureReservesResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => BeginSponsoringFutureReservesResultCode::Success, - -1 => BeginSponsoringFutureReservesResultCode::Malformed, - -2 => BeginSponsoringFutureReservesResultCode::AlreadySponsored, - -3 => BeginSponsoringFutureReservesResultCode::Recursive, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: BeginSponsoringFutureReservesResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for BeginSponsoringFutureReservesResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for BeginSponsoringFutureReservesResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// BeginSponsoringFutureReservesResult is an XDR Union defined as: -/// -/// ```text -/// union BeginSponsoringFutureReservesResult switch ( -/// BeginSponsoringFutureReservesResultCode code) -/// { -/// case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: -/// void; -/// case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: -/// case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: -/// case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: -/// void; -/// }; -/// ``` -/// -// union with discriminant BeginSponsoringFutureReservesResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum BeginSponsoringFutureReservesResult { - Success, - Malformed, - AlreadySponsored, - Recursive, -} - -#[cfg(feature = "alloc")] -impl Default for BeginSponsoringFutureReservesResult { - fn default() -> Self { - Self::Success - } -} - -impl BeginSponsoringFutureReservesResult { - const _VARIANTS: &[BeginSponsoringFutureReservesResultCode] = &[ - BeginSponsoringFutureReservesResultCode::Success, - BeginSponsoringFutureReservesResultCode::Malformed, - BeginSponsoringFutureReservesResultCode::AlreadySponsored, - BeginSponsoringFutureReservesResultCode::Recursive, - ]; - pub const VARIANTS: [BeginSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Success", "Malformed", "AlreadySponsored", "Recursive"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::AlreadySponsored => "AlreadySponsored", - Self::Recursive => "Recursive", - } - } - - #[must_use] - pub const fn discriminant(&self) -> BeginSponsoringFutureReservesResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => BeginSponsoringFutureReservesResultCode::Success, - Self::Malformed => BeginSponsoringFutureReservesResultCode::Malformed, - Self::AlreadySponsored => BeginSponsoringFutureReservesResultCode::AlreadySponsored, - Self::Recursive => BeginSponsoringFutureReservesResultCode::Recursive, - } - } - - #[must_use] - pub const fn variants() -> [BeginSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for BeginSponsoringFutureReservesResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for BeginSponsoringFutureReservesResult { - #[must_use] - fn discriminant(&self) -> BeginSponsoringFutureReservesResultCode { - Self::discriminant(self) - } -} - -impl Variants for BeginSponsoringFutureReservesResult { - fn variants() -> slice::Iter<'static, BeginSponsoringFutureReservesResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for BeginSponsoringFutureReservesResult {} - -impl ReadXdr for BeginSponsoringFutureReservesResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: BeginSponsoringFutureReservesResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - BeginSponsoringFutureReservesResultCode::Success => Self::Success, - BeginSponsoringFutureReservesResultCode::Malformed => Self::Malformed, - BeginSponsoringFutureReservesResultCode::AlreadySponsored => Self::AlreadySponsored, - BeginSponsoringFutureReservesResultCode::Recursive => Self::Recursive, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for BeginSponsoringFutureReservesResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::AlreadySponsored => ().write_xdr(w)?, - Self::Recursive => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// EndSponsoringFutureReservesResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum EndSponsoringFutureReservesResultCode -/// { -/// // codes considered as "success" for the operation -/// END_SPONSORING_FUTURE_RESERVES_SUCCESS = 0, -/// -/// // codes considered as "failure" for the operation -/// END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED = -1 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum EndSponsoringFutureReservesResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - NotSponsored = -1, -} - -impl EndSponsoringFutureReservesResultCode { - const _VARIANTS: &[EndSponsoringFutureReservesResultCode] = &[ - EndSponsoringFutureReservesResultCode::Success, - EndSponsoringFutureReservesResultCode::NotSponsored, - ]; - pub const VARIANTS: [EndSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Success", "NotSponsored"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::NotSponsored => "NotSponsored", - } - } - - #[must_use] - pub const fn variants() -> [EndSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for EndSponsoringFutureReservesResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for EndSponsoringFutureReservesResultCode { - fn variants() -> slice::Iter<'static, EndSponsoringFutureReservesResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for EndSponsoringFutureReservesResultCode {} - -impl fmt::Display for EndSponsoringFutureReservesResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for EndSponsoringFutureReservesResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => EndSponsoringFutureReservesResultCode::Success, - -1 => EndSponsoringFutureReservesResultCode::NotSponsored, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: EndSponsoringFutureReservesResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for EndSponsoringFutureReservesResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for EndSponsoringFutureReservesResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// EndSponsoringFutureReservesResult is an XDR Union defined as: -/// -/// ```text -/// union EndSponsoringFutureReservesResult switch ( -/// EndSponsoringFutureReservesResultCode code) -/// { -/// case END_SPONSORING_FUTURE_RESERVES_SUCCESS: -/// void; -/// case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: -/// void; -/// }; -/// ``` -/// -// union with discriminant EndSponsoringFutureReservesResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum EndSponsoringFutureReservesResult { - Success, - NotSponsored, -} - -#[cfg(feature = "alloc")] -impl Default for EndSponsoringFutureReservesResult { - fn default() -> Self { - Self::Success - } -} - -impl EndSponsoringFutureReservesResult { - const _VARIANTS: &[EndSponsoringFutureReservesResultCode] = &[ - EndSponsoringFutureReservesResultCode::Success, - EndSponsoringFutureReservesResultCode::NotSponsored, - ]; - pub const VARIANTS: [EndSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Success", "NotSponsored"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::NotSponsored => "NotSponsored", - } - } - - #[must_use] - pub const fn discriminant(&self) -> EndSponsoringFutureReservesResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => EndSponsoringFutureReservesResultCode::Success, - Self::NotSponsored => EndSponsoringFutureReservesResultCode::NotSponsored, - } - } - - #[must_use] - pub const fn variants() -> [EndSponsoringFutureReservesResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for EndSponsoringFutureReservesResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for EndSponsoringFutureReservesResult { - #[must_use] - fn discriminant(&self) -> EndSponsoringFutureReservesResultCode { - Self::discriminant(self) - } -} - -impl Variants for EndSponsoringFutureReservesResult { - fn variants() -> slice::Iter<'static, EndSponsoringFutureReservesResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for EndSponsoringFutureReservesResult {} - -impl ReadXdr for EndSponsoringFutureReservesResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: EndSponsoringFutureReservesResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - EndSponsoringFutureReservesResultCode::Success => Self::Success, - EndSponsoringFutureReservesResultCode::NotSponsored => Self::NotSponsored, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for EndSponsoringFutureReservesResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::NotSponsored => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// RevokeSponsorshipResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum RevokeSponsorshipResultCode -/// { -/// // codes considered as "success" for the operation -/// REVOKE_SPONSORSHIP_SUCCESS = 0, -/// -/// // codes considered as "failure" for the operation -/// REVOKE_SPONSORSHIP_DOES_NOT_EXIST = -1, -/// REVOKE_SPONSORSHIP_NOT_SPONSOR = -2, -/// REVOKE_SPONSORSHIP_LOW_RESERVE = -3, -/// REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE = -4, -/// REVOKE_SPONSORSHIP_MALFORMED = -5 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum RevokeSponsorshipResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - DoesNotExist = -1, - NotSponsor = -2, - LowReserve = -3, - OnlyTransferable = -4, - Malformed = -5, -} - -impl RevokeSponsorshipResultCode { - const _VARIANTS: &[RevokeSponsorshipResultCode] = &[ - RevokeSponsorshipResultCode::Success, - RevokeSponsorshipResultCode::DoesNotExist, - RevokeSponsorshipResultCode::NotSponsor, - RevokeSponsorshipResultCode::LowReserve, - RevokeSponsorshipResultCode::OnlyTransferable, - RevokeSponsorshipResultCode::Malformed, - ]; - pub const VARIANTS: [RevokeSponsorshipResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "DoesNotExist", - "NotSponsor", - "LowReserve", - "OnlyTransferable", - "Malformed", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::DoesNotExist => "DoesNotExist", - Self::NotSponsor => "NotSponsor", - Self::LowReserve => "LowReserve", - Self::OnlyTransferable => "OnlyTransferable", - Self::Malformed => "Malformed", - } - } - - #[must_use] - pub const fn variants() -> [RevokeSponsorshipResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for RevokeSponsorshipResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for RevokeSponsorshipResultCode { - fn variants() -> slice::Iter<'static, RevokeSponsorshipResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for RevokeSponsorshipResultCode {} - -impl fmt::Display for RevokeSponsorshipResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for RevokeSponsorshipResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => RevokeSponsorshipResultCode::Success, - -1 => RevokeSponsorshipResultCode::DoesNotExist, - -2 => RevokeSponsorshipResultCode::NotSponsor, - -3 => RevokeSponsorshipResultCode::LowReserve, - -4 => RevokeSponsorshipResultCode::OnlyTransferable, - -5 => RevokeSponsorshipResultCode::Malformed, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: RevokeSponsorshipResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for RevokeSponsorshipResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for RevokeSponsorshipResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// RevokeSponsorshipResult is an XDR Union defined as: -/// -/// ```text -/// union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) -/// { -/// case REVOKE_SPONSORSHIP_SUCCESS: -/// void; -/// case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: -/// case REVOKE_SPONSORSHIP_NOT_SPONSOR: -/// case REVOKE_SPONSORSHIP_LOW_RESERVE: -/// case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: -/// case REVOKE_SPONSORSHIP_MALFORMED: -/// void; -/// }; -/// ``` -/// -// union with discriminant RevokeSponsorshipResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum RevokeSponsorshipResult { - Success, - DoesNotExist, - NotSponsor, - LowReserve, - OnlyTransferable, - Malformed, -} - -#[cfg(feature = "alloc")] -impl Default for RevokeSponsorshipResult { - fn default() -> Self { - Self::Success - } -} - -impl RevokeSponsorshipResult { - const _VARIANTS: &[RevokeSponsorshipResultCode] = &[ - RevokeSponsorshipResultCode::Success, - RevokeSponsorshipResultCode::DoesNotExist, - RevokeSponsorshipResultCode::NotSponsor, - RevokeSponsorshipResultCode::LowReserve, - RevokeSponsorshipResultCode::OnlyTransferable, - RevokeSponsorshipResultCode::Malformed, - ]; - pub const VARIANTS: [RevokeSponsorshipResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "DoesNotExist", - "NotSponsor", - "LowReserve", - "OnlyTransferable", - "Malformed", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::DoesNotExist => "DoesNotExist", - Self::NotSponsor => "NotSponsor", - Self::LowReserve => "LowReserve", - Self::OnlyTransferable => "OnlyTransferable", - Self::Malformed => "Malformed", - } - } - - #[must_use] - pub const fn discriminant(&self) -> RevokeSponsorshipResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => RevokeSponsorshipResultCode::Success, - Self::DoesNotExist => RevokeSponsorshipResultCode::DoesNotExist, - Self::NotSponsor => RevokeSponsorshipResultCode::NotSponsor, - Self::LowReserve => RevokeSponsorshipResultCode::LowReserve, - Self::OnlyTransferable => RevokeSponsorshipResultCode::OnlyTransferable, - Self::Malformed => RevokeSponsorshipResultCode::Malformed, - } - } - - #[must_use] - pub const fn variants() -> [RevokeSponsorshipResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for RevokeSponsorshipResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for RevokeSponsorshipResult { - #[must_use] - fn discriminant(&self) -> RevokeSponsorshipResultCode { - Self::discriminant(self) - } -} - -impl Variants for RevokeSponsorshipResult { - fn variants() -> slice::Iter<'static, RevokeSponsorshipResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for RevokeSponsorshipResult {} - -impl ReadXdr for RevokeSponsorshipResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: RevokeSponsorshipResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - RevokeSponsorshipResultCode::Success => Self::Success, - RevokeSponsorshipResultCode::DoesNotExist => Self::DoesNotExist, - RevokeSponsorshipResultCode::NotSponsor => Self::NotSponsor, - RevokeSponsorshipResultCode::LowReserve => Self::LowReserve, - RevokeSponsorshipResultCode::OnlyTransferable => Self::OnlyTransferable, - RevokeSponsorshipResultCode::Malformed => Self::Malformed, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for RevokeSponsorshipResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::DoesNotExist => ().write_xdr(w)?, - Self::NotSponsor => ().write_xdr(w)?, - Self::LowReserve => ().write_xdr(w)?, - Self::OnlyTransferable => ().write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ClawbackResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum ClawbackResultCode -/// { -/// // codes considered as "success" for the operation -/// CLAWBACK_SUCCESS = 0, -/// -/// // codes considered as "failure" for the operation -/// CLAWBACK_MALFORMED = -1, -/// CLAWBACK_NOT_CLAWBACK_ENABLED = -2, -/// CLAWBACK_NO_TRUST = -3, -/// CLAWBACK_UNDERFUNDED = -4 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ClawbackResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - NotClawbackEnabled = -2, - NoTrust = -3, - Underfunded = -4, -} - -impl ClawbackResultCode { - const _VARIANTS: &[ClawbackResultCode] = &[ - ClawbackResultCode::Success, - ClawbackResultCode::Malformed, - ClawbackResultCode::NotClawbackEnabled, - ClawbackResultCode::NoTrust, - ClawbackResultCode::Underfunded, - ]; - pub const VARIANTS: [ClawbackResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "NotClawbackEnabled", - "NoTrust", - "Underfunded", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::NotClawbackEnabled => "NotClawbackEnabled", - Self::NoTrust => "NoTrust", - Self::Underfunded => "Underfunded", - } - } - - #[must_use] - pub const fn variants() -> [ClawbackResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClawbackResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ClawbackResultCode { - fn variants() -> slice::Iter<'static, ClawbackResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for ClawbackResultCode {} - -impl fmt::Display for ClawbackResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ClawbackResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ClawbackResultCode::Success, - -1 => ClawbackResultCode::Malformed, - -2 => ClawbackResultCode::NotClawbackEnabled, - -3 => ClawbackResultCode::NoTrust, - -4 => ClawbackResultCode::Underfunded, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ClawbackResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for ClawbackResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ClawbackResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ClawbackResult is an XDR Union defined as: -/// -/// ```text -/// union ClawbackResult switch (ClawbackResultCode code) -/// { -/// case CLAWBACK_SUCCESS: -/// void; -/// case CLAWBACK_MALFORMED: -/// case CLAWBACK_NOT_CLAWBACK_ENABLED: -/// case CLAWBACK_NO_TRUST: -/// case CLAWBACK_UNDERFUNDED: -/// void; -/// }; -/// ``` -/// -// union with discriminant ClawbackResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ClawbackResult { - Success, - Malformed, - NotClawbackEnabled, - NoTrust, - Underfunded, -} - -#[cfg(feature = "alloc")] -impl Default for ClawbackResult { - fn default() -> Self { - Self::Success - } -} - -impl ClawbackResult { - const _VARIANTS: &[ClawbackResultCode] = &[ - ClawbackResultCode::Success, - ClawbackResultCode::Malformed, - ClawbackResultCode::NotClawbackEnabled, - ClawbackResultCode::NoTrust, - ClawbackResultCode::Underfunded, - ]; - pub const VARIANTS: [ClawbackResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "NotClawbackEnabled", - "NoTrust", - "Underfunded", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::NotClawbackEnabled => "NotClawbackEnabled", - Self::NoTrust => "NoTrust", - Self::Underfunded => "Underfunded", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ClawbackResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ClawbackResultCode::Success, - Self::Malformed => ClawbackResultCode::Malformed, - Self::NotClawbackEnabled => ClawbackResultCode::NotClawbackEnabled, - Self::NoTrust => ClawbackResultCode::NoTrust, - Self::Underfunded => ClawbackResultCode::Underfunded, - } - } - - #[must_use] - pub const fn variants() -> [ClawbackResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClawbackResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ClawbackResult { - #[must_use] - fn discriminant(&self) -> ClawbackResultCode { - Self::discriminant(self) - } -} - -impl Variants for ClawbackResult { - fn variants() -> slice::Iter<'static, ClawbackResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for ClawbackResult {} - -impl ReadXdr for ClawbackResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ClawbackResultCode = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ClawbackResultCode::Success => Self::Success, - ClawbackResultCode::Malformed => Self::Malformed, - ClawbackResultCode::NotClawbackEnabled => Self::NotClawbackEnabled, - ClawbackResultCode::NoTrust => Self::NoTrust, - ClawbackResultCode::Underfunded => Self::Underfunded, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ClawbackResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::NotClawbackEnabled => ().write_xdr(w)?, - Self::NoTrust => ().write_xdr(w)?, - Self::Underfunded => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ClawbackClaimableBalanceResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum ClawbackClaimableBalanceResultCode -/// { -/// // codes considered as "success" for the operation -/// CLAWBACK_CLAIMABLE_BALANCE_SUCCESS = 0, -/// -/// // codes considered as "failure" for the operation -/// CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST = -1, -/// CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER = -2, -/// CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED = -3 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ClawbackClaimableBalanceResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - DoesNotExist = -1, - NotIssuer = -2, - NotClawbackEnabled = -3, -} - -impl ClawbackClaimableBalanceResultCode { - const _VARIANTS: &[ClawbackClaimableBalanceResultCode] = &[ - ClawbackClaimableBalanceResultCode::Success, - ClawbackClaimableBalanceResultCode::DoesNotExist, - ClawbackClaimableBalanceResultCode::NotIssuer, - ClawbackClaimableBalanceResultCode::NotClawbackEnabled, - ]; - pub const VARIANTS: [ClawbackClaimableBalanceResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Success", "DoesNotExist", "NotIssuer", "NotClawbackEnabled"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::DoesNotExist => "DoesNotExist", - Self::NotIssuer => "NotIssuer", - Self::NotClawbackEnabled => "NotClawbackEnabled", - } - } - - #[must_use] - pub const fn variants() -> [ClawbackClaimableBalanceResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClawbackClaimableBalanceResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ClawbackClaimableBalanceResultCode { - fn variants() -> slice::Iter<'static, ClawbackClaimableBalanceResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for ClawbackClaimableBalanceResultCode {} - -impl fmt::Display for ClawbackClaimableBalanceResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ClawbackClaimableBalanceResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ClawbackClaimableBalanceResultCode::Success, - -1 => ClawbackClaimableBalanceResultCode::DoesNotExist, - -2 => ClawbackClaimableBalanceResultCode::NotIssuer, - -3 => ClawbackClaimableBalanceResultCode::NotClawbackEnabled, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ClawbackClaimableBalanceResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for ClawbackClaimableBalanceResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ClawbackClaimableBalanceResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ClawbackClaimableBalanceResult is an XDR Union defined as: -/// -/// ```text -/// union ClawbackClaimableBalanceResult switch ( -/// ClawbackClaimableBalanceResultCode code) -/// { -/// case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: -/// void; -/// case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: -/// case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: -/// case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: -/// void; -/// }; -/// ``` -/// -// union with discriminant ClawbackClaimableBalanceResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ClawbackClaimableBalanceResult { - Success, - DoesNotExist, - NotIssuer, - NotClawbackEnabled, -} - -#[cfg(feature = "alloc")] -impl Default for ClawbackClaimableBalanceResult { - fn default() -> Self { - Self::Success - } -} - -impl ClawbackClaimableBalanceResult { - const _VARIANTS: &[ClawbackClaimableBalanceResultCode] = &[ - ClawbackClaimableBalanceResultCode::Success, - ClawbackClaimableBalanceResultCode::DoesNotExist, - ClawbackClaimableBalanceResultCode::NotIssuer, - ClawbackClaimableBalanceResultCode::NotClawbackEnabled, - ]; - pub const VARIANTS: [ClawbackClaimableBalanceResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Success", "DoesNotExist", "NotIssuer", "NotClawbackEnabled"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::DoesNotExist => "DoesNotExist", - Self::NotIssuer => "NotIssuer", - Self::NotClawbackEnabled => "NotClawbackEnabled", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ClawbackClaimableBalanceResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ClawbackClaimableBalanceResultCode::Success, - Self::DoesNotExist => ClawbackClaimableBalanceResultCode::DoesNotExist, - Self::NotIssuer => ClawbackClaimableBalanceResultCode::NotIssuer, - Self::NotClawbackEnabled => ClawbackClaimableBalanceResultCode::NotClawbackEnabled, - } - } - - #[must_use] - pub const fn variants() -> [ClawbackClaimableBalanceResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClawbackClaimableBalanceResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ClawbackClaimableBalanceResult { - #[must_use] - fn discriminant(&self) -> ClawbackClaimableBalanceResultCode { - Self::discriminant(self) - } -} - -impl Variants for ClawbackClaimableBalanceResult { - fn variants() -> slice::Iter<'static, ClawbackClaimableBalanceResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for ClawbackClaimableBalanceResult {} - -impl ReadXdr for ClawbackClaimableBalanceResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ClawbackClaimableBalanceResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ClawbackClaimableBalanceResultCode::Success => Self::Success, - ClawbackClaimableBalanceResultCode::DoesNotExist => Self::DoesNotExist, - ClawbackClaimableBalanceResultCode::NotIssuer => Self::NotIssuer, - ClawbackClaimableBalanceResultCode::NotClawbackEnabled => Self::NotClawbackEnabled, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ClawbackClaimableBalanceResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::DoesNotExist => ().write_xdr(w)?, - Self::NotIssuer => ().write_xdr(w)?, - Self::NotClawbackEnabled => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// SetTrustLineFlagsResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum SetTrustLineFlagsResultCode -/// { -/// // codes considered as "success" for the operation -/// SET_TRUST_LINE_FLAGS_SUCCESS = 0, -/// -/// // codes considered as "failure" for the operation -/// SET_TRUST_LINE_FLAGS_MALFORMED = -1, -/// SET_TRUST_LINE_FLAGS_NO_TRUST_LINE = -2, -/// SET_TRUST_LINE_FLAGS_CANT_REVOKE = -3, -/// SET_TRUST_LINE_FLAGS_INVALID_STATE = -4, -/// SET_TRUST_LINE_FLAGS_LOW_RESERVE = -5 // claimable balances can't be created -/// // on revoke due to low reserves -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum SetTrustLineFlagsResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - NoTrustLine = -2, - CantRevoke = -3, - InvalidState = -4, - LowReserve = -5, -} - -impl SetTrustLineFlagsResultCode { - const _VARIANTS: &[SetTrustLineFlagsResultCode] = &[ - SetTrustLineFlagsResultCode::Success, - SetTrustLineFlagsResultCode::Malformed, - SetTrustLineFlagsResultCode::NoTrustLine, - SetTrustLineFlagsResultCode::CantRevoke, - SetTrustLineFlagsResultCode::InvalidState, - SetTrustLineFlagsResultCode::LowReserve, - ]; - pub const VARIANTS: [SetTrustLineFlagsResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "NoTrustLine", - "CantRevoke", - "InvalidState", - "LowReserve", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::NoTrustLine => "NoTrustLine", - Self::CantRevoke => "CantRevoke", - Self::InvalidState => "InvalidState", - Self::LowReserve => "LowReserve", - } - } - - #[must_use] - pub const fn variants() -> [SetTrustLineFlagsResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SetTrustLineFlagsResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for SetTrustLineFlagsResultCode { - fn variants() -> slice::Iter<'static, SetTrustLineFlagsResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for SetTrustLineFlagsResultCode {} - -impl fmt::Display for SetTrustLineFlagsResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for SetTrustLineFlagsResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => SetTrustLineFlagsResultCode::Success, - -1 => SetTrustLineFlagsResultCode::Malformed, - -2 => SetTrustLineFlagsResultCode::NoTrustLine, - -3 => SetTrustLineFlagsResultCode::CantRevoke, - -4 => SetTrustLineFlagsResultCode::InvalidState, - -5 => SetTrustLineFlagsResultCode::LowReserve, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: SetTrustLineFlagsResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for SetTrustLineFlagsResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for SetTrustLineFlagsResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// SetTrustLineFlagsResult is an XDR Union defined as: -/// -/// ```text -/// union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) -/// { -/// case SET_TRUST_LINE_FLAGS_SUCCESS: -/// void; -/// case SET_TRUST_LINE_FLAGS_MALFORMED: -/// case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: -/// case SET_TRUST_LINE_FLAGS_CANT_REVOKE: -/// case SET_TRUST_LINE_FLAGS_INVALID_STATE: -/// case SET_TRUST_LINE_FLAGS_LOW_RESERVE: -/// void; -/// }; -/// ``` -/// -// union with discriminant SetTrustLineFlagsResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum SetTrustLineFlagsResult { - Success, - Malformed, - NoTrustLine, - CantRevoke, - InvalidState, - LowReserve, -} - -#[cfg(feature = "alloc")] -impl Default for SetTrustLineFlagsResult { - fn default() -> Self { - Self::Success - } -} - -impl SetTrustLineFlagsResult { - const _VARIANTS: &[SetTrustLineFlagsResultCode] = &[ - SetTrustLineFlagsResultCode::Success, - SetTrustLineFlagsResultCode::Malformed, - SetTrustLineFlagsResultCode::NoTrustLine, - SetTrustLineFlagsResultCode::CantRevoke, - SetTrustLineFlagsResultCode::InvalidState, - SetTrustLineFlagsResultCode::LowReserve, - ]; - pub const VARIANTS: [SetTrustLineFlagsResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "NoTrustLine", - "CantRevoke", - "InvalidState", - "LowReserve", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::NoTrustLine => "NoTrustLine", - Self::CantRevoke => "CantRevoke", - Self::InvalidState => "InvalidState", - Self::LowReserve => "LowReserve", - } - } - - #[must_use] - pub const fn discriminant(&self) -> SetTrustLineFlagsResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => SetTrustLineFlagsResultCode::Success, - Self::Malformed => SetTrustLineFlagsResultCode::Malformed, - Self::NoTrustLine => SetTrustLineFlagsResultCode::NoTrustLine, - Self::CantRevoke => SetTrustLineFlagsResultCode::CantRevoke, - Self::InvalidState => SetTrustLineFlagsResultCode::InvalidState, - Self::LowReserve => SetTrustLineFlagsResultCode::LowReserve, - } - } - - #[must_use] - pub const fn variants() -> [SetTrustLineFlagsResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SetTrustLineFlagsResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for SetTrustLineFlagsResult { - #[must_use] - fn discriminant(&self) -> SetTrustLineFlagsResultCode { - Self::discriminant(self) - } -} - -impl Variants for SetTrustLineFlagsResult { - fn variants() -> slice::Iter<'static, SetTrustLineFlagsResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for SetTrustLineFlagsResult {} - -impl ReadXdr for SetTrustLineFlagsResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: SetTrustLineFlagsResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - SetTrustLineFlagsResultCode::Success => Self::Success, - SetTrustLineFlagsResultCode::Malformed => Self::Malformed, - SetTrustLineFlagsResultCode::NoTrustLine => Self::NoTrustLine, - SetTrustLineFlagsResultCode::CantRevoke => Self::CantRevoke, - SetTrustLineFlagsResultCode::InvalidState => Self::InvalidState, - SetTrustLineFlagsResultCode::LowReserve => Self::LowReserve, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for SetTrustLineFlagsResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::NoTrustLine => ().write_xdr(w)?, - Self::CantRevoke => ().write_xdr(w)?, - Self::InvalidState => ().write_xdr(w)?, - Self::LowReserve => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// LiquidityPoolDepositResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum LiquidityPoolDepositResultCode -/// { -/// // codes considered as "success" for the operation -/// LIQUIDITY_POOL_DEPOSIT_SUCCESS = 0, -/// -/// // codes considered as "failure" for the operation -/// LIQUIDITY_POOL_DEPOSIT_MALFORMED = -1, // bad input -/// LIQUIDITY_POOL_DEPOSIT_NO_TRUST = -2, // no trust line for one of the -/// // assets -/// LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED = -3, // not authorized for one of the -/// // assets -/// LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED = -4, // not enough balance for one of -/// // the assets -/// LIQUIDITY_POOL_DEPOSIT_LINE_FULL = -5, // pool share trust line doesn't -/// // have sufficient limit -/// LIQUIDITY_POOL_DEPOSIT_BAD_PRICE = -6, // deposit price outside bounds -/// LIQUIDITY_POOL_DEPOSIT_POOL_FULL = -7, // pool reserves are full -/// LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN = -8 // trustline for one of the -/// // assets is frozen -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum LiquidityPoolDepositResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - NoTrust = -2, - NotAuthorized = -3, - Underfunded = -4, - LineFull = -5, - BadPrice = -6, - PoolFull = -7, - TrustlineFrozen = -8, -} - -impl LiquidityPoolDepositResultCode { - const _VARIANTS: &[LiquidityPoolDepositResultCode] = &[ - LiquidityPoolDepositResultCode::Success, - LiquidityPoolDepositResultCode::Malformed, - LiquidityPoolDepositResultCode::NoTrust, - LiquidityPoolDepositResultCode::NotAuthorized, - LiquidityPoolDepositResultCode::Underfunded, - LiquidityPoolDepositResultCode::LineFull, - LiquidityPoolDepositResultCode::BadPrice, - LiquidityPoolDepositResultCode::PoolFull, - LiquidityPoolDepositResultCode::TrustlineFrozen, - ]; - pub const VARIANTS: [LiquidityPoolDepositResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "NoTrust", - "NotAuthorized", - "Underfunded", - "LineFull", - "BadPrice", - "PoolFull", - "TrustlineFrozen", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::NoTrust => "NoTrust", - Self::NotAuthorized => "NotAuthorized", - Self::Underfunded => "Underfunded", - Self::LineFull => "LineFull", - Self::BadPrice => "BadPrice", - Self::PoolFull => "PoolFull", - Self::TrustlineFrozen => "TrustlineFrozen", - } - } - - #[must_use] - pub const fn variants() -> [LiquidityPoolDepositResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LiquidityPoolDepositResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for LiquidityPoolDepositResultCode { - fn variants() -> slice::Iter<'static, LiquidityPoolDepositResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for LiquidityPoolDepositResultCode {} - -impl fmt::Display for LiquidityPoolDepositResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for LiquidityPoolDepositResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => LiquidityPoolDepositResultCode::Success, - -1 => LiquidityPoolDepositResultCode::Malformed, - -2 => LiquidityPoolDepositResultCode::NoTrust, - -3 => LiquidityPoolDepositResultCode::NotAuthorized, - -4 => LiquidityPoolDepositResultCode::Underfunded, - -5 => LiquidityPoolDepositResultCode::LineFull, - -6 => LiquidityPoolDepositResultCode::BadPrice, - -7 => LiquidityPoolDepositResultCode::PoolFull, - -8 => LiquidityPoolDepositResultCode::TrustlineFrozen, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: LiquidityPoolDepositResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for LiquidityPoolDepositResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for LiquidityPoolDepositResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// LiquidityPoolDepositResult is an XDR Union defined as: -/// -/// ```text -/// union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) -/// { -/// case LIQUIDITY_POOL_DEPOSIT_SUCCESS: -/// void; -/// case LIQUIDITY_POOL_DEPOSIT_MALFORMED: -/// case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: -/// case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: -/// case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: -/// case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: -/// case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: -/// case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: -/// case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: -/// void; -/// }; -/// ``` -/// -// union with discriminant LiquidityPoolDepositResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LiquidityPoolDepositResult { - Success, - Malformed, - NoTrust, - NotAuthorized, - Underfunded, - LineFull, - BadPrice, - PoolFull, - TrustlineFrozen, -} - -#[cfg(feature = "alloc")] -impl Default for LiquidityPoolDepositResult { - fn default() -> Self { - Self::Success - } -} - -impl LiquidityPoolDepositResult { - const _VARIANTS: &[LiquidityPoolDepositResultCode] = &[ - LiquidityPoolDepositResultCode::Success, - LiquidityPoolDepositResultCode::Malformed, - LiquidityPoolDepositResultCode::NoTrust, - LiquidityPoolDepositResultCode::NotAuthorized, - LiquidityPoolDepositResultCode::Underfunded, - LiquidityPoolDepositResultCode::LineFull, - LiquidityPoolDepositResultCode::BadPrice, - LiquidityPoolDepositResultCode::PoolFull, - LiquidityPoolDepositResultCode::TrustlineFrozen, - ]; - pub const VARIANTS: [LiquidityPoolDepositResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "NoTrust", - "NotAuthorized", - "Underfunded", - "LineFull", - "BadPrice", - "PoolFull", - "TrustlineFrozen", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::NoTrust => "NoTrust", - Self::NotAuthorized => "NotAuthorized", - Self::Underfunded => "Underfunded", - Self::LineFull => "LineFull", - Self::BadPrice => "BadPrice", - Self::PoolFull => "PoolFull", - Self::TrustlineFrozen => "TrustlineFrozen", - } - } - - #[must_use] - pub const fn discriminant(&self) -> LiquidityPoolDepositResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => LiquidityPoolDepositResultCode::Success, - Self::Malformed => LiquidityPoolDepositResultCode::Malformed, - Self::NoTrust => LiquidityPoolDepositResultCode::NoTrust, - Self::NotAuthorized => LiquidityPoolDepositResultCode::NotAuthorized, - Self::Underfunded => LiquidityPoolDepositResultCode::Underfunded, - Self::LineFull => LiquidityPoolDepositResultCode::LineFull, - Self::BadPrice => LiquidityPoolDepositResultCode::BadPrice, - Self::PoolFull => LiquidityPoolDepositResultCode::PoolFull, - Self::TrustlineFrozen => LiquidityPoolDepositResultCode::TrustlineFrozen, - } - } - - #[must_use] - pub const fn variants() -> [LiquidityPoolDepositResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LiquidityPoolDepositResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LiquidityPoolDepositResult { - #[must_use] - fn discriminant(&self) -> LiquidityPoolDepositResultCode { - Self::discriminant(self) - } -} - -impl Variants for LiquidityPoolDepositResult { - fn variants() -> slice::Iter<'static, LiquidityPoolDepositResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for LiquidityPoolDepositResult {} - -impl ReadXdr for LiquidityPoolDepositResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: LiquidityPoolDepositResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - LiquidityPoolDepositResultCode::Success => Self::Success, - LiquidityPoolDepositResultCode::Malformed => Self::Malformed, - LiquidityPoolDepositResultCode::NoTrust => Self::NoTrust, - LiquidityPoolDepositResultCode::NotAuthorized => Self::NotAuthorized, - LiquidityPoolDepositResultCode::Underfunded => Self::Underfunded, - LiquidityPoolDepositResultCode::LineFull => Self::LineFull, - LiquidityPoolDepositResultCode::BadPrice => Self::BadPrice, - LiquidityPoolDepositResultCode::PoolFull => Self::PoolFull, - LiquidityPoolDepositResultCode::TrustlineFrozen => Self::TrustlineFrozen, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LiquidityPoolDepositResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::NoTrust => ().write_xdr(w)?, - Self::NotAuthorized => ().write_xdr(w)?, - Self::Underfunded => ().write_xdr(w)?, - Self::LineFull => ().write_xdr(w)?, - Self::BadPrice => ().write_xdr(w)?, - Self::PoolFull => ().write_xdr(w)?, - Self::TrustlineFrozen => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// LiquidityPoolWithdrawResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum LiquidityPoolWithdrawResultCode -/// { -/// // codes considered as "success" for the operation -/// LIQUIDITY_POOL_WITHDRAW_SUCCESS = 0, -/// -/// // codes considered as "failure" for the operation -/// LIQUIDITY_POOL_WITHDRAW_MALFORMED = -1, // bad input -/// LIQUIDITY_POOL_WITHDRAW_NO_TRUST = -2, // no trust line for one of the -/// // assets -/// LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED = -3, // not enough balance of the -/// // pool share -/// LIQUIDITY_POOL_WITHDRAW_LINE_FULL = -4, // would go above limit for one -/// // of the assets -/// LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM = -5, // didn't withdraw enough -/// LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN = -6 // trustline for one of the -/// // assets is frozen -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum LiquidityPoolWithdrawResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - NoTrust = -2, - Underfunded = -3, - LineFull = -4, - UnderMinimum = -5, - TrustlineFrozen = -6, -} - -impl LiquidityPoolWithdrawResultCode { - const _VARIANTS: &[LiquidityPoolWithdrawResultCode] = &[ - LiquidityPoolWithdrawResultCode::Success, - LiquidityPoolWithdrawResultCode::Malformed, - LiquidityPoolWithdrawResultCode::NoTrust, - LiquidityPoolWithdrawResultCode::Underfunded, - LiquidityPoolWithdrawResultCode::LineFull, - LiquidityPoolWithdrawResultCode::UnderMinimum, - LiquidityPoolWithdrawResultCode::TrustlineFrozen, - ]; - pub const VARIANTS: [LiquidityPoolWithdrawResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "NoTrust", - "Underfunded", - "LineFull", - "UnderMinimum", - "TrustlineFrozen", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::NoTrust => "NoTrust", - Self::Underfunded => "Underfunded", - Self::LineFull => "LineFull", - Self::UnderMinimum => "UnderMinimum", - Self::TrustlineFrozen => "TrustlineFrozen", - } - } - - #[must_use] - pub const fn variants() -> [LiquidityPoolWithdrawResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LiquidityPoolWithdrawResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for LiquidityPoolWithdrawResultCode { - fn variants() -> slice::Iter<'static, LiquidityPoolWithdrawResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for LiquidityPoolWithdrawResultCode {} - -impl fmt::Display for LiquidityPoolWithdrawResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for LiquidityPoolWithdrawResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => LiquidityPoolWithdrawResultCode::Success, - -1 => LiquidityPoolWithdrawResultCode::Malformed, - -2 => LiquidityPoolWithdrawResultCode::NoTrust, - -3 => LiquidityPoolWithdrawResultCode::Underfunded, - -4 => LiquidityPoolWithdrawResultCode::LineFull, - -5 => LiquidityPoolWithdrawResultCode::UnderMinimum, - -6 => LiquidityPoolWithdrawResultCode::TrustlineFrozen, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: LiquidityPoolWithdrawResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for LiquidityPoolWithdrawResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for LiquidityPoolWithdrawResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// LiquidityPoolWithdrawResult is an XDR Union defined as: -/// -/// ```text -/// union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) -/// { -/// case LIQUIDITY_POOL_WITHDRAW_SUCCESS: -/// void; -/// case LIQUIDITY_POOL_WITHDRAW_MALFORMED: -/// case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: -/// case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: -/// case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: -/// case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: -/// case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: -/// void; -/// }; -/// ``` -/// -// union with discriminant LiquidityPoolWithdrawResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum LiquidityPoolWithdrawResult { - Success, - Malformed, - NoTrust, - Underfunded, - LineFull, - UnderMinimum, - TrustlineFrozen, -} - -#[cfg(feature = "alloc")] -impl Default for LiquidityPoolWithdrawResult { - fn default() -> Self { - Self::Success - } -} - -impl LiquidityPoolWithdrawResult { - const _VARIANTS: &[LiquidityPoolWithdrawResultCode] = &[ - LiquidityPoolWithdrawResultCode::Success, - LiquidityPoolWithdrawResultCode::Malformed, - LiquidityPoolWithdrawResultCode::NoTrust, - LiquidityPoolWithdrawResultCode::Underfunded, - LiquidityPoolWithdrawResultCode::LineFull, - LiquidityPoolWithdrawResultCode::UnderMinimum, - LiquidityPoolWithdrawResultCode::TrustlineFrozen, - ]; - pub const VARIANTS: [LiquidityPoolWithdrawResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "NoTrust", - "Underfunded", - "LineFull", - "UnderMinimum", - "TrustlineFrozen", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::NoTrust => "NoTrust", - Self::Underfunded => "Underfunded", - Self::LineFull => "LineFull", - Self::UnderMinimum => "UnderMinimum", - Self::TrustlineFrozen => "TrustlineFrozen", - } - } - - #[must_use] - pub const fn discriminant(&self) -> LiquidityPoolWithdrawResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => LiquidityPoolWithdrawResultCode::Success, - Self::Malformed => LiquidityPoolWithdrawResultCode::Malformed, - Self::NoTrust => LiquidityPoolWithdrawResultCode::NoTrust, - Self::Underfunded => LiquidityPoolWithdrawResultCode::Underfunded, - Self::LineFull => LiquidityPoolWithdrawResultCode::LineFull, - Self::UnderMinimum => LiquidityPoolWithdrawResultCode::UnderMinimum, - Self::TrustlineFrozen => LiquidityPoolWithdrawResultCode::TrustlineFrozen, - } - } - - #[must_use] - pub const fn variants() -> [LiquidityPoolWithdrawResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for LiquidityPoolWithdrawResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for LiquidityPoolWithdrawResult { - #[must_use] - fn discriminant(&self) -> LiquidityPoolWithdrawResultCode { - Self::discriminant(self) - } -} - -impl Variants for LiquidityPoolWithdrawResult { - fn variants() -> slice::Iter<'static, LiquidityPoolWithdrawResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for LiquidityPoolWithdrawResult {} - -impl ReadXdr for LiquidityPoolWithdrawResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: LiquidityPoolWithdrawResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - LiquidityPoolWithdrawResultCode::Success => Self::Success, - LiquidityPoolWithdrawResultCode::Malformed => Self::Malformed, - LiquidityPoolWithdrawResultCode::NoTrust => Self::NoTrust, - LiquidityPoolWithdrawResultCode::Underfunded => Self::Underfunded, - LiquidityPoolWithdrawResultCode::LineFull => Self::LineFull, - LiquidityPoolWithdrawResultCode::UnderMinimum => Self::UnderMinimum, - LiquidityPoolWithdrawResultCode::TrustlineFrozen => Self::TrustlineFrozen, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for LiquidityPoolWithdrawResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::NoTrust => ().write_xdr(w)?, - Self::Underfunded => ().write_xdr(w)?, - Self::LineFull => ().write_xdr(w)?, - Self::UnderMinimum => ().write_xdr(w)?, - Self::TrustlineFrozen => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// InvokeHostFunctionResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum InvokeHostFunctionResultCode -/// { -/// // codes considered as "success" for the operation -/// INVOKE_HOST_FUNCTION_SUCCESS = 0, -/// -/// // codes considered as "failure" for the operation -/// INVOKE_HOST_FUNCTION_MALFORMED = -1, -/// INVOKE_HOST_FUNCTION_TRAPPED = -2, -/// INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED = -3, -/// INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED = -4, -/// INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE = -5 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum InvokeHostFunctionResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - Trapped = -2, - ResourceLimitExceeded = -3, - EntryArchived = -4, - InsufficientRefundableFee = -5, -} - -impl InvokeHostFunctionResultCode { - const _VARIANTS: &[InvokeHostFunctionResultCode] = &[ - InvokeHostFunctionResultCode::Success, - InvokeHostFunctionResultCode::Malformed, - InvokeHostFunctionResultCode::Trapped, - InvokeHostFunctionResultCode::ResourceLimitExceeded, - InvokeHostFunctionResultCode::EntryArchived, - InvokeHostFunctionResultCode::InsufficientRefundableFee, - ]; - pub const VARIANTS: [InvokeHostFunctionResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "Trapped", - "ResourceLimitExceeded", - "EntryArchived", - "InsufficientRefundableFee", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::Trapped => "Trapped", - Self::ResourceLimitExceeded => "ResourceLimitExceeded", - Self::EntryArchived => "EntryArchived", - Self::InsufficientRefundableFee => "InsufficientRefundableFee", - } - } - - #[must_use] - pub const fn variants() -> [InvokeHostFunctionResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for InvokeHostFunctionResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for InvokeHostFunctionResultCode { - fn variants() -> slice::Iter<'static, InvokeHostFunctionResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for InvokeHostFunctionResultCode {} - -impl fmt::Display for InvokeHostFunctionResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for InvokeHostFunctionResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => InvokeHostFunctionResultCode::Success, - -1 => InvokeHostFunctionResultCode::Malformed, - -2 => InvokeHostFunctionResultCode::Trapped, - -3 => InvokeHostFunctionResultCode::ResourceLimitExceeded, - -4 => InvokeHostFunctionResultCode::EntryArchived, - -5 => InvokeHostFunctionResultCode::InsufficientRefundableFee, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: InvokeHostFunctionResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for InvokeHostFunctionResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for InvokeHostFunctionResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// InvokeHostFunctionResult is an XDR Union defined as: -/// -/// ```text -/// union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) -/// { -/// case INVOKE_HOST_FUNCTION_SUCCESS: -/// Hash success; // sha256(InvokeHostFunctionSuccessPreImage) -/// case INVOKE_HOST_FUNCTION_MALFORMED: -/// case INVOKE_HOST_FUNCTION_TRAPPED: -/// case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: -/// case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: -/// case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: -/// void; -/// }; -/// ``` -/// -// union with discriminant InvokeHostFunctionResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum InvokeHostFunctionResult { - Success(Hash), - Malformed, - Trapped, - ResourceLimitExceeded, - EntryArchived, - InsufficientRefundableFee, -} - -#[cfg(feature = "alloc")] -impl Default for InvokeHostFunctionResult { - fn default() -> Self { - Self::Success(Hash::default()) - } -} - -impl InvokeHostFunctionResult { - const _VARIANTS: &[InvokeHostFunctionResultCode] = &[ - InvokeHostFunctionResultCode::Success, - InvokeHostFunctionResultCode::Malformed, - InvokeHostFunctionResultCode::Trapped, - InvokeHostFunctionResultCode::ResourceLimitExceeded, - InvokeHostFunctionResultCode::EntryArchived, - InvokeHostFunctionResultCode::InsufficientRefundableFee, - ]; - pub const VARIANTS: [InvokeHostFunctionResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "Trapped", - "ResourceLimitExceeded", - "EntryArchived", - "InsufficientRefundableFee", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success(_) => "Success", - Self::Malformed => "Malformed", - Self::Trapped => "Trapped", - Self::ResourceLimitExceeded => "ResourceLimitExceeded", - Self::EntryArchived => "EntryArchived", - Self::InsufficientRefundableFee => "InsufficientRefundableFee", - } - } - - #[must_use] - pub const fn discriminant(&self) -> InvokeHostFunctionResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success(_) => InvokeHostFunctionResultCode::Success, - Self::Malformed => InvokeHostFunctionResultCode::Malformed, - Self::Trapped => InvokeHostFunctionResultCode::Trapped, - Self::ResourceLimitExceeded => InvokeHostFunctionResultCode::ResourceLimitExceeded, - Self::EntryArchived => InvokeHostFunctionResultCode::EntryArchived, - Self::InsufficientRefundableFee => { - InvokeHostFunctionResultCode::InsufficientRefundableFee - } - } - } - - #[must_use] - pub const fn variants() -> [InvokeHostFunctionResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for InvokeHostFunctionResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for InvokeHostFunctionResult { - #[must_use] - fn discriminant(&self) -> InvokeHostFunctionResultCode { - Self::discriminant(self) - } -} - -impl Variants for InvokeHostFunctionResult { - fn variants() -> slice::Iter<'static, InvokeHostFunctionResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for InvokeHostFunctionResult {} - -impl ReadXdr for InvokeHostFunctionResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: InvokeHostFunctionResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - InvokeHostFunctionResultCode::Success => Self::Success(Hash::read_xdr(r)?), - InvokeHostFunctionResultCode::Malformed => Self::Malformed, - InvokeHostFunctionResultCode::Trapped => Self::Trapped, - InvokeHostFunctionResultCode::ResourceLimitExceeded => Self::ResourceLimitExceeded, - InvokeHostFunctionResultCode::EntryArchived => Self::EntryArchived, - InvokeHostFunctionResultCode::InsufficientRefundableFee => { - Self::InsufficientRefundableFee - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for InvokeHostFunctionResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success(v) => v.write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::Trapped => ().write_xdr(w)?, - Self::ResourceLimitExceeded => ().write_xdr(w)?, - Self::EntryArchived => ().write_xdr(w)?, - Self::InsufficientRefundableFee => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// ExtendFootprintTtlResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum ExtendFootprintTTLResultCode -/// { -/// // codes considered as "success" for the operation -/// EXTEND_FOOTPRINT_TTL_SUCCESS = 0, -/// -/// // codes considered as "failure" for the operation -/// EXTEND_FOOTPRINT_TTL_MALFORMED = -1, -/// EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED = -2, -/// EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE = -3 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ExtendFootprintTtlResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - ResourceLimitExceeded = -2, - InsufficientRefundableFee = -3, -} - -impl ExtendFootprintTtlResultCode { - const _VARIANTS: &[ExtendFootprintTtlResultCode] = &[ - ExtendFootprintTtlResultCode::Success, - ExtendFootprintTtlResultCode::Malformed, - ExtendFootprintTtlResultCode::ResourceLimitExceeded, - ExtendFootprintTtlResultCode::InsufficientRefundableFee, - ]; - pub const VARIANTS: [ExtendFootprintTtlResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "ResourceLimitExceeded", - "InsufficientRefundableFee", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::ResourceLimitExceeded => "ResourceLimitExceeded", - Self::InsufficientRefundableFee => "InsufficientRefundableFee", - } - } - - #[must_use] - pub const fn variants() -> [ExtendFootprintTtlResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ExtendFootprintTtlResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ExtendFootprintTtlResultCode { - fn variants() -> slice::Iter<'static, ExtendFootprintTtlResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for ExtendFootprintTtlResultCode {} - -impl fmt::Display for ExtendFootprintTtlResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ExtendFootprintTtlResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ExtendFootprintTtlResultCode::Success, - -1 => ExtendFootprintTtlResultCode::Malformed, - -2 => ExtendFootprintTtlResultCode::ResourceLimitExceeded, - -3 => ExtendFootprintTtlResultCode::InsufficientRefundableFee, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ExtendFootprintTtlResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for ExtendFootprintTtlResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ExtendFootprintTtlResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ExtendFootprintTtlResult is an XDR Union defined as: -/// -/// ```text -/// union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) -/// { -/// case EXTEND_FOOTPRINT_TTL_SUCCESS: -/// void; -/// case EXTEND_FOOTPRINT_TTL_MALFORMED: -/// case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: -/// case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: -/// void; -/// }; -/// ``` -/// -// union with discriminant ExtendFootprintTtlResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ExtendFootprintTtlResult { - Success, - Malformed, - ResourceLimitExceeded, - InsufficientRefundableFee, -} - -#[cfg(feature = "alloc")] -impl Default for ExtendFootprintTtlResult { - fn default() -> Self { - Self::Success - } -} - -impl ExtendFootprintTtlResult { - const _VARIANTS: &[ExtendFootprintTtlResultCode] = &[ - ExtendFootprintTtlResultCode::Success, - ExtendFootprintTtlResultCode::Malformed, - ExtendFootprintTtlResultCode::ResourceLimitExceeded, - ExtendFootprintTtlResultCode::InsufficientRefundableFee, - ]; - pub const VARIANTS: [ExtendFootprintTtlResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "ResourceLimitExceeded", - "InsufficientRefundableFee", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::ResourceLimitExceeded => "ResourceLimitExceeded", - Self::InsufficientRefundableFee => "InsufficientRefundableFee", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ExtendFootprintTtlResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ExtendFootprintTtlResultCode::Success, - Self::Malformed => ExtendFootprintTtlResultCode::Malformed, - Self::ResourceLimitExceeded => ExtendFootprintTtlResultCode::ResourceLimitExceeded, - Self::InsufficientRefundableFee => { - ExtendFootprintTtlResultCode::InsufficientRefundableFee - } - } - } - - #[must_use] - pub const fn variants() -> [ExtendFootprintTtlResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ExtendFootprintTtlResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ExtendFootprintTtlResult { - #[must_use] - fn discriminant(&self) -> ExtendFootprintTtlResultCode { - Self::discriminant(self) - } -} - -impl Variants for ExtendFootprintTtlResult { - fn variants() -> slice::Iter<'static, ExtendFootprintTtlResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for ExtendFootprintTtlResult {} - -impl ReadXdr for ExtendFootprintTtlResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ExtendFootprintTtlResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ExtendFootprintTtlResultCode::Success => Self::Success, - ExtendFootprintTtlResultCode::Malformed => Self::Malformed, - ExtendFootprintTtlResultCode::ResourceLimitExceeded => Self::ResourceLimitExceeded, - ExtendFootprintTtlResultCode::InsufficientRefundableFee => { - Self::InsufficientRefundableFee - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ExtendFootprintTtlResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::ResourceLimitExceeded => ().write_xdr(w)?, - Self::InsufficientRefundableFee => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// RestoreFootprintResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum RestoreFootprintResultCode -/// { -/// // codes considered as "success" for the operation -/// RESTORE_FOOTPRINT_SUCCESS = 0, -/// -/// // codes considered as "failure" for the operation -/// RESTORE_FOOTPRINT_MALFORMED = -1, -/// RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED = -2, -/// RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE = -3 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum RestoreFootprintResultCode { - #[cfg_attr(feature = "alloc", default)] - Success = 0, - Malformed = -1, - ResourceLimitExceeded = -2, - InsufficientRefundableFee = -3, -} - -impl RestoreFootprintResultCode { - const _VARIANTS: &[RestoreFootprintResultCode] = &[ - RestoreFootprintResultCode::Success, - RestoreFootprintResultCode::Malformed, - RestoreFootprintResultCode::ResourceLimitExceeded, - RestoreFootprintResultCode::InsufficientRefundableFee, - ]; - pub const VARIANTS: [RestoreFootprintResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "ResourceLimitExceeded", - "InsufficientRefundableFee", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::ResourceLimitExceeded => "ResourceLimitExceeded", - Self::InsufficientRefundableFee => "InsufficientRefundableFee", - } - } - - #[must_use] - pub const fn variants() -> [RestoreFootprintResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for RestoreFootprintResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for RestoreFootprintResultCode { - fn variants() -> slice::Iter<'static, RestoreFootprintResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for RestoreFootprintResultCode {} - -impl fmt::Display for RestoreFootprintResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for RestoreFootprintResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => RestoreFootprintResultCode::Success, - -1 => RestoreFootprintResultCode::Malformed, - -2 => RestoreFootprintResultCode::ResourceLimitExceeded, - -3 => RestoreFootprintResultCode::InsufficientRefundableFee, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: RestoreFootprintResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for RestoreFootprintResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for RestoreFootprintResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// RestoreFootprintResult is an XDR Union defined as: -/// -/// ```text -/// union RestoreFootprintResult switch (RestoreFootprintResultCode code) -/// { -/// case RESTORE_FOOTPRINT_SUCCESS: -/// void; -/// case RESTORE_FOOTPRINT_MALFORMED: -/// case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: -/// case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: -/// void; -/// }; -/// ``` -/// -// union with discriminant RestoreFootprintResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum RestoreFootprintResult { - Success, - Malformed, - ResourceLimitExceeded, - InsufficientRefundableFee, -} - -#[cfg(feature = "alloc")] -impl Default for RestoreFootprintResult { - fn default() -> Self { - Self::Success - } -} - -impl RestoreFootprintResult { - const _VARIANTS: &[RestoreFootprintResultCode] = &[ - RestoreFootprintResultCode::Success, - RestoreFootprintResultCode::Malformed, - RestoreFootprintResultCode::ResourceLimitExceeded, - RestoreFootprintResultCode::InsufficientRefundableFee, - ]; - pub const VARIANTS: [RestoreFootprintResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Success", - "Malformed", - "ResourceLimitExceeded", - "InsufficientRefundableFee", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Success => "Success", - Self::Malformed => "Malformed", - Self::ResourceLimitExceeded => "ResourceLimitExceeded", - Self::InsufficientRefundableFee => "InsufficientRefundableFee", - } - } - - #[must_use] - pub const fn discriminant(&self) -> RestoreFootprintResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::Success => RestoreFootprintResultCode::Success, - Self::Malformed => RestoreFootprintResultCode::Malformed, - Self::ResourceLimitExceeded => RestoreFootprintResultCode::ResourceLimitExceeded, - Self::InsufficientRefundableFee => { - RestoreFootprintResultCode::InsufficientRefundableFee - } - } - } - - #[must_use] - pub const fn variants() -> [RestoreFootprintResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for RestoreFootprintResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for RestoreFootprintResult { - #[must_use] - fn discriminant(&self) -> RestoreFootprintResultCode { - Self::discriminant(self) - } -} - -impl Variants for RestoreFootprintResult { - fn variants() -> slice::Iter<'static, RestoreFootprintResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for RestoreFootprintResult {} - -impl ReadXdr for RestoreFootprintResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: RestoreFootprintResultCode = - ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - RestoreFootprintResultCode::Success => Self::Success, - RestoreFootprintResultCode::Malformed => Self::Malformed, - RestoreFootprintResultCode::ResourceLimitExceeded => Self::ResourceLimitExceeded, - RestoreFootprintResultCode::InsufficientRefundableFee => { - Self::InsufficientRefundableFee - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for RestoreFootprintResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Success => ().write_xdr(w)?, - Self::Malformed => ().write_xdr(w)?, - Self::ResourceLimitExceeded => ().write_xdr(w)?, - Self::InsufficientRefundableFee => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// OperationResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum OperationResultCode -/// { -/// opINNER = 0, // inner object result is valid -/// -/// opBAD_AUTH = -1, // too few valid signatures / wrong network -/// opNO_ACCOUNT = -2, // source account was not found -/// opNOT_SUPPORTED = -3, // operation not supported at this time -/// opTOO_MANY_SUBENTRIES = -4, // max number of subentries already reached -/// opEXCEEDED_WORK_LIMIT = -5, // operation did too much work -/// opTOO_MANY_SPONSORING = -6 // account is sponsoring too many entries -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum OperationResultCode { - #[cfg_attr(feature = "alloc", default)] - OpInner = 0, - OpBadAuth = -1, - OpNoAccount = -2, - OpNotSupported = -3, - OpTooManySubentries = -4, - OpExceededWorkLimit = -5, - OpTooManySponsoring = -6, -} - -impl OperationResultCode { - const _VARIANTS: &[OperationResultCode] = &[ - OperationResultCode::OpInner, - OperationResultCode::OpBadAuth, - OperationResultCode::OpNoAccount, - OperationResultCode::OpNotSupported, - OperationResultCode::OpTooManySubentries, - OperationResultCode::OpExceededWorkLimit, - OperationResultCode::OpTooManySponsoring, - ]; - pub const VARIANTS: [OperationResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "OpInner", - "OpBadAuth", - "OpNoAccount", - "OpNotSupported", - "OpTooManySubentries", - "OpExceededWorkLimit", - "OpTooManySponsoring", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::OpInner => "OpInner", - Self::OpBadAuth => "OpBadAuth", - Self::OpNoAccount => "OpNoAccount", - Self::OpNotSupported => "OpNotSupported", - Self::OpTooManySubentries => "OpTooManySubentries", - Self::OpExceededWorkLimit => "OpExceededWorkLimit", - Self::OpTooManySponsoring => "OpTooManySponsoring", - } - } - - #[must_use] - pub const fn variants() -> [OperationResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for OperationResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for OperationResultCode { - fn variants() -> slice::Iter<'static, OperationResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for OperationResultCode {} - -impl fmt::Display for OperationResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for OperationResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => OperationResultCode::OpInner, - -1 => OperationResultCode::OpBadAuth, - -2 => OperationResultCode::OpNoAccount, - -3 => OperationResultCode::OpNotSupported, - -4 => OperationResultCode::OpTooManySubentries, - -5 => OperationResultCode::OpExceededWorkLimit, - -6 => OperationResultCode::OpTooManySponsoring, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: OperationResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for OperationResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for OperationResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// OperationResultTr is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (OperationType type) -/// { -/// case CREATE_ACCOUNT: -/// CreateAccountResult createAccountResult; -/// case PAYMENT: -/// PaymentResult paymentResult; -/// case PATH_PAYMENT_STRICT_RECEIVE: -/// PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; -/// case MANAGE_SELL_OFFER: -/// ManageSellOfferResult manageSellOfferResult; -/// case CREATE_PASSIVE_SELL_OFFER: -/// ManageSellOfferResult createPassiveSellOfferResult; -/// case SET_OPTIONS: -/// SetOptionsResult setOptionsResult; -/// case CHANGE_TRUST: -/// ChangeTrustResult changeTrustResult; -/// case ALLOW_TRUST: -/// AllowTrustResult allowTrustResult; -/// case ACCOUNT_MERGE: -/// AccountMergeResult accountMergeResult; -/// case INFLATION: -/// InflationResult inflationResult; -/// case MANAGE_DATA: -/// ManageDataResult manageDataResult; -/// case BUMP_SEQUENCE: -/// BumpSequenceResult bumpSeqResult; -/// case MANAGE_BUY_OFFER: -/// ManageBuyOfferResult manageBuyOfferResult; -/// case PATH_PAYMENT_STRICT_SEND: -/// PathPaymentStrictSendResult pathPaymentStrictSendResult; -/// case CREATE_CLAIMABLE_BALANCE: -/// CreateClaimableBalanceResult createClaimableBalanceResult; -/// case CLAIM_CLAIMABLE_BALANCE: -/// ClaimClaimableBalanceResult claimClaimableBalanceResult; -/// case BEGIN_SPONSORING_FUTURE_RESERVES: -/// BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; -/// case END_SPONSORING_FUTURE_RESERVES: -/// EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; -/// case REVOKE_SPONSORSHIP: -/// RevokeSponsorshipResult revokeSponsorshipResult; -/// case CLAWBACK: -/// ClawbackResult clawbackResult; -/// case CLAWBACK_CLAIMABLE_BALANCE: -/// ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; -/// case SET_TRUST_LINE_FLAGS: -/// SetTrustLineFlagsResult setTrustLineFlagsResult; -/// case LIQUIDITY_POOL_DEPOSIT: -/// LiquidityPoolDepositResult liquidityPoolDepositResult; -/// case LIQUIDITY_POOL_WITHDRAW: -/// LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; -/// case INVOKE_HOST_FUNCTION: -/// InvokeHostFunctionResult invokeHostFunctionResult; -/// case EXTEND_FOOTPRINT_TTL: -/// ExtendFootprintTTLResult extendFootprintTTLResult; -/// case RESTORE_FOOTPRINT: -/// RestoreFootprintResult restoreFootprintResult; -/// } -/// ``` -/// -// union with discriminant OperationType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum OperationResultTr { - CreateAccount(CreateAccountResult), - Payment(PaymentResult), - PathPaymentStrictReceive(PathPaymentStrictReceiveResult), - ManageSellOffer(ManageSellOfferResult), - CreatePassiveSellOffer(ManageSellOfferResult), - SetOptions(SetOptionsResult), - ChangeTrust(ChangeTrustResult), - AllowTrust(AllowTrustResult), - AccountMerge(AccountMergeResult), - Inflation(InflationResult), - ManageData(ManageDataResult), - BumpSequence(BumpSequenceResult), - ManageBuyOffer(ManageBuyOfferResult), - PathPaymentStrictSend(PathPaymentStrictSendResult), - CreateClaimableBalance(CreateClaimableBalanceResult), - ClaimClaimableBalance(ClaimClaimableBalanceResult), - BeginSponsoringFutureReserves(BeginSponsoringFutureReservesResult), - EndSponsoringFutureReserves(EndSponsoringFutureReservesResult), - RevokeSponsorship(RevokeSponsorshipResult), - Clawback(ClawbackResult), - ClawbackClaimableBalance(ClawbackClaimableBalanceResult), - SetTrustLineFlags(SetTrustLineFlagsResult), - LiquidityPoolDeposit(LiquidityPoolDepositResult), - LiquidityPoolWithdraw(LiquidityPoolWithdrawResult), - InvokeHostFunction(InvokeHostFunctionResult), - ExtendFootprintTtl(ExtendFootprintTtlResult), - RestoreFootprint(RestoreFootprintResult), -} - -#[cfg(feature = "alloc")] -impl Default for OperationResultTr { - fn default() -> Self { - Self::CreateAccount(CreateAccountResult::default()) - } -} - -impl OperationResultTr { - const _VARIANTS: &[OperationType] = &[ - OperationType::CreateAccount, - OperationType::Payment, - OperationType::PathPaymentStrictReceive, - OperationType::ManageSellOffer, - OperationType::CreatePassiveSellOffer, - OperationType::SetOptions, - OperationType::ChangeTrust, - OperationType::AllowTrust, - OperationType::AccountMerge, - OperationType::Inflation, - OperationType::ManageData, - OperationType::BumpSequence, - OperationType::ManageBuyOffer, - OperationType::PathPaymentStrictSend, - OperationType::CreateClaimableBalance, - OperationType::ClaimClaimableBalance, - OperationType::BeginSponsoringFutureReserves, - OperationType::EndSponsoringFutureReserves, - OperationType::RevokeSponsorship, - OperationType::Clawback, - OperationType::ClawbackClaimableBalance, - OperationType::SetTrustLineFlags, - OperationType::LiquidityPoolDeposit, - OperationType::LiquidityPoolWithdraw, - OperationType::InvokeHostFunction, - OperationType::ExtendFootprintTtl, - OperationType::RestoreFootprint, - ]; - pub const VARIANTS: [OperationType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "CreateAccount", - "Payment", - "PathPaymentStrictReceive", - "ManageSellOffer", - "CreatePassiveSellOffer", - "SetOptions", - "ChangeTrust", - "AllowTrust", - "AccountMerge", - "Inflation", - "ManageData", - "BumpSequence", - "ManageBuyOffer", - "PathPaymentStrictSend", - "CreateClaimableBalance", - "ClaimClaimableBalance", - "BeginSponsoringFutureReserves", - "EndSponsoringFutureReserves", - "RevokeSponsorship", - "Clawback", - "ClawbackClaimableBalance", - "SetTrustLineFlags", - "LiquidityPoolDeposit", - "LiquidityPoolWithdraw", - "InvokeHostFunction", - "ExtendFootprintTtl", - "RestoreFootprint", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::CreateAccount(_) => "CreateAccount", - Self::Payment(_) => "Payment", - Self::PathPaymentStrictReceive(_) => "PathPaymentStrictReceive", - Self::ManageSellOffer(_) => "ManageSellOffer", - Self::CreatePassiveSellOffer(_) => "CreatePassiveSellOffer", - Self::SetOptions(_) => "SetOptions", - Self::ChangeTrust(_) => "ChangeTrust", - Self::AllowTrust(_) => "AllowTrust", - Self::AccountMerge(_) => "AccountMerge", - Self::Inflation(_) => "Inflation", - Self::ManageData(_) => "ManageData", - Self::BumpSequence(_) => "BumpSequence", - Self::ManageBuyOffer(_) => "ManageBuyOffer", - Self::PathPaymentStrictSend(_) => "PathPaymentStrictSend", - Self::CreateClaimableBalance(_) => "CreateClaimableBalance", - Self::ClaimClaimableBalance(_) => "ClaimClaimableBalance", - Self::BeginSponsoringFutureReserves(_) => "BeginSponsoringFutureReserves", - Self::EndSponsoringFutureReserves(_) => "EndSponsoringFutureReserves", - Self::RevokeSponsorship(_) => "RevokeSponsorship", - Self::Clawback(_) => "Clawback", - Self::ClawbackClaimableBalance(_) => "ClawbackClaimableBalance", - Self::SetTrustLineFlags(_) => "SetTrustLineFlags", - Self::LiquidityPoolDeposit(_) => "LiquidityPoolDeposit", - Self::LiquidityPoolWithdraw(_) => "LiquidityPoolWithdraw", - Self::InvokeHostFunction(_) => "InvokeHostFunction", - Self::ExtendFootprintTtl(_) => "ExtendFootprintTtl", - Self::RestoreFootprint(_) => "RestoreFootprint", - } - } - - #[must_use] - pub const fn discriminant(&self) -> OperationType { - #[allow(clippy::match_same_arms)] - match self { - Self::CreateAccount(_) => OperationType::CreateAccount, - Self::Payment(_) => OperationType::Payment, - Self::PathPaymentStrictReceive(_) => OperationType::PathPaymentStrictReceive, - Self::ManageSellOffer(_) => OperationType::ManageSellOffer, - Self::CreatePassiveSellOffer(_) => OperationType::CreatePassiveSellOffer, - Self::SetOptions(_) => OperationType::SetOptions, - Self::ChangeTrust(_) => OperationType::ChangeTrust, - Self::AllowTrust(_) => OperationType::AllowTrust, - Self::AccountMerge(_) => OperationType::AccountMerge, - Self::Inflation(_) => OperationType::Inflation, - Self::ManageData(_) => OperationType::ManageData, - Self::BumpSequence(_) => OperationType::BumpSequence, - Self::ManageBuyOffer(_) => OperationType::ManageBuyOffer, - Self::PathPaymentStrictSend(_) => OperationType::PathPaymentStrictSend, - Self::CreateClaimableBalance(_) => OperationType::CreateClaimableBalance, - Self::ClaimClaimableBalance(_) => OperationType::ClaimClaimableBalance, - Self::BeginSponsoringFutureReserves(_) => OperationType::BeginSponsoringFutureReserves, - Self::EndSponsoringFutureReserves(_) => OperationType::EndSponsoringFutureReserves, - Self::RevokeSponsorship(_) => OperationType::RevokeSponsorship, - Self::Clawback(_) => OperationType::Clawback, - Self::ClawbackClaimableBalance(_) => OperationType::ClawbackClaimableBalance, - Self::SetTrustLineFlags(_) => OperationType::SetTrustLineFlags, - Self::LiquidityPoolDeposit(_) => OperationType::LiquidityPoolDeposit, - Self::LiquidityPoolWithdraw(_) => OperationType::LiquidityPoolWithdraw, - Self::InvokeHostFunction(_) => OperationType::InvokeHostFunction, - Self::ExtendFootprintTtl(_) => OperationType::ExtendFootprintTtl, - Self::RestoreFootprint(_) => OperationType::RestoreFootprint, - } - } - - #[must_use] - pub const fn variants() -> [OperationType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for OperationResultTr { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for OperationResultTr { - #[must_use] - fn discriminant(&self) -> OperationType { - Self::discriminant(self) - } -} - -impl Variants for OperationResultTr { - fn variants() -> slice::Iter<'static, OperationType> { - Self::VARIANTS.iter() - } -} - -impl Union for OperationResultTr {} - -impl ReadXdr for OperationResultTr { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: OperationType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - OperationType::CreateAccount => { - Self::CreateAccount(CreateAccountResult::read_xdr(r)?) - } - OperationType::Payment => Self::Payment(PaymentResult::read_xdr(r)?), - OperationType::PathPaymentStrictReceive => { - Self::PathPaymentStrictReceive(PathPaymentStrictReceiveResult::read_xdr(r)?) - } - OperationType::ManageSellOffer => { - Self::ManageSellOffer(ManageSellOfferResult::read_xdr(r)?) - } - OperationType::CreatePassiveSellOffer => { - Self::CreatePassiveSellOffer(ManageSellOfferResult::read_xdr(r)?) - } - OperationType::SetOptions => Self::SetOptions(SetOptionsResult::read_xdr(r)?), - OperationType::ChangeTrust => Self::ChangeTrust(ChangeTrustResult::read_xdr(r)?), - OperationType::AllowTrust => Self::AllowTrust(AllowTrustResult::read_xdr(r)?), - OperationType::AccountMerge => Self::AccountMerge(AccountMergeResult::read_xdr(r)?), - OperationType::Inflation => Self::Inflation(InflationResult::read_xdr(r)?), - OperationType::ManageData => Self::ManageData(ManageDataResult::read_xdr(r)?), - OperationType::BumpSequence => Self::BumpSequence(BumpSequenceResult::read_xdr(r)?), - OperationType::ManageBuyOffer => { - Self::ManageBuyOffer(ManageBuyOfferResult::read_xdr(r)?) - } - OperationType::PathPaymentStrictSend => { - Self::PathPaymentStrictSend(PathPaymentStrictSendResult::read_xdr(r)?) - } - OperationType::CreateClaimableBalance => { - Self::CreateClaimableBalance(CreateClaimableBalanceResult::read_xdr(r)?) - } - OperationType::ClaimClaimableBalance => { - Self::ClaimClaimableBalance(ClaimClaimableBalanceResult::read_xdr(r)?) - } - OperationType::BeginSponsoringFutureReserves => { - Self::BeginSponsoringFutureReserves( - BeginSponsoringFutureReservesResult::read_xdr(r)?, - ) - } - OperationType::EndSponsoringFutureReserves => Self::EndSponsoringFutureReserves( - EndSponsoringFutureReservesResult::read_xdr(r)?, - ), - OperationType::RevokeSponsorship => { - Self::RevokeSponsorship(RevokeSponsorshipResult::read_xdr(r)?) - } - OperationType::Clawback => Self::Clawback(ClawbackResult::read_xdr(r)?), - OperationType::ClawbackClaimableBalance => { - Self::ClawbackClaimableBalance(ClawbackClaimableBalanceResult::read_xdr(r)?) - } - OperationType::SetTrustLineFlags => { - Self::SetTrustLineFlags(SetTrustLineFlagsResult::read_xdr(r)?) - } - OperationType::LiquidityPoolDeposit => { - Self::LiquidityPoolDeposit(LiquidityPoolDepositResult::read_xdr(r)?) - } - OperationType::LiquidityPoolWithdraw => { - Self::LiquidityPoolWithdraw(LiquidityPoolWithdrawResult::read_xdr(r)?) - } - OperationType::InvokeHostFunction => { - Self::InvokeHostFunction(InvokeHostFunctionResult::read_xdr(r)?) - } - OperationType::ExtendFootprintTtl => { - Self::ExtendFootprintTtl(ExtendFootprintTtlResult::read_xdr(r)?) - } - OperationType::RestoreFootprint => { - Self::RestoreFootprint(RestoreFootprintResult::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for OperationResultTr { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::CreateAccount(v) => v.write_xdr(w)?, - Self::Payment(v) => v.write_xdr(w)?, - Self::PathPaymentStrictReceive(v) => v.write_xdr(w)?, - Self::ManageSellOffer(v) => v.write_xdr(w)?, - Self::CreatePassiveSellOffer(v) => v.write_xdr(w)?, - Self::SetOptions(v) => v.write_xdr(w)?, - Self::ChangeTrust(v) => v.write_xdr(w)?, - Self::AllowTrust(v) => v.write_xdr(w)?, - Self::AccountMerge(v) => v.write_xdr(w)?, - Self::Inflation(v) => v.write_xdr(w)?, - Self::ManageData(v) => v.write_xdr(w)?, - Self::BumpSequence(v) => v.write_xdr(w)?, - Self::ManageBuyOffer(v) => v.write_xdr(w)?, - Self::PathPaymentStrictSend(v) => v.write_xdr(w)?, - Self::CreateClaimableBalance(v) => v.write_xdr(w)?, - Self::ClaimClaimableBalance(v) => v.write_xdr(w)?, - Self::BeginSponsoringFutureReserves(v) => v.write_xdr(w)?, - Self::EndSponsoringFutureReserves(v) => v.write_xdr(w)?, - Self::RevokeSponsorship(v) => v.write_xdr(w)?, - Self::Clawback(v) => v.write_xdr(w)?, - Self::ClawbackClaimableBalance(v) => v.write_xdr(w)?, - Self::SetTrustLineFlags(v) => v.write_xdr(w)?, - Self::LiquidityPoolDeposit(v) => v.write_xdr(w)?, - Self::LiquidityPoolWithdraw(v) => v.write_xdr(w)?, - Self::InvokeHostFunction(v) => v.write_xdr(w)?, - Self::ExtendFootprintTtl(v) => v.write_xdr(w)?, - Self::RestoreFootprint(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// OperationResult is an XDR Union defined as: -/// -/// ```text -/// union OperationResult switch (OperationResultCode code) -/// { -/// case opINNER: -/// union switch (OperationType type) -/// { -/// case CREATE_ACCOUNT: -/// CreateAccountResult createAccountResult; -/// case PAYMENT: -/// PaymentResult paymentResult; -/// case PATH_PAYMENT_STRICT_RECEIVE: -/// PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; -/// case MANAGE_SELL_OFFER: -/// ManageSellOfferResult manageSellOfferResult; -/// case CREATE_PASSIVE_SELL_OFFER: -/// ManageSellOfferResult createPassiveSellOfferResult; -/// case SET_OPTIONS: -/// SetOptionsResult setOptionsResult; -/// case CHANGE_TRUST: -/// ChangeTrustResult changeTrustResult; -/// case ALLOW_TRUST: -/// AllowTrustResult allowTrustResult; -/// case ACCOUNT_MERGE: -/// AccountMergeResult accountMergeResult; -/// case INFLATION: -/// InflationResult inflationResult; -/// case MANAGE_DATA: -/// ManageDataResult manageDataResult; -/// case BUMP_SEQUENCE: -/// BumpSequenceResult bumpSeqResult; -/// case MANAGE_BUY_OFFER: -/// ManageBuyOfferResult manageBuyOfferResult; -/// case PATH_PAYMENT_STRICT_SEND: -/// PathPaymentStrictSendResult pathPaymentStrictSendResult; -/// case CREATE_CLAIMABLE_BALANCE: -/// CreateClaimableBalanceResult createClaimableBalanceResult; -/// case CLAIM_CLAIMABLE_BALANCE: -/// ClaimClaimableBalanceResult claimClaimableBalanceResult; -/// case BEGIN_SPONSORING_FUTURE_RESERVES: -/// BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; -/// case END_SPONSORING_FUTURE_RESERVES: -/// EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; -/// case REVOKE_SPONSORSHIP: -/// RevokeSponsorshipResult revokeSponsorshipResult; -/// case CLAWBACK: -/// ClawbackResult clawbackResult; -/// case CLAWBACK_CLAIMABLE_BALANCE: -/// ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; -/// case SET_TRUST_LINE_FLAGS: -/// SetTrustLineFlagsResult setTrustLineFlagsResult; -/// case LIQUIDITY_POOL_DEPOSIT: -/// LiquidityPoolDepositResult liquidityPoolDepositResult; -/// case LIQUIDITY_POOL_WITHDRAW: -/// LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; -/// case INVOKE_HOST_FUNCTION: -/// InvokeHostFunctionResult invokeHostFunctionResult; -/// case EXTEND_FOOTPRINT_TTL: -/// ExtendFootprintTTLResult extendFootprintTTLResult; -/// case RESTORE_FOOTPRINT: -/// RestoreFootprintResult restoreFootprintResult; -/// } -/// tr; -/// case opBAD_AUTH: -/// case opNO_ACCOUNT: -/// case opNOT_SUPPORTED: -/// case opTOO_MANY_SUBENTRIES: -/// case opEXCEEDED_WORK_LIMIT: -/// case opTOO_MANY_SPONSORING: -/// void; -/// }; -/// ``` -/// -// union with discriminant OperationResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum OperationResult { - OpInner(OperationResultTr), - OpBadAuth, - OpNoAccount, - OpNotSupported, - OpTooManySubentries, - OpExceededWorkLimit, - OpTooManySponsoring, -} - -#[cfg(feature = "alloc")] -impl Default for OperationResult { - fn default() -> Self { - Self::OpInner(OperationResultTr::default()) - } -} - -impl OperationResult { - const _VARIANTS: &[OperationResultCode] = &[ - OperationResultCode::OpInner, - OperationResultCode::OpBadAuth, - OperationResultCode::OpNoAccount, - OperationResultCode::OpNotSupported, - OperationResultCode::OpTooManySubentries, - OperationResultCode::OpExceededWorkLimit, - OperationResultCode::OpTooManySponsoring, - ]; - pub const VARIANTS: [OperationResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "OpInner", - "OpBadAuth", - "OpNoAccount", - "OpNotSupported", - "OpTooManySubentries", - "OpExceededWorkLimit", - "OpTooManySponsoring", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::OpInner(_) => "OpInner", - Self::OpBadAuth => "OpBadAuth", - Self::OpNoAccount => "OpNoAccount", - Self::OpNotSupported => "OpNotSupported", - Self::OpTooManySubentries => "OpTooManySubentries", - Self::OpExceededWorkLimit => "OpExceededWorkLimit", - Self::OpTooManySponsoring => "OpTooManySponsoring", - } - } - - #[must_use] - pub const fn discriminant(&self) -> OperationResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::OpInner(_) => OperationResultCode::OpInner, - Self::OpBadAuth => OperationResultCode::OpBadAuth, - Self::OpNoAccount => OperationResultCode::OpNoAccount, - Self::OpNotSupported => OperationResultCode::OpNotSupported, - Self::OpTooManySubentries => OperationResultCode::OpTooManySubentries, - Self::OpExceededWorkLimit => OperationResultCode::OpExceededWorkLimit, - Self::OpTooManySponsoring => OperationResultCode::OpTooManySponsoring, - } - } - - #[must_use] - pub const fn variants() -> [OperationResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for OperationResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for OperationResult { - #[must_use] - fn discriminant(&self) -> OperationResultCode { - Self::discriminant(self) - } -} - -impl Variants for OperationResult { - fn variants() -> slice::Iter<'static, OperationResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for OperationResult {} - -impl ReadXdr for OperationResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: OperationResultCode = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - OperationResultCode::OpInner => Self::OpInner(OperationResultTr::read_xdr(r)?), - OperationResultCode::OpBadAuth => Self::OpBadAuth, - OperationResultCode::OpNoAccount => Self::OpNoAccount, - OperationResultCode::OpNotSupported => Self::OpNotSupported, - OperationResultCode::OpTooManySubentries => Self::OpTooManySubentries, - OperationResultCode::OpExceededWorkLimit => Self::OpExceededWorkLimit, - OperationResultCode::OpTooManySponsoring => Self::OpTooManySponsoring, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for OperationResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::OpInner(v) => v.write_xdr(w)?, - Self::OpBadAuth => ().write_xdr(w)?, - Self::OpNoAccount => ().write_xdr(w)?, - Self::OpNotSupported => ().write_xdr(w)?, - Self::OpTooManySubentries => ().write_xdr(w)?, - Self::OpExceededWorkLimit => ().write_xdr(w)?, - Self::OpTooManySponsoring => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TransactionResultCode is an XDR Enum defined as: -/// -/// ```text -/// enum TransactionResultCode -/// { -/// txFEE_BUMP_INNER_SUCCESS = 1, // fee bump inner transaction succeeded -/// txSUCCESS = 0, // all operations succeeded -/// -/// txFAILED = -1, // one of the operations failed (none were applied) -/// -/// txTOO_EARLY = -2, // ledger closeTime before minTime -/// txTOO_LATE = -3, // ledger closeTime after maxTime -/// txMISSING_OPERATION = -4, // no operation was specified -/// txBAD_SEQ = -5, // sequence number does not match source account -/// -/// txBAD_AUTH = -6, // too few valid signatures / wrong network -/// txINSUFFICIENT_BALANCE = -7, // fee would bring account below reserve -/// txNO_ACCOUNT = -8, // source account not found -/// txINSUFFICIENT_FEE = -9, // fee is too small -/// txBAD_AUTH_EXTRA = -10, // unused signatures attached to transaction -/// txINTERNAL_ERROR = -11, // an unknown error occurred -/// -/// txNOT_SUPPORTED = -12, // transaction type not supported -/// txFEE_BUMP_INNER_FAILED = -13, // fee bump inner transaction failed -/// txBAD_SPONSORSHIP = -14, // sponsorship not confirmed -/// txBAD_MIN_SEQ_AGE_OR_GAP = -15, // minSeqAge or minSeqLedgerGap conditions not met -/// txMALFORMED = -16, // precondition is invalid -/// txSOROBAN_INVALID = -17, // soroban-specific preconditions were not met -/// txFROZEN_KEY_ACCESSED = -18 // a 'frozen' ledger key is accessed by any operation -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum TransactionResultCode { - #[cfg_attr(feature = "alloc", default)] - TxFeeBumpInnerSuccess = 1, - TxSuccess = 0, - TxFailed = -1, - TxTooEarly = -2, - TxTooLate = -3, - TxMissingOperation = -4, - TxBadSeq = -5, - TxBadAuth = -6, - TxInsufficientBalance = -7, - TxNoAccount = -8, - TxInsufficientFee = -9, - TxBadAuthExtra = -10, - TxInternalError = -11, - TxNotSupported = -12, - TxFeeBumpInnerFailed = -13, - TxBadSponsorship = -14, - TxBadMinSeqAgeOrGap = -15, - TxMalformed = -16, - TxSorobanInvalid = -17, - TxFrozenKeyAccessed = -18, -} - -impl TransactionResultCode { - const _VARIANTS: &[TransactionResultCode] = &[ - TransactionResultCode::TxFeeBumpInnerSuccess, - TransactionResultCode::TxSuccess, - TransactionResultCode::TxFailed, - TransactionResultCode::TxTooEarly, - TransactionResultCode::TxTooLate, - TransactionResultCode::TxMissingOperation, - TransactionResultCode::TxBadSeq, - TransactionResultCode::TxBadAuth, - TransactionResultCode::TxInsufficientBalance, - TransactionResultCode::TxNoAccount, - TransactionResultCode::TxInsufficientFee, - TransactionResultCode::TxBadAuthExtra, - TransactionResultCode::TxInternalError, - TransactionResultCode::TxNotSupported, - TransactionResultCode::TxFeeBumpInnerFailed, - TransactionResultCode::TxBadSponsorship, - TransactionResultCode::TxBadMinSeqAgeOrGap, - TransactionResultCode::TxMalformed, - TransactionResultCode::TxSorobanInvalid, - TransactionResultCode::TxFrozenKeyAccessed, - ]; - pub const VARIANTS: [TransactionResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "TxFeeBumpInnerSuccess", - "TxSuccess", - "TxFailed", - "TxTooEarly", - "TxTooLate", - "TxMissingOperation", - "TxBadSeq", - "TxBadAuth", - "TxInsufficientBalance", - "TxNoAccount", - "TxInsufficientFee", - "TxBadAuthExtra", - "TxInternalError", - "TxNotSupported", - "TxFeeBumpInnerFailed", - "TxBadSponsorship", - "TxBadMinSeqAgeOrGap", - "TxMalformed", - "TxSorobanInvalid", - "TxFrozenKeyAccessed", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::TxFeeBumpInnerSuccess => "TxFeeBumpInnerSuccess", - Self::TxSuccess => "TxSuccess", - Self::TxFailed => "TxFailed", - Self::TxTooEarly => "TxTooEarly", - Self::TxTooLate => "TxTooLate", - Self::TxMissingOperation => "TxMissingOperation", - Self::TxBadSeq => "TxBadSeq", - Self::TxBadAuth => "TxBadAuth", - Self::TxInsufficientBalance => "TxInsufficientBalance", - Self::TxNoAccount => "TxNoAccount", - Self::TxInsufficientFee => "TxInsufficientFee", - Self::TxBadAuthExtra => "TxBadAuthExtra", - Self::TxInternalError => "TxInternalError", - Self::TxNotSupported => "TxNotSupported", - Self::TxFeeBumpInnerFailed => "TxFeeBumpInnerFailed", - Self::TxBadSponsorship => "TxBadSponsorship", - Self::TxBadMinSeqAgeOrGap => "TxBadMinSeqAgeOrGap", - Self::TxMalformed => "TxMalformed", - Self::TxSorobanInvalid => "TxSorobanInvalid", - Self::TxFrozenKeyAccessed => "TxFrozenKeyAccessed", - } - } - - #[must_use] - pub const fn variants() -> [TransactionResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TransactionResultCode { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for TransactionResultCode { - fn variants() -> slice::Iter<'static, TransactionResultCode> { - Self::VARIANTS.iter() - } -} - -impl Enum for TransactionResultCode {} - -impl fmt::Display for TransactionResultCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for TransactionResultCode { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 1 => TransactionResultCode::TxFeeBumpInnerSuccess, - 0 => TransactionResultCode::TxSuccess, - -1 => TransactionResultCode::TxFailed, - -2 => TransactionResultCode::TxTooEarly, - -3 => TransactionResultCode::TxTooLate, - -4 => TransactionResultCode::TxMissingOperation, - -5 => TransactionResultCode::TxBadSeq, - -6 => TransactionResultCode::TxBadAuth, - -7 => TransactionResultCode::TxInsufficientBalance, - -8 => TransactionResultCode::TxNoAccount, - -9 => TransactionResultCode::TxInsufficientFee, - -10 => TransactionResultCode::TxBadAuthExtra, - -11 => TransactionResultCode::TxInternalError, - -12 => TransactionResultCode::TxNotSupported, - -13 => TransactionResultCode::TxFeeBumpInnerFailed, - -14 => TransactionResultCode::TxBadSponsorship, - -15 => TransactionResultCode::TxBadMinSeqAgeOrGap, - -16 => TransactionResultCode::TxMalformed, - -17 => TransactionResultCode::TxSorobanInvalid, - -18 => TransactionResultCode::TxFrozenKeyAccessed, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: TransactionResultCode) -> Self { - e as Self - } -} - -impl ReadXdr for TransactionResultCode { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for TransactionResultCode { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// InnerTransactionResultResult is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (TransactionResultCode code) -/// { -/// // txFEE_BUMP_INNER_SUCCESS is not included -/// case txSUCCESS: -/// case txFAILED: -/// OperationResult results<>; -/// case txTOO_EARLY: -/// case txTOO_LATE: -/// case txMISSING_OPERATION: -/// case txBAD_SEQ: -/// case txBAD_AUTH: -/// case txINSUFFICIENT_BALANCE: -/// case txNO_ACCOUNT: -/// case txINSUFFICIENT_FEE: -/// case txBAD_AUTH_EXTRA: -/// case txINTERNAL_ERROR: -/// case txNOT_SUPPORTED: -/// // txFEE_BUMP_INNER_FAILED is not included -/// case txBAD_SPONSORSHIP: -/// case txBAD_MIN_SEQ_AGE_OR_GAP: -/// case txMALFORMED: -/// case txSOROBAN_INVALID: -/// case txFROZEN_KEY_ACCESSED: -/// void; -/// } -/// ``` -/// -// union with discriminant TransactionResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum InnerTransactionResultResult { - TxSuccess(VecM), - TxFailed(VecM), - TxTooEarly, - TxTooLate, - TxMissingOperation, - TxBadSeq, - TxBadAuth, - TxInsufficientBalance, - TxNoAccount, - TxInsufficientFee, - TxBadAuthExtra, - TxInternalError, - TxNotSupported, - TxBadSponsorship, - TxBadMinSeqAgeOrGap, - TxMalformed, - TxSorobanInvalid, - TxFrozenKeyAccessed, -} - -#[cfg(feature = "alloc")] -impl Default for InnerTransactionResultResult { - fn default() -> Self { - Self::TxSuccess(VecM::::default()) - } -} - -impl InnerTransactionResultResult { - const _VARIANTS: &[TransactionResultCode] = &[ - TransactionResultCode::TxSuccess, - TransactionResultCode::TxFailed, - TransactionResultCode::TxTooEarly, - TransactionResultCode::TxTooLate, - TransactionResultCode::TxMissingOperation, - TransactionResultCode::TxBadSeq, - TransactionResultCode::TxBadAuth, - TransactionResultCode::TxInsufficientBalance, - TransactionResultCode::TxNoAccount, - TransactionResultCode::TxInsufficientFee, - TransactionResultCode::TxBadAuthExtra, - TransactionResultCode::TxInternalError, - TransactionResultCode::TxNotSupported, - TransactionResultCode::TxBadSponsorship, - TransactionResultCode::TxBadMinSeqAgeOrGap, - TransactionResultCode::TxMalformed, - TransactionResultCode::TxSorobanInvalid, - TransactionResultCode::TxFrozenKeyAccessed, - ]; - pub const VARIANTS: [TransactionResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "TxSuccess", - "TxFailed", - "TxTooEarly", - "TxTooLate", - "TxMissingOperation", - "TxBadSeq", - "TxBadAuth", - "TxInsufficientBalance", - "TxNoAccount", - "TxInsufficientFee", - "TxBadAuthExtra", - "TxInternalError", - "TxNotSupported", - "TxBadSponsorship", - "TxBadMinSeqAgeOrGap", - "TxMalformed", - "TxSorobanInvalid", - "TxFrozenKeyAccessed", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::TxSuccess(_) => "TxSuccess", - Self::TxFailed(_) => "TxFailed", - Self::TxTooEarly => "TxTooEarly", - Self::TxTooLate => "TxTooLate", - Self::TxMissingOperation => "TxMissingOperation", - Self::TxBadSeq => "TxBadSeq", - Self::TxBadAuth => "TxBadAuth", - Self::TxInsufficientBalance => "TxInsufficientBalance", - Self::TxNoAccount => "TxNoAccount", - Self::TxInsufficientFee => "TxInsufficientFee", - Self::TxBadAuthExtra => "TxBadAuthExtra", - Self::TxInternalError => "TxInternalError", - Self::TxNotSupported => "TxNotSupported", - Self::TxBadSponsorship => "TxBadSponsorship", - Self::TxBadMinSeqAgeOrGap => "TxBadMinSeqAgeOrGap", - Self::TxMalformed => "TxMalformed", - Self::TxSorobanInvalid => "TxSorobanInvalid", - Self::TxFrozenKeyAccessed => "TxFrozenKeyAccessed", - } - } - - #[must_use] - pub const fn discriminant(&self) -> TransactionResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::TxSuccess(_) => TransactionResultCode::TxSuccess, - Self::TxFailed(_) => TransactionResultCode::TxFailed, - Self::TxTooEarly => TransactionResultCode::TxTooEarly, - Self::TxTooLate => TransactionResultCode::TxTooLate, - Self::TxMissingOperation => TransactionResultCode::TxMissingOperation, - Self::TxBadSeq => TransactionResultCode::TxBadSeq, - Self::TxBadAuth => TransactionResultCode::TxBadAuth, - Self::TxInsufficientBalance => TransactionResultCode::TxInsufficientBalance, - Self::TxNoAccount => TransactionResultCode::TxNoAccount, - Self::TxInsufficientFee => TransactionResultCode::TxInsufficientFee, - Self::TxBadAuthExtra => TransactionResultCode::TxBadAuthExtra, - Self::TxInternalError => TransactionResultCode::TxInternalError, - Self::TxNotSupported => TransactionResultCode::TxNotSupported, - Self::TxBadSponsorship => TransactionResultCode::TxBadSponsorship, - Self::TxBadMinSeqAgeOrGap => TransactionResultCode::TxBadMinSeqAgeOrGap, - Self::TxMalformed => TransactionResultCode::TxMalformed, - Self::TxSorobanInvalid => TransactionResultCode::TxSorobanInvalid, - Self::TxFrozenKeyAccessed => TransactionResultCode::TxFrozenKeyAccessed, - } - } - - #[must_use] - pub const fn variants() -> [TransactionResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for InnerTransactionResultResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for InnerTransactionResultResult { - #[must_use] - fn discriminant(&self) -> TransactionResultCode { - Self::discriminant(self) - } -} - -impl Variants for InnerTransactionResultResult { - fn variants() -> slice::Iter<'static, TransactionResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for InnerTransactionResultResult {} - -impl ReadXdr for InnerTransactionResultResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: TransactionResultCode = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - TransactionResultCode::TxSuccess => { - Self::TxSuccess(VecM::::read_xdr(r)?) - } - TransactionResultCode::TxFailed => { - Self::TxFailed(VecM::::read_xdr(r)?) - } - TransactionResultCode::TxTooEarly => Self::TxTooEarly, - TransactionResultCode::TxTooLate => Self::TxTooLate, - TransactionResultCode::TxMissingOperation => Self::TxMissingOperation, - TransactionResultCode::TxBadSeq => Self::TxBadSeq, - TransactionResultCode::TxBadAuth => Self::TxBadAuth, - TransactionResultCode::TxInsufficientBalance => Self::TxInsufficientBalance, - TransactionResultCode::TxNoAccount => Self::TxNoAccount, - TransactionResultCode::TxInsufficientFee => Self::TxInsufficientFee, - TransactionResultCode::TxBadAuthExtra => Self::TxBadAuthExtra, - TransactionResultCode::TxInternalError => Self::TxInternalError, - TransactionResultCode::TxNotSupported => Self::TxNotSupported, - TransactionResultCode::TxBadSponsorship => Self::TxBadSponsorship, - TransactionResultCode::TxBadMinSeqAgeOrGap => Self::TxBadMinSeqAgeOrGap, - TransactionResultCode::TxMalformed => Self::TxMalformed, - TransactionResultCode::TxSorobanInvalid => Self::TxSorobanInvalid, - TransactionResultCode::TxFrozenKeyAccessed => Self::TxFrozenKeyAccessed, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for InnerTransactionResultResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::TxSuccess(v) => v.write_xdr(w)?, - Self::TxFailed(v) => v.write_xdr(w)?, - Self::TxTooEarly => ().write_xdr(w)?, - Self::TxTooLate => ().write_xdr(w)?, - Self::TxMissingOperation => ().write_xdr(w)?, - Self::TxBadSeq => ().write_xdr(w)?, - Self::TxBadAuth => ().write_xdr(w)?, - Self::TxInsufficientBalance => ().write_xdr(w)?, - Self::TxNoAccount => ().write_xdr(w)?, - Self::TxInsufficientFee => ().write_xdr(w)?, - Self::TxBadAuthExtra => ().write_xdr(w)?, - Self::TxInternalError => ().write_xdr(w)?, - Self::TxNotSupported => ().write_xdr(w)?, - Self::TxBadSponsorship => ().write_xdr(w)?, - Self::TxBadMinSeqAgeOrGap => ().write_xdr(w)?, - Self::TxMalformed => ().write_xdr(w)?, - Self::TxSorobanInvalid => ().write_xdr(w)?, - Self::TxFrozenKeyAccessed => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// InnerTransactionResultExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum InnerTransactionResultExt { - V0, -} - -#[cfg(feature = "alloc")] -impl Default for InnerTransactionResultExt { - fn default() -> Self { - Self::V0 - } -} - -impl InnerTransactionResultExt { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for InnerTransactionResultExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for InnerTransactionResultExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for InnerTransactionResultExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for InnerTransactionResultExt {} - -impl ReadXdr for InnerTransactionResultExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for InnerTransactionResultExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// InnerTransactionResult is an XDR Struct defined as: -/// -/// ```text -/// struct InnerTransactionResult -/// { -/// // Always 0. Here for binary compatibility. -/// int64 feeCharged; -/// -/// union switch (TransactionResultCode code) -/// { -/// // txFEE_BUMP_INNER_SUCCESS is not included -/// case txSUCCESS: -/// case txFAILED: -/// OperationResult results<>; -/// case txTOO_EARLY: -/// case txTOO_LATE: -/// case txMISSING_OPERATION: -/// case txBAD_SEQ: -/// case txBAD_AUTH: -/// case txINSUFFICIENT_BALANCE: -/// case txNO_ACCOUNT: -/// case txINSUFFICIENT_FEE: -/// case txBAD_AUTH_EXTRA: -/// case txINTERNAL_ERROR: -/// case txNOT_SUPPORTED: -/// // txFEE_BUMP_INNER_FAILED is not included -/// case txBAD_SPONSORSHIP: -/// case txBAD_MIN_SEQ_AGE_OR_GAP: -/// case txMALFORMED: -/// case txSOROBAN_INVALID: -/// case txFROZEN_KEY_ACCESSED: -/// void; -/// } -/// result; -/// -/// // reserved for future use -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct InnerTransactionResult { - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub fee_charged: i64, - pub result: InnerTransactionResultResult, - pub ext: InnerTransactionResultExt, -} - -impl ReadXdr for InnerTransactionResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - fee_charged: i64::read_xdr(r)?, - result: InnerTransactionResultResult::read_xdr(r)?, - ext: InnerTransactionResultExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for InnerTransactionResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.fee_charged.write_xdr(w)?; - self.result.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// InnerTransactionResultPair is an XDR Struct defined as: -/// -/// ```text -/// struct InnerTransactionResultPair -/// { -/// Hash transactionHash; // hash of the inner transaction -/// InnerTransactionResult result; // result for the inner transaction -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct InnerTransactionResultPair { - pub transaction_hash: Hash, - pub result: InnerTransactionResult, -} - -impl ReadXdr for InnerTransactionResultPair { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - transaction_hash: Hash::read_xdr(r)?, - result: InnerTransactionResult::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for InnerTransactionResultPair { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.transaction_hash.write_xdr(w)?; - self.result.write_xdr(w)?; - Ok(()) - }) - } -} - -/// TransactionResultResult is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (TransactionResultCode code) -/// { -/// case txFEE_BUMP_INNER_SUCCESS: -/// case txFEE_BUMP_INNER_FAILED: -/// InnerTransactionResultPair innerResultPair; -/// case txSUCCESS: -/// case txFAILED: -/// OperationResult results<>; -/// case txTOO_EARLY: -/// case txTOO_LATE: -/// case txMISSING_OPERATION: -/// case txBAD_SEQ: -/// case txBAD_AUTH: -/// case txINSUFFICIENT_BALANCE: -/// case txNO_ACCOUNT: -/// case txINSUFFICIENT_FEE: -/// case txBAD_AUTH_EXTRA: -/// case txINTERNAL_ERROR: -/// case txNOT_SUPPORTED: -/// // case txFEE_BUMP_INNER_FAILED: handled above -/// case txBAD_SPONSORSHIP: -/// case txBAD_MIN_SEQ_AGE_OR_GAP: -/// case txMALFORMED: -/// case txSOROBAN_INVALID: -/// case txFROZEN_KEY_ACCESSED: -/// void; -/// } -/// ``` -/// -// union with discriminant TransactionResultCode -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TransactionResultResult { - TxFeeBumpInnerSuccess(InnerTransactionResultPair), - TxFeeBumpInnerFailed(InnerTransactionResultPair), - TxSuccess(VecM), - TxFailed(VecM), - TxTooEarly, - TxTooLate, - TxMissingOperation, - TxBadSeq, - TxBadAuth, - TxInsufficientBalance, - TxNoAccount, - TxInsufficientFee, - TxBadAuthExtra, - TxInternalError, - TxNotSupported, - TxBadSponsorship, - TxBadMinSeqAgeOrGap, - TxMalformed, - TxSorobanInvalid, - TxFrozenKeyAccessed, -} - -#[cfg(feature = "alloc")] -impl Default for TransactionResultResult { - fn default() -> Self { - Self::TxFeeBumpInnerSuccess(InnerTransactionResultPair::default()) - } -} - -impl TransactionResultResult { - const _VARIANTS: &[TransactionResultCode] = &[ - TransactionResultCode::TxFeeBumpInnerSuccess, - TransactionResultCode::TxFeeBumpInnerFailed, - TransactionResultCode::TxSuccess, - TransactionResultCode::TxFailed, - TransactionResultCode::TxTooEarly, - TransactionResultCode::TxTooLate, - TransactionResultCode::TxMissingOperation, - TransactionResultCode::TxBadSeq, - TransactionResultCode::TxBadAuth, - TransactionResultCode::TxInsufficientBalance, - TransactionResultCode::TxNoAccount, - TransactionResultCode::TxInsufficientFee, - TransactionResultCode::TxBadAuthExtra, - TransactionResultCode::TxInternalError, - TransactionResultCode::TxNotSupported, - TransactionResultCode::TxBadSponsorship, - TransactionResultCode::TxBadMinSeqAgeOrGap, - TransactionResultCode::TxMalformed, - TransactionResultCode::TxSorobanInvalid, - TransactionResultCode::TxFrozenKeyAccessed, - ]; - pub const VARIANTS: [TransactionResultCode; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "TxFeeBumpInnerSuccess", - "TxFeeBumpInnerFailed", - "TxSuccess", - "TxFailed", - "TxTooEarly", - "TxTooLate", - "TxMissingOperation", - "TxBadSeq", - "TxBadAuth", - "TxInsufficientBalance", - "TxNoAccount", - "TxInsufficientFee", - "TxBadAuthExtra", - "TxInternalError", - "TxNotSupported", - "TxBadSponsorship", - "TxBadMinSeqAgeOrGap", - "TxMalformed", - "TxSorobanInvalid", - "TxFrozenKeyAccessed", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::TxFeeBumpInnerSuccess(_) => "TxFeeBumpInnerSuccess", - Self::TxFeeBumpInnerFailed(_) => "TxFeeBumpInnerFailed", - Self::TxSuccess(_) => "TxSuccess", - Self::TxFailed(_) => "TxFailed", - Self::TxTooEarly => "TxTooEarly", - Self::TxTooLate => "TxTooLate", - Self::TxMissingOperation => "TxMissingOperation", - Self::TxBadSeq => "TxBadSeq", - Self::TxBadAuth => "TxBadAuth", - Self::TxInsufficientBalance => "TxInsufficientBalance", - Self::TxNoAccount => "TxNoAccount", - Self::TxInsufficientFee => "TxInsufficientFee", - Self::TxBadAuthExtra => "TxBadAuthExtra", - Self::TxInternalError => "TxInternalError", - Self::TxNotSupported => "TxNotSupported", - Self::TxBadSponsorship => "TxBadSponsorship", - Self::TxBadMinSeqAgeOrGap => "TxBadMinSeqAgeOrGap", - Self::TxMalformed => "TxMalformed", - Self::TxSorobanInvalid => "TxSorobanInvalid", - Self::TxFrozenKeyAccessed => "TxFrozenKeyAccessed", - } - } - - #[must_use] - pub const fn discriminant(&self) -> TransactionResultCode { - #[allow(clippy::match_same_arms)] - match self { - Self::TxFeeBumpInnerSuccess(_) => TransactionResultCode::TxFeeBumpInnerSuccess, - Self::TxFeeBumpInnerFailed(_) => TransactionResultCode::TxFeeBumpInnerFailed, - Self::TxSuccess(_) => TransactionResultCode::TxSuccess, - Self::TxFailed(_) => TransactionResultCode::TxFailed, - Self::TxTooEarly => TransactionResultCode::TxTooEarly, - Self::TxTooLate => TransactionResultCode::TxTooLate, - Self::TxMissingOperation => TransactionResultCode::TxMissingOperation, - Self::TxBadSeq => TransactionResultCode::TxBadSeq, - Self::TxBadAuth => TransactionResultCode::TxBadAuth, - Self::TxInsufficientBalance => TransactionResultCode::TxInsufficientBalance, - Self::TxNoAccount => TransactionResultCode::TxNoAccount, - Self::TxInsufficientFee => TransactionResultCode::TxInsufficientFee, - Self::TxBadAuthExtra => TransactionResultCode::TxBadAuthExtra, - Self::TxInternalError => TransactionResultCode::TxInternalError, - Self::TxNotSupported => TransactionResultCode::TxNotSupported, - Self::TxBadSponsorship => TransactionResultCode::TxBadSponsorship, - Self::TxBadMinSeqAgeOrGap => TransactionResultCode::TxBadMinSeqAgeOrGap, - Self::TxMalformed => TransactionResultCode::TxMalformed, - Self::TxSorobanInvalid => TransactionResultCode::TxSorobanInvalid, - Self::TxFrozenKeyAccessed => TransactionResultCode::TxFrozenKeyAccessed, - } - } - - #[must_use] - pub const fn variants() -> [TransactionResultCode; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TransactionResultResult { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TransactionResultResult { - #[must_use] - fn discriminant(&self) -> TransactionResultCode { - Self::discriminant(self) - } -} - -impl Variants for TransactionResultResult { - fn variants() -> slice::Iter<'static, TransactionResultCode> { - Self::VARIANTS.iter() - } -} - -impl Union for TransactionResultResult {} - -impl ReadXdr for TransactionResultResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: TransactionResultCode = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - TransactionResultCode::TxFeeBumpInnerSuccess => { - Self::TxFeeBumpInnerSuccess(InnerTransactionResultPair::read_xdr(r)?) - } - TransactionResultCode::TxFeeBumpInnerFailed => { - Self::TxFeeBumpInnerFailed(InnerTransactionResultPair::read_xdr(r)?) - } - TransactionResultCode::TxSuccess => { - Self::TxSuccess(VecM::::read_xdr(r)?) - } - TransactionResultCode::TxFailed => { - Self::TxFailed(VecM::::read_xdr(r)?) - } - TransactionResultCode::TxTooEarly => Self::TxTooEarly, - TransactionResultCode::TxTooLate => Self::TxTooLate, - TransactionResultCode::TxMissingOperation => Self::TxMissingOperation, - TransactionResultCode::TxBadSeq => Self::TxBadSeq, - TransactionResultCode::TxBadAuth => Self::TxBadAuth, - TransactionResultCode::TxInsufficientBalance => Self::TxInsufficientBalance, - TransactionResultCode::TxNoAccount => Self::TxNoAccount, - TransactionResultCode::TxInsufficientFee => Self::TxInsufficientFee, - TransactionResultCode::TxBadAuthExtra => Self::TxBadAuthExtra, - TransactionResultCode::TxInternalError => Self::TxInternalError, - TransactionResultCode::TxNotSupported => Self::TxNotSupported, - TransactionResultCode::TxBadSponsorship => Self::TxBadSponsorship, - TransactionResultCode::TxBadMinSeqAgeOrGap => Self::TxBadMinSeqAgeOrGap, - TransactionResultCode::TxMalformed => Self::TxMalformed, - TransactionResultCode::TxSorobanInvalid => Self::TxSorobanInvalid, - TransactionResultCode::TxFrozenKeyAccessed => Self::TxFrozenKeyAccessed, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TransactionResultResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::TxFeeBumpInnerSuccess(v) => v.write_xdr(w)?, - Self::TxFeeBumpInnerFailed(v) => v.write_xdr(w)?, - Self::TxSuccess(v) => v.write_xdr(w)?, - Self::TxFailed(v) => v.write_xdr(w)?, - Self::TxTooEarly => ().write_xdr(w)?, - Self::TxTooLate => ().write_xdr(w)?, - Self::TxMissingOperation => ().write_xdr(w)?, - Self::TxBadSeq => ().write_xdr(w)?, - Self::TxBadAuth => ().write_xdr(w)?, - Self::TxInsufficientBalance => ().write_xdr(w)?, - Self::TxNoAccount => ().write_xdr(w)?, - Self::TxInsufficientFee => ().write_xdr(w)?, - Self::TxBadAuthExtra => ().write_xdr(w)?, - Self::TxInternalError => ().write_xdr(w)?, - Self::TxNotSupported => ().write_xdr(w)?, - Self::TxBadSponsorship => ().write_xdr(w)?, - Self::TxBadMinSeqAgeOrGap => ().write_xdr(w)?, - Self::TxMalformed => ().write_xdr(w)?, - Self::TxSorobanInvalid => ().write_xdr(w)?, - Self::TxFrozenKeyAccessed => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TransactionResultExt is an XDR NestedUnion defined as: -/// -/// ```text -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum TransactionResultExt { - V0, -} - -#[cfg(feature = "alloc")] -impl Default for TransactionResultExt { - fn default() -> Self { - Self::V0 - } -} - -impl TransactionResultExt { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for TransactionResultExt { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for TransactionResultExt { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for TransactionResultExt { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for TransactionResultExt {} - -impl ReadXdr for TransactionResultExt { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for TransactionResultExt { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// TransactionResult is an XDR Struct defined as: -/// -/// ```text -/// struct TransactionResult -/// { -/// int64 feeCharged; // actual fee charged for the transaction -/// -/// union switch (TransactionResultCode code) -/// { -/// case txFEE_BUMP_INNER_SUCCESS: -/// case txFEE_BUMP_INNER_FAILED: -/// InnerTransactionResultPair innerResultPair; -/// case txSUCCESS: -/// case txFAILED: -/// OperationResult results<>; -/// case txTOO_EARLY: -/// case txTOO_LATE: -/// case txMISSING_OPERATION: -/// case txBAD_SEQ: -/// case txBAD_AUTH: -/// case txINSUFFICIENT_BALANCE: -/// case txNO_ACCOUNT: -/// case txINSUFFICIENT_FEE: -/// case txBAD_AUTH_EXTRA: -/// case txINTERNAL_ERROR: -/// case txNOT_SUPPORTED: -/// // case txFEE_BUMP_INNER_FAILED: handled above -/// case txBAD_SPONSORSHIP: -/// case txBAD_MIN_SEQ_AGE_OR_GAP: -/// case txMALFORMED: -/// case txSOROBAN_INVALID: -/// case txFROZEN_KEY_ACCESSED: -/// void; -/// } -/// result; -/// -/// // reserved for future use -/// union switch (int v) -/// { -/// case 0: -/// void; -/// } -/// ext; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct TransactionResult { - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub fee_charged: i64, - pub result: TransactionResultResult, - pub ext: TransactionResultExt, -} - -impl ReadXdr for TransactionResult { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - fee_charged: i64::read_xdr(r)?, - result: TransactionResultResult::read_xdr(r)?, - ext: TransactionResultExt::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for TransactionResult { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.fee_charged.write_xdr(w)?; - self.result.write_xdr(w)?; - self.ext.write_xdr(w)?; - Ok(()) - }) - } -} - -/// Hash is an XDR Typedef defined as: -/// -/// ```text -/// typedef opaque Hash[32]; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -pub struct Hash(pub [u8; 32]); - -impl core::fmt::Debug for Hash { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let v = &self.0; - write!(f, "Hash(")?; - for b in v { - write!(f, "{b:02x}")?; - } - write!(f, ")")?; - Ok(()) - } -} -impl core::fmt::Display for Hash { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let v = &self.0; - for b in v { - write!(f, "{b:02x}")?; - } - Ok(()) - } -} - -#[cfg(feature = "alloc")] -impl core::str::FromStr for Hash { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - hex::decode(s).map_err(|_| Error::InvalidHex)?.try_into() - } -} -#[cfg(feature = "schemars")] -impl schemars::JsonSchema for Hash { - fn schema_name() -> String { - "Hash".to_string() - } - - fn is_referenceable() -> bool { - false - } - - fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { - let schema = String::json_schema(gen); - if let schemars::schema::Schema::Object(mut schema) = schema { - schema.extensions.insert( - "contentEncoding".to_owned(), - serde_json::Value::String("hex".to_string()), - ); - schema.extensions.insert( - "contentMediaType".to_owned(), - serde_json::Value::String("application/binary".to_string()), - ); - let string = *schema.string.unwrap_or_default().clone(); - schema.string = Some(Box::new(schemars::schema::StringValidation { - max_length: 32_u32.checked_mul(2).map(Some).unwrap_or_default(), - min_length: 32_u32.checked_mul(2).map(Some).unwrap_or_default(), - ..string - })); - schema.into() - } else { - schema - } - } -} -impl From for [u8; 32] { - #[must_use] - fn from(x: Hash) -> Self { - x.0 - } -} - -impl From<[u8; 32]> for Hash { - #[must_use] - fn from(x: [u8; 32]) -> Self { - Hash(x) - } -} - -impl AsRef<[u8; 32]> for Hash { - #[must_use] - fn as_ref(&self) -> &[u8; 32] { - &self.0 - } -} - -impl ReadXdr for Hash { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = <[u8; 32]>::read_xdr(r)?; - let v = Hash(i); - Ok(v) - }) - } -} - -impl WriteXdr for Hash { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Hash { - #[must_use] - pub fn as_slice(&self) -> &[u8] { - &self.0 - } -} - -#[cfg(feature = "alloc")] -impl TryFrom> for Hash { - type Error = Error; - fn try_from(x: Vec) -> Result { - x.as_slice().try_into() - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for Hash { - type Error = Error; - fn try_from(x: &Vec) -> Result { - x.as_slice().try_into() - } -} - -impl TryFrom<&[u8]> for Hash { - type Error = Error; - fn try_from(x: &[u8]) -> Result { - Ok(Hash(x.try_into()?)) - } -} - -impl AsRef<[u8]> for Hash { - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 - } -} - -/// Uint256 is an XDR Typedef defined as: -/// -/// ```text -/// typedef opaque uint256[32]; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -pub struct Uint256(pub [u8; 32]); - -impl core::fmt::Debug for Uint256 { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let v = &self.0; - write!(f, "Uint256(")?; - for b in v { - write!(f, "{b:02x}")?; - } - write!(f, ")")?; - Ok(()) - } -} -impl core::fmt::Display for Uint256 { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let v = &self.0; - for b in v { - write!(f, "{b:02x}")?; - } - Ok(()) - } -} - -#[cfg(feature = "alloc")] -impl core::str::FromStr for Uint256 { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - hex::decode(s).map_err(|_| Error::InvalidHex)?.try_into() - } -} -#[cfg(feature = "schemars")] -impl schemars::JsonSchema for Uint256 { - fn schema_name() -> String { - "Uint256".to_string() - } - - fn is_referenceable() -> bool { - false - } - - fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { - let schema = String::json_schema(gen); - if let schemars::schema::Schema::Object(mut schema) = schema { - schema.extensions.insert( - "contentEncoding".to_owned(), - serde_json::Value::String("hex".to_string()), - ); - schema.extensions.insert( - "contentMediaType".to_owned(), - serde_json::Value::String("application/binary".to_string()), - ); - let string = *schema.string.unwrap_or_default().clone(); - schema.string = Some(Box::new(schemars::schema::StringValidation { - max_length: 32_u32.checked_mul(2).map(Some).unwrap_or_default(), - min_length: 32_u32.checked_mul(2).map(Some).unwrap_or_default(), - ..string - })); - schema.into() - } else { - schema - } - } -} -impl From for [u8; 32] { - #[must_use] - fn from(x: Uint256) -> Self { - x.0 - } -} - -impl From<[u8; 32]> for Uint256 { - #[must_use] - fn from(x: [u8; 32]) -> Self { - Uint256(x) - } -} - -impl AsRef<[u8; 32]> for Uint256 { - #[must_use] - fn as_ref(&self) -> &[u8; 32] { - &self.0 - } -} - -impl ReadXdr for Uint256 { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = <[u8; 32]>::read_xdr(r)?; - let v = Uint256(i); - Ok(v) - }) - } -} - -impl WriteXdr for Uint256 { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Uint256 { - #[must_use] - pub fn as_slice(&self) -> &[u8] { - &self.0 - } -} - -#[cfg(feature = "alloc")] -impl TryFrom> for Uint256 { - type Error = Error; - fn try_from(x: Vec) -> Result { - x.as_slice().try_into() - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for Uint256 { - type Error = Error; - fn try_from(x: &Vec) -> Result { - x.as_slice().try_into() - } -} - -impl TryFrom<&[u8]> for Uint256 { - type Error = Error; - fn try_from(x: &[u8]) -> Result { - Ok(Uint256(x.try_into()?)) - } -} - -impl AsRef<[u8]> for Uint256 { - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 - } -} - -/// Uint32 is an XDR Typedef defined as: -/// -/// ```text -/// typedef unsigned int uint32; -/// ``` -/// -pub type Uint32 = u32; - -/// Int32 is an XDR Typedef defined as: -/// -/// ```text -/// typedef int int32; -/// ``` -/// -pub type Int32 = i32; - -/// Uint64 is an XDR Typedef defined as: -/// -/// ```text -/// typedef unsigned hyper uint64; -/// ``` -/// -pub type Uint64 = u64; - -/// Int64 is an XDR Typedef defined as: -/// -/// ```text -/// typedef hyper int64; -/// ``` -/// -pub type Int64 = i64; - -/// TimePoint is an XDR Typedef defined as: -/// -/// ```text -/// typedef uint64 TimePoint; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct TimePoint( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub u64, -); - -impl From for u64 { - #[must_use] - fn from(x: TimePoint) -> Self { - x.0 - } -} - -impl From for TimePoint { - #[must_use] - fn from(x: u64) -> Self { - TimePoint(x) - } -} - -impl AsRef for TimePoint { - #[must_use] - fn as_ref(&self) -> &u64 { - &self.0 - } -} - -impl ReadXdr for TimePoint { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = u64::read_xdr(r)?; - let v = TimePoint(i); - Ok(v) - }) - } -} - -impl WriteXdr for TimePoint { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -/// Duration is an XDR Typedef defined as: -/// -/// ```text -/// typedef uint64 Duration; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct Duration( - #[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_as(as = "NumberOrString") - )] - pub u64, -); - -impl From for u64 { - #[must_use] - fn from(x: Duration) -> Self { - x.0 - } -} - -impl From for Duration { - #[must_use] - fn from(x: u64) -> Self { - Duration(x) - } -} - -impl AsRef for Duration { - #[must_use] - fn as_ref(&self) -> &u64 { - &self.0 - } -} - -impl ReadXdr for Duration { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = u64::read_xdr(r)?; - let v = Duration(i); - Ok(v) - }) - } -} - -impl WriteXdr for Duration { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -/// ExtensionPoint is an XDR Union defined as: -/// -/// ```text -/// union ExtensionPoint switch (int v) -/// { -/// case 0: -/// void; -/// }; -/// ``` -/// -// union with discriminant i32 -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[allow(clippy::large_enum_variant)] -pub enum ExtensionPoint { - V0, -} - -#[cfg(feature = "alloc")] -impl Default for ExtensionPoint { - fn default() -> Self { - Self::V0 - } -} - -impl ExtensionPoint { - const _VARIANTS: &[i32] = &[0]; - pub const VARIANTS: [i32; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["V0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::V0 => "V0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> i32 { - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => 0, - } - } - - #[must_use] - pub const fn variants() -> [i32; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ExtensionPoint { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ExtensionPoint { - #[must_use] - fn discriminant(&self) -> i32 { - Self::discriminant(self) - } -} - -impl Variants for ExtensionPoint { - fn variants() -> slice::Iter<'static, i32> { - Self::VARIANTS.iter() - } -} - -impl Union for ExtensionPoint {} - -impl ReadXdr for ExtensionPoint { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: i32 = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - 0 => Self::V0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ExtensionPoint { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::V0 => ().write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// CryptoKeyType is an XDR Enum defined as: -/// -/// ```text -/// enum CryptoKeyType -/// { -/// KEY_TYPE_ED25519 = 0, -/// KEY_TYPE_PRE_AUTH_TX = 1, -/// KEY_TYPE_HASH_X = 2, -/// KEY_TYPE_ED25519_SIGNED_PAYLOAD = 3, -/// // MUXED enum values for supported type are derived from the enum values -/// // above by ORing them with 0x100 -/// KEY_TYPE_MUXED_ED25519 = 0x100 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum CryptoKeyType { - #[cfg_attr(feature = "alloc", default)] - Ed25519 = 0, - PreAuthTx = 1, - HashX = 2, - Ed25519SignedPayload = 3, - MuxedEd25519 = 256, -} - -impl CryptoKeyType { - const _VARIANTS: &[CryptoKeyType] = &[ - CryptoKeyType::Ed25519, - CryptoKeyType::PreAuthTx, - CryptoKeyType::HashX, - CryptoKeyType::Ed25519SignedPayload, - CryptoKeyType::MuxedEd25519, - ]; - pub const VARIANTS: [CryptoKeyType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Ed25519", - "PreAuthTx", - "HashX", - "Ed25519SignedPayload", - "MuxedEd25519", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Ed25519 => "Ed25519", - Self::PreAuthTx => "PreAuthTx", - Self::HashX => "HashX", - Self::Ed25519SignedPayload => "Ed25519SignedPayload", - Self::MuxedEd25519 => "MuxedEd25519", - } - } - - #[must_use] - pub const fn variants() -> [CryptoKeyType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for CryptoKeyType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for CryptoKeyType { - fn variants() -> slice::Iter<'static, CryptoKeyType> { - Self::VARIANTS.iter() - } -} - -impl Enum for CryptoKeyType {} - -impl fmt::Display for CryptoKeyType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for CryptoKeyType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => CryptoKeyType::Ed25519, - 1 => CryptoKeyType::PreAuthTx, - 2 => CryptoKeyType::HashX, - 3 => CryptoKeyType::Ed25519SignedPayload, - 256 => CryptoKeyType::MuxedEd25519, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: CryptoKeyType) -> Self { - e as Self - } -} - -impl ReadXdr for CryptoKeyType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for CryptoKeyType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// PublicKeyType is an XDR Enum defined as: -/// -/// ```text -/// enum PublicKeyType -/// { -/// PUBLIC_KEY_TYPE_ED25519 = KEY_TYPE_ED25519 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum PublicKeyType { - #[cfg_attr(feature = "alloc", default)] - PublicKeyTypeEd25519 = 0, -} - -impl PublicKeyType { - const _VARIANTS: &[PublicKeyType] = &[PublicKeyType::PublicKeyTypeEd25519]; - pub const VARIANTS: [PublicKeyType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["PublicKeyTypeEd25519"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::PublicKeyTypeEd25519 => "PublicKeyTypeEd25519", - } - } - - #[must_use] - pub const fn variants() -> [PublicKeyType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for PublicKeyType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for PublicKeyType { - fn variants() -> slice::Iter<'static, PublicKeyType> { - Self::VARIANTS.iter() - } -} - -impl Enum for PublicKeyType {} - -impl fmt::Display for PublicKeyType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for PublicKeyType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => PublicKeyType::PublicKeyTypeEd25519, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: PublicKeyType) -> Self { - e as Self - } -} - -impl ReadXdr for PublicKeyType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for PublicKeyType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// SignerKeyType is an XDR Enum defined as: -/// -/// ```text -/// enum SignerKeyType -/// { -/// SIGNER_KEY_TYPE_ED25519 = KEY_TYPE_ED25519, -/// SIGNER_KEY_TYPE_PRE_AUTH_TX = KEY_TYPE_PRE_AUTH_TX, -/// SIGNER_KEY_TYPE_HASH_X = KEY_TYPE_HASH_X, -/// SIGNER_KEY_TYPE_ED25519_SIGNED_PAYLOAD = KEY_TYPE_ED25519_SIGNED_PAYLOAD -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum SignerKeyType { - #[cfg_attr(feature = "alloc", default)] - Ed25519 = 0, - PreAuthTx = 1, - HashX = 2, - Ed25519SignedPayload = 3, -} - -impl SignerKeyType { - const _VARIANTS: &[SignerKeyType] = &[ - SignerKeyType::Ed25519, - SignerKeyType::PreAuthTx, - SignerKeyType::HashX, - SignerKeyType::Ed25519SignedPayload, - ]; - pub const VARIANTS: [SignerKeyType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Ed25519 => "Ed25519", - Self::PreAuthTx => "PreAuthTx", - Self::HashX => "HashX", - Self::Ed25519SignedPayload => "Ed25519SignedPayload", - } - } - - #[must_use] - pub const fn variants() -> [SignerKeyType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SignerKeyType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for SignerKeyType { - fn variants() -> slice::Iter<'static, SignerKeyType> { - Self::VARIANTS.iter() - } -} - -impl Enum for SignerKeyType {} - -impl fmt::Display for SignerKeyType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for SignerKeyType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => SignerKeyType::Ed25519, - 1 => SignerKeyType::PreAuthTx, - 2 => SignerKeyType::HashX, - 3 => SignerKeyType::Ed25519SignedPayload, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: SignerKeyType) -> Self { - e as Self - } -} - -impl ReadXdr for SignerKeyType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for SignerKeyType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// PublicKey is an XDR Union defined as: -/// -/// ```text -/// union PublicKey switch (PublicKeyType type) -/// { -/// case PUBLIC_KEY_TYPE_ED25519: -/// uint256 ed25519; -/// }; -/// ``` -/// -// union with discriminant PublicKeyType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -#[allow(clippy::large_enum_variant)] -pub enum PublicKey { - PublicKeyTypeEd25519(Uint256), -} - -#[cfg(feature = "alloc")] -impl Default for PublicKey { - fn default() -> Self { - Self::PublicKeyTypeEd25519(Uint256::default()) - } -} - -impl PublicKey { - const _VARIANTS: &[PublicKeyType] = &[PublicKeyType::PublicKeyTypeEd25519]; - pub const VARIANTS: [PublicKeyType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["PublicKeyTypeEd25519"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::PublicKeyTypeEd25519(_) => "PublicKeyTypeEd25519", - } - } - - #[must_use] - pub const fn discriminant(&self) -> PublicKeyType { - #[allow(clippy::match_same_arms)] - match self { - Self::PublicKeyTypeEd25519(_) => PublicKeyType::PublicKeyTypeEd25519, - } - } - - #[must_use] - pub const fn variants() -> [PublicKeyType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for PublicKey { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for PublicKey { - #[must_use] - fn discriminant(&self) -> PublicKeyType { - Self::discriminant(self) - } -} - -impl Variants for PublicKey { - fn variants() -> slice::Iter<'static, PublicKeyType> { - Self::VARIANTS.iter() - } -} - -impl Union for PublicKey {} - -impl ReadXdr for PublicKey { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: PublicKeyType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - PublicKeyType::PublicKeyTypeEd25519 => { - Self::PublicKeyTypeEd25519(Uint256::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for PublicKey { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::PublicKeyTypeEd25519(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// SignerKeyEd25519SignedPayload is an XDR NestedStruct defined as: -/// -/// ```text -/// struct -/// { -/// /* Public key that must sign the payload. */ -/// uint256 ed25519; -/// /* Payload to be raw signed by ed25519. */ -/// opaque payload<64>; -/// } -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay) -)] -pub struct SignerKeyEd25519SignedPayload { - pub ed25519: Uint256, - pub payload: BytesM<64>, -} - -impl ReadXdr for SignerKeyEd25519SignedPayload { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - ed25519: Uint256::read_xdr(r)?, - payload: BytesM::<64>::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SignerKeyEd25519SignedPayload { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.ed25519.write_xdr(w)?; - self.payload.write_xdr(w)?; - Ok(()) - }) - } -} -#[cfg(all(feature = "serde", feature = "alloc"))] -impl<'de> serde::Deserialize<'de> for SignerKeyEd25519SignedPayload { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - use serde::Deserialize; - #[derive(Deserialize)] - struct SignerKeyEd25519SignedPayload { - ed25519: Uint256, - payload: BytesM<64>, - } - #[derive(Deserialize)] - #[serde(untagged)] - enum SignerKeyEd25519SignedPayloadOrString<'a> { - Str(&'a str), - String(String), - SignerKeyEd25519SignedPayload(SignerKeyEd25519SignedPayload), - } - match SignerKeyEd25519SignedPayloadOrString::deserialize(deserializer)? { - SignerKeyEd25519SignedPayloadOrString::Str(s) => { - s.parse().map_err(serde::de::Error::custom) - } - SignerKeyEd25519SignedPayloadOrString::String(s) => { - s.parse().map_err(serde::de::Error::custom) - } - SignerKeyEd25519SignedPayloadOrString::SignerKeyEd25519SignedPayload( - SignerKeyEd25519SignedPayload { ed25519, payload }, - ) => Ok(self::SignerKeyEd25519SignedPayload { ed25519, payload }), - } - } -} - -/// SignerKey is an XDR Union defined as: -/// -/// ```text -/// union SignerKey switch (SignerKeyType type) -/// { -/// case SIGNER_KEY_TYPE_ED25519: -/// uint256 ed25519; -/// case SIGNER_KEY_TYPE_PRE_AUTH_TX: -/// /* SHA-256 Hash of TransactionSignaturePayload structure */ -/// uint256 preAuthTx; -/// case SIGNER_KEY_TYPE_HASH_X: -/// /* Hash of random 256 bit preimage X */ -/// uint256 hashX; -/// case SIGNER_KEY_TYPE_ED25519_SIGNED_PAYLOAD: -/// struct -/// { -/// /* Public key that must sign the payload. */ -/// uint256 ed25519; -/// /* Payload to be raw signed by ed25519. */ -/// opaque payload<64>; -/// } ed25519SignedPayload; -/// }; -/// ``` -/// -// union with discriminant SignerKeyType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -#[allow(clippy::large_enum_variant)] -pub enum SignerKey { - Ed25519(Uint256), - PreAuthTx(Uint256), - HashX(Uint256), - Ed25519SignedPayload(SignerKeyEd25519SignedPayload), -} - -#[cfg(feature = "alloc")] -impl Default for SignerKey { - fn default() -> Self { - Self::Ed25519(Uint256::default()) - } -} - -impl SignerKey { - const _VARIANTS: &[SignerKeyType] = &[ - SignerKeyType::Ed25519, - SignerKeyType::PreAuthTx, - SignerKeyType::HashX, - SignerKeyType::Ed25519SignedPayload, - ]; - pub const VARIANTS: [SignerKeyType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["Ed25519", "PreAuthTx", "HashX", "Ed25519SignedPayload"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::Ed25519(_) => "Ed25519", - Self::PreAuthTx(_) => "PreAuthTx", - Self::HashX(_) => "HashX", - Self::Ed25519SignedPayload(_) => "Ed25519SignedPayload", - } - } - - #[must_use] - pub const fn discriminant(&self) -> SignerKeyType { - #[allow(clippy::match_same_arms)] - match self { - Self::Ed25519(_) => SignerKeyType::Ed25519, - Self::PreAuthTx(_) => SignerKeyType::PreAuthTx, - Self::HashX(_) => SignerKeyType::HashX, - Self::Ed25519SignedPayload(_) => SignerKeyType::Ed25519SignedPayload, - } - } - - #[must_use] - pub const fn variants() -> [SignerKeyType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for SignerKey { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for SignerKey { - #[must_use] - fn discriminant(&self) -> SignerKeyType { - Self::discriminant(self) - } -} - -impl Variants for SignerKey { - fn variants() -> slice::Iter<'static, SignerKeyType> { - Self::VARIANTS.iter() - } -} - -impl Union for SignerKey {} - -impl ReadXdr for SignerKey { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: SignerKeyType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - SignerKeyType::Ed25519 => Self::Ed25519(Uint256::read_xdr(r)?), - SignerKeyType::PreAuthTx => Self::PreAuthTx(Uint256::read_xdr(r)?), - SignerKeyType::HashX => Self::HashX(Uint256::read_xdr(r)?), - SignerKeyType::Ed25519SignedPayload => { - Self::Ed25519SignedPayload(SignerKeyEd25519SignedPayload::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for SignerKey { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::Ed25519(v) => v.write_xdr(w)?, - Self::PreAuthTx(v) => v.write_xdr(w)?, - Self::HashX(v) => v.write_xdr(w)?, - Self::Ed25519SignedPayload(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -/// Signature is an XDR Typedef defined as: -/// -/// ```text -/// typedef opaque Signature<64>; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[derive(Default, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[derive(Debug)] -pub struct Signature(pub BytesM<64>); - -impl From for BytesM<64> { - #[must_use] - fn from(x: Signature) -> Self { - x.0 - } -} - -impl From> for Signature { - #[must_use] - fn from(x: BytesM<64>) -> Self { - Signature(x) - } -} - -impl AsRef> for Signature { - #[must_use] - fn as_ref(&self) -> &BytesM<64> { - &self.0 - } -} - -impl ReadXdr for Signature { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = BytesM::<64>::read_xdr(r)?; - let v = Signature(i); - Ok(v) - }) - } -} - -impl WriteXdr for Signature { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl Deref for Signature { - type Target = BytesM<64>; - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl From for Vec { - #[must_use] - fn from(x: Signature) -> Self { - x.0 .0 - } -} - -impl TryFrom> for Signature { - type Error = Error; - fn try_from(x: Vec) -> Result { - Ok(Signature(x.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for Signature { - type Error = Error; - fn try_from(x: &Vec) -> Result { - Ok(Signature(x.try_into()?)) - } -} - -impl AsRef> for Signature { - #[must_use] - fn as_ref(&self) -> &Vec { - &self.0 .0 - } -} - -impl AsRef<[u8]> for Signature { - #[cfg(feature = "alloc")] - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 .0 - } - #[cfg(not(feature = "alloc"))] - #[must_use] - fn as_ref(&self) -> &[u8] { - self.0 .0 - } -} - -/// SignatureHint is an XDR Typedef defined as: -/// -/// ```text -/// typedef opaque SignatureHint[4]; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -pub struct SignatureHint(pub [u8; 4]); - -impl core::fmt::Debug for SignatureHint { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let v = &self.0; - write!(f, "SignatureHint(")?; - for b in v { - write!(f, "{b:02x}")?; - } - write!(f, ")")?; - Ok(()) - } -} -impl core::fmt::Display for SignatureHint { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let v = &self.0; - for b in v { - write!(f, "{b:02x}")?; - } - Ok(()) - } -} - -#[cfg(feature = "alloc")] -impl core::str::FromStr for SignatureHint { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - hex::decode(s).map_err(|_| Error::InvalidHex)?.try_into() - } -} -#[cfg(feature = "schemars")] -impl schemars::JsonSchema for SignatureHint { - fn schema_name() -> String { - "SignatureHint".to_string() - } - - fn is_referenceable() -> bool { - false - } - - fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema { - let schema = String::json_schema(gen); - if let schemars::schema::Schema::Object(mut schema) = schema { - schema.extensions.insert( - "contentEncoding".to_owned(), - serde_json::Value::String("hex".to_string()), - ); - schema.extensions.insert( - "contentMediaType".to_owned(), - serde_json::Value::String("application/binary".to_string()), - ); - let string = *schema.string.unwrap_or_default().clone(); - schema.string = Some(Box::new(schemars::schema::StringValidation { - max_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(), - min_length: 4_u32.checked_mul(2).map(Some).unwrap_or_default(), - ..string - })); - schema.into() - } else { - schema - } - } -} -impl From for [u8; 4] { - #[must_use] - fn from(x: SignatureHint) -> Self { - x.0 - } -} - -impl From<[u8; 4]> for SignatureHint { - #[must_use] - fn from(x: [u8; 4]) -> Self { - SignatureHint(x) - } -} - -impl AsRef<[u8; 4]> for SignatureHint { - #[must_use] - fn as_ref(&self) -> &[u8; 4] { - &self.0 - } -} - -impl ReadXdr for SignatureHint { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = <[u8; 4]>::read_xdr(r)?; - let v = SignatureHint(i); - Ok(v) - }) - } -} - -impl WriteXdr for SignatureHint { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -impl SignatureHint { - #[must_use] - pub fn as_slice(&self) -> &[u8] { - &self.0 - } -} - -#[cfg(feature = "alloc")] -impl TryFrom> for SignatureHint { - type Error = Error; - fn try_from(x: Vec) -> Result { - x.as_slice().try_into() - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for SignatureHint { - type Error = Error; - fn try_from(x: &Vec) -> Result { - x.as_slice().try_into() - } -} - -impl TryFrom<&[u8]> for SignatureHint { - type Error = Error; - fn try_from(x: &[u8]) -> Result { - Ok(SignatureHint(x.try_into()?)) - } -} - -impl AsRef<[u8]> for SignatureHint { - #[must_use] - fn as_ref(&self) -> &[u8] { - &self.0 - } -} - -/// NodeId is an XDR Typedef defined as: -/// -/// ```text -/// typedef PublicKey NodeID; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -#[derive(Debug)] -pub struct NodeId(pub PublicKey); - -impl From for PublicKey { - #[must_use] - fn from(x: NodeId) -> Self { - x.0 - } -} - -impl From for NodeId { - #[must_use] - fn from(x: PublicKey) -> Self { - NodeId(x) - } -} - -impl AsRef for NodeId { - #[must_use] - fn as_ref(&self) -> &PublicKey { - &self.0 - } -} - -impl ReadXdr for NodeId { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = PublicKey::read_xdr(r)?; - let v = NodeId(i); - Ok(v) - }) - } -} - -impl WriteXdr for NodeId { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -/// AccountId is an XDR Typedef defined as: -/// -/// ```text -/// typedef PublicKey AccountID; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -#[derive(Debug)] -pub struct AccountId(pub PublicKey); - -impl From for PublicKey { - #[must_use] - fn from(x: AccountId) -> Self { - x.0 - } -} - -impl From for AccountId { - #[must_use] - fn from(x: PublicKey) -> Self { - AccountId(x) - } -} - -impl AsRef for AccountId { - #[must_use] - fn as_ref(&self) -> &PublicKey { - &self.0 - } -} - -impl ReadXdr for AccountId { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = PublicKey::read_xdr(r)?; - let v = AccountId(i); - Ok(v) - }) - } -} - -impl WriteXdr for AccountId { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -/// ContractId is an XDR Typedef defined as: -/// -/// ```text -/// typedef Hash ContractID; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -#[derive(Debug)] -pub struct ContractId(pub Hash); - -impl From for Hash { - #[must_use] - fn from(x: ContractId) -> Self { - x.0 - } -} - -impl From for ContractId { - #[must_use] - fn from(x: Hash) -> Self { - ContractId(x) - } -} - -impl AsRef for ContractId { - #[must_use] - fn as_ref(&self) -> &Hash { - &self.0 - } -} - -impl ReadXdr for ContractId { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = Hash::read_xdr(r)?; - let v = ContractId(i); - Ok(v) - }) - } -} - -impl WriteXdr for ContractId { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -/// Curve25519Secret is an XDR Struct defined as: -/// -/// ```text -/// struct Curve25519Secret -/// { -/// opaque key[32]; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct Curve25519Secret { - pub key: [u8; 32], -} - -impl ReadXdr for Curve25519Secret { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - key: <[u8; 32]>::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for Curve25519Secret { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.key.write_xdr(w)?; - Ok(()) - }) - } -} - -/// Curve25519Public is an XDR Struct defined as: -/// -/// ```text -/// struct Curve25519Public -/// { -/// opaque key[32]; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct Curve25519Public { - pub key: [u8; 32], -} - -impl ReadXdr for Curve25519Public { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - key: <[u8; 32]>::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for Curve25519Public { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.key.write_xdr(w)?; - Ok(()) - }) - } -} - -/// HmacSha256Key is an XDR Struct defined as: -/// -/// ```text -/// struct HmacSha256Key -/// { -/// opaque key[32]; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct HmacSha256Key { - pub key: [u8; 32], -} - -impl ReadXdr for HmacSha256Key { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - key: <[u8; 32]>::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for HmacSha256Key { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.key.write_xdr(w)?; - Ok(()) - }) - } -} - -/// HmacSha256Mac is an XDR Struct defined as: -/// -/// ```text -/// struct HmacSha256Mac -/// { -/// opaque mac[32]; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct HmacSha256Mac { - pub mac: [u8; 32], -} - -impl ReadXdr for HmacSha256Mac { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - mac: <[u8; 32]>::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for HmacSha256Mac { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.mac.write_xdr(w)?; - Ok(()) - }) - } -} - -/// ShortHashSeed is an XDR Struct defined as: -/// -/// ```text -/// struct ShortHashSeed -/// { -/// opaque seed[16]; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct ShortHashSeed { - pub seed: [u8; 16], -} - -impl ReadXdr for ShortHashSeed { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - seed: <[u8; 16]>::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for ShortHashSeed { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.seed.write_xdr(w)?; - Ok(()) - }) - } -} - -/// BinaryFuseFilterType is an XDR Enum defined as: -/// -/// ```text -/// enum BinaryFuseFilterType -/// { -/// BINARY_FUSE_FILTER_8_BIT = 0, -/// BINARY_FUSE_FILTER_16_BIT = 1, -/// BINARY_FUSE_FILTER_32_BIT = 2 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum BinaryFuseFilterType { - #[cfg_attr(feature = "alloc", default)] - B8Bit = 0, - B16Bit = 1, - B32Bit = 2, -} - -impl BinaryFuseFilterType { - const _VARIANTS: &[BinaryFuseFilterType] = &[ - BinaryFuseFilterType::B8Bit, - BinaryFuseFilterType::B16Bit, - BinaryFuseFilterType::B32Bit, - ]; - pub const VARIANTS: [BinaryFuseFilterType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["B8Bit", "B16Bit", "B32Bit"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::B8Bit => "B8Bit", - Self::B16Bit => "B16Bit", - Self::B32Bit => "B32Bit", - } - } - - #[must_use] - pub const fn variants() -> [BinaryFuseFilterType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for BinaryFuseFilterType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for BinaryFuseFilterType { - fn variants() -> slice::Iter<'static, BinaryFuseFilterType> { - Self::VARIANTS.iter() - } -} - -impl Enum for BinaryFuseFilterType {} - -impl fmt::Display for BinaryFuseFilterType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for BinaryFuseFilterType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => BinaryFuseFilterType::B8Bit, - 1 => BinaryFuseFilterType::B16Bit, - 2 => BinaryFuseFilterType::B32Bit, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: BinaryFuseFilterType) -> Self { - e as Self - } -} - -impl ReadXdr for BinaryFuseFilterType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for BinaryFuseFilterType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// SerializedBinaryFuseFilter is an XDR Struct defined as: -/// -/// ```text -/// struct SerializedBinaryFuseFilter -/// { -/// BinaryFuseFilterType type; -/// -/// // Seed used to hash input to filter -/// ShortHashSeed inputHashSeed; -/// -/// // Seed used for internal filter hash operations -/// ShortHashSeed filterSeed; -/// uint32 segmentLength; -/// uint32 segementLengthMask; -/// uint32 segmentCount; -/// uint32 segmentCountLength; -/// uint32 fingerprintLength; // Length in terms of element count, not bytes -/// -/// // Array of uint8_t, uint16_t, or uint32_t depending on filter type -/// opaque fingerprints<>; -/// }; -/// ``` -/// -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - serde_with::serde_as, - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub struct SerializedBinaryFuseFilter { - pub type_: BinaryFuseFilterType, - pub input_hash_seed: ShortHashSeed, - pub filter_seed: ShortHashSeed, - pub segment_length: u32, - pub segement_length_mask: u32, - pub segment_count: u32, - pub segment_count_length: u32, - pub fingerprint_length: u32, - pub fingerprints: BytesM, -} - -impl ReadXdr for SerializedBinaryFuseFilter { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - Ok(Self { - type_: BinaryFuseFilterType::read_xdr(r)?, - input_hash_seed: ShortHashSeed::read_xdr(r)?, - filter_seed: ShortHashSeed::read_xdr(r)?, - segment_length: u32::read_xdr(r)?, - segement_length_mask: u32::read_xdr(r)?, - segment_count: u32::read_xdr(r)?, - segment_count_length: u32::read_xdr(r)?, - fingerprint_length: u32::read_xdr(r)?, - fingerprints: BytesM::read_xdr(r)?, - }) - }) - } -} - -impl WriteXdr for SerializedBinaryFuseFilter { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.type_.write_xdr(w)?; - self.input_hash_seed.write_xdr(w)?; - self.filter_seed.write_xdr(w)?; - self.segment_length.write_xdr(w)?; - self.segement_length_mask.write_xdr(w)?; - self.segment_count.write_xdr(w)?; - self.segment_count_length.write_xdr(w)?; - self.fingerprint_length.write_xdr(w)?; - self.fingerprints.write_xdr(w)?; - Ok(()) - }) - } -} - -/// PoolId is an XDR Typedef defined as: -/// -/// ```text -/// typedef Hash PoolID; -/// ``` -/// -#[cfg_eval::cfg_eval] -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -#[derive(Debug)] -pub struct PoolId(pub Hash); - -impl From for Hash { - #[must_use] - fn from(x: PoolId) -> Self { - x.0 - } -} - -impl From for PoolId { - #[must_use] - fn from(x: Hash) -> Self { - PoolId(x) - } -} - -impl AsRef for PoolId { - #[must_use] - fn as_ref(&self) -> &Hash { - &self.0 - } -} - -impl ReadXdr for PoolId { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let i = Hash::read_xdr(r)?; - let v = PoolId(i); - Ok(v) - }) - } -} - -impl WriteXdr for PoolId { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| self.0.write_xdr(w)) - } -} - -/// ClaimableBalanceIdType is an XDR Enum defined as: -/// -/// ```text -/// enum ClaimableBalanceIDType -/// { -/// CLAIMABLE_BALANCE_ID_TYPE_V0 = 0 -/// }; -/// ``` -/// -// enum -#[cfg_attr(feature = "alloc", derive(Default))] -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -#[repr(i32)] -pub enum ClaimableBalanceIdType { - #[cfg_attr(feature = "alloc", default)] - ClaimableBalanceIdTypeV0 = 0, -} - -impl ClaimableBalanceIdType { - const _VARIANTS: &[ClaimableBalanceIdType] = - &[ClaimableBalanceIdType::ClaimableBalanceIdTypeV0]; - pub const VARIANTS: [ClaimableBalanceIdType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["ClaimableBalanceIdTypeV0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ClaimableBalanceIdTypeV0 => "ClaimableBalanceIdTypeV0", - } - } - - #[must_use] - pub const fn variants() -> [ClaimableBalanceIdType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClaimableBalanceIdType { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for ClaimableBalanceIdType { - fn variants() -> slice::Iter<'static, ClaimableBalanceIdType> { - Self::VARIANTS.iter() - } -} - -impl Enum for ClaimableBalanceIdType {} - -impl fmt::Display for ClaimableBalanceIdType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.name()) - } -} - -impl TryFrom for ClaimableBalanceIdType { - type Error = Error; - - fn try_from(i: i32) -> Result { - let e = match i { - 0 => ClaimableBalanceIdType::ClaimableBalanceIdTypeV0, - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(e) - } -} - -impl From for i32 { - #[must_use] - fn from(e: ClaimableBalanceIdType) -> Self { - e as Self - } -} - -impl ReadXdr for ClaimableBalanceIdType { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let e = i32::read_xdr(r)?; - let v: Self = e.try_into()?; - Ok(v) - }) - } -} - -impl WriteXdr for ClaimableBalanceIdType { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - let i: i32 = (*self).into(); - i.write_xdr(w) - }) - } -} - -/// ClaimableBalanceId is an XDR Union defined as: -/// -/// ```text -/// union ClaimableBalanceID switch (ClaimableBalanceIDType type) -/// { -/// case CLAIMABLE_BALANCE_ID_TYPE_V0: -/// Hash v0; -/// }; -/// ``` -/// -// union with discriminant ClaimableBalanceIdType -#[cfg_eval::cfg_eval] -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr(feature = "arbitrary", derive(Arbitrary))] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde_with::SerializeDisplay, serde_with::DeserializeFromStr) -)] -#[allow(clippy::large_enum_variant)] -pub enum ClaimableBalanceId { - ClaimableBalanceIdTypeV0(Hash), -} - -#[cfg(feature = "alloc")] -impl Default for ClaimableBalanceId { - fn default() -> Self { - Self::ClaimableBalanceIdTypeV0(Hash::default()) - } -} - -impl ClaimableBalanceId { - const _VARIANTS: &[ClaimableBalanceIdType] = - &[ClaimableBalanceIdType::ClaimableBalanceIdTypeV0]; - pub const VARIANTS: [ClaimableBalanceIdType; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &["ClaimableBalanceIdTypeV0"]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - pub const fn name(&self) -> &'static str { - match self { - Self::ClaimableBalanceIdTypeV0(_) => "ClaimableBalanceIdTypeV0", - } - } - - #[must_use] - pub const fn discriminant(&self) -> ClaimableBalanceIdType { - #[allow(clippy::match_same_arms)] - match self { - Self::ClaimableBalanceIdTypeV0(_) => ClaimableBalanceIdType::ClaimableBalanceIdTypeV0, - } - } - - #[must_use] - pub const fn variants() -> [ClaimableBalanceIdType; Self::_VARIANTS.len()] { - Self::VARIANTS - } -} - -impl Name for ClaimableBalanceId { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Discriminant for ClaimableBalanceId { - #[must_use] - fn discriminant(&self) -> ClaimableBalanceIdType { - Self::discriminant(self) - } -} - -impl Variants for ClaimableBalanceId { - fn variants() -> slice::Iter<'static, ClaimableBalanceIdType> { - Self::VARIANTS.iter() - } -} - -impl Union for ClaimableBalanceId {} - -impl ReadXdr for ClaimableBalanceId { - #[cfg(feature = "std")] - fn read_xdr(r: &mut Limited) -> Result { - r.with_limited_depth(|r| { - let dv: ClaimableBalanceIdType = ::read_xdr(r)?; - #[allow(clippy::match_same_arms, clippy::match_wildcard_for_single_variants)] - let v = match dv { - ClaimableBalanceIdType::ClaimableBalanceIdTypeV0 => { - Self::ClaimableBalanceIdTypeV0(Hash::read_xdr(r)?) - } - #[allow(unreachable_patterns)] - _ => return Err(Error::Invalid), - }; - Ok(v) - }) - } -} - -impl WriteXdr for ClaimableBalanceId { - #[cfg(feature = "std")] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - w.with_limited_depth(|w| { - self.discriminant().write_xdr(w)?; - #[allow(clippy::match_same_arms)] - match self { - Self::ClaimableBalanceIdTypeV0(v) => v.write_xdr(w)?, - }; - Ok(()) - }) - } -} - -#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case") -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub enum TypeVariant { - Value, - ScpBallot, - ScpStatementType, - ScpNomination, - ScpStatement, - ScpStatementPledges, - ScpStatementPrepare, - ScpStatementConfirm, - ScpStatementExternalize, - ScpEnvelope, - ScpQuorumSet, - EncodedLedgerKey, - ConfigSettingContractExecutionLanesV0, - ConfigSettingContractComputeV0, - ConfigSettingContractParallelComputeV0, - ConfigSettingContractLedgerCostV0, - ConfigSettingContractLedgerCostExtV0, - ConfigSettingContractHistoricalDataV0, - ConfigSettingContractEventsV0, - ConfigSettingContractBandwidthV0, - ContractCostType, - ContractCostParamEntry, - StateArchivalSettings, - EvictionIterator, - ConfigSettingScpTiming, - FrozenLedgerKeys, - FrozenLedgerKeysDelta, - FreezeBypassTxs, - FreezeBypassTxsDelta, - ContractCostParams, - ConfigSettingId, - ConfigSettingEntry, - ScEnvMetaKind, - ScEnvMetaEntry, - ScEnvMetaEntryInterfaceVersion, - ScMetaV0, - ScMetaKind, - ScMetaEntry, - ScSpecType, - ScSpecTypeOption, - ScSpecTypeResult, - ScSpecTypeVec, - ScSpecTypeMap, - ScSpecTypeTuple, - ScSpecTypeBytesN, - ScSpecTypeUdt, - ScSpecTypeDef, - ScSpecUdtStructFieldV0, - ScSpecUdtStructV0, - ScSpecUdtUnionCaseVoidV0, - ScSpecUdtUnionCaseTupleV0, - ScSpecUdtUnionCaseV0Kind, - ScSpecUdtUnionCaseV0, - ScSpecUdtUnionV0, - ScSpecUdtEnumCaseV0, - ScSpecUdtEnumV0, - ScSpecUdtErrorEnumCaseV0, - ScSpecUdtErrorEnumV0, - ScSpecFunctionInputV0, - ScSpecFunctionV0, - ScSpecEventParamLocationV0, - ScSpecEventParamV0, - ScSpecEventDataFormat, - ScSpecEventV0, - ScSpecEntryKind, - ScSpecEntry, - ScValType, - ScErrorType, - ScErrorCode, - ScError, - UInt128Parts, - Int128Parts, - UInt256Parts, - Int256Parts, - ContractExecutableType, - ContractExecutable, - ScAddressType, - MuxedEd25519Account, - ScAddress, - ScVec, - ScMap, - ScBytes, - ScString, - ScSymbol, - ScNonceKey, - ScContractInstance, - ScVal, - ScMapEntry, - LedgerCloseMetaBatch, - StoredTransactionSet, - StoredDebugTransactionSet, - PersistedScpStateV0, - PersistedScpStateV1, - PersistedScpState, - Thresholds, - String32, - String64, - SequenceNumber, - DataValue, - AssetCode4, - AssetCode12, - AssetType, - AssetCode, - AlphaNum4, - AlphaNum12, - Asset, - Price, - Liabilities, - ThresholdIndexes, - LedgerEntryType, - Signer, - AccountFlags, - SponsorshipDescriptor, - AccountEntryExtensionV3, - AccountEntryExtensionV2, - AccountEntryExtensionV2Ext, - AccountEntryExtensionV1, - AccountEntryExtensionV1Ext, - AccountEntry, - AccountEntryExt, - TrustLineFlags, - LiquidityPoolType, - TrustLineAsset, - TrustLineEntryExtensionV2, - TrustLineEntryExtensionV2Ext, - TrustLineEntry, - TrustLineEntryExt, - TrustLineEntryV1, - TrustLineEntryV1Ext, - OfferEntryFlags, - OfferEntry, - OfferEntryExt, - DataEntry, - DataEntryExt, - ClaimPredicateType, - ClaimPredicate, - ClaimantType, - Claimant, - ClaimantV0, - ClaimableBalanceFlags, - ClaimableBalanceEntryExtensionV1, - ClaimableBalanceEntryExtensionV1Ext, - ClaimableBalanceEntry, - ClaimableBalanceEntryExt, - LiquidityPoolConstantProductParameters, - LiquidityPoolEntry, - LiquidityPoolEntryBody, - LiquidityPoolEntryConstantProduct, - ContractDataDurability, - ContractDataEntry, - ContractCodeCostInputs, - ContractCodeEntry, - ContractCodeEntryExt, - ContractCodeEntryV1, - TtlEntry, - LedgerEntryExtensionV1, - LedgerEntryExtensionV1Ext, - LedgerEntry, - LedgerEntryData, - LedgerEntryExt, - LedgerKey, - LedgerKeyAccount, - LedgerKeyTrustLine, - LedgerKeyOffer, - LedgerKeyData, - LedgerKeyClaimableBalance, - LedgerKeyLiquidityPool, - LedgerKeyContractData, - LedgerKeyContractCode, - LedgerKeyConfigSetting, - LedgerKeyTtl, - EnvelopeType, - BucketListType, - BucketEntryType, - HotArchiveBucketEntryType, - BucketMetadata, - BucketMetadataExt, - BucketEntry, - HotArchiveBucketEntry, - UpgradeType, - StellarValueType, - LedgerCloseValueSignature, - StellarValue, - StellarValueExt, - LedgerHeaderFlags, - LedgerHeaderExtensionV1, - LedgerHeaderExtensionV1Ext, - LedgerHeader, - LedgerHeaderExt, - LedgerUpgradeType, - ConfigUpgradeSetKey, - LedgerUpgrade, - ConfigUpgradeSet, - TxSetComponentType, - DependentTxCluster, - ParallelTxExecutionStage, - ParallelTxsComponent, - TxSetComponent, - TxSetComponentTxsMaybeDiscountedFee, - TransactionPhase, - TransactionSet, - TransactionSetV1, - GeneralizedTransactionSet, - TransactionResultPair, - TransactionResultSet, - TransactionHistoryEntry, - TransactionHistoryEntryExt, - TransactionHistoryResultEntry, - TransactionHistoryResultEntryExt, - LedgerHeaderHistoryEntry, - LedgerHeaderHistoryEntryExt, - LedgerScpMessages, - ScpHistoryEntryV0, - ScpHistoryEntry, - LedgerEntryChangeType, - LedgerEntryChange, - LedgerEntryChanges, - OperationMeta, - TransactionMetaV1, - TransactionMetaV2, - ContractEventType, - ContractEvent, - ContractEventBody, - ContractEventV0, - DiagnosticEvent, - SorobanTransactionMetaExtV1, - SorobanTransactionMetaExt, - SorobanTransactionMeta, - TransactionMetaV3, - OperationMetaV2, - SorobanTransactionMetaV2, - TransactionEventStage, - TransactionEvent, - TransactionMetaV4, - InvokeHostFunctionSuccessPreImage, - TransactionMeta, - TransactionResultMeta, - TransactionResultMetaV1, - UpgradeEntryMeta, - LedgerCloseMetaV0, - LedgerCloseMetaExtV1, - LedgerCloseMetaExt, - LedgerCloseMetaV1, - LedgerCloseMetaV2, - LedgerCloseMeta, - ErrorCode, - SError, - SendMore, - SendMoreExtended, - AuthCert, - Hello, - Auth, - IpAddrType, - PeerAddress, - PeerAddressIp, - MessageType, - DontHave, - SurveyMessageCommandType, - SurveyMessageResponseType, - TimeSlicedSurveyStartCollectingMessage, - SignedTimeSlicedSurveyStartCollectingMessage, - TimeSlicedSurveyStopCollectingMessage, - SignedTimeSlicedSurveyStopCollectingMessage, - SurveyRequestMessage, - TimeSlicedSurveyRequestMessage, - SignedTimeSlicedSurveyRequestMessage, - EncryptedBody, - SurveyResponseMessage, - TimeSlicedSurveyResponseMessage, - SignedTimeSlicedSurveyResponseMessage, - PeerStats, - TimeSlicedNodeData, - TimeSlicedPeerData, - TimeSlicedPeerDataList, - TopologyResponseBodyV2, - SurveyResponseBody, - TxAdvertVector, - FloodAdvert, - TxDemandVector, - FloodDemand, - StellarMessage, - AuthenticatedMessage, - AuthenticatedMessageV0, - LiquidityPoolParameters, - MuxedAccount, - MuxedAccountMed25519, - DecoratedSignature, - OperationType, - CreateAccountOp, - PaymentOp, - PathPaymentStrictReceiveOp, - PathPaymentStrictSendOp, - ManageSellOfferOp, - ManageBuyOfferOp, - CreatePassiveSellOfferOp, - SetOptionsOp, - ChangeTrustAsset, - ChangeTrustOp, - AllowTrustOp, - ManageDataOp, - BumpSequenceOp, - CreateClaimableBalanceOp, - ClaimClaimableBalanceOp, - BeginSponsoringFutureReservesOp, - RevokeSponsorshipType, - RevokeSponsorshipOp, - RevokeSponsorshipOpSigner, - ClawbackOp, - ClawbackClaimableBalanceOp, - SetTrustLineFlagsOp, - LiquidityPoolDepositOp, - LiquidityPoolWithdrawOp, - HostFunctionType, - ContractIdPreimageType, - ContractIdPreimage, - ContractIdPreimageFromAddress, - CreateContractArgs, - CreateContractArgsV2, - InvokeContractArgs, - HostFunction, - SorobanAuthorizedFunctionType, - SorobanAuthorizedFunction, - SorobanAuthorizedInvocation, - SorobanAddressCredentials, - SorobanCredentialsType, - SorobanCredentials, - SorobanAuthorizationEntry, - SorobanAuthorizationEntries, - InvokeHostFunctionOp, - ExtendFootprintTtlOp, - RestoreFootprintOp, - Operation, - OperationBody, - HashIdPreimage, - HashIdPreimageOperationId, - HashIdPreimageRevokeId, - HashIdPreimageContractId, - HashIdPreimageSorobanAuthorization, - MemoType, - Memo, - TimeBounds, - LedgerBounds, - PreconditionsV2, - PreconditionType, - Preconditions, - LedgerFootprint, - SorobanResources, - SorobanResourcesExtV0, - SorobanTransactionData, - SorobanTransactionDataExt, - TransactionV0, - TransactionV0Ext, - TransactionV0Envelope, - Transaction, - TransactionExt, - TransactionV1Envelope, - FeeBumpTransaction, - FeeBumpTransactionInnerTx, - FeeBumpTransactionExt, - FeeBumpTransactionEnvelope, - TransactionEnvelope, - TransactionSignaturePayload, - TransactionSignaturePayloadTaggedTransaction, - ClaimAtomType, - ClaimOfferAtomV0, - ClaimOfferAtom, - ClaimLiquidityAtom, - ClaimAtom, - CreateAccountResultCode, - CreateAccountResult, - PaymentResultCode, - PaymentResult, - PathPaymentStrictReceiveResultCode, - SimplePaymentResult, - PathPaymentStrictReceiveResult, - PathPaymentStrictReceiveResultSuccess, - PathPaymentStrictSendResultCode, - PathPaymentStrictSendResult, - PathPaymentStrictSendResultSuccess, - ManageSellOfferResultCode, - ManageOfferEffect, - ManageOfferSuccessResult, - ManageOfferSuccessResultOffer, - ManageSellOfferResult, - ManageBuyOfferResultCode, - ManageBuyOfferResult, - SetOptionsResultCode, - SetOptionsResult, - ChangeTrustResultCode, - ChangeTrustResult, - AllowTrustResultCode, - AllowTrustResult, - AccountMergeResultCode, - AccountMergeResult, - InflationResultCode, - InflationPayout, - InflationResult, - ManageDataResultCode, - ManageDataResult, - BumpSequenceResultCode, - BumpSequenceResult, - CreateClaimableBalanceResultCode, - CreateClaimableBalanceResult, - ClaimClaimableBalanceResultCode, - ClaimClaimableBalanceResult, - BeginSponsoringFutureReservesResultCode, - BeginSponsoringFutureReservesResult, - EndSponsoringFutureReservesResultCode, - EndSponsoringFutureReservesResult, - RevokeSponsorshipResultCode, - RevokeSponsorshipResult, - ClawbackResultCode, - ClawbackResult, - ClawbackClaimableBalanceResultCode, - ClawbackClaimableBalanceResult, - SetTrustLineFlagsResultCode, - SetTrustLineFlagsResult, - LiquidityPoolDepositResultCode, - LiquidityPoolDepositResult, - LiquidityPoolWithdrawResultCode, - LiquidityPoolWithdrawResult, - InvokeHostFunctionResultCode, - InvokeHostFunctionResult, - ExtendFootprintTtlResultCode, - ExtendFootprintTtlResult, - RestoreFootprintResultCode, - RestoreFootprintResult, - OperationResultCode, - OperationResult, - OperationResultTr, - TransactionResultCode, - InnerTransactionResult, - InnerTransactionResultResult, - InnerTransactionResultExt, - InnerTransactionResultPair, - TransactionResult, - TransactionResultResult, - TransactionResultExt, - Hash, - Uint256, - Uint32, - Int32, - Uint64, - Int64, - TimePoint, - Duration, - ExtensionPoint, - CryptoKeyType, - PublicKeyType, - SignerKeyType, - PublicKey, - SignerKey, - SignerKeyEd25519SignedPayload, - Signature, - SignatureHint, - NodeId, - AccountId, - ContractId, - Curve25519Secret, - Curve25519Public, - HmacSha256Key, - HmacSha256Mac, - ShortHashSeed, - BinaryFuseFilterType, - SerializedBinaryFuseFilter, - PoolId, - ClaimableBalanceIdType, - ClaimableBalanceId, -} - -impl TypeVariant { - const _VARIANTS: &[TypeVariant] = &[ - TypeVariant::Value, - TypeVariant::ScpBallot, - TypeVariant::ScpStatementType, - TypeVariant::ScpNomination, - TypeVariant::ScpStatement, - TypeVariant::ScpStatementPledges, - TypeVariant::ScpStatementPrepare, - TypeVariant::ScpStatementConfirm, - TypeVariant::ScpStatementExternalize, - TypeVariant::ScpEnvelope, - TypeVariant::ScpQuorumSet, - TypeVariant::EncodedLedgerKey, - TypeVariant::ConfigSettingContractExecutionLanesV0, - TypeVariant::ConfigSettingContractComputeV0, - TypeVariant::ConfigSettingContractParallelComputeV0, - TypeVariant::ConfigSettingContractLedgerCostV0, - TypeVariant::ConfigSettingContractLedgerCostExtV0, - TypeVariant::ConfigSettingContractHistoricalDataV0, - TypeVariant::ConfigSettingContractEventsV0, - TypeVariant::ConfigSettingContractBandwidthV0, - TypeVariant::ContractCostType, - TypeVariant::ContractCostParamEntry, - TypeVariant::StateArchivalSettings, - TypeVariant::EvictionIterator, - TypeVariant::ConfigSettingScpTiming, - TypeVariant::FrozenLedgerKeys, - TypeVariant::FrozenLedgerKeysDelta, - TypeVariant::FreezeBypassTxs, - TypeVariant::FreezeBypassTxsDelta, - TypeVariant::ContractCostParams, - TypeVariant::ConfigSettingId, - TypeVariant::ConfigSettingEntry, - TypeVariant::ScEnvMetaKind, - TypeVariant::ScEnvMetaEntry, - TypeVariant::ScEnvMetaEntryInterfaceVersion, - TypeVariant::ScMetaV0, - TypeVariant::ScMetaKind, - TypeVariant::ScMetaEntry, - TypeVariant::ScSpecType, - TypeVariant::ScSpecTypeOption, - TypeVariant::ScSpecTypeResult, - TypeVariant::ScSpecTypeVec, - TypeVariant::ScSpecTypeMap, - TypeVariant::ScSpecTypeTuple, - TypeVariant::ScSpecTypeBytesN, - TypeVariant::ScSpecTypeUdt, - TypeVariant::ScSpecTypeDef, - TypeVariant::ScSpecUdtStructFieldV0, - TypeVariant::ScSpecUdtStructV0, - TypeVariant::ScSpecUdtUnionCaseVoidV0, - TypeVariant::ScSpecUdtUnionCaseTupleV0, - TypeVariant::ScSpecUdtUnionCaseV0Kind, - TypeVariant::ScSpecUdtUnionCaseV0, - TypeVariant::ScSpecUdtUnionV0, - TypeVariant::ScSpecUdtEnumCaseV0, - TypeVariant::ScSpecUdtEnumV0, - TypeVariant::ScSpecUdtErrorEnumCaseV0, - TypeVariant::ScSpecUdtErrorEnumV0, - TypeVariant::ScSpecFunctionInputV0, - TypeVariant::ScSpecFunctionV0, - TypeVariant::ScSpecEventParamLocationV0, - TypeVariant::ScSpecEventParamV0, - TypeVariant::ScSpecEventDataFormat, - TypeVariant::ScSpecEventV0, - TypeVariant::ScSpecEntryKind, - TypeVariant::ScSpecEntry, - TypeVariant::ScValType, - TypeVariant::ScErrorType, - TypeVariant::ScErrorCode, - TypeVariant::ScError, - TypeVariant::UInt128Parts, - TypeVariant::Int128Parts, - TypeVariant::UInt256Parts, - TypeVariant::Int256Parts, - TypeVariant::ContractExecutableType, - TypeVariant::ContractExecutable, - TypeVariant::ScAddressType, - TypeVariant::MuxedEd25519Account, - TypeVariant::ScAddress, - TypeVariant::ScVec, - TypeVariant::ScMap, - TypeVariant::ScBytes, - TypeVariant::ScString, - TypeVariant::ScSymbol, - TypeVariant::ScNonceKey, - TypeVariant::ScContractInstance, - TypeVariant::ScVal, - TypeVariant::ScMapEntry, - TypeVariant::LedgerCloseMetaBatch, - TypeVariant::StoredTransactionSet, - TypeVariant::StoredDebugTransactionSet, - TypeVariant::PersistedScpStateV0, - TypeVariant::PersistedScpStateV1, - TypeVariant::PersistedScpState, - TypeVariant::Thresholds, - TypeVariant::String32, - TypeVariant::String64, - TypeVariant::SequenceNumber, - TypeVariant::DataValue, - TypeVariant::AssetCode4, - TypeVariant::AssetCode12, - TypeVariant::AssetType, - TypeVariant::AssetCode, - TypeVariant::AlphaNum4, - TypeVariant::AlphaNum12, - TypeVariant::Asset, - TypeVariant::Price, - TypeVariant::Liabilities, - TypeVariant::ThresholdIndexes, - TypeVariant::LedgerEntryType, - TypeVariant::Signer, - TypeVariant::AccountFlags, - TypeVariant::SponsorshipDescriptor, - TypeVariant::AccountEntryExtensionV3, - TypeVariant::AccountEntryExtensionV2, - TypeVariant::AccountEntryExtensionV2Ext, - TypeVariant::AccountEntryExtensionV1, - TypeVariant::AccountEntryExtensionV1Ext, - TypeVariant::AccountEntry, - TypeVariant::AccountEntryExt, - TypeVariant::TrustLineFlags, - TypeVariant::LiquidityPoolType, - TypeVariant::TrustLineAsset, - TypeVariant::TrustLineEntryExtensionV2, - TypeVariant::TrustLineEntryExtensionV2Ext, - TypeVariant::TrustLineEntry, - TypeVariant::TrustLineEntryExt, - TypeVariant::TrustLineEntryV1, - TypeVariant::TrustLineEntryV1Ext, - TypeVariant::OfferEntryFlags, - TypeVariant::OfferEntry, - TypeVariant::OfferEntryExt, - TypeVariant::DataEntry, - TypeVariant::DataEntryExt, - TypeVariant::ClaimPredicateType, - TypeVariant::ClaimPredicate, - TypeVariant::ClaimantType, - TypeVariant::Claimant, - TypeVariant::ClaimantV0, - TypeVariant::ClaimableBalanceFlags, - TypeVariant::ClaimableBalanceEntryExtensionV1, - TypeVariant::ClaimableBalanceEntryExtensionV1Ext, - TypeVariant::ClaimableBalanceEntry, - TypeVariant::ClaimableBalanceEntryExt, - TypeVariant::LiquidityPoolConstantProductParameters, - TypeVariant::LiquidityPoolEntry, - TypeVariant::LiquidityPoolEntryBody, - TypeVariant::LiquidityPoolEntryConstantProduct, - TypeVariant::ContractDataDurability, - TypeVariant::ContractDataEntry, - TypeVariant::ContractCodeCostInputs, - TypeVariant::ContractCodeEntry, - TypeVariant::ContractCodeEntryExt, - TypeVariant::ContractCodeEntryV1, - TypeVariant::TtlEntry, - TypeVariant::LedgerEntryExtensionV1, - TypeVariant::LedgerEntryExtensionV1Ext, - TypeVariant::LedgerEntry, - TypeVariant::LedgerEntryData, - TypeVariant::LedgerEntryExt, - TypeVariant::LedgerKey, - TypeVariant::LedgerKeyAccount, - TypeVariant::LedgerKeyTrustLine, - TypeVariant::LedgerKeyOffer, - TypeVariant::LedgerKeyData, - TypeVariant::LedgerKeyClaimableBalance, - TypeVariant::LedgerKeyLiquidityPool, - TypeVariant::LedgerKeyContractData, - TypeVariant::LedgerKeyContractCode, - TypeVariant::LedgerKeyConfigSetting, - TypeVariant::LedgerKeyTtl, - TypeVariant::EnvelopeType, - TypeVariant::BucketListType, - TypeVariant::BucketEntryType, - TypeVariant::HotArchiveBucketEntryType, - TypeVariant::BucketMetadata, - TypeVariant::BucketMetadataExt, - TypeVariant::BucketEntry, - TypeVariant::HotArchiveBucketEntry, - TypeVariant::UpgradeType, - TypeVariant::StellarValueType, - TypeVariant::LedgerCloseValueSignature, - TypeVariant::StellarValue, - TypeVariant::StellarValueExt, - TypeVariant::LedgerHeaderFlags, - TypeVariant::LedgerHeaderExtensionV1, - TypeVariant::LedgerHeaderExtensionV1Ext, - TypeVariant::LedgerHeader, - TypeVariant::LedgerHeaderExt, - TypeVariant::LedgerUpgradeType, - TypeVariant::ConfigUpgradeSetKey, - TypeVariant::LedgerUpgrade, - TypeVariant::ConfigUpgradeSet, - TypeVariant::TxSetComponentType, - TypeVariant::DependentTxCluster, - TypeVariant::ParallelTxExecutionStage, - TypeVariant::ParallelTxsComponent, - TypeVariant::TxSetComponent, - TypeVariant::TxSetComponentTxsMaybeDiscountedFee, - TypeVariant::TransactionPhase, - TypeVariant::TransactionSet, - TypeVariant::TransactionSetV1, - TypeVariant::GeneralizedTransactionSet, - TypeVariant::TransactionResultPair, - TypeVariant::TransactionResultSet, - TypeVariant::TransactionHistoryEntry, - TypeVariant::TransactionHistoryEntryExt, - TypeVariant::TransactionHistoryResultEntry, - TypeVariant::TransactionHistoryResultEntryExt, - TypeVariant::LedgerHeaderHistoryEntry, - TypeVariant::LedgerHeaderHistoryEntryExt, - TypeVariant::LedgerScpMessages, - TypeVariant::ScpHistoryEntryV0, - TypeVariant::ScpHistoryEntry, - TypeVariant::LedgerEntryChangeType, - TypeVariant::LedgerEntryChange, - TypeVariant::LedgerEntryChanges, - TypeVariant::OperationMeta, - TypeVariant::TransactionMetaV1, - TypeVariant::TransactionMetaV2, - TypeVariant::ContractEventType, - TypeVariant::ContractEvent, - TypeVariant::ContractEventBody, - TypeVariant::ContractEventV0, - TypeVariant::DiagnosticEvent, - TypeVariant::SorobanTransactionMetaExtV1, - TypeVariant::SorobanTransactionMetaExt, - TypeVariant::SorobanTransactionMeta, - TypeVariant::TransactionMetaV3, - TypeVariant::OperationMetaV2, - TypeVariant::SorobanTransactionMetaV2, - TypeVariant::TransactionEventStage, - TypeVariant::TransactionEvent, - TypeVariant::TransactionMetaV4, - TypeVariant::InvokeHostFunctionSuccessPreImage, - TypeVariant::TransactionMeta, - TypeVariant::TransactionResultMeta, - TypeVariant::TransactionResultMetaV1, - TypeVariant::UpgradeEntryMeta, - TypeVariant::LedgerCloseMetaV0, - TypeVariant::LedgerCloseMetaExtV1, - TypeVariant::LedgerCloseMetaExt, - TypeVariant::LedgerCloseMetaV1, - TypeVariant::LedgerCloseMetaV2, - TypeVariant::LedgerCloseMeta, - TypeVariant::ErrorCode, - TypeVariant::SError, - TypeVariant::SendMore, - TypeVariant::SendMoreExtended, - TypeVariant::AuthCert, - TypeVariant::Hello, - TypeVariant::Auth, - TypeVariant::IpAddrType, - TypeVariant::PeerAddress, - TypeVariant::PeerAddressIp, - TypeVariant::MessageType, - TypeVariant::DontHave, - TypeVariant::SurveyMessageCommandType, - TypeVariant::SurveyMessageResponseType, - TypeVariant::TimeSlicedSurveyStartCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage, - TypeVariant::TimeSlicedSurveyStopCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage, - TypeVariant::SurveyRequestMessage, - TypeVariant::TimeSlicedSurveyRequestMessage, - TypeVariant::SignedTimeSlicedSurveyRequestMessage, - TypeVariant::EncryptedBody, - TypeVariant::SurveyResponseMessage, - TypeVariant::TimeSlicedSurveyResponseMessage, - TypeVariant::SignedTimeSlicedSurveyResponseMessage, - TypeVariant::PeerStats, - TypeVariant::TimeSlicedNodeData, - TypeVariant::TimeSlicedPeerData, - TypeVariant::TimeSlicedPeerDataList, - TypeVariant::TopologyResponseBodyV2, - TypeVariant::SurveyResponseBody, - TypeVariant::TxAdvertVector, - TypeVariant::FloodAdvert, - TypeVariant::TxDemandVector, - TypeVariant::FloodDemand, - TypeVariant::StellarMessage, - TypeVariant::AuthenticatedMessage, - TypeVariant::AuthenticatedMessageV0, - TypeVariant::LiquidityPoolParameters, - TypeVariant::MuxedAccount, - TypeVariant::MuxedAccountMed25519, - TypeVariant::DecoratedSignature, - TypeVariant::OperationType, - TypeVariant::CreateAccountOp, - TypeVariant::PaymentOp, - TypeVariant::PathPaymentStrictReceiveOp, - TypeVariant::PathPaymentStrictSendOp, - TypeVariant::ManageSellOfferOp, - TypeVariant::ManageBuyOfferOp, - TypeVariant::CreatePassiveSellOfferOp, - TypeVariant::SetOptionsOp, - TypeVariant::ChangeTrustAsset, - TypeVariant::ChangeTrustOp, - TypeVariant::AllowTrustOp, - TypeVariant::ManageDataOp, - TypeVariant::BumpSequenceOp, - TypeVariant::CreateClaimableBalanceOp, - TypeVariant::ClaimClaimableBalanceOp, - TypeVariant::BeginSponsoringFutureReservesOp, - TypeVariant::RevokeSponsorshipType, - TypeVariant::RevokeSponsorshipOp, - TypeVariant::RevokeSponsorshipOpSigner, - TypeVariant::ClawbackOp, - TypeVariant::ClawbackClaimableBalanceOp, - TypeVariant::SetTrustLineFlagsOp, - TypeVariant::LiquidityPoolDepositOp, - TypeVariant::LiquidityPoolWithdrawOp, - TypeVariant::HostFunctionType, - TypeVariant::ContractIdPreimageType, - TypeVariant::ContractIdPreimage, - TypeVariant::ContractIdPreimageFromAddress, - TypeVariant::CreateContractArgs, - TypeVariant::CreateContractArgsV2, - TypeVariant::InvokeContractArgs, - TypeVariant::HostFunction, - TypeVariant::SorobanAuthorizedFunctionType, - TypeVariant::SorobanAuthorizedFunction, - TypeVariant::SorobanAuthorizedInvocation, - TypeVariant::SorobanAddressCredentials, - TypeVariant::SorobanCredentialsType, - TypeVariant::SorobanCredentials, - TypeVariant::SorobanAuthorizationEntry, - TypeVariant::SorobanAuthorizationEntries, - TypeVariant::InvokeHostFunctionOp, - TypeVariant::ExtendFootprintTtlOp, - TypeVariant::RestoreFootprintOp, - TypeVariant::Operation, - TypeVariant::OperationBody, - TypeVariant::HashIdPreimage, - TypeVariant::HashIdPreimageOperationId, - TypeVariant::HashIdPreimageRevokeId, - TypeVariant::HashIdPreimageContractId, - TypeVariant::HashIdPreimageSorobanAuthorization, - TypeVariant::MemoType, - TypeVariant::Memo, - TypeVariant::TimeBounds, - TypeVariant::LedgerBounds, - TypeVariant::PreconditionsV2, - TypeVariant::PreconditionType, - TypeVariant::Preconditions, - TypeVariant::LedgerFootprint, - TypeVariant::SorobanResources, - TypeVariant::SorobanResourcesExtV0, - TypeVariant::SorobanTransactionData, - TypeVariant::SorobanTransactionDataExt, - TypeVariant::TransactionV0, - TypeVariant::TransactionV0Ext, - TypeVariant::TransactionV0Envelope, - TypeVariant::Transaction, - TypeVariant::TransactionExt, - TypeVariant::TransactionV1Envelope, - TypeVariant::FeeBumpTransaction, - TypeVariant::FeeBumpTransactionInnerTx, - TypeVariant::FeeBumpTransactionExt, - TypeVariant::FeeBumpTransactionEnvelope, - TypeVariant::TransactionEnvelope, - TypeVariant::TransactionSignaturePayload, - TypeVariant::TransactionSignaturePayloadTaggedTransaction, - TypeVariant::ClaimAtomType, - TypeVariant::ClaimOfferAtomV0, - TypeVariant::ClaimOfferAtom, - TypeVariant::ClaimLiquidityAtom, - TypeVariant::ClaimAtom, - TypeVariant::CreateAccountResultCode, - TypeVariant::CreateAccountResult, - TypeVariant::PaymentResultCode, - TypeVariant::PaymentResult, - TypeVariant::PathPaymentStrictReceiveResultCode, - TypeVariant::SimplePaymentResult, - TypeVariant::PathPaymentStrictReceiveResult, - TypeVariant::PathPaymentStrictReceiveResultSuccess, - TypeVariant::PathPaymentStrictSendResultCode, - TypeVariant::PathPaymentStrictSendResult, - TypeVariant::PathPaymentStrictSendResultSuccess, - TypeVariant::ManageSellOfferResultCode, - TypeVariant::ManageOfferEffect, - TypeVariant::ManageOfferSuccessResult, - TypeVariant::ManageOfferSuccessResultOffer, - TypeVariant::ManageSellOfferResult, - TypeVariant::ManageBuyOfferResultCode, - TypeVariant::ManageBuyOfferResult, - TypeVariant::SetOptionsResultCode, - TypeVariant::SetOptionsResult, - TypeVariant::ChangeTrustResultCode, - TypeVariant::ChangeTrustResult, - TypeVariant::AllowTrustResultCode, - TypeVariant::AllowTrustResult, - TypeVariant::AccountMergeResultCode, - TypeVariant::AccountMergeResult, - TypeVariant::InflationResultCode, - TypeVariant::InflationPayout, - TypeVariant::InflationResult, - TypeVariant::ManageDataResultCode, - TypeVariant::ManageDataResult, - TypeVariant::BumpSequenceResultCode, - TypeVariant::BumpSequenceResult, - TypeVariant::CreateClaimableBalanceResultCode, - TypeVariant::CreateClaimableBalanceResult, - TypeVariant::ClaimClaimableBalanceResultCode, - TypeVariant::ClaimClaimableBalanceResult, - TypeVariant::BeginSponsoringFutureReservesResultCode, - TypeVariant::BeginSponsoringFutureReservesResult, - TypeVariant::EndSponsoringFutureReservesResultCode, - TypeVariant::EndSponsoringFutureReservesResult, - TypeVariant::RevokeSponsorshipResultCode, - TypeVariant::RevokeSponsorshipResult, - TypeVariant::ClawbackResultCode, - TypeVariant::ClawbackResult, - TypeVariant::ClawbackClaimableBalanceResultCode, - TypeVariant::ClawbackClaimableBalanceResult, - TypeVariant::SetTrustLineFlagsResultCode, - TypeVariant::SetTrustLineFlagsResult, - TypeVariant::LiquidityPoolDepositResultCode, - TypeVariant::LiquidityPoolDepositResult, - TypeVariant::LiquidityPoolWithdrawResultCode, - TypeVariant::LiquidityPoolWithdrawResult, - TypeVariant::InvokeHostFunctionResultCode, - TypeVariant::InvokeHostFunctionResult, - TypeVariant::ExtendFootprintTtlResultCode, - TypeVariant::ExtendFootprintTtlResult, - TypeVariant::RestoreFootprintResultCode, - TypeVariant::RestoreFootprintResult, - TypeVariant::OperationResultCode, - TypeVariant::OperationResult, - TypeVariant::OperationResultTr, - TypeVariant::TransactionResultCode, - TypeVariant::InnerTransactionResult, - TypeVariant::InnerTransactionResultResult, - TypeVariant::InnerTransactionResultExt, - TypeVariant::InnerTransactionResultPair, - TypeVariant::TransactionResult, - TypeVariant::TransactionResultResult, - TypeVariant::TransactionResultExt, - TypeVariant::Hash, - TypeVariant::Uint256, - TypeVariant::Uint32, - TypeVariant::Int32, - TypeVariant::Uint64, - TypeVariant::Int64, - TypeVariant::TimePoint, - TypeVariant::Duration, - TypeVariant::ExtensionPoint, - TypeVariant::CryptoKeyType, - TypeVariant::PublicKeyType, - TypeVariant::SignerKeyType, - TypeVariant::PublicKey, - TypeVariant::SignerKey, - TypeVariant::SignerKeyEd25519SignedPayload, - TypeVariant::Signature, - TypeVariant::SignatureHint, - TypeVariant::NodeId, - TypeVariant::AccountId, - TypeVariant::ContractId, - TypeVariant::Curve25519Secret, - TypeVariant::Curve25519Public, - TypeVariant::HmacSha256Key, - TypeVariant::HmacSha256Mac, - TypeVariant::ShortHashSeed, - TypeVariant::BinaryFuseFilterType, - TypeVariant::SerializedBinaryFuseFilter, - TypeVariant::PoolId, - TypeVariant::ClaimableBalanceIdType, - TypeVariant::ClaimableBalanceId, - ]; - pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Value", - "ScpBallot", - "ScpStatementType", - "ScpNomination", - "ScpStatement", - "ScpStatementPledges", - "ScpStatementPrepare", - "ScpStatementConfirm", - "ScpStatementExternalize", - "ScpEnvelope", - "ScpQuorumSet", - "EncodedLedgerKey", - "ConfigSettingContractExecutionLanesV0", - "ConfigSettingContractComputeV0", - "ConfigSettingContractParallelComputeV0", - "ConfigSettingContractLedgerCostV0", - "ConfigSettingContractLedgerCostExtV0", - "ConfigSettingContractHistoricalDataV0", - "ConfigSettingContractEventsV0", - "ConfigSettingContractBandwidthV0", - "ContractCostType", - "ContractCostParamEntry", - "StateArchivalSettings", - "EvictionIterator", - "ConfigSettingScpTiming", - "FrozenLedgerKeys", - "FrozenLedgerKeysDelta", - "FreezeBypassTxs", - "FreezeBypassTxsDelta", - "ContractCostParams", - "ConfigSettingId", - "ConfigSettingEntry", - "ScEnvMetaKind", - "ScEnvMetaEntry", - "ScEnvMetaEntryInterfaceVersion", - "ScMetaV0", - "ScMetaKind", - "ScMetaEntry", - "ScSpecType", - "ScSpecTypeOption", - "ScSpecTypeResult", - "ScSpecTypeVec", - "ScSpecTypeMap", - "ScSpecTypeTuple", - "ScSpecTypeBytesN", - "ScSpecTypeUdt", - "ScSpecTypeDef", - "ScSpecUdtStructFieldV0", - "ScSpecUdtStructV0", - "ScSpecUdtUnionCaseVoidV0", - "ScSpecUdtUnionCaseTupleV0", - "ScSpecUdtUnionCaseV0Kind", - "ScSpecUdtUnionCaseV0", - "ScSpecUdtUnionV0", - "ScSpecUdtEnumCaseV0", - "ScSpecUdtEnumV0", - "ScSpecUdtErrorEnumCaseV0", - "ScSpecUdtErrorEnumV0", - "ScSpecFunctionInputV0", - "ScSpecFunctionV0", - "ScSpecEventParamLocationV0", - "ScSpecEventParamV0", - "ScSpecEventDataFormat", - "ScSpecEventV0", - "ScSpecEntryKind", - "ScSpecEntry", - "ScValType", - "ScErrorType", - "ScErrorCode", - "ScError", - "UInt128Parts", - "Int128Parts", - "UInt256Parts", - "Int256Parts", - "ContractExecutableType", - "ContractExecutable", - "ScAddressType", - "MuxedEd25519Account", - "ScAddress", - "ScVec", - "ScMap", - "ScBytes", - "ScString", - "ScSymbol", - "ScNonceKey", - "ScContractInstance", - "ScVal", - "ScMapEntry", - "LedgerCloseMetaBatch", - "StoredTransactionSet", - "StoredDebugTransactionSet", - "PersistedScpStateV0", - "PersistedScpStateV1", - "PersistedScpState", - "Thresholds", - "String32", - "String64", - "SequenceNumber", - "DataValue", - "AssetCode4", - "AssetCode12", - "AssetType", - "AssetCode", - "AlphaNum4", - "AlphaNum12", - "Asset", - "Price", - "Liabilities", - "ThresholdIndexes", - "LedgerEntryType", - "Signer", - "AccountFlags", - "SponsorshipDescriptor", - "AccountEntryExtensionV3", - "AccountEntryExtensionV2", - "AccountEntryExtensionV2Ext", - "AccountEntryExtensionV1", - "AccountEntryExtensionV1Ext", - "AccountEntry", - "AccountEntryExt", - "TrustLineFlags", - "LiquidityPoolType", - "TrustLineAsset", - "TrustLineEntryExtensionV2", - "TrustLineEntryExtensionV2Ext", - "TrustLineEntry", - "TrustLineEntryExt", - "TrustLineEntryV1", - "TrustLineEntryV1Ext", - "OfferEntryFlags", - "OfferEntry", - "OfferEntryExt", - "DataEntry", - "DataEntryExt", - "ClaimPredicateType", - "ClaimPredicate", - "ClaimantType", - "Claimant", - "ClaimantV0", - "ClaimableBalanceFlags", - "ClaimableBalanceEntryExtensionV1", - "ClaimableBalanceEntryExtensionV1Ext", - "ClaimableBalanceEntry", - "ClaimableBalanceEntryExt", - "LiquidityPoolConstantProductParameters", - "LiquidityPoolEntry", - "LiquidityPoolEntryBody", - "LiquidityPoolEntryConstantProduct", - "ContractDataDurability", - "ContractDataEntry", - "ContractCodeCostInputs", - "ContractCodeEntry", - "ContractCodeEntryExt", - "ContractCodeEntryV1", - "TtlEntry", - "LedgerEntryExtensionV1", - "LedgerEntryExtensionV1Ext", - "LedgerEntry", - "LedgerEntryData", - "LedgerEntryExt", - "LedgerKey", - "LedgerKeyAccount", - "LedgerKeyTrustLine", - "LedgerKeyOffer", - "LedgerKeyData", - "LedgerKeyClaimableBalance", - "LedgerKeyLiquidityPool", - "LedgerKeyContractData", - "LedgerKeyContractCode", - "LedgerKeyConfigSetting", - "LedgerKeyTtl", - "EnvelopeType", - "BucketListType", - "BucketEntryType", - "HotArchiveBucketEntryType", - "BucketMetadata", - "BucketMetadataExt", - "BucketEntry", - "HotArchiveBucketEntry", - "UpgradeType", - "StellarValueType", - "LedgerCloseValueSignature", - "StellarValue", - "StellarValueExt", - "LedgerHeaderFlags", - "LedgerHeaderExtensionV1", - "LedgerHeaderExtensionV1Ext", - "LedgerHeader", - "LedgerHeaderExt", - "LedgerUpgradeType", - "ConfigUpgradeSetKey", - "LedgerUpgrade", - "ConfigUpgradeSet", - "TxSetComponentType", - "DependentTxCluster", - "ParallelTxExecutionStage", - "ParallelTxsComponent", - "TxSetComponent", - "TxSetComponentTxsMaybeDiscountedFee", - "TransactionPhase", - "TransactionSet", - "TransactionSetV1", - "GeneralizedTransactionSet", - "TransactionResultPair", - "TransactionResultSet", - "TransactionHistoryEntry", - "TransactionHistoryEntryExt", - "TransactionHistoryResultEntry", - "TransactionHistoryResultEntryExt", - "LedgerHeaderHistoryEntry", - "LedgerHeaderHistoryEntryExt", - "LedgerScpMessages", - "ScpHistoryEntryV0", - "ScpHistoryEntry", - "LedgerEntryChangeType", - "LedgerEntryChange", - "LedgerEntryChanges", - "OperationMeta", - "TransactionMetaV1", - "TransactionMetaV2", - "ContractEventType", - "ContractEvent", - "ContractEventBody", - "ContractEventV0", - "DiagnosticEvent", - "SorobanTransactionMetaExtV1", - "SorobanTransactionMetaExt", - "SorobanTransactionMeta", - "TransactionMetaV3", - "OperationMetaV2", - "SorobanTransactionMetaV2", - "TransactionEventStage", - "TransactionEvent", - "TransactionMetaV4", - "InvokeHostFunctionSuccessPreImage", - "TransactionMeta", - "TransactionResultMeta", - "TransactionResultMetaV1", - "UpgradeEntryMeta", - "LedgerCloseMetaV0", - "LedgerCloseMetaExtV1", - "LedgerCloseMetaExt", - "LedgerCloseMetaV1", - "LedgerCloseMetaV2", - "LedgerCloseMeta", - "ErrorCode", - "SError", - "SendMore", - "SendMoreExtended", - "AuthCert", - "Hello", - "Auth", - "IpAddrType", - "PeerAddress", - "PeerAddressIp", - "MessageType", - "DontHave", - "SurveyMessageCommandType", - "SurveyMessageResponseType", - "TimeSlicedSurveyStartCollectingMessage", - "SignedTimeSlicedSurveyStartCollectingMessage", - "TimeSlicedSurveyStopCollectingMessage", - "SignedTimeSlicedSurveyStopCollectingMessage", - "SurveyRequestMessage", - "TimeSlicedSurveyRequestMessage", - "SignedTimeSlicedSurveyRequestMessage", - "EncryptedBody", - "SurveyResponseMessage", - "TimeSlicedSurveyResponseMessage", - "SignedTimeSlicedSurveyResponseMessage", - "PeerStats", - "TimeSlicedNodeData", - "TimeSlicedPeerData", - "TimeSlicedPeerDataList", - "TopologyResponseBodyV2", - "SurveyResponseBody", - "TxAdvertVector", - "FloodAdvert", - "TxDemandVector", - "FloodDemand", - "StellarMessage", - "AuthenticatedMessage", - "AuthenticatedMessageV0", - "LiquidityPoolParameters", - "MuxedAccount", - "MuxedAccountMed25519", - "DecoratedSignature", - "OperationType", - "CreateAccountOp", - "PaymentOp", - "PathPaymentStrictReceiveOp", - "PathPaymentStrictSendOp", - "ManageSellOfferOp", - "ManageBuyOfferOp", - "CreatePassiveSellOfferOp", - "SetOptionsOp", - "ChangeTrustAsset", - "ChangeTrustOp", - "AllowTrustOp", - "ManageDataOp", - "BumpSequenceOp", - "CreateClaimableBalanceOp", - "ClaimClaimableBalanceOp", - "BeginSponsoringFutureReservesOp", - "RevokeSponsorshipType", - "RevokeSponsorshipOp", - "RevokeSponsorshipOpSigner", - "ClawbackOp", - "ClawbackClaimableBalanceOp", - "SetTrustLineFlagsOp", - "LiquidityPoolDepositOp", - "LiquidityPoolWithdrawOp", - "HostFunctionType", - "ContractIdPreimageType", - "ContractIdPreimage", - "ContractIdPreimageFromAddress", - "CreateContractArgs", - "CreateContractArgsV2", - "InvokeContractArgs", - "HostFunction", - "SorobanAuthorizedFunctionType", - "SorobanAuthorizedFunction", - "SorobanAuthorizedInvocation", - "SorobanAddressCredentials", - "SorobanCredentialsType", - "SorobanCredentials", - "SorobanAuthorizationEntry", - "SorobanAuthorizationEntries", - "InvokeHostFunctionOp", - "ExtendFootprintTtlOp", - "RestoreFootprintOp", - "Operation", - "OperationBody", - "HashIdPreimage", - "HashIdPreimageOperationId", - "HashIdPreimageRevokeId", - "HashIdPreimageContractId", - "HashIdPreimageSorobanAuthorization", - "MemoType", - "Memo", - "TimeBounds", - "LedgerBounds", - "PreconditionsV2", - "PreconditionType", - "Preconditions", - "LedgerFootprint", - "SorobanResources", - "SorobanResourcesExtV0", - "SorobanTransactionData", - "SorobanTransactionDataExt", - "TransactionV0", - "TransactionV0Ext", - "TransactionV0Envelope", - "Transaction", - "TransactionExt", - "TransactionV1Envelope", - "FeeBumpTransaction", - "FeeBumpTransactionInnerTx", - "FeeBumpTransactionExt", - "FeeBumpTransactionEnvelope", - "TransactionEnvelope", - "TransactionSignaturePayload", - "TransactionSignaturePayloadTaggedTransaction", - "ClaimAtomType", - "ClaimOfferAtomV0", - "ClaimOfferAtom", - "ClaimLiquidityAtom", - "ClaimAtom", - "CreateAccountResultCode", - "CreateAccountResult", - "PaymentResultCode", - "PaymentResult", - "PathPaymentStrictReceiveResultCode", - "SimplePaymentResult", - "PathPaymentStrictReceiveResult", - "PathPaymentStrictReceiveResultSuccess", - "PathPaymentStrictSendResultCode", - "PathPaymentStrictSendResult", - "PathPaymentStrictSendResultSuccess", - "ManageSellOfferResultCode", - "ManageOfferEffect", - "ManageOfferSuccessResult", - "ManageOfferSuccessResultOffer", - "ManageSellOfferResult", - "ManageBuyOfferResultCode", - "ManageBuyOfferResult", - "SetOptionsResultCode", - "SetOptionsResult", - "ChangeTrustResultCode", - "ChangeTrustResult", - "AllowTrustResultCode", - "AllowTrustResult", - "AccountMergeResultCode", - "AccountMergeResult", - "InflationResultCode", - "InflationPayout", - "InflationResult", - "ManageDataResultCode", - "ManageDataResult", - "BumpSequenceResultCode", - "BumpSequenceResult", - "CreateClaimableBalanceResultCode", - "CreateClaimableBalanceResult", - "ClaimClaimableBalanceResultCode", - "ClaimClaimableBalanceResult", - "BeginSponsoringFutureReservesResultCode", - "BeginSponsoringFutureReservesResult", - "EndSponsoringFutureReservesResultCode", - "EndSponsoringFutureReservesResult", - "RevokeSponsorshipResultCode", - "RevokeSponsorshipResult", - "ClawbackResultCode", - "ClawbackResult", - "ClawbackClaimableBalanceResultCode", - "ClawbackClaimableBalanceResult", - "SetTrustLineFlagsResultCode", - "SetTrustLineFlagsResult", - "LiquidityPoolDepositResultCode", - "LiquidityPoolDepositResult", - "LiquidityPoolWithdrawResultCode", - "LiquidityPoolWithdrawResult", - "InvokeHostFunctionResultCode", - "InvokeHostFunctionResult", - "ExtendFootprintTtlResultCode", - "ExtendFootprintTtlResult", - "RestoreFootprintResultCode", - "RestoreFootprintResult", - "OperationResultCode", - "OperationResult", - "OperationResultTr", - "TransactionResultCode", - "InnerTransactionResult", - "InnerTransactionResultResult", - "InnerTransactionResultExt", - "InnerTransactionResultPair", - "TransactionResult", - "TransactionResultResult", - "TransactionResultExt", - "Hash", - "Uint256", - "Uint32", - "Int32", - "Uint64", - "Int64", - "TimePoint", - "Duration", - "ExtensionPoint", - "CryptoKeyType", - "PublicKeyType", - "SignerKeyType", - "PublicKey", - "SignerKey", - "SignerKeyEd25519SignedPayload", - "Signature", - "SignatureHint", - "NodeId", - "AccountId", - "ContractId", - "Curve25519Secret", - "Curve25519Public", - "HmacSha256Key", - "HmacSha256Mac", - "ShortHashSeed", - "BinaryFuseFilterType", - "SerializedBinaryFuseFilter", - "PoolId", - "ClaimableBalanceIdType", - "ClaimableBalanceId", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[must_use] - #[allow(clippy::too_many_lines)] - pub const fn name(&self) -> &'static str { - match self { - Self::Value => "Value", - Self::ScpBallot => "ScpBallot", - Self::ScpStatementType => "ScpStatementType", - Self::ScpNomination => "ScpNomination", - Self::ScpStatement => "ScpStatement", - Self::ScpStatementPledges => "ScpStatementPledges", - Self::ScpStatementPrepare => "ScpStatementPrepare", - Self::ScpStatementConfirm => "ScpStatementConfirm", - Self::ScpStatementExternalize => "ScpStatementExternalize", - Self::ScpEnvelope => "ScpEnvelope", - Self::ScpQuorumSet => "ScpQuorumSet", - Self::EncodedLedgerKey => "EncodedLedgerKey", - Self::ConfigSettingContractExecutionLanesV0 => "ConfigSettingContractExecutionLanesV0", - Self::ConfigSettingContractComputeV0 => "ConfigSettingContractComputeV0", - Self::ConfigSettingContractParallelComputeV0 => { - "ConfigSettingContractParallelComputeV0" - } - Self::ConfigSettingContractLedgerCostV0 => "ConfigSettingContractLedgerCostV0", - Self::ConfigSettingContractLedgerCostExtV0 => "ConfigSettingContractLedgerCostExtV0", - Self::ConfigSettingContractHistoricalDataV0 => "ConfigSettingContractHistoricalDataV0", - Self::ConfigSettingContractEventsV0 => "ConfigSettingContractEventsV0", - Self::ConfigSettingContractBandwidthV0 => "ConfigSettingContractBandwidthV0", - Self::ContractCostType => "ContractCostType", - Self::ContractCostParamEntry => "ContractCostParamEntry", - Self::StateArchivalSettings => "StateArchivalSettings", - Self::EvictionIterator => "EvictionIterator", - Self::ConfigSettingScpTiming => "ConfigSettingScpTiming", - Self::FrozenLedgerKeys => "FrozenLedgerKeys", - Self::FrozenLedgerKeysDelta => "FrozenLedgerKeysDelta", - Self::FreezeBypassTxs => "FreezeBypassTxs", - Self::FreezeBypassTxsDelta => "FreezeBypassTxsDelta", - Self::ContractCostParams => "ContractCostParams", - Self::ConfigSettingId => "ConfigSettingId", - Self::ConfigSettingEntry => "ConfigSettingEntry", - Self::ScEnvMetaKind => "ScEnvMetaKind", - Self::ScEnvMetaEntry => "ScEnvMetaEntry", - Self::ScEnvMetaEntryInterfaceVersion => "ScEnvMetaEntryInterfaceVersion", - Self::ScMetaV0 => "ScMetaV0", - Self::ScMetaKind => "ScMetaKind", - Self::ScMetaEntry => "ScMetaEntry", - Self::ScSpecType => "ScSpecType", - Self::ScSpecTypeOption => "ScSpecTypeOption", - Self::ScSpecTypeResult => "ScSpecTypeResult", - Self::ScSpecTypeVec => "ScSpecTypeVec", - Self::ScSpecTypeMap => "ScSpecTypeMap", - Self::ScSpecTypeTuple => "ScSpecTypeTuple", - Self::ScSpecTypeBytesN => "ScSpecTypeBytesN", - Self::ScSpecTypeUdt => "ScSpecTypeUdt", - Self::ScSpecTypeDef => "ScSpecTypeDef", - Self::ScSpecUdtStructFieldV0 => "ScSpecUdtStructFieldV0", - Self::ScSpecUdtStructV0 => "ScSpecUdtStructV0", - Self::ScSpecUdtUnionCaseVoidV0 => "ScSpecUdtUnionCaseVoidV0", - Self::ScSpecUdtUnionCaseTupleV0 => "ScSpecUdtUnionCaseTupleV0", - Self::ScSpecUdtUnionCaseV0Kind => "ScSpecUdtUnionCaseV0Kind", - Self::ScSpecUdtUnionCaseV0 => "ScSpecUdtUnionCaseV0", - Self::ScSpecUdtUnionV0 => "ScSpecUdtUnionV0", - Self::ScSpecUdtEnumCaseV0 => "ScSpecUdtEnumCaseV0", - Self::ScSpecUdtEnumV0 => "ScSpecUdtEnumV0", - Self::ScSpecUdtErrorEnumCaseV0 => "ScSpecUdtErrorEnumCaseV0", - Self::ScSpecUdtErrorEnumV0 => "ScSpecUdtErrorEnumV0", - Self::ScSpecFunctionInputV0 => "ScSpecFunctionInputV0", - Self::ScSpecFunctionV0 => "ScSpecFunctionV0", - Self::ScSpecEventParamLocationV0 => "ScSpecEventParamLocationV0", - Self::ScSpecEventParamV0 => "ScSpecEventParamV0", - Self::ScSpecEventDataFormat => "ScSpecEventDataFormat", - Self::ScSpecEventV0 => "ScSpecEventV0", - Self::ScSpecEntryKind => "ScSpecEntryKind", - Self::ScSpecEntry => "ScSpecEntry", - Self::ScValType => "ScValType", - Self::ScErrorType => "ScErrorType", - Self::ScErrorCode => "ScErrorCode", - Self::ScError => "ScError", - Self::UInt128Parts => "UInt128Parts", - Self::Int128Parts => "Int128Parts", - Self::UInt256Parts => "UInt256Parts", - Self::Int256Parts => "Int256Parts", - Self::ContractExecutableType => "ContractExecutableType", - Self::ContractExecutable => "ContractExecutable", - Self::ScAddressType => "ScAddressType", - Self::MuxedEd25519Account => "MuxedEd25519Account", - Self::ScAddress => "ScAddress", - Self::ScVec => "ScVec", - Self::ScMap => "ScMap", - Self::ScBytes => "ScBytes", - Self::ScString => "ScString", - Self::ScSymbol => "ScSymbol", - Self::ScNonceKey => "ScNonceKey", - Self::ScContractInstance => "ScContractInstance", - Self::ScVal => "ScVal", - Self::ScMapEntry => "ScMapEntry", - Self::LedgerCloseMetaBatch => "LedgerCloseMetaBatch", - Self::StoredTransactionSet => "StoredTransactionSet", - Self::StoredDebugTransactionSet => "StoredDebugTransactionSet", - Self::PersistedScpStateV0 => "PersistedScpStateV0", - Self::PersistedScpStateV1 => "PersistedScpStateV1", - Self::PersistedScpState => "PersistedScpState", - Self::Thresholds => "Thresholds", - Self::String32 => "String32", - Self::String64 => "String64", - Self::SequenceNumber => "SequenceNumber", - Self::DataValue => "DataValue", - Self::AssetCode4 => "AssetCode4", - Self::AssetCode12 => "AssetCode12", - Self::AssetType => "AssetType", - Self::AssetCode => "AssetCode", - Self::AlphaNum4 => "AlphaNum4", - Self::AlphaNum12 => "AlphaNum12", - Self::Asset => "Asset", - Self::Price => "Price", - Self::Liabilities => "Liabilities", - Self::ThresholdIndexes => "ThresholdIndexes", - Self::LedgerEntryType => "LedgerEntryType", - Self::Signer => "Signer", - Self::AccountFlags => "AccountFlags", - Self::SponsorshipDescriptor => "SponsorshipDescriptor", - Self::AccountEntryExtensionV3 => "AccountEntryExtensionV3", - Self::AccountEntryExtensionV2 => "AccountEntryExtensionV2", - Self::AccountEntryExtensionV2Ext => "AccountEntryExtensionV2Ext", - Self::AccountEntryExtensionV1 => "AccountEntryExtensionV1", - Self::AccountEntryExtensionV1Ext => "AccountEntryExtensionV1Ext", - Self::AccountEntry => "AccountEntry", - Self::AccountEntryExt => "AccountEntryExt", - Self::TrustLineFlags => "TrustLineFlags", - Self::LiquidityPoolType => "LiquidityPoolType", - Self::TrustLineAsset => "TrustLineAsset", - Self::TrustLineEntryExtensionV2 => "TrustLineEntryExtensionV2", - Self::TrustLineEntryExtensionV2Ext => "TrustLineEntryExtensionV2Ext", - Self::TrustLineEntry => "TrustLineEntry", - Self::TrustLineEntryExt => "TrustLineEntryExt", - Self::TrustLineEntryV1 => "TrustLineEntryV1", - Self::TrustLineEntryV1Ext => "TrustLineEntryV1Ext", - Self::OfferEntryFlags => "OfferEntryFlags", - Self::OfferEntry => "OfferEntry", - Self::OfferEntryExt => "OfferEntryExt", - Self::DataEntry => "DataEntry", - Self::DataEntryExt => "DataEntryExt", - Self::ClaimPredicateType => "ClaimPredicateType", - Self::ClaimPredicate => "ClaimPredicate", - Self::ClaimantType => "ClaimantType", - Self::Claimant => "Claimant", - Self::ClaimantV0 => "ClaimantV0", - Self::ClaimableBalanceFlags => "ClaimableBalanceFlags", - Self::ClaimableBalanceEntryExtensionV1 => "ClaimableBalanceEntryExtensionV1", - Self::ClaimableBalanceEntryExtensionV1Ext => "ClaimableBalanceEntryExtensionV1Ext", - Self::ClaimableBalanceEntry => "ClaimableBalanceEntry", - Self::ClaimableBalanceEntryExt => "ClaimableBalanceEntryExt", - Self::LiquidityPoolConstantProductParameters => { - "LiquidityPoolConstantProductParameters" - } - Self::LiquidityPoolEntry => "LiquidityPoolEntry", - Self::LiquidityPoolEntryBody => "LiquidityPoolEntryBody", - Self::LiquidityPoolEntryConstantProduct => "LiquidityPoolEntryConstantProduct", - Self::ContractDataDurability => "ContractDataDurability", - Self::ContractDataEntry => "ContractDataEntry", - Self::ContractCodeCostInputs => "ContractCodeCostInputs", - Self::ContractCodeEntry => "ContractCodeEntry", - Self::ContractCodeEntryExt => "ContractCodeEntryExt", - Self::ContractCodeEntryV1 => "ContractCodeEntryV1", - Self::TtlEntry => "TtlEntry", - Self::LedgerEntryExtensionV1 => "LedgerEntryExtensionV1", - Self::LedgerEntryExtensionV1Ext => "LedgerEntryExtensionV1Ext", - Self::LedgerEntry => "LedgerEntry", - Self::LedgerEntryData => "LedgerEntryData", - Self::LedgerEntryExt => "LedgerEntryExt", - Self::LedgerKey => "LedgerKey", - Self::LedgerKeyAccount => "LedgerKeyAccount", - Self::LedgerKeyTrustLine => "LedgerKeyTrustLine", - Self::LedgerKeyOffer => "LedgerKeyOffer", - Self::LedgerKeyData => "LedgerKeyData", - Self::LedgerKeyClaimableBalance => "LedgerKeyClaimableBalance", - Self::LedgerKeyLiquidityPool => "LedgerKeyLiquidityPool", - Self::LedgerKeyContractData => "LedgerKeyContractData", - Self::LedgerKeyContractCode => "LedgerKeyContractCode", - Self::LedgerKeyConfigSetting => "LedgerKeyConfigSetting", - Self::LedgerKeyTtl => "LedgerKeyTtl", - Self::EnvelopeType => "EnvelopeType", - Self::BucketListType => "BucketListType", - Self::BucketEntryType => "BucketEntryType", - Self::HotArchiveBucketEntryType => "HotArchiveBucketEntryType", - Self::BucketMetadata => "BucketMetadata", - Self::BucketMetadataExt => "BucketMetadataExt", - Self::BucketEntry => "BucketEntry", - Self::HotArchiveBucketEntry => "HotArchiveBucketEntry", - Self::UpgradeType => "UpgradeType", - Self::StellarValueType => "StellarValueType", - Self::LedgerCloseValueSignature => "LedgerCloseValueSignature", - Self::StellarValue => "StellarValue", - Self::StellarValueExt => "StellarValueExt", - Self::LedgerHeaderFlags => "LedgerHeaderFlags", - Self::LedgerHeaderExtensionV1 => "LedgerHeaderExtensionV1", - Self::LedgerHeaderExtensionV1Ext => "LedgerHeaderExtensionV1Ext", - Self::LedgerHeader => "LedgerHeader", - Self::LedgerHeaderExt => "LedgerHeaderExt", - Self::LedgerUpgradeType => "LedgerUpgradeType", - Self::ConfigUpgradeSetKey => "ConfigUpgradeSetKey", - Self::LedgerUpgrade => "LedgerUpgrade", - Self::ConfigUpgradeSet => "ConfigUpgradeSet", - Self::TxSetComponentType => "TxSetComponentType", - Self::DependentTxCluster => "DependentTxCluster", - Self::ParallelTxExecutionStage => "ParallelTxExecutionStage", - Self::ParallelTxsComponent => "ParallelTxsComponent", - Self::TxSetComponent => "TxSetComponent", - Self::TxSetComponentTxsMaybeDiscountedFee => "TxSetComponentTxsMaybeDiscountedFee", - Self::TransactionPhase => "TransactionPhase", - Self::TransactionSet => "TransactionSet", - Self::TransactionSetV1 => "TransactionSetV1", - Self::GeneralizedTransactionSet => "GeneralizedTransactionSet", - Self::TransactionResultPair => "TransactionResultPair", - Self::TransactionResultSet => "TransactionResultSet", - Self::TransactionHistoryEntry => "TransactionHistoryEntry", - Self::TransactionHistoryEntryExt => "TransactionHistoryEntryExt", - Self::TransactionHistoryResultEntry => "TransactionHistoryResultEntry", - Self::TransactionHistoryResultEntryExt => "TransactionHistoryResultEntryExt", - Self::LedgerHeaderHistoryEntry => "LedgerHeaderHistoryEntry", - Self::LedgerHeaderHistoryEntryExt => "LedgerHeaderHistoryEntryExt", - Self::LedgerScpMessages => "LedgerScpMessages", - Self::ScpHistoryEntryV0 => "ScpHistoryEntryV0", - Self::ScpHistoryEntry => "ScpHistoryEntry", - Self::LedgerEntryChangeType => "LedgerEntryChangeType", - Self::LedgerEntryChange => "LedgerEntryChange", - Self::LedgerEntryChanges => "LedgerEntryChanges", - Self::OperationMeta => "OperationMeta", - Self::TransactionMetaV1 => "TransactionMetaV1", - Self::TransactionMetaV2 => "TransactionMetaV2", - Self::ContractEventType => "ContractEventType", - Self::ContractEvent => "ContractEvent", - Self::ContractEventBody => "ContractEventBody", - Self::ContractEventV0 => "ContractEventV0", - Self::DiagnosticEvent => "DiagnosticEvent", - Self::SorobanTransactionMetaExtV1 => "SorobanTransactionMetaExtV1", - Self::SorobanTransactionMetaExt => "SorobanTransactionMetaExt", - Self::SorobanTransactionMeta => "SorobanTransactionMeta", - Self::TransactionMetaV3 => "TransactionMetaV3", - Self::OperationMetaV2 => "OperationMetaV2", - Self::SorobanTransactionMetaV2 => "SorobanTransactionMetaV2", - Self::TransactionEventStage => "TransactionEventStage", - Self::TransactionEvent => "TransactionEvent", - Self::TransactionMetaV4 => "TransactionMetaV4", - Self::InvokeHostFunctionSuccessPreImage => "InvokeHostFunctionSuccessPreImage", - Self::TransactionMeta => "TransactionMeta", - Self::TransactionResultMeta => "TransactionResultMeta", - Self::TransactionResultMetaV1 => "TransactionResultMetaV1", - Self::UpgradeEntryMeta => "UpgradeEntryMeta", - Self::LedgerCloseMetaV0 => "LedgerCloseMetaV0", - Self::LedgerCloseMetaExtV1 => "LedgerCloseMetaExtV1", - Self::LedgerCloseMetaExt => "LedgerCloseMetaExt", - Self::LedgerCloseMetaV1 => "LedgerCloseMetaV1", - Self::LedgerCloseMetaV2 => "LedgerCloseMetaV2", - Self::LedgerCloseMeta => "LedgerCloseMeta", - Self::ErrorCode => "ErrorCode", - Self::SError => "SError", - Self::SendMore => "SendMore", - Self::SendMoreExtended => "SendMoreExtended", - Self::AuthCert => "AuthCert", - Self::Hello => "Hello", - Self::Auth => "Auth", - Self::IpAddrType => "IpAddrType", - Self::PeerAddress => "PeerAddress", - Self::PeerAddressIp => "PeerAddressIp", - Self::MessageType => "MessageType", - Self::DontHave => "DontHave", - Self::SurveyMessageCommandType => "SurveyMessageCommandType", - Self::SurveyMessageResponseType => "SurveyMessageResponseType", - Self::TimeSlicedSurveyStartCollectingMessage => { - "TimeSlicedSurveyStartCollectingMessage" - } - Self::SignedTimeSlicedSurveyStartCollectingMessage => { - "SignedTimeSlicedSurveyStartCollectingMessage" - } - Self::TimeSlicedSurveyStopCollectingMessage => "TimeSlicedSurveyStopCollectingMessage", - Self::SignedTimeSlicedSurveyStopCollectingMessage => { - "SignedTimeSlicedSurveyStopCollectingMessage" - } - Self::SurveyRequestMessage => "SurveyRequestMessage", - Self::TimeSlicedSurveyRequestMessage => "TimeSlicedSurveyRequestMessage", - Self::SignedTimeSlicedSurveyRequestMessage => "SignedTimeSlicedSurveyRequestMessage", - Self::EncryptedBody => "EncryptedBody", - Self::SurveyResponseMessage => "SurveyResponseMessage", - Self::TimeSlicedSurveyResponseMessage => "TimeSlicedSurveyResponseMessage", - Self::SignedTimeSlicedSurveyResponseMessage => "SignedTimeSlicedSurveyResponseMessage", - Self::PeerStats => "PeerStats", - Self::TimeSlicedNodeData => "TimeSlicedNodeData", - Self::TimeSlicedPeerData => "TimeSlicedPeerData", - Self::TimeSlicedPeerDataList => "TimeSlicedPeerDataList", - Self::TopologyResponseBodyV2 => "TopologyResponseBodyV2", - Self::SurveyResponseBody => "SurveyResponseBody", - Self::TxAdvertVector => "TxAdvertVector", - Self::FloodAdvert => "FloodAdvert", - Self::TxDemandVector => "TxDemandVector", - Self::FloodDemand => "FloodDemand", - Self::StellarMessage => "StellarMessage", - Self::AuthenticatedMessage => "AuthenticatedMessage", - Self::AuthenticatedMessageV0 => "AuthenticatedMessageV0", - Self::LiquidityPoolParameters => "LiquidityPoolParameters", - Self::MuxedAccount => "MuxedAccount", - Self::MuxedAccountMed25519 => "MuxedAccountMed25519", - Self::DecoratedSignature => "DecoratedSignature", - Self::OperationType => "OperationType", - Self::CreateAccountOp => "CreateAccountOp", - Self::PaymentOp => "PaymentOp", - Self::PathPaymentStrictReceiveOp => "PathPaymentStrictReceiveOp", - Self::PathPaymentStrictSendOp => "PathPaymentStrictSendOp", - Self::ManageSellOfferOp => "ManageSellOfferOp", - Self::ManageBuyOfferOp => "ManageBuyOfferOp", - Self::CreatePassiveSellOfferOp => "CreatePassiveSellOfferOp", - Self::SetOptionsOp => "SetOptionsOp", - Self::ChangeTrustAsset => "ChangeTrustAsset", - Self::ChangeTrustOp => "ChangeTrustOp", - Self::AllowTrustOp => "AllowTrustOp", - Self::ManageDataOp => "ManageDataOp", - Self::BumpSequenceOp => "BumpSequenceOp", - Self::CreateClaimableBalanceOp => "CreateClaimableBalanceOp", - Self::ClaimClaimableBalanceOp => "ClaimClaimableBalanceOp", - Self::BeginSponsoringFutureReservesOp => "BeginSponsoringFutureReservesOp", - Self::RevokeSponsorshipType => "RevokeSponsorshipType", - Self::RevokeSponsorshipOp => "RevokeSponsorshipOp", - Self::RevokeSponsorshipOpSigner => "RevokeSponsorshipOpSigner", - Self::ClawbackOp => "ClawbackOp", - Self::ClawbackClaimableBalanceOp => "ClawbackClaimableBalanceOp", - Self::SetTrustLineFlagsOp => "SetTrustLineFlagsOp", - Self::LiquidityPoolDepositOp => "LiquidityPoolDepositOp", - Self::LiquidityPoolWithdrawOp => "LiquidityPoolWithdrawOp", - Self::HostFunctionType => "HostFunctionType", - Self::ContractIdPreimageType => "ContractIdPreimageType", - Self::ContractIdPreimage => "ContractIdPreimage", - Self::ContractIdPreimageFromAddress => "ContractIdPreimageFromAddress", - Self::CreateContractArgs => "CreateContractArgs", - Self::CreateContractArgsV2 => "CreateContractArgsV2", - Self::InvokeContractArgs => "InvokeContractArgs", - Self::HostFunction => "HostFunction", - Self::SorobanAuthorizedFunctionType => "SorobanAuthorizedFunctionType", - Self::SorobanAuthorizedFunction => "SorobanAuthorizedFunction", - Self::SorobanAuthorizedInvocation => "SorobanAuthorizedInvocation", - Self::SorobanAddressCredentials => "SorobanAddressCredentials", - Self::SorobanCredentialsType => "SorobanCredentialsType", - Self::SorobanCredentials => "SorobanCredentials", - Self::SorobanAuthorizationEntry => "SorobanAuthorizationEntry", - Self::SorobanAuthorizationEntries => "SorobanAuthorizationEntries", - Self::InvokeHostFunctionOp => "InvokeHostFunctionOp", - Self::ExtendFootprintTtlOp => "ExtendFootprintTtlOp", - Self::RestoreFootprintOp => "RestoreFootprintOp", - Self::Operation => "Operation", - Self::OperationBody => "OperationBody", - Self::HashIdPreimage => "HashIdPreimage", - Self::HashIdPreimageOperationId => "HashIdPreimageOperationId", - Self::HashIdPreimageRevokeId => "HashIdPreimageRevokeId", - Self::HashIdPreimageContractId => "HashIdPreimageContractId", - Self::HashIdPreimageSorobanAuthorization => "HashIdPreimageSorobanAuthorization", - Self::MemoType => "MemoType", - Self::Memo => "Memo", - Self::TimeBounds => "TimeBounds", - Self::LedgerBounds => "LedgerBounds", - Self::PreconditionsV2 => "PreconditionsV2", - Self::PreconditionType => "PreconditionType", - Self::Preconditions => "Preconditions", - Self::LedgerFootprint => "LedgerFootprint", - Self::SorobanResources => "SorobanResources", - Self::SorobanResourcesExtV0 => "SorobanResourcesExtV0", - Self::SorobanTransactionData => "SorobanTransactionData", - Self::SorobanTransactionDataExt => "SorobanTransactionDataExt", - Self::TransactionV0 => "TransactionV0", - Self::TransactionV0Ext => "TransactionV0Ext", - Self::TransactionV0Envelope => "TransactionV0Envelope", - Self::Transaction => "Transaction", - Self::TransactionExt => "TransactionExt", - Self::TransactionV1Envelope => "TransactionV1Envelope", - Self::FeeBumpTransaction => "FeeBumpTransaction", - Self::FeeBumpTransactionInnerTx => "FeeBumpTransactionInnerTx", - Self::FeeBumpTransactionExt => "FeeBumpTransactionExt", - Self::FeeBumpTransactionEnvelope => "FeeBumpTransactionEnvelope", - Self::TransactionEnvelope => "TransactionEnvelope", - Self::TransactionSignaturePayload => "TransactionSignaturePayload", - Self::TransactionSignaturePayloadTaggedTransaction => { - "TransactionSignaturePayloadTaggedTransaction" - } - Self::ClaimAtomType => "ClaimAtomType", - Self::ClaimOfferAtomV0 => "ClaimOfferAtomV0", - Self::ClaimOfferAtom => "ClaimOfferAtom", - Self::ClaimLiquidityAtom => "ClaimLiquidityAtom", - Self::ClaimAtom => "ClaimAtom", - Self::CreateAccountResultCode => "CreateAccountResultCode", - Self::CreateAccountResult => "CreateAccountResult", - Self::PaymentResultCode => "PaymentResultCode", - Self::PaymentResult => "PaymentResult", - Self::PathPaymentStrictReceiveResultCode => "PathPaymentStrictReceiveResultCode", - Self::SimplePaymentResult => "SimplePaymentResult", - Self::PathPaymentStrictReceiveResult => "PathPaymentStrictReceiveResult", - Self::PathPaymentStrictReceiveResultSuccess => "PathPaymentStrictReceiveResultSuccess", - Self::PathPaymentStrictSendResultCode => "PathPaymentStrictSendResultCode", - Self::PathPaymentStrictSendResult => "PathPaymentStrictSendResult", - Self::PathPaymentStrictSendResultSuccess => "PathPaymentStrictSendResultSuccess", - Self::ManageSellOfferResultCode => "ManageSellOfferResultCode", - Self::ManageOfferEffect => "ManageOfferEffect", - Self::ManageOfferSuccessResult => "ManageOfferSuccessResult", - Self::ManageOfferSuccessResultOffer => "ManageOfferSuccessResultOffer", - Self::ManageSellOfferResult => "ManageSellOfferResult", - Self::ManageBuyOfferResultCode => "ManageBuyOfferResultCode", - Self::ManageBuyOfferResult => "ManageBuyOfferResult", - Self::SetOptionsResultCode => "SetOptionsResultCode", - Self::SetOptionsResult => "SetOptionsResult", - Self::ChangeTrustResultCode => "ChangeTrustResultCode", - Self::ChangeTrustResult => "ChangeTrustResult", - Self::AllowTrustResultCode => "AllowTrustResultCode", - Self::AllowTrustResult => "AllowTrustResult", - Self::AccountMergeResultCode => "AccountMergeResultCode", - Self::AccountMergeResult => "AccountMergeResult", - Self::InflationResultCode => "InflationResultCode", - Self::InflationPayout => "InflationPayout", - Self::InflationResult => "InflationResult", - Self::ManageDataResultCode => "ManageDataResultCode", - Self::ManageDataResult => "ManageDataResult", - Self::BumpSequenceResultCode => "BumpSequenceResultCode", - Self::BumpSequenceResult => "BumpSequenceResult", - Self::CreateClaimableBalanceResultCode => "CreateClaimableBalanceResultCode", - Self::CreateClaimableBalanceResult => "CreateClaimableBalanceResult", - Self::ClaimClaimableBalanceResultCode => "ClaimClaimableBalanceResultCode", - Self::ClaimClaimableBalanceResult => "ClaimClaimableBalanceResult", - Self::BeginSponsoringFutureReservesResultCode => { - "BeginSponsoringFutureReservesResultCode" - } - Self::BeginSponsoringFutureReservesResult => "BeginSponsoringFutureReservesResult", - Self::EndSponsoringFutureReservesResultCode => "EndSponsoringFutureReservesResultCode", - Self::EndSponsoringFutureReservesResult => "EndSponsoringFutureReservesResult", - Self::RevokeSponsorshipResultCode => "RevokeSponsorshipResultCode", - Self::RevokeSponsorshipResult => "RevokeSponsorshipResult", - Self::ClawbackResultCode => "ClawbackResultCode", - Self::ClawbackResult => "ClawbackResult", - Self::ClawbackClaimableBalanceResultCode => "ClawbackClaimableBalanceResultCode", - Self::ClawbackClaimableBalanceResult => "ClawbackClaimableBalanceResult", - Self::SetTrustLineFlagsResultCode => "SetTrustLineFlagsResultCode", - Self::SetTrustLineFlagsResult => "SetTrustLineFlagsResult", - Self::LiquidityPoolDepositResultCode => "LiquidityPoolDepositResultCode", - Self::LiquidityPoolDepositResult => "LiquidityPoolDepositResult", - Self::LiquidityPoolWithdrawResultCode => "LiquidityPoolWithdrawResultCode", - Self::LiquidityPoolWithdrawResult => "LiquidityPoolWithdrawResult", - Self::InvokeHostFunctionResultCode => "InvokeHostFunctionResultCode", - Self::InvokeHostFunctionResult => "InvokeHostFunctionResult", - Self::ExtendFootprintTtlResultCode => "ExtendFootprintTtlResultCode", - Self::ExtendFootprintTtlResult => "ExtendFootprintTtlResult", - Self::RestoreFootprintResultCode => "RestoreFootprintResultCode", - Self::RestoreFootprintResult => "RestoreFootprintResult", - Self::OperationResultCode => "OperationResultCode", - Self::OperationResult => "OperationResult", - Self::OperationResultTr => "OperationResultTr", - Self::TransactionResultCode => "TransactionResultCode", - Self::InnerTransactionResult => "InnerTransactionResult", - Self::InnerTransactionResultResult => "InnerTransactionResultResult", - Self::InnerTransactionResultExt => "InnerTransactionResultExt", - Self::InnerTransactionResultPair => "InnerTransactionResultPair", - Self::TransactionResult => "TransactionResult", - Self::TransactionResultResult => "TransactionResultResult", - Self::TransactionResultExt => "TransactionResultExt", - Self::Hash => "Hash", - Self::Uint256 => "Uint256", - Self::Uint32 => "Uint32", - Self::Int32 => "Int32", - Self::Uint64 => "Uint64", - Self::Int64 => "Int64", - Self::TimePoint => "TimePoint", - Self::Duration => "Duration", - Self::ExtensionPoint => "ExtensionPoint", - Self::CryptoKeyType => "CryptoKeyType", - Self::PublicKeyType => "PublicKeyType", - Self::SignerKeyType => "SignerKeyType", - Self::PublicKey => "PublicKey", - Self::SignerKey => "SignerKey", - Self::SignerKeyEd25519SignedPayload => "SignerKeyEd25519SignedPayload", - Self::Signature => "Signature", - Self::SignatureHint => "SignatureHint", - Self::NodeId => "NodeId", - Self::AccountId => "AccountId", - Self::ContractId => "ContractId", - Self::Curve25519Secret => "Curve25519Secret", - Self::Curve25519Public => "Curve25519Public", - Self::HmacSha256Key => "HmacSha256Key", - Self::HmacSha256Mac => "HmacSha256Mac", - Self::ShortHashSeed => "ShortHashSeed", - Self::BinaryFuseFilterType => "BinaryFuseFilterType", - Self::SerializedBinaryFuseFilter => "SerializedBinaryFuseFilter", - Self::PoolId => "PoolId", - Self::ClaimableBalanceIdType => "ClaimableBalanceIdType", - Self::ClaimableBalanceId => "ClaimableBalanceId", - } - } - - #[must_use] - #[allow(clippy::too_many_lines)] - pub const fn variants() -> [TypeVariant; Self::_VARIANTS.len()] { - Self::VARIANTS - } - - #[cfg(feature = "schemars")] - #[must_use] - #[allow(clippy::too_many_lines)] - pub fn json_schema(&self, gen: schemars::gen::SchemaGenerator) -> schemars::schema::RootSchema { - match self { - Self::Value => gen.into_root_schema_for::(), - Self::ScpBallot => gen.into_root_schema_for::(), - Self::ScpStatementType => gen.into_root_schema_for::(), - Self::ScpNomination => gen.into_root_schema_for::(), - Self::ScpStatement => gen.into_root_schema_for::(), - Self::ScpStatementPledges => gen.into_root_schema_for::(), - Self::ScpStatementPrepare => gen.into_root_schema_for::(), - Self::ScpStatementConfirm => gen.into_root_schema_for::(), - Self::ScpStatementExternalize => gen.into_root_schema_for::(), - Self::ScpEnvelope => gen.into_root_schema_for::(), - Self::ScpQuorumSet => gen.into_root_schema_for::(), - Self::EncodedLedgerKey => gen.into_root_schema_for::(), - Self::ConfigSettingContractExecutionLanesV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractComputeV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractParallelComputeV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractLedgerCostV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractLedgerCostExtV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractHistoricalDataV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractEventsV0 => { - gen.into_root_schema_for::() - } - Self::ConfigSettingContractBandwidthV0 => { - gen.into_root_schema_for::() - } - Self::ContractCostType => gen.into_root_schema_for::(), - Self::ContractCostParamEntry => gen.into_root_schema_for::(), - Self::StateArchivalSettings => gen.into_root_schema_for::(), - Self::EvictionIterator => gen.into_root_schema_for::(), - Self::ConfigSettingScpTiming => gen.into_root_schema_for::(), - Self::FrozenLedgerKeys => gen.into_root_schema_for::(), - Self::FrozenLedgerKeysDelta => gen.into_root_schema_for::(), - Self::FreezeBypassTxs => gen.into_root_schema_for::(), - Self::FreezeBypassTxsDelta => gen.into_root_schema_for::(), - Self::ContractCostParams => gen.into_root_schema_for::(), - Self::ConfigSettingId => gen.into_root_schema_for::(), - Self::ConfigSettingEntry => gen.into_root_schema_for::(), - Self::ScEnvMetaKind => gen.into_root_schema_for::(), - Self::ScEnvMetaEntry => gen.into_root_schema_for::(), - Self::ScEnvMetaEntryInterfaceVersion => { - gen.into_root_schema_for::() - } - Self::ScMetaV0 => gen.into_root_schema_for::(), - Self::ScMetaKind => gen.into_root_schema_for::(), - Self::ScMetaEntry => gen.into_root_schema_for::(), - Self::ScSpecType => gen.into_root_schema_for::(), - Self::ScSpecTypeOption => gen.into_root_schema_for::(), - Self::ScSpecTypeResult => gen.into_root_schema_for::(), - Self::ScSpecTypeVec => gen.into_root_schema_for::(), - Self::ScSpecTypeMap => gen.into_root_schema_for::(), - Self::ScSpecTypeTuple => gen.into_root_schema_for::(), - Self::ScSpecTypeBytesN => gen.into_root_schema_for::(), - Self::ScSpecTypeUdt => gen.into_root_schema_for::(), - Self::ScSpecTypeDef => gen.into_root_schema_for::(), - Self::ScSpecUdtStructFieldV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtStructV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtUnionCaseVoidV0 => { - gen.into_root_schema_for::() - } - Self::ScSpecUdtUnionCaseTupleV0 => { - gen.into_root_schema_for::() - } - Self::ScSpecUdtUnionCaseV0Kind => { - gen.into_root_schema_for::() - } - Self::ScSpecUdtUnionCaseV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtUnionV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtEnumCaseV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtEnumV0 => gen.into_root_schema_for::(), - Self::ScSpecUdtErrorEnumCaseV0 => { - gen.into_root_schema_for::() - } - Self::ScSpecUdtErrorEnumV0 => gen.into_root_schema_for::(), - Self::ScSpecFunctionInputV0 => gen.into_root_schema_for::(), - Self::ScSpecFunctionV0 => gen.into_root_schema_for::(), - Self::ScSpecEventParamLocationV0 => { - gen.into_root_schema_for::() - } - Self::ScSpecEventParamV0 => gen.into_root_schema_for::(), - Self::ScSpecEventDataFormat => gen.into_root_schema_for::(), - Self::ScSpecEventV0 => gen.into_root_schema_for::(), - Self::ScSpecEntryKind => gen.into_root_schema_for::(), - Self::ScSpecEntry => gen.into_root_schema_for::(), - Self::ScValType => gen.into_root_schema_for::(), - Self::ScErrorType => gen.into_root_schema_for::(), - Self::ScErrorCode => gen.into_root_schema_for::(), - Self::ScError => gen.into_root_schema_for::(), - Self::UInt128Parts => gen.into_root_schema_for::(), - Self::Int128Parts => gen.into_root_schema_for::(), - Self::UInt256Parts => gen.into_root_schema_for::(), - Self::Int256Parts => gen.into_root_schema_for::(), - Self::ContractExecutableType => gen.into_root_schema_for::(), - Self::ContractExecutable => gen.into_root_schema_for::(), - Self::ScAddressType => gen.into_root_schema_for::(), - Self::MuxedEd25519Account => gen.into_root_schema_for::(), - Self::ScAddress => gen.into_root_schema_for::(), - Self::ScVec => gen.into_root_schema_for::(), - Self::ScMap => gen.into_root_schema_for::(), - Self::ScBytes => gen.into_root_schema_for::(), - Self::ScString => gen.into_root_schema_for::(), - Self::ScSymbol => gen.into_root_schema_for::(), - Self::ScNonceKey => gen.into_root_schema_for::(), - Self::ScContractInstance => gen.into_root_schema_for::(), - Self::ScVal => gen.into_root_schema_for::(), - Self::ScMapEntry => gen.into_root_schema_for::(), - Self::LedgerCloseMetaBatch => gen.into_root_schema_for::(), - Self::StoredTransactionSet => gen.into_root_schema_for::(), - Self::StoredDebugTransactionSet => { - gen.into_root_schema_for::() - } - Self::PersistedScpStateV0 => gen.into_root_schema_for::(), - Self::PersistedScpStateV1 => gen.into_root_schema_for::(), - Self::PersistedScpState => gen.into_root_schema_for::(), - Self::Thresholds => gen.into_root_schema_for::(), - Self::String32 => gen.into_root_schema_for::(), - Self::String64 => gen.into_root_schema_for::(), - Self::SequenceNumber => gen.into_root_schema_for::(), - Self::DataValue => gen.into_root_schema_for::(), - Self::AssetCode4 => gen.into_root_schema_for::(), - Self::AssetCode12 => gen.into_root_schema_for::(), - Self::AssetType => gen.into_root_schema_for::(), - Self::AssetCode => gen.into_root_schema_for::(), - Self::AlphaNum4 => gen.into_root_schema_for::(), - Self::AlphaNum12 => gen.into_root_schema_for::(), - Self::Asset => gen.into_root_schema_for::(), - Self::Price => gen.into_root_schema_for::(), - Self::Liabilities => gen.into_root_schema_for::(), - Self::ThresholdIndexes => gen.into_root_schema_for::(), - Self::LedgerEntryType => gen.into_root_schema_for::(), - Self::Signer => gen.into_root_schema_for::(), - Self::AccountFlags => gen.into_root_schema_for::(), - Self::SponsorshipDescriptor => gen.into_root_schema_for::(), - Self::AccountEntryExtensionV3 => gen.into_root_schema_for::(), - Self::AccountEntryExtensionV2 => gen.into_root_schema_for::(), - Self::AccountEntryExtensionV2Ext => { - gen.into_root_schema_for::() - } - Self::AccountEntryExtensionV1 => gen.into_root_schema_for::(), - Self::AccountEntryExtensionV1Ext => { - gen.into_root_schema_for::() - } - Self::AccountEntry => gen.into_root_schema_for::(), - Self::AccountEntryExt => gen.into_root_schema_for::(), - Self::TrustLineFlags => gen.into_root_schema_for::(), - Self::LiquidityPoolType => gen.into_root_schema_for::(), - Self::TrustLineAsset => gen.into_root_schema_for::(), - Self::TrustLineEntryExtensionV2 => { - gen.into_root_schema_for::() - } - Self::TrustLineEntryExtensionV2Ext => { - gen.into_root_schema_for::() - } - Self::TrustLineEntry => gen.into_root_schema_for::(), - Self::TrustLineEntryExt => gen.into_root_schema_for::(), - Self::TrustLineEntryV1 => gen.into_root_schema_for::(), - Self::TrustLineEntryV1Ext => gen.into_root_schema_for::(), - Self::OfferEntryFlags => gen.into_root_schema_for::(), - Self::OfferEntry => gen.into_root_schema_for::(), - Self::OfferEntryExt => gen.into_root_schema_for::(), - Self::DataEntry => gen.into_root_schema_for::(), - Self::DataEntryExt => gen.into_root_schema_for::(), - Self::ClaimPredicateType => gen.into_root_schema_for::(), - Self::ClaimPredicate => gen.into_root_schema_for::(), - Self::ClaimantType => gen.into_root_schema_for::(), - Self::Claimant => gen.into_root_schema_for::(), - Self::ClaimantV0 => gen.into_root_schema_for::(), - Self::ClaimableBalanceFlags => gen.into_root_schema_for::(), - Self::ClaimableBalanceEntryExtensionV1 => { - gen.into_root_schema_for::() - } - Self::ClaimableBalanceEntryExtensionV1Ext => { - gen.into_root_schema_for::() - } - Self::ClaimableBalanceEntry => gen.into_root_schema_for::(), - Self::ClaimableBalanceEntryExt => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolConstantProductParameters => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolEntry => gen.into_root_schema_for::(), - Self::LiquidityPoolEntryBody => gen.into_root_schema_for::(), - Self::LiquidityPoolEntryConstantProduct => { - gen.into_root_schema_for::() - } - Self::ContractDataDurability => gen.into_root_schema_for::(), - Self::ContractDataEntry => gen.into_root_schema_for::(), - Self::ContractCodeCostInputs => gen.into_root_schema_for::(), - Self::ContractCodeEntry => gen.into_root_schema_for::(), - Self::ContractCodeEntryExt => gen.into_root_schema_for::(), - Self::ContractCodeEntryV1 => gen.into_root_schema_for::(), - Self::TtlEntry => gen.into_root_schema_for::(), - Self::LedgerEntryExtensionV1 => gen.into_root_schema_for::(), - Self::LedgerEntryExtensionV1Ext => { - gen.into_root_schema_for::() - } - Self::LedgerEntry => gen.into_root_schema_for::(), - Self::LedgerEntryData => gen.into_root_schema_for::(), - Self::LedgerEntryExt => gen.into_root_schema_for::(), - Self::LedgerKey => gen.into_root_schema_for::(), - Self::LedgerKeyAccount => gen.into_root_schema_for::(), - Self::LedgerKeyTrustLine => gen.into_root_schema_for::(), - Self::LedgerKeyOffer => gen.into_root_schema_for::(), - Self::LedgerKeyData => gen.into_root_schema_for::(), - Self::LedgerKeyClaimableBalance => { - gen.into_root_schema_for::() - } - Self::LedgerKeyLiquidityPool => gen.into_root_schema_for::(), - Self::LedgerKeyContractData => gen.into_root_schema_for::(), - Self::LedgerKeyContractCode => gen.into_root_schema_for::(), - Self::LedgerKeyConfigSetting => gen.into_root_schema_for::(), - Self::LedgerKeyTtl => gen.into_root_schema_for::(), - Self::EnvelopeType => gen.into_root_schema_for::(), - Self::BucketListType => gen.into_root_schema_for::(), - Self::BucketEntryType => gen.into_root_schema_for::(), - Self::HotArchiveBucketEntryType => { - gen.into_root_schema_for::() - } - Self::BucketMetadata => gen.into_root_schema_for::(), - Self::BucketMetadataExt => gen.into_root_schema_for::(), - Self::BucketEntry => gen.into_root_schema_for::(), - Self::HotArchiveBucketEntry => gen.into_root_schema_for::(), - Self::UpgradeType => gen.into_root_schema_for::(), - Self::StellarValueType => gen.into_root_schema_for::(), - Self::LedgerCloseValueSignature => { - gen.into_root_schema_for::() - } - Self::StellarValue => gen.into_root_schema_for::(), - Self::StellarValueExt => gen.into_root_schema_for::(), - Self::LedgerHeaderFlags => gen.into_root_schema_for::(), - Self::LedgerHeaderExtensionV1 => gen.into_root_schema_for::(), - Self::LedgerHeaderExtensionV1Ext => { - gen.into_root_schema_for::() - } - Self::LedgerHeader => gen.into_root_schema_for::(), - Self::LedgerHeaderExt => gen.into_root_schema_for::(), - Self::LedgerUpgradeType => gen.into_root_schema_for::(), - Self::ConfigUpgradeSetKey => gen.into_root_schema_for::(), - Self::LedgerUpgrade => gen.into_root_schema_for::(), - Self::ConfigUpgradeSet => gen.into_root_schema_for::(), - Self::TxSetComponentType => gen.into_root_schema_for::(), - Self::DependentTxCluster => gen.into_root_schema_for::(), - Self::ParallelTxExecutionStage => { - gen.into_root_schema_for::() - } - Self::ParallelTxsComponent => gen.into_root_schema_for::(), - Self::TxSetComponent => gen.into_root_schema_for::(), - Self::TxSetComponentTxsMaybeDiscountedFee => { - gen.into_root_schema_for::() - } - Self::TransactionPhase => gen.into_root_schema_for::(), - Self::TransactionSet => gen.into_root_schema_for::(), - Self::TransactionSetV1 => gen.into_root_schema_for::(), - Self::GeneralizedTransactionSet => { - gen.into_root_schema_for::() - } - Self::TransactionResultPair => gen.into_root_schema_for::(), - Self::TransactionResultSet => gen.into_root_schema_for::(), - Self::TransactionHistoryEntry => gen.into_root_schema_for::(), - Self::TransactionHistoryEntryExt => { - gen.into_root_schema_for::() - } - Self::TransactionHistoryResultEntry => { - gen.into_root_schema_for::() - } - Self::TransactionHistoryResultEntryExt => { - gen.into_root_schema_for::() - } - Self::LedgerHeaderHistoryEntry => { - gen.into_root_schema_for::() - } - Self::LedgerHeaderHistoryEntryExt => { - gen.into_root_schema_for::() - } - Self::LedgerScpMessages => gen.into_root_schema_for::(), - Self::ScpHistoryEntryV0 => gen.into_root_schema_for::(), - Self::ScpHistoryEntry => gen.into_root_schema_for::(), - Self::LedgerEntryChangeType => gen.into_root_schema_for::(), - Self::LedgerEntryChange => gen.into_root_schema_for::(), - Self::LedgerEntryChanges => gen.into_root_schema_for::(), - Self::OperationMeta => gen.into_root_schema_for::(), - Self::TransactionMetaV1 => gen.into_root_schema_for::(), - Self::TransactionMetaV2 => gen.into_root_schema_for::(), - Self::ContractEventType => gen.into_root_schema_for::(), - Self::ContractEvent => gen.into_root_schema_for::(), - Self::ContractEventBody => gen.into_root_schema_for::(), - Self::ContractEventV0 => gen.into_root_schema_for::(), - Self::DiagnosticEvent => gen.into_root_schema_for::(), - Self::SorobanTransactionMetaExtV1 => { - gen.into_root_schema_for::() - } - Self::SorobanTransactionMetaExt => { - gen.into_root_schema_for::() - } - Self::SorobanTransactionMeta => gen.into_root_schema_for::(), - Self::TransactionMetaV3 => gen.into_root_schema_for::(), - Self::OperationMetaV2 => gen.into_root_schema_for::(), - Self::SorobanTransactionMetaV2 => { - gen.into_root_schema_for::() - } - Self::TransactionEventStage => gen.into_root_schema_for::(), - Self::TransactionEvent => gen.into_root_schema_for::(), - Self::TransactionMetaV4 => gen.into_root_schema_for::(), - Self::InvokeHostFunctionSuccessPreImage => { - gen.into_root_schema_for::() - } - Self::TransactionMeta => gen.into_root_schema_for::(), - Self::TransactionResultMeta => gen.into_root_schema_for::(), - Self::TransactionResultMetaV1 => gen.into_root_schema_for::(), - Self::UpgradeEntryMeta => gen.into_root_schema_for::(), - Self::LedgerCloseMetaV0 => gen.into_root_schema_for::(), - Self::LedgerCloseMetaExtV1 => gen.into_root_schema_for::(), - Self::LedgerCloseMetaExt => gen.into_root_schema_for::(), - Self::LedgerCloseMetaV1 => gen.into_root_schema_for::(), - Self::LedgerCloseMetaV2 => gen.into_root_schema_for::(), - Self::LedgerCloseMeta => gen.into_root_schema_for::(), - Self::ErrorCode => gen.into_root_schema_for::(), - Self::SError => gen.into_root_schema_for::(), - Self::SendMore => gen.into_root_schema_for::(), - Self::SendMoreExtended => gen.into_root_schema_for::(), - Self::AuthCert => gen.into_root_schema_for::(), - Self::Hello => gen.into_root_schema_for::(), - Self::Auth => gen.into_root_schema_for::(), - Self::IpAddrType => gen.into_root_schema_for::(), - Self::PeerAddress => gen.into_root_schema_for::(), - Self::PeerAddressIp => gen.into_root_schema_for::(), - Self::MessageType => gen.into_root_schema_for::(), - Self::DontHave => gen.into_root_schema_for::(), - Self::SurveyMessageCommandType => { - gen.into_root_schema_for::() - } - Self::SurveyMessageResponseType => { - gen.into_root_schema_for::() - } - Self::TimeSlicedSurveyStartCollectingMessage => { - gen.into_root_schema_for::() - } - Self::SignedTimeSlicedSurveyStartCollectingMessage => { - gen.into_root_schema_for::() - } - Self::TimeSlicedSurveyStopCollectingMessage => { - gen.into_root_schema_for::() - } - Self::SignedTimeSlicedSurveyStopCollectingMessage => { - gen.into_root_schema_for::() - } - Self::SurveyRequestMessage => gen.into_root_schema_for::(), - Self::TimeSlicedSurveyRequestMessage => { - gen.into_root_schema_for::() - } - Self::SignedTimeSlicedSurveyRequestMessage => { - gen.into_root_schema_for::() - } - Self::EncryptedBody => gen.into_root_schema_for::(), - Self::SurveyResponseMessage => gen.into_root_schema_for::(), - Self::TimeSlicedSurveyResponseMessage => { - gen.into_root_schema_for::() - } - Self::SignedTimeSlicedSurveyResponseMessage => { - gen.into_root_schema_for::() - } - Self::PeerStats => gen.into_root_schema_for::(), - Self::TimeSlicedNodeData => gen.into_root_schema_for::(), - Self::TimeSlicedPeerData => gen.into_root_schema_for::(), - Self::TimeSlicedPeerDataList => gen.into_root_schema_for::(), - Self::TopologyResponseBodyV2 => gen.into_root_schema_for::(), - Self::SurveyResponseBody => gen.into_root_schema_for::(), - Self::TxAdvertVector => gen.into_root_schema_for::(), - Self::FloodAdvert => gen.into_root_schema_for::(), - Self::TxDemandVector => gen.into_root_schema_for::(), - Self::FloodDemand => gen.into_root_schema_for::(), - Self::StellarMessage => gen.into_root_schema_for::(), - Self::AuthenticatedMessage => gen.into_root_schema_for::(), - Self::AuthenticatedMessageV0 => gen.into_root_schema_for::(), - Self::LiquidityPoolParameters => gen.into_root_schema_for::(), - Self::MuxedAccount => gen.into_root_schema_for::(), - Self::MuxedAccountMed25519 => gen.into_root_schema_for::(), - Self::DecoratedSignature => gen.into_root_schema_for::(), - Self::OperationType => gen.into_root_schema_for::(), - Self::CreateAccountOp => gen.into_root_schema_for::(), - Self::PaymentOp => gen.into_root_schema_for::(), - Self::PathPaymentStrictReceiveOp => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictSendOp => gen.into_root_schema_for::(), - Self::ManageSellOfferOp => gen.into_root_schema_for::(), - Self::ManageBuyOfferOp => gen.into_root_schema_for::(), - Self::CreatePassiveSellOfferOp => { - gen.into_root_schema_for::() - } - Self::SetOptionsOp => gen.into_root_schema_for::(), - Self::ChangeTrustAsset => gen.into_root_schema_for::(), - Self::ChangeTrustOp => gen.into_root_schema_for::(), - Self::AllowTrustOp => gen.into_root_schema_for::(), - Self::ManageDataOp => gen.into_root_schema_for::(), - Self::BumpSequenceOp => gen.into_root_schema_for::(), - Self::CreateClaimableBalanceOp => { - gen.into_root_schema_for::() - } - Self::ClaimClaimableBalanceOp => gen.into_root_schema_for::(), - Self::BeginSponsoringFutureReservesOp => { - gen.into_root_schema_for::() - } - Self::RevokeSponsorshipType => gen.into_root_schema_for::(), - Self::RevokeSponsorshipOp => gen.into_root_schema_for::(), - Self::RevokeSponsorshipOpSigner => { - gen.into_root_schema_for::() - } - Self::ClawbackOp => gen.into_root_schema_for::(), - Self::ClawbackClaimableBalanceOp => { - gen.into_root_schema_for::() - } - Self::SetTrustLineFlagsOp => gen.into_root_schema_for::(), - Self::LiquidityPoolDepositOp => gen.into_root_schema_for::(), - Self::LiquidityPoolWithdrawOp => gen.into_root_schema_for::(), - Self::HostFunctionType => gen.into_root_schema_for::(), - Self::ContractIdPreimageType => gen.into_root_schema_for::(), - Self::ContractIdPreimage => gen.into_root_schema_for::(), - Self::ContractIdPreimageFromAddress => { - gen.into_root_schema_for::() - } - Self::CreateContractArgs => gen.into_root_schema_for::(), - Self::CreateContractArgsV2 => gen.into_root_schema_for::(), - Self::InvokeContractArgs => gen.into_root_schema_for::(), - Self::HostFunction => gen.into_root_schema_for::(), - Self::SorobanAuthorizedFunctionType => { - gen.into_root_schema_for::() - } - Self::SorobanAuthorizedFunction => { - gen.into_root_schema_for::() - } - Self::SorobanAuthorizedInvocation => { - gen.into_root_schema_for::() - } - Self::SorobanAddressCredentials => { - gen.into_root_schema_for::() - } - Self::SorobanCredentialsType => gen.into_root_schema_for::(), - Self::SorobanCredentials => gen.into_root_schema_for::(), - Self::SorobanAuthorizationEntry => { - gen.into_root_schema_for::() - } - Self::SorobanAuthorizationEntries => { - gen.into_root_schema_for::() - } - Self::InvokeHostFunctionOp => gen.into_root_schema_for::(), - Self::ExtendFootprintTtlOp => gen.into_root_schema_for::(), - Self::RestoreFootprintOp => gen.into_root_schema_for::(), - Self::Operation => gen.into_root_schema_for::(), - Self::OperationBody => gen.into_root_schema_for::(), - Self::HashIdPreimage => gen.into_root_schema_for::(), - Self::HashIdPreimageOperationId => { - gen.into_root_schema_for::() - } - Self::HashIdPreimageRevokeId => gen.into_root_schema_for::(), - Self::HashIdPreimageContractId => { - gen.into_root_schema_for::() - } - Self::HashIdPreimageSorobanAuthorization => { - gen.into_root_schema_for::() - } - Self::MemoType => gen.into_root_schema_for::(), - Self::Memo => gen.into_root_schema_for::(), - Self::TimeBounds => gen.into_root_schema_for::(), - Self::LedgerBounds => gen.into_root_schema_for::(), - Self::PreconditionsV2 => gen.into_root_schema_for::(), - Self::PreconditionType => gen.into_root_schema_for::(), - Self::Preconditions => gen.into_root_schema_for::(), - Self::LedgerFootprint => gen.into_root_schema_for::(), - Self::SorobanResources => gen.into_root_schema_for::(), - Self::SorobanResourcesExtV0 => gen.into_root_schema_for::(), - Self::SorobanTransactionData => gen.into_root_schema_for::(), - Self::SorobanTransactionDataExt => { - gen.into_root_schema_for::() - } - Self::TransactionV0 => gen.into_root_schema_for::(), - Self::TransactionV0Ext => gen.into_root_schema_for::(), - Self::TransactionV0Envelope => gen.into_root_schema_for::(), - Self::Transaction => gen.into_root_schema_for::(), - Self::TransactionExt => gen.into_root_schema_for::(), - Self::TransactionV1Envelope => gen.into_root_schema_for::(), - Self::FeeBumpTransaction => gen.into_root_schema_for::(), - Self::FeeBumpTransactionInnerTx => { - gen.into_root_schema_for::() - } - Self::FeeBumpTransactionExt => gen.into_root_schema_for::(), - Self::FeeBumpTransactionEnvelope => { - gen.into_root_schema_for::() - } - Self::TransactionEnvelope => gen.into_root_schema_for::(), - Self::TransactionSignaturePayload => { - gen.into_root_schema_for::() - } - Self::TransactionSignaturePayloadTaggedTransaction => { - gen.into_root_schema_for::() - } - Self::ClaimAtomType => gen.into_root_schema_for::(), - Self::ClaimOfferAtomV0 => gen.into_root_schema_for::(), - Self::ClaimOfferAtom => gen.into_root_schema_for::(), - Self::ClaimLiquidityAtom => gen.into_root_schema_for::(), - Self::ClaimAtom => gen.into_root_schema_for::(), - Self::CreateAccountResultCode => gen.into_root_schema_for::(), - Self::CreateAccountResult => gen.into_root_schema_for::(), - Self::PaymentResultCode => gen.into_root_schema_for::(), - Self::PaymentResult => gen.into_root_schema_for::(), - Self::PathPaymentStrictReceiveResultCode => { - gen.into_root_schema_for::() - } - Self::SimplePaymentResult => gen.into_root_schema_for::(), - Self::PathPaymentStrictReceiveResult => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictReceiveResultSuccess => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictSendResultCode => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictSendResult => { - gen.into_root_schema_for::() - } - Self::PathPaymentStrictSendResultSuccess => { - gen.into_root_schema_for::() - } - Self::ManageSellOfferResultCode => { - gen.into_root_schema_for::() - } - Self::ManageOfferEffect => gen.into_root_schema_for::(), - Self::ManageOfferSuccessResult => { - gen.into_root_schema_for::() - } - Self::ManageOfferSuccessResultOffer => { - gen.into_root_schema_for::() - } - Self::ManageSellOfferResult => gen.into_root_schema_for::(), - Self::ManageBuyOfferResultCode => { - gen.into_root_schema_for::() - } - Self::ManageBuyOfferResult => gen.into_root_schema_for::(), - Self::SetOptionsResultCode => gen.into_root_schema_for::(), - Self::SetOptionsResult => gen.into_root_schema_for::(), - Self::ChangeTrustResultCode => gen.into_root_schema_for::(), - Self::ChangeTrustResult => gen.into_root_schema_for::(), - Self::AllowTrustResultCode => gen.into_root_schema_for::(), - Self::AllowTrustResult => gen.into_root_schema_for::(), - Self::AccountMergeResultCode => gen.into_root_schema_for::(), - Self::AccountMergeResult => gen.into_root_schema_for::(), - Self::InflationResultCode => gen.into_root_schema_for::(), - Self::InflationPayout => gen.into_root_schema_for::(), - Self::InflationResult => gen.into_root_schema_for::(), - Self::ManageDataResultCode => gen.into_root_schema_for::(), - Self::ManageDataResult => gen.into_root_schema_for::(), - Self::BumpSequenceResultCode => gen.into_root_schema_for::(), - Self::BumpSequenceResult => gen.into_root_schema_for::(), - Self::CreateClaimableBalanceResultCode => { - gen.into_root_schema_for::() - } - Self::CreateClaimableBalanceResult => { - gen.into_root_schema_for::() - } - Self::ClaimClaimableBalanceResultCode => { - gen.into_root_schema_for::() - } - Self::ClaimClaimableBalanceResult => { - gen.into_root_schema_for::() - } - Self::BeginSponsoringFutureReservesResultCode => { - gen.into_root_schema_for::() - } - Self::BeginSponsoringFutureReservesResult => { - gen.into_root_schema_for::() - } - Self::EndSponsoringFutureReservesResultCode => { - gen.into_root_schema_for::() - } - Self::EndSponsoringFutureReservesResult => { - gen.into_root_schema_for::() - } - Self::RevokeSponsorshipResultCode => { - gen.into_root_schema_for::() - } - Self::RevokeSponsorshipResult => gen.into_root_schema_for::(), - Self::ClawbackResultCode => gen.into_root_schema_for::(), - Self::ClawbackResult => gen.into_root_schema_for::(), - Self::ClawbackClaimableBalanceResultCode => { - gen.into_root_schema_for::() - } - Self::ClawbackClaimableBalanceResult => { - gen.into_root_schema_for::() - } - Self::SetTrustLineFlagsResultCode => { - gen.into_root_schema_for::() - } - Self::SetTrustLineFlagsResult => gen.into_root_schema_for::(), - Self::LiquidityPoolDepositResultCode => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolDepositResult => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolWithdrawResultCode => { - gen.into_root_schema_for::() - } - Self::LiquidityPoolWithdrawResult => { - gen.into_root_schema_for::() - } - Self::InvokeHostFunctionResultCode => { - gen.into_root_schema_for::() - } - Self::InvokeHostFunctionResult => { - gen.into_root_schema_for::() - } - Self::ExtendFootprintTtlResultCode => { - gen.into_root_schema_for::() - } - Self::ExtendFootprintTtlResult => { - gen.into_root_schema_for::() - } - Self::RestoreFootprintResultCode => { - gen.into_root_schema_for::() - } - Self::RestoreFootprintResult => gen.into_root_schema_for::(), - Self::OperationResultCode => gen.into_root_schema_for::(), - Self::OperationResult => gen.into_root_schema_for::(), - Self::OperationResultTr => gen.into_root_schema_for::(), - Self::TransactionResultCode => gen.into_root_schema_for::(), - Self::InnerTransactionResult => gen.into_root_schema_for::(), - Self::InnerTransactionResultResult => { - gen.into_root_schema_for::() - } - Self::InnerTransactionResultExt => { - gen.into_root_schema_for::() - } - Self::InnerTransactionResultPair => { - gen.into_root_schema_for::() - } - Self::TransactionResult => gen.into_root_schema_for::(), - Self::TransactionResultResult => gen.into_root_schema_for::(), - Self::TransactionResultExt => gen.into_root_schema_for::(), - Self::Hash => gen.into_root_schema_for::(), - Self::Uint256 => gen.into_root_schema_for::(), - Self::Uint32 => gen.into_root_schema_for::(), - Self::Int32 => gen.into_root_schema_for::(), - Self::Uint64 => gen.into_root_schema_for::(), - Self::Int64 => gen.into_root_schema_for::(), - Self::TimePoint => gen.into_root_schema_for::(), - Self::Duration => gen.into_root_schema_for::(), - Self::ExtensionPoint => gen.into_root_schema_for::(), - Self::CryptoKeyType => gen.into_root_schema_for::(), - Self::PublicKeyType => gen.into_root_schema_for::(), - Self::SignerKeyType => gen.into_root_schema_for::(), - Self::PublicKey => gen.into_root_schema_for::(), - Self::SignerKey => gen.into_root_schema_for::(), - Self::SignerKeyEd25519SignedPayload => { - gen.into_root_schema_for::() - } - Self::Signature => gen.into_root_schema_for::(), - Self::SignatureHint => gen.into_root_schema_for::(), - Self::NodeId => gen.into_root_schema_for::(), - Self::AccountId => gen.into_root_schema_for::(), - Self::ContractId => gen.into_root_schema_for::(), - Self::Curve25519Secret => gen.into_root_schema_for::(), - Self::Curve25519Public => gen.into_root_schema_for::(), - Self::HmacSha256Key => gen.into_root_schema_for::(), - Self::HmacSha256Mac => gen.into_root_schema_for::(), - Self::ShortHashSeed => gen.into_root_schema_for::(), - Self::BinaryFuseFilterType => gen.into_root_schema_for::(), - Self::SerializedBinaryFuseFilter => { - gen.into_root_schema_for::() - } - Self::PoolId => gen.into_root_schema_for::(), - Self::ClaimableBalanceIdType => gen.into_root_schema_for::(), - Self::ClaimableBalanceId => gen.into_root_schema_for::(), - } - } -} - -impl Name for TypeVariant { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for TypeVariant { - fn variants() -> slice::Iter<'static, TypeVariant> { - Self::VARIANTS.iter() - } -} - -impl core::str::FromStr for TypeVariant { - type Err = Error; - #[allow(clippy::too_many_lines)] - fn from_str(s: &str) -> Result { - match s { - "Value" => Ok(Self::Value), - "ScpBallot" => Ok(Self::ScpBallot), - "ScpStatementType" => Ok(Self::ScpStatementType), - "ScpNomination" => Ok(Self::ScpNomination), - "ScpStatement" => Ok(Self::ScpStatement), - "ScpStatementPledges" => Ok(Self::ScpStatementPledges), - "ScpStatementPrepare" => Ok(Self::ScpStatementPrepare), - "ScpStatementConfirm" => Ok(Self::ScpStatementConfirm), - "ScpStatementExternalize" => Ok(Self::ScpStatementExternalize), - "ScpEnvelope" => Ok(Self::ScpEnvelope), - "ScpQuorumSet" => Ok(Self::ScpQuorumSet), - "EncodedLedgerKey" => Ok(Self::EncodedLedgerKey), - "ConfigSettingContractExecutionLanesV0" => { - Ok(Self::ConfigSettingContractExecutionLanesV0) - } - "ConfigSettingContractComputeV0" => Ok(Self::ConfigSettingContractComputeV0), - "ConfigSettingContractParallelComputeV0" => { - Ok(Self::ConfigSettingContractParallelComputeV0) - } - "ConfigSettingContractLedgerCostV0" => Ok(Self::ConfigSettingContractLedgerCostV0), - "ConfigSettingContractLedgerCostExtV0" => { - Ok(Self::ConfigSettingContractLedgerCostExtV0) - } - "ConfigSettingContractHistoricalDataV0" => { - Ok(Self::ConfigSettingContractHistoricalDataV0) - } - "ConfigSettingContractEventsV0" => Ok(Self::ConfigSettingContractEventsV0), - "ConfigSettingContractBandwidthV0" => Ok(Self::ConfigSettingContractBandwidthV0), - "ContractCostType" => Ok(Self::ContractCostType), - "ContractCostParamEntry" => Ok(Self::ContractCostParamEntry), - "StateArchivalSettings" => Ok(Self::StateArchivalSettings), - "EvictionIterator" => Ok(Self::EvictionIterator), - "ConfigSettingScpTiming" => Ok(Self::ConfigSettingScpTiming), - "FrozenLedgerKeys" => Ok(Self::FrozenLedgerKeys), - "FrozenLedgerKeysDelta" => Ok(Self::FrozenLedgerKeysDelta), - "FreezeBypassTxs" => Ok(Self::FreezeBypassTxs), - "FreezeBypassTxsDelta" => Ok(Self::FreezeBypassTxsDelta), - "ContractCostParams" => Ok(Self::ContractCostParams), - "ConfigSettingId" => Ok(Self::ConfigSettingId), - "ConfigSettingEntry" => Ok(Self::ConfigSettingEntry), - "ScEnvMetaKind" => Ok(Self::ScEnvMetaKind), - "ScEnvMetaEntry" => Ok(Self::ScEnvMetaEntry), - "ScEnvMetaEntryInterfaceVersion" => Ok(Self::ScEnvMetaEntryInterfaceVersion), - "ScMetaV0" => Ok(Self::ScMetaV0), - "ScMetaKind" => Ok(Self::ScMetaKind), - "ScMetaEntry" => Ok(Self::ScMetaEntry), - "ScSpecType" => Ok(Self::ScSpecType), - "ScSpecTypeOption" => Ok(Self::ScSpecTypeOption), - "ScSpecTypeResult" => Ok(Self::ScSpecTypeResult), - "ScSpecTypeVec" => Ok(Self::ScSpecTypeVec), - "ScSpecTypeMap" => Ok(Self::ScSpecTypeMap), - "ScSpecTypeTuple" => Ok(Self::ScSpecTypeTuple), - "ScSpecTypeBytesN" => Ok(Self::ScSpecTypeBytesN), - "ScSpecTypeUdt" => Ok(Self::ScSpecTypeUdt), - "ScSpecTypeDef" => Ok(Self::ScSpecTypeDef), - "ScSpecUdtStructFieldV0" => Ok(Self::ScSpecUdtStructFieldV0), - "ScSpecUdtStructV0" => Ok(Self::ScSpecUdtStructV0), - "ScSpecUdtUnionCaseVoidV0" => Ok(Self::ScSpecUdtUnionCaseVoidV0), - "ScSpecUdtUnionCaseTupleV0" => Ok(Self::ScSpecUdtUnionCaseTupleV0), - "ScSpecUdtUnionCaseV0Kind" => Ok(Self::ScSpecUdtUnionCaseV0Kind), - "ScSpecUdtUnionCaseV0" => Ok(Self::ScSpecUdtUnionCaseV0), - "ScSpecUdtUnionV0" => Ok(Self::ScSpecUdtUnionV0), - "ScSpecUdtEnumCaseV0" => Ok(Self::ScSpecUdtEnumCaseV0), - "ScSpecUdtEnumV0" => Ok(Self::ScSpecUdtEnumV0), - "ScSpecUdtErrorEnumCaseV0" => Ok(Self::ScSpecUdtErrorEnumCaseV0), - "ScSpecUdtErrorEnumV0" => Ok(Self::ScSpecUdtErrorEnumV0), - "ScSpecFunctionInputV0" => Ok(Self::ScSpecFunctionInputV0), - "ScSpecFunctionV0" => Ok(Self::ScSpecFunctionV0), - "ScSpecEventParamLocationV0" => Ok(Self::ScSpecEventParamLocationV0), - "ScSpecEventParamV0" => Ok(Self::ScSpecEventParamV0), - "ScSpecEventDataFormat" => Ok(Self::ScSpecEventDataFormat), - "ScSpecEventV0" => Ok(Self::ScSpecEventV0), - "ScSpecEntryKind" => Ok(Self::ScSpecEntryKind), - "ScSpecEntry" => Ok(Self::ScSpecEntry), - "ScValType" => Ok(Self::ScValType), - "ScErrorType" => Ok(Self::ScErrorType), - "ScErrorCode" => Ok(Self::ScErrorCode), - "ScError" => Ok(Self::ScError), - "UInt128Parts" => Ok(Self::UInt128Parts), - "Int128Parts" => Ok(Self::Int128Parts), - "UInt256Parts" => Ok(Self::UInt256Parts), - "Int256Parts" => Ok(Self::Int256Parts), - "ContractExecutableType" => Ok(Self::ContractExecutableType), - "ContractExecutable" => Ok(Self::ContractExecutable), - "ScAddressType" => Ok(Self::ScAddressType), - "MuxedEd25519Account" => Ok(Self::MuxedEd25519Account), - "ScAddress" => Ok(Self::ScAddress), - "ScVec" => Ok(Self::ScVec), - "ScMap" => Ok(Self::ScMap), - "ScBytes" => Ok(Self::ScBytes), - "ScString" => Ok(Self::ScString), - "ScSymbol" => Ok(Self::ScSymbol), - "ScNonceKey" => Ok(Self::ScNonceKey), - "ScContractInstance" => Ok(Self::ScContractInstance), - "ScVal" => Ok(Self::ScVal), - "ScMapEntry" => Ok(Self::ScMapEntry), - "LedgerCloseMetaBatch" => Ok(Self::LedgerCloseMetaBatch), - "StoredTransactionSet" => Ok(Self::StoredTransactionSet), - "StoredDebugTransactionSet" => Ok(Self::StoredDebugTransactionSet), - "PersistedScpStateV0" => Ok(Self::PersistedScpStateV0), - "PersistedScpStateV1" => Ok(Self::PersistedScpStateV1), - "PersistedScpState" => Ok(Self::PersistedScpState), - "Thresholds" => Ok(Self::Thresholds), - "String32" => Ok(Self::String32), - "String64" => Ok(Self::String64), - "SequenceNumber" => Ok(Self::SequenceNumber), - "DataValue" => Ok(Self::DataValue), - "AssetCode4" => Ok(Self::AssetCode4), - "AssetCode12" => Ok(Self::AssetCode12), - "AssetType" => Ok(Self::AssetType), - "AssetCode" => Ok(Self::AssetCode), - "AlphaNum4" => Ok(Self::AlphaNum4), - "AlphaNum12" => Ok(Self::AlphaNum12), - "Asset" => Ok(Self::Asset), - "Price" => Ok(Self::Price), - "Liabilities" => Ok(Self::Liabilities), - "ThresholdIndexes" => Ok(Self::ThresholdIndexes), - "LedgerEntryType" => Ok(Self::LedgerEntryType), - "Signer" => Ok(Self::Signer), - "AccountFlags" => Ok(Self::AccountFlags), - "SponsorshipDescriptor" => Ok(Self::SponsorshipDescriptor), - "AccountEntryExtensionV3" => Ok(Self::AccountEntryExtensionV3), - "AccountEntryExtensionV2" => Ok(Self::AccountEntryExtensionV2), - "AccountEntryExtensionV2Ext" => Ok(Self::AccountEntryExtensionV2Ext), - "AccountEntryExtensionV1" => Ok(Self::AccountEntryExtensionV1), - "AccountEntryExtensionV1Ext" => Ok(Self::AccountEntryExtensionV1Ext), - "AccountEntry" => Ok(Self::AccountEntry), - "AccountEntryExt" => Ok(Self::AccountEntryExt), - "TrustLineFlags" => Ok(Self::TrustLineFlags), - "LiquidityPoolType" => Ok(Self::LiquidityPoolType), - "TrustLineAsset" => Ok(Self::TrustLineAsset), - "TrustLineEntryExtensionV2" => Ok(Self::TrustLineEntryExtensionV2), - "TrustLineEntryExtensionV2Ext" => Ok(Self::TrustLineEntryExtensionV2Ext), - "TrustLineEntry" => Ok(Self::TrustLineEntry), - "TrustLineEntryExt" => Ok(Self::TrustLineEntryExt), - "TrustLineEntryV1" => Ok(Self::TrustLineEntryV1), - "TrustLineEntryV1Ext" => Ok(Self::TrustLineEntryV1Ext), - "OfferEntryFlags" => Ok(Self::OfferEntryFlags), - "OfferEntry" => Ok(Self::OfferEntry), - "OfferEntryExt" => Ok(Self::OfferEntryExt), - "DataEntry" => Ok(Self::DataEntry), - "DataEntryExt" => Ok(Self::DataEntryExt), - "ClaimPredicateType" => Ok(Self::ClaimPredicateType), - "ClaimPredicate" => Ok(Self::ClaimPredicate), - "ClaimantType" => Ok(Self::ClaimantType), - "Claimant" => Ok(Self::Claimant), - "ClaimantV0" => Ok(Self::ClaimantV0), - "ClaimableBalanceFlags" => Ok(Self::ClaimableBalanceFlags), - "ClaimableBalanceEntryExtensionV1" => Ok(Self::ClaimableBalanceEntryExtensionV1), - "ClaimableBalanceEntryExtensionV1Ext" => Ok(Self::ClaimableBalanceEntryExtensionV1Ext), - "ClaimableBalanceEntry" => Ok(Self::ClaimableBalanceEntry), - "ClaimableBalanceEntryExt" => Ok(Self::ClaimableBalanceEntryExt), - "LiquidityPoolConstantProductParameters" => { - Ok(Self::LiquidityPoolConstantProductParameters) - } - "LiquidityPoolEntry" => Ok(Self::LiquidityPoolEntry), - "LiquidityPoolEntryBody" => Ok(Self::LiquidityPoolEntryBody), - "LiquidityPoolEntryConstantProduct" => Ok(Self::LiquidityPoolEntryConstantProduct), - "ContractDataDurability" => Ok(Self::ContractDataDurability), - "ContractDataEntry" => Ok(Self::ContractDataEntry), - "ContractCodeCostInputs" => Ok(Self::ContractCodeCostInputs), - "ContractCodeEntry" => Ok(Self::ContractCodeEntry), - "ContractCodeEntryExt" => Ok(Self::ContractCodeEntryExt), - "ContractCodeEntryV1" => Ok(Self::ContractCodeEntryV1), - "TtlEntry" => Ok(Self::TtlEntry), - "LedgerEntryExtensionV1" => Ok(Self::LedgerEntryExtensionV1), - "LedgerEntryExtensionV1Ext" => Ok(Self::LedgerEntryExtensionV1Ext), - "LedgerEntry" => Ok(Self::LedgerEntry), - "LedgerEntryData" => Ok(Self::LedgerEntryData), - "LedgerEntryExt" => Ok(Self::LedgerEntryExt), - "LedgerKey" => Ok(Self::LedgerKey), - "LedgerKeyAccount" => Ok(Self::LedgerKeyAccount), - "LedgerKeyTrustLine" => Ok(Self::LedgerKeyTrustLine), - "LedgerKeyOffer" => Ok(Self::LedgerKeyOffer), - "LedgerKeyData" => Ok(Self::LedgerKeyData), - "LedgerKeyClaimableBalance" => Ok(Self::LedgerKeyClaimableBalance), - "LedgerKeyLiquidityPool" => Ok(Self::LedgerKeyLiquidityPool), - "LedgerKeyContractData" => Ok(Self::LedgerKeyContractData), - "LedgerKeyContractCode" => Ok(Self::LedgerKeyContractCode), - "LedgerKeyConfigSetting" => Ok(Self::LedgerKeyConfigSetting), - "LedgerKeyTtl" => Ok(Self::LedgerKeyTtl), - "EnvelopeType" => Ok(Self::EnvelopeType), - "BucketListType" => Ok(Self::BucketListType), - "BucketEntryType" => Ok(Self::BucketEntryType), - "HotArchiveBucketEntryType" => Ok(Self::HotArchiveBucketEntryType), - "BucketMetadata" => Ok(Self::BucketMetadata), - "BucketMetadataExt" => Ok(Self::BucketMetadataExt), - "BucketEntry" => Ok(Self::BucketEntry), - "HotArchiveBucketEntry" => Ok(Self::HotArchiveBucketEntry), - "UpgradeType" => Ok(Self::UpgradeType), - "StellarValueType" => Ok(Self::StellarValueType), - "LedgerCloseValueSignature" => Ok(Self::LedgerCloseValueSignature), - "StellarValue" => Ok(Self::StellarValue), - "StellarValueExt" => Ok(Self::StellarValueExt), - "LedgerHeaderFlags" => Ok(Self::LedgerHeaderFlags), - "LedgerHeaderExtensionV1" => Ok(Self::LedgerHeaderExtensionV1), - "LedgerHeaderExtensionV1Ext" => Ok(Self::LedgerHeaderExtensionV1Ext), - "LedgerHeader" => Ok(Self::LedgerHeader), - "LedgerHeaderExt" => Ok(Self::LedgerHeaderExt), - "LedgerUpgradeType" => Ok(Self::LedgerUpgradeType), - "ConfigUpgradeSetKey" => Ok(Self::ConfigUpgradeSetKey), - "LedgerUpgrade" => Ok(Self::LedgerUpgrade), - "ConfigUpgradeSet" => Ok(Self::ConfigUpgradeSet), - "TxSetComponentType" => Ok(Self::TxSetComponentType), - "DependentTxCluster" => Ok(Self::DependentTxCluster), - "ParallelTxExecutionStage" => Ok(Self::ParallelTxExecutionStage), - "ParallelTxsComponent" => Ok(Self::ParallelTxsComponent), - "TxSetComponent" => Ok(Self::TxSetComponent), - "TxSetComponentTxsMaybeDiscountedFee" => Ok(Self::TxSetComponentTxsMaybeDiscountedFee), - "TransactionPhase" => Ok(Self::TransactionPhase), - "TransactionSet" => Ok(Self::TransactionSet), - "TransactionSetV1" => Ok(Self::TransactionSetV1), - "GeneralizedTransactionSet" => Ok(Self::GeneralizedTransactionSet), - "TransactionResultPair" => Ok(Self::TransactionResultPair), - "TransactionResultSet" => Ok(Self::TransactionResultSet), - "TransactionHistoryEntry" => Ok(Self::TransactionHistoryEntry), - "TransactionHistoryEntryExt" => Ok(Self::TransactionHistoryEntryExt), - "TransactionHistoryResultEntry" => Ok(Self::TransactionHistoryResultEntry), - "TransactionHistoryResultEntryExt" => Ok(Self::TransactionHistoryResultEntryExt), - "LedgerHeaderHistoryEntry" => Ok(Self::LedgerHeaderHistoryEntry), - "LedgerHeaderHistoryEntryExt" => Ok(Self::LedgerHeaderHistoryEntryExt), - "LedgerScpMessages" => Ok(Self::LedgerScpMessages), - "ScpHistoryEntryV0" => Ok(Self::ScpHistoryEntryV0), - "ScpHistoryEntry" => Ok(Self::ScpHistoryEntry), - "LedgerEntryChangeType" => Ok(Self::LedgerEntryChangeType), - "LedgerEntryChange" => Ok(Self::LedgerEntryChange), - "LedgerEntryChanges" => Ok(Self::LedgerEntryChanges), - "OperationMeta" => Ok(Self::OperationMeta), - "TransactionMetaV1" => Ok(Self::TransactionMetaV1), - "TransactionMetaV2" => Ok(Self::TransactionMetaV2), - "ContractEventType" => Ok(Self::ContractEventType), - "ContractEvent" => Ok(Self::ContractEvent), - "ContractEventBody" => Ok(Self::ContractEventBody), - "ContractEventV0" => Ok(Self::ContractEventV0), - "DiagnosticEvent" => Ok(Self::DiagnosticEvent), - "SorobanTransactionMetaExtV1" => Ok(Self::SorobanTransactionMetaExtV1), - "SorobanTransactionMetaExt" => Ok(Self::SorobanTransactionMetaExt), - "SorobanTransactionMeta" => Ok(Self::SorobanTransactionMeta), - "TransactionMetaV3" => Ok(Self::TransactionMetaV3), - "OperationMetaV2" => Ok(Self::OperationMetaV2), - "SorobanTransactionMetaV2" => Ok(Self::SorobanTransactionMetaV2), - "TransactionEventStage" => Ok(Self::TransactionEventStage), - "TransactionEvent" => Ok(Self::TransactionEvent), - "TransactionMetaV4" => Ok(Self::TransactionMetaV4), - "InvokeHostFunctionSuccessPreImage" => Ok(Self::InvokeHostFunctionSuccessPreImage), - "TransactionMeta" => Ok(Self::TransactionMeta), - "TransactionResultMeta" => Ok(Self::TransactionResultMeta), - "TransactionResultMetaV1" => Ok(Self::TransactionResultMetaV1), - "UpgradeEntryMeta" => Ok(Self::UpgradeEntryMeta), - "LedgerCloseMetaV0" => Ok(Self::LedgerCloseMetaV0), - "LedgerCloseMetaExtV1" => Ok(Self::LedgerCloseMetaExtV1), - "LedgerCloseMetaExt" => Ok(Self::LedgerCloseMetaExt), - "LedgerCloseMetaV1" => Ok(Self::LedgerCloseMetaV1), - "LedgerCloseMetaV2" => Ok(Self::LedgerCloseMetaV2), - "LedgerCloseMeta" => Ok(Self::LedgerCloseMeta), - "ErrorCode" => Ok(Self::ErrorCode), - "SError" => Ok(Self::SError), - "SendMore" => Ok(Self::SendMore), - "SendMoreExtended" => Ok(Self::SendMoreExtended), - "AuthCert" => Ok(Self::AuthCert), - "Hello" => Ok(Self::Hello), - "Auth" => Ok(Self::Auth), - "IpAddrType" => Ok(Self::IpAddrType), - "PeerAddress" => Ok(Self::PeerAddress), - "PeerAddressIp" => Ok(Self::PeerAddressIp), - "MessageType" => Ok(Self::MessageType), - "DontHave" => Ok(Self::DontHave), - "SurveyMessageCommandType" => Ok(Self::SurveyMessageCommandType), - "SurveyMessageResponseType" => Ok(Self::SurveyMessageResponseType), - "TimeSlicedSurveyStartCollectingMessage" => { - Ok(Self::TimeSlicedSurveyStartCollectingMessage) - } - "SignedTimeSlicedSurveyStartCollectingMessage" => { - Ok(Self::SignedTimeSlicedSurveyStartCollectingMessage) - } - "TimeSlicedSurveyStopCollectingMessage" => { - Ok(Self::TimeSlicedSurveyStopCollectingMessage) - } - "SignedTimeSlicedSurveyStopCollectingMessage" => { - Ok(Self::SignedTimeSlicedSurveyStopCollectingMessage) - } - "SurveyRequestMessage" => Ok(Self::SurveyRequestMessage), - "TimeSlicedSurveyRequestMessage" => Ok(Self::TimeSlicedSurveyRequestMessage), - "SignedTimeSlicedSurveyRequestMessage" => { - Ok(Self::SignedTimeSlicedSurveyRequestMessage) - } - "EncryptedBody" => Ok(Self::EncryptedBody), - "SurveyResponseMessage" => Ok(Self::SurveyResponseMessage), - "TimeSlicedSurveyResponseMessage" => Ok(Self::TimeSlicedSurveyResponseMessage), - "SignedTimeSlicedSurveyResponseMessage" => { - Ok(Self::SignedTimeSlicedSurveyResponseMessage) - } - "PeerStats" => Ok(Self::PeerStats), - "TimeSlicedNodeData" => Ok(Self::TimeSlicedNodeData), - "TimeSlicedPeerData" => Ok(Self::TimeSlicedPeerData), - "TimeSlicedPeerDataList" => Ok(Self::TimeSlicedPeerDataList), - "TopologyResponseBodyV2" => Ok(Self::TopologyResponseBodyV2), - "SurveyResponseBody" => Ok(Self::SurveyResponseBody), - "TxAdvertVector" => Ok(Self::TxAdvertVector), - "FloodAdvert" => Ok(Self::FloodAdvert), - "TxDemandVector" => Ok(Self::TxDemandVector), - "FloodDemand" => Ok(Self::FloodDemand), - "StellarMessage" => Ok(Self::StellarMessage), - "AuthenticatedMessage" => Ok(Self::AuthenticatedMessage), - "AuthenticatedMessageV0" => Ok(Self::AuthenticatedMessageV0), - "LiquidityPoolParameters" => Ok(Self::LiquidityPoolParameters), - "MuxedAccount" => Ok(Self::MuxedAccount), - "MuxedAccountMed25519" => Ok(Self::MuxedAccountMed25519), - "DecoratedSignature" => Ok(Self::DecoratedSignature), - "OperationType" => Ok(Self::OperationType), - "CreateAccountOp" => Ok(Self::CreateAccountOp), - "PaymentOp" => Ok(Self::PaymentOp), - "PathPaymentStrictReceiveOp" => Ok(Self::PathPaymentStrictReceiveOp), - "PathPaymentStrictSendOp" => Ok(Self::PathPaymentStrictSendOp), - "ManageSellOfferOp" => Ok(Self::ManageSellOfferOp), - "ManageBuyOfferOp" => Ok(Self::ManageBuyOfferOp), - "CreatePassiveSellOfferOp" => Ok(Self::CreatePassiveSellOfferOp), - "SetOptionsOp" => Ok(Self::SetOptionsOp), - "ChangeTrustAsset" => Ok(Self::ChangeTrustAsset), - "ChangeTrustOp" => Ok(Self::ChangeTrustOp), - "AllowTrustOp" => Ok(Self::AllowTrustOp), - "ManageDataOp" => Ok(Self::ManageDataOp), - "BumpSequenceOp" => Ok(Self::BumpSequenceOp), - "CreateClaimableBalanceOp" => Ok(Self::CreateClaimableBalanceOp), - "ClaimClaimableBalanceOp" => Ok(Self::ClaimClaimableBalanceOp), - "BeginSponsoringFutureReservesOp" => Ok(Self::BeginSponsoringFutureReservesOp), - "RevokeSponsorshipType" => Ok(Self::RevokeSponsorshipType), - "RevokeSponsorshipOp" => Ok(Self::RevokeSponsorshipOp), - "RevokeSponsorshipOpSigner" => Ok(Self::RevokeSponsorshipOpSigner), - "ClawbackOp" => Ok(Self::ClawbackOp), - "ClawbackClaimableBalanceOp" => Ok(Self::ClawbackClaimableBalanceOp), - "SetTrustLineFlagsOp" => Ok(Self::SetTrustLineFlagsOp), - "LiquidityPoolDepositOp" => Ok(Self::LiquidityPoolDepositOp), - "LiquidityPoolWithdrawOp" => Ok(Self::LiquidityPoolWithdrawOp), - "HostFunctionType" => Ok(Self::HostFunctionType), - "ContractIdPreimageType" => Ok(Self::ContractIdPreimageType), - "ContractIdPreimage" => Ok(Self::ContractIdPreimage), - "ContractIdPreimageFromAddress" => Ok(Self::ContractIdPreimageFromAddress), - "CreateContractArgs" => Ok(Self::CreateContractArgs), - "CreateContractArgsV2" => Ok(Self::CreateContractArgsV2), - "InvokeContractArgs" => Ok(Self::InvokeContractArgs), - "HostFunction" => Ok(Self::HostFunction), - "SorobanAuthorizedFunctionType" => Ok(Self::SorobanAuthorizedFunctionType), - "SorobanAuthorizedFunction" => Ok(Self::SorobanAuthorizedFunction), - "SorobanAuthorizedInvocation" => Ok(Self::SorobanAuthorizedInvocation), - "SorobanAddressCredentials" => Ok(Self::SorobanAddressCredentials), - "SorobanCredentialsType" => Ok(Self::SorobanCredentialsType), - "SorobanCredentials" => Ok(Self::SorobanCredentials), - "SorobanAuthorizationEntry" => Ok(Self::SorobanAuthorizationEntry), - "SorobanAuthorizationEntries" => Ok(Self::SorobanAuthorizationEntries), - "InvokeHostFunctionOp" => Ok(Self::InvokeHostFunctionOp), - "ExtendFootprintTtlOp" => Ok(Self::ExtendFootprintTtlOp), - "RestoreFootprintOp" => Ok(Self::RestoreFootprintOp), - "Operation" => Ok(Self::Operation), - "OperationBody" => Ok(Self::OperationBody), - "HashIdPreimage" => Ok(Self::HashIdPreimage), - "HashIdPreimageOperationId" => Ok(Self::HashIdPreimageOperationId), - "HashIdPreimageRevokeId" => Ok(Self::HashIdPreimageRevokeId), - "HashIdPreimageContractId" => Ok(Self::HashIdPreimageContractId), - "HashIdPreimageSorobanAuthorization" => Ok(Self::HashIdPreimageSorobanAuthorization), - "MemoType" => Ok(Self::MemoType), - "Memo" => Ok(Self::Memo), - "TimeBounds" => Ok(Self::TimeBounds), - "LedgerBounds" => Ok(Self::LedgerBounds), - "PreconditionsV2" => Ok(Self::PreconditionsV2), - "PreconditionType" => Ok(Self::PreconditionType), - "Preconditions" => Ok(Self::Preconditions), - "LedgerFootprint" => Ok(Self::LedgerFootprint), - "SorobanResources" => Ok(Self::SorobanResources), - "SorobanResourcesExtV0" => Ok(Self::SorobanResourcesExtV0), - "SorobanTransactionData" => Ok(Self::SorobanTransactionData), - "SorobanTransactionDataExt" => Ok(Self::SorobanTransactionDataExt), - "TransactionV0" => Ok(Self::TransactionV0), - "TransactionV0Ext" => Ok(Self::TransactionV0Ext), - "TransactionV0Envelope" => Ok(Self::TransactionV0Envelope), - "Transaction" => Ok(Self::Transaction), - "TransactionExt" => Ok(Self::TransactionExt), - "TransactionV1Envelope" => Ok(Self::TransactionV1Envelope), - "FeeBumpTransaction" => Ok(Self::FeeBumpTransaction), - "FeeBumpTransactionInnerTx" => Ok(Self::FeeBumpTransactionInnerTx), - "FeeBumpTransactionExt" => Ok(Self::FeeBumpTransactionExt), - "FeeBumpTransactionEnvelope" => Ok(Self::FeeBumpTransactionEnvelope), - "TransactionEnvelope" => Ok(Self::TransactionEnvelope), - "TransactionSignaturePayload" => Ok(Self::TransactionSignaturePayload), - "TransactionSignaturePayloadTaggedTransaction" => { - Ok(Self::TransactionSignaturePayloadTaggedTransaction) - } - "ClaimAtomType" => Ok(Self::ClaimAtomType), - "ClaimOfferAtomV0" => Ok(Self::ClaimOfferAtomV0), - "ClaimOfferAtom" => Ok(Self::ClaimOfferAtom), - "ClaimLiquidityAtom" => Ok(Self::ClaimLiquidityAtom), - "ClaimAtom" => Ok(Self::ClaimAtom), - "CreateAccountResultCode" => Ok(Self::CreateAccountResultCode), - "CreateAccountResult" => Ok(Self::CreateAccountResult), - "PaymentResultCode" => Ok(Self::PaymentResultCode), - "PaymentResult" => Ok(Self::PaymentResult), - "PathPaymentStrictReceiveResultCode" => Ok(Self::PathPaymentStrictReceiveResultCode), - "SimplePaymentResult" => Ok(Self::SimplePaymentResult), - "PathPaymentStrictReceiveResult" => Ok(Self::PathPaymentStrictReceiveResult), - "PathPaymentStrictReceiveResultSuccess" => { - Ok(Self::PathPaymentStrictReceiveResultSuccess) - } - "PathPaymentStrictSendResultCode" => Ok(Self::PathPaymentStrictSendResultCode), - "PathPaymentStrictSendResult" => Ok(Self::PathPaymentStrictSendResult), - "PathPaymentStrictSendResultSuccess" => Ok(Self::PathPaymentStrictSendResultSuccess), - "ManageSellOfferResultCode" => Ok(Self::ManageSellOfferResultCode), - "ManageOfferEffect" => Ok(Self::ManageOfferEffect), - "ManageOfferSuccessResult" => Ok(Self::ManageOfferSuccessResult), - "ManageOfferSuccessResultOffer" => Ok(Self::ManageOfferSuccessResultOffer), - "ManageSellOfferResult" => Ok(Self::ManageSellOfferResult), - "ManageBuyOfferResultCode" => Ok(Self::ManageBuyOfferResultCode), - "ManageBuyOfferResult" => Ok(Self::ManageBuyOfferResult), - "SetOptionsResultCode" => Ok(Self::SetOptionsResultCode), - "SetOptionsResult" => Ok(Self::SetOptionsResult), - "ChangeTrustResultCode" => Ok(Self::ChangeTrustResultCode), - "ChangeTrustResult" => Ok(Self::ChangeTrustResult), - "AllowTrustResultCode" => Ok(Self::AllowTrustResultCode), - "AllowTrustResult" => Ok(Self::AllowTrustResult), - "AccountMergeResultCode" => Ok(Self::AccountMergeResultCode), - "AccountMergeResult" => Ok(Self::AccountMergeResult), - "InflationResultCode" => Ok(Self::InflationResultCode), - "InflationPayout" => Ok(Self::InflationPayout), - "InflationResult" => Ok(Self::InflationResult), - "ManageDataResultCode" => Ok(Self::ManageDataResultCode), - "ManageDataResult" => Ok(Self::ManageDataResult), - "BumpSequenceResultCode" => Ok(Self::BumpSequenceResultCode), - "BumpSequenceResult" => Ok(Self::BumpSequenceResult), - "CreateClaimableBalanceResultCode" => Ok(Self::CreateClaimableBalanceResultCode), - "CreateClaimableBalanceResult" => Ok(Self::CreateClaimableBalanceResult), - "ClaimClaimableBalanceResultCode" => Ok(Self::ClaimClaimableBalanceResultCode), - "ClaimClaimableBalanceResult" => Ok(Self::ClaimClaimableBalanceResult), - "BeginSponsoringFutureReservesResultCode" => { - Ok(Self::BeginSponsoringFutureReservesResultCode) - } - "BeginSponsoringFutureReservesResult" => Ok(Self::BeginSponsoringFutureReservesResult), - "EndSponsoringFutureReservesResultCode" => { - Ok(Self::EndSponsoringFutureReservesResultCode) - } - "EndSponsoringFutureReservesResult" => Ok(Self::EndSponsoringFutureReservesResult), - "RevokeSponsorshipResultCode" => Ok(Self::RevokeSponsorshipResultCode), - "RevokeSponsorshipResult" => Ok(Self::RevokeSponsorshipResult), - "ClawbackResultCode" => Ok(Self::ClawbackResultCode), - "ClawbackResult" => Ok(Self::ClawbackResult), - "ClawbackClaimableBalanceResultCode" => Ok(Self::ClawbackClaimableBalanceResultCode), - "ClawbackClaimableBalanceResult" => Ok(Self::ClawbackClaimableBalanceResult), - "SetTrustLineFlagsResultCode" => Ok(Self::SetTrustLineFlagsResultCode), - "SetTrustLineFlagsResult" => Ok(Self::SetTrustLineFlagsResult), - "LiquidityPoolDepositResultCode" => Ok(Self::LiquidityPoolDepositResultCode), - "LiquidityPoolDepositResult" => Ok(Self::LiquidityPoolDepositResult), - "LiquidityPoolWithdrawResultCode" => Ok(Self::LiquidityPoolWithdrawResultCode), - "LiquidityPoolWithdrawResult" => Ok(Self::LiquidityPoolWithdrawResult), - "InvokeHostFunctionResultCode" => Ok(Self::InvokeHostFunctionResultCode), - "InvokeHostFunctionResult" => Ok(Self::InvokeHostFunctionResult), - "ExtendFootprintTtlResultCode" => Ok(Self::ExtendFootprintTtlResultCode), - "ExtendFootprintTtlResult" => Ok(Self::ExtendFootprintTtlResult), - "RestoreFootprintResultCode" => Ok(Self::RestoreFootprintResultCode), - "RestoreFootprintResult" => Ok(Self::RestoreFootprintResult), - "OperationResultCode" => Ok(Self::OperationResultCode), - "OperationResult" => Ok(Self::OperationResult), - "OperationResultTr" => Ok(Self::OperationResultTr), - "TransactionResultCode" => Ok(Self::TransactionResultCode), - "InnerTransactionResult" => Ok(Self::InnerTransactionResult), - "InnerTransactionResultResult" => Ok(Self::InnerTransactionResultResult), - "InnerTransactionResultExt" => Ok(Self::InnerTransactionResultExt), - "InnerTransactionResultPair" => Ok(Self::InnerTransactionResultPair), - "TransactionResult" => Ok(Self::TransactionResult), - "TransactionResultResult" => Ok(Self::TransactionResultResult), - "TransactionResultExt" => Ok(Self::TransactionResultExt), - "Hash" => Ok(Self::Hash), - "Uint256" => Ok(Self::Uint256), - "Uint32" => Ok(Self::Uint32), - "Int32" => Ok(Self::Int32), - "Uint64" => Ok(Self::Uint64), - "Int64" => Ok(Self::Int64), - "TimePoint" => Ok(Self::TimePoint), - "Duration" => Ok(Self::Duration), - "ExtensionPoint" => Ok(Self::ExtensionPoint), - "CryptoKeyType" => Ok(Self::CryptoKeyType), - "PublicKeyType" => Ok(Self::PublicKeyType), - "SignerKeyType" => Ok(Self::SignerKeyType), - "PublicKey" => Ok(Self::PublicKey), - "SignerKey" => Ok(Self::SignerKey), - "SignerKeyEd25519SignedPayload" => Ok(Self::SignerKeyEd25519SignedPayload), - "Signature" => Ok(Self::Signature), - "SignatureHint" => Ok(Self::SignatureHint), - "NodeId" => Ok(Self::NodeId), - "AccountId" => Ok(Self::AccountId), - "ContractId" => Ok(Self::ContractId), - "Curve25519Secret" => Ok(Self::Curve25519Secret), - "Curve25519Public" => Ok(Self::Curve25519Public), - "HmacSha256Key" => Ok(Self::HmacSha256Key), - "HmacSha256Mac" => Ok(Self::HmacSha256Mac), - "ShortHashSeed" => Ok(Self::ShortHashSeed), - "BinaryFuseFilterType" => Ok(Self::BinaryFuseFilterType), - "SerializedBinaryFuseFilter" => Ok(Self::SerializedBinaryFuseFilter), - "PoolId" => Ok(Self::PoolId), - "ClaimableBalanceIdType" => Ok(Self::ClaimableBalanceIdType), - "ClaimableBalanceId" => Ok(Self::ClaimableBalanceId), - _ => Err(Error::Invalid), - } - } -} - -#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] -#[cfg_attr( - all(feature = "serde", feature = "alloc"), - derive(serde::Serialize, serde::Deserialize), - serde(rename_all = "snake_case"), - serde(untagged) -)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -pub enum Type { - Value(Box), - ScpBallot(Box), - ScpStatementType(Box), - ScpNomination(Box), - ScpStatement(Box), - ScpStatementPledges(Box), - ScpStatementPrepare(Box), - ScpStatementConfirm(Box), - ScpStatementExternalize(Box), - ScpEnvelope(Box), - ScpQuorumSet(Box), - EncodedLedgerKey(Box), - ConfigSettingContractExecutionLanesV0(Box), - ConfigSettingContractComputeV0(Box), - ConfigSettingContractParallelComputeV0(Box), - ConfigSettingContractLedgerCostV0(Box), - ConfigSettingContractLedgerCostExtV0(Box), - ConfigSettingContractHistoricalDataV0(Box), - ConfigSettingContractEventsV0(Box), - ConfigSettingContractBandwidthV0(Box), - ContractCostType(Box), - ContractCostParamEntry(Box), - StateArchivalSettings(Box), - EvictionIterator(Box), - ConfigSettingScpTiming(Box), - FrozenLedgerKeys(Box), - FrozenLedgerKeysDelta(Box), - FreezeBypassTxs(Box), - FreezeBypassTxsDelta(Box), - ContractCostParams(Box), - ConfigSettingId(Box), - ConfigSettingEntry(Box), - ScEnvMetaKind(Box), - ScEnvMetaEntry(Box), - ScEnvMetaEntryInterfaceVersion(Box), - ScMetaV0(Box), - ScMetaKind(Box), - ScMetaEntry(Box), - ScSpecType(Box), - ScSpecTypeOption(Box), - ScSpecTypeResult(Box), - ScSpecTypeVec(Box), - ScSpecTypeMap(Box), - ScSpecTypeTuple(Box), - ScSpecTypeBytesN(Box), - ScSpecTypeUdt(Box), - ScSpecTypeDef(Box), - ScSpecUdtStructFieldV0(Box), - ScSpecUdtStructV0(Box), - ScSpecUdtUnionCaseVoidV0(Box), - ScSpecUdtUnionCaseTupleV0(Box), - ScSpecUdtUnionCaseV0Kind(Box), - ScSpecUdtUnionCaseV0(Box), - ScSpecUdtUnionV0(Box), - ScSpecUdtEnumCaseV0(Box), - ScSpecUdtEnumV0(Box), - ScSpecUdtErrorEnumCaseV0(Box), - ScSpecUdtErrorEnumV0(Box), - ScSpecFunctionInputV0(Box), - ScSpecFunctionV0(Box), - ScSpecEventParamLocationV0(Box), - ScSpecEventParamV0(Box), - ScSpecEventDataFormat(Box), - ScSpecEventV0(Box), - ScSpecEntryKind(Box), - ScSpecEntry(Box), - ScValType(Box), - ScErrorType(Box), - ScErrorCode(Box), - ScError(Box), - UInt128Parts(Box), - Int128Parts(Box), - UInt256Parts(Box), - Int256Parts(Box), - ContractExecutableType(Box), - ContractExecutable(Box), - ScAddressType(Box), - MuxedEd25519Account(Box), - ScAddress(Box), - ScVec(Box), - ScMap(Box), - ScBytes(Box), - ScString(Box), - ScSymbol(Box), - ScNonceKey(Box), - ScContractInstance(Box), - ScVal(Box), - ScMapEntry(Box), - LedgerCloseMetaBatch(Box), - StoredTransactionSet(Box), - StoredDebugTransactionSet(Box), - PersistedScpStateV0(Box), - PersistedScpStateV1(Box), - PersistedScpState(Box), - Thresholds(Box), - String32(Box), - String64(Box), - SequenceNumber(Box), - DataValue(Box), - AssetCode4(Box), - AssetCode12(Box), - AssetType(Box), - AssetCode(Box), - AlphaNum4(Box), - AlphaNum12(Box), - Asset(Box), - Price(Box), - Liabilities(Box), - ThresholdIndexes(Box), - LedgerEntryType(Box), - Signer(Box), - AccountFlags(Box), - SponsorshipDescriptor(Box), - AccountEntryExtensionV3(Box), - AccountEntryExtensionV2(Box), - AccountEntryExtensionV2Ext(Box), - AccountEntryExtensionV1(Box), - AccountEntryExtensionV1Ext(Box), - AccountEntry(Box), - AccountEntryExt(Box), - TrustLineFlags(Box), - LiquidityPoolType(Box), - TrustLineAsset(Box), - TrustLineEntryExtensionV2(Box), - TrustLineEntryExtensionV2Ext(Box), - TrustLineEntry(Box), - TrustLineEntryExt(Box), - TrustLineEntryV1(Box), - TrustLineEntryV1Ext(Box), - OfferEntryFlags(Box), - OfferEntry(Box), - OfferEntryExt(Box), - DataEntry(Box), - DataEntryExt(Box), - ClaimPredicateType(Box), - ClaimPredicate(Box), - ClaimantType(Box), - Claimant(Box), - ClaimantV0(Box), - ClaimableBalanceFlags(Box), - ClaimableBalanceEntryExtensionV1(Box), - ClaimableBalanceEntryExtensionV1Ext(Box), - ClaimableBalanceEntry(Box), - ClaimableBalanceEntryExt(Box), - LiquidityPoolConstantProductParameters(Box), - LiquidityPoolEntry(Box), - LiquidityPoolEntryBody(Box), - LiquidityPoolEntryConstantProduct(Box), - ContractDataDurability(Box), - ContractDataEntry(Box), - ContractCodeCostInputs(Box), - ContractCodeEntry(Box), - ContractCodeEntryExt(Box), - ContractCodeEntryV1(Box), - TtlEntry(Box), - LedgerEntryExtensionV1(Box), - LedgerEntryExtensionV1Ext(Box), - LedgerEntry(Box), - LedgerEntryData(Box), - LedgerEntryExt(Box), - LedgerKey(Box), - LedgerKeyAccount(Box), - LedgerKeyTrustLine(Box), - LedgerKeyOffer(Box), - LedgerKeyData(Box), - LedgerKeyClaimableBalance(Box), - LedgerKeyLiquidityPool(Box), - LedgerKeyContractData(Box), - LedgerKeyContractCode(Box), - LedgerKeyConfigSetting(Box), - LedgerKeyTtl(Box), - EnvelopeType(Box), - BucketListType(Box), - BucketEntryType(Box), - HotArchiveBucketEntryType(Box), - BucketMetadata(Box), - BucketMetadataExt(Box), - BucketEntry(Box), - HotArchiveBucketEntry(Box), - UpgradeType(Box), - StellarValueType(Box), - LedgerCloseValueSignature(Box), - StellarValue(Box), - StellarValueExt(Box), - LedgerHeaderFlags(Box), - LedgerHeaderExtensionV1(Box), - LedgerHeaderExtensionV1Ext(Box), - LedgerHeader(Box), - LedgerHeaderExt(Box), - LedgerUpgradeType(Box), - ConfigUpgradeSetKey(Box), - LedgerUpgrade(Box), - ConfigUpgradeSet(Box), - TxSetComponentType(Box), - DependentTxCluster(Box), - ParallelTxExecutionStage(Box), - ParallelTxsComponent(Box), - TxSetComponent(Box), - TxSetComponentTxsMaybeDiscountedFee(Box), - TransactionPhase(Box), - TransactionSet(Box), - TransactionSetV1(Box), - GeneralizedTransactionSet(Box), - TransactionResultPair(Box), - TransactionResultSet(Box), - TransactionHistoryEntry(Box), - TransactionHistoryEntryExt(Box), - TransactionHistoryResultEntry(Box), - TransactionHistoryResultEntryExt(Box), - LedgerHeaderHistoryEntry(Box), - LedgerHeaderHistoryEntryExt(Box), - LedgerScpMessages(Box), - ScpHistoryEntryV0(Box), - ScpHistoryEntry(Box), - LedgerEntryChangeType(Box), - LedgerEntryChange(Box), - LedgerEntryChanges(Box), - OperationMeta(Box), - TransactionMetaV1(Box), - TransactionMetaV2(Box), - ContractEventType(Box), - ContractEvent(Box), - ContractEventBody(Box), - ContractEventV0(Box), - DiagnosticEvent(Box), - SorobanTransactionMetaExtV1(Box), - SorobanTransactionMetaExt(Box), - SorobanTransactionMeta(Box), - TransactionMetaV3(Box), - OperationMetaV2(Box), - SorobanTransactionMetaV2(Box), - TransactionEventStage(Box), - TransactionEvent(Box), - TransactionMetaV4(Box), - InvokeHostFunctionSuccessPreImage(Box), - TransactionMeta(Box), - TransactionResultMeta(Box), - TransactionResultMetaV1(Box), - UpgradeEntryMeta(Box), - LedgerCloseMetaV0(Box), - LedgerCloseMetaExtV1(Box), - LedgerCloseMetaExt(Box), - LedgerCloseMetaV1(Box), - LedgerCloseMetaV2(Box), - LedgerCloseMeta(Box), - ErrorCode(Box), - SError(Box), - SendMore(Box), - SendMoreExtended(Box), - AuthCert(Box), - Hello(Box), - Auth(Box), - IpAddrType(Box), - PeerAddress(Box), - PeerAddressIp(Box), - MessageType(Box), - DontHave(Box), - SurveyMessageCommandType(Box), - SurveyMessageResponseType(Box), - TimeSlicedSurveyStartCollectingMessage(Box), - SignedTimeSlicedSurveyStartCollectingMessage(Box), - TimeSlicedSurveyStopCollectingMessage(Box), - SignedTimeSlicedSurveyStopCollectingMessage(Box), - SurveyRequestMessage(Box), - TimeSlicedSurveyRequestMessage(Box), - SignedTimeSlicedSurveyRequestMessage(Box), - EncryptedBody(Box), - SurveyResponseMessage(Box), - TimeSlicedSurveyResponseMessage(Box), - SignedTimeSlicedSurveyResponseMessage(Box), - PeerStats(Box), - TimeSlicedNodeData(Box), - TimeSlicedPeerData(Box), - TimeSlicedPeerDataList(Box), - TopologyResponseBodyV2(Box), - SurveyResponseBody(Box), - TxAdvertVector(Box), - FloodAdvert(Box), - TxDemandVector(Box), - FloodDemand(Box), - StellarMessage(Box), - AuthenticatedMessage(Box), - AuthenticatedMessageV0(Box), - LiquidityPoolParameters(Box), - MuxedAccount(Box), - MuxedAccountMed25519(Box), - DecoratedSignature(Box), - OperationType(Box), - CreateAccountOp(Box), - PaymentOp(Box), - PathPaymentStrictReceiveOp(Box), - PathPaymentStrictSendOp(Box), - ManageSellOfferOp(Box), - ManageBuyOfferOp(Box), - CreatePassiveSellOfferOp(Box), - SetOptionsOp(Box), - ChangeTrustAsset(Box), - ChangeTrustOp(Box), - AllowTrustOp(Box), - ManageDataOp(Box), - BumpSequenceOp(Box), - CreateClaimableBalanceOp(Box), - ClaimClaimableBalanceOp(Box), - BeginSponsoringFutureReservesOp(Box), - RevokeSponsorshipType(Box), - RevokeSponsorshipOp(Box), - RevokeSponsorshipOpSigner(Box), - ClawbackOp(Box), - ClawbackClaimableBalanceOp(Box), - SetTrustLineFlagsOp(Box), - LiquidityPoolDepositOp(Box), - LiquidityPoolWithdrawOp(Box), - HostFunctionType(Box), - ContractIdPreimageType(Box), - ContractIdPreimage(Box), - ContractIdPreimageFromAddress(Box), - CreateContractArgs(Box), - CreateContractArgsV2(Box), - InvokeContractArgs(Box), - HostFunction(Box), - SorobanAuthorizedFunctionType(Box), - SorobanAuthorizedFunction(Box), - SorobanAuthorizedInvocation(Box), - SorobanAddressCredentials(Box), - SorobanCredentialsType(Box), - SorobanCredentials(Box), - SorobanAuthorizationEntry(Box), - SorobanAuthorizationEntries(Box), - InvokeHostFunctionOp(Box), - ExtendFootprintTtlOp(Box), - RestoreFootprintOp(Box), - Operation(Box), - OperationBody(Box), - HashIdPreimage(Box), - HashIdPreimageOperationId(Box), - HashIdPreimageRevokeId(Box), - HashIdPreimageContractId(Box), - HashIdPreimageSorobanAuthorization(Box), - MemoType(Box), - Memo(Box), - TimeBounds(Box), - LedgerBounds(Box), - PreconditionsV2(Box), - PreconditionType(Box), - Preconditions(Box), - LedgerFootprint(Box), - SorobanResources(Box), - SorobanResourcesExtV0(Box), - SorobanTransactionData(Box), - SorobanTransactionDataExt(Box), - TransactionV0(Box), - TransactionV0Ext(Box), - TransactionV0Envelope(Box), - Transaction(Box), - TransactionExt(Box), - TransactionV1Envelope(Box), - FeeBumpTransaction(Box), - FeeBumpTransactionInnerTx(Box), - FeeBumpTransactionExt(Box), - FeeBumpTransactionEnvelope(Box), - TransactionEnvelope(Box), - TransactionSignaturePayload(Box), - TransactionSignaturePayloadTaggedTransaction(Box), - ClaimAtomType(Box), - ClaimOfferAtomV0(Box), - ClaimOfferAtom(Box), - ClaimLiquidityAtom(Box), - ClaimAtom(Box), - CreateAccountResultCode(Box), - CreateAccountResult(Box), - PaymentResultCode(Box), - PaymentResult(Box), - PathPaymentStrictReceiveResultCode(Box), - SimplePaymentResult(Box), - PathPaymentStrictReceiveResult(Box), - PathPaymentStrictReceiveResultSuccess(Box), - PathPaymentStrictSendResultCode(Box), - PathPaymentStrictSendResult(Box), - PathPaymentStrictSendResultSuccess(Box), - ManageSellOfferResultCode(Box), - ManageOfferEffect(Box), - ManageOfferSuccessResult(Box), - ManageOfferSuccessResultOffer(Box), - ManageSellOfferResult(Box), - ManageBuyOfferResultCode(Box), - ManageBuyOfferResult(Box), - SetOptionsResultCode(Box), - SetOptionsResult(Box), - ChangeTrustResultCode(Box), - ChangeTrustResult(Box), - AllowTrustResultCode(Box), - AllowTrustResult(Box), - AccountMergeResultCode(Box), - AccountMergeResult(Box), - InflationResultCode(Box), - InflationPayout(Box), - InflationResult(Box), - ManageDataResultCode(Box), - ManageDataResult(Box), - BumpSequenceResultCode(Box), - BumpSequenceResult(Box), - CreateClaimableBalanceResultCode(Box), - CreateClaimableBalanceResult(Box), - ClaimClaimableBalanceResultCode(Box), - ClaimClaimableBalanceResult(Box), - BeginSponsoringFutureReservesResultCode(Box), - BeginSponsoringFutureReservesResult(Box), - EndSponsoringFutureReservesResultCode(Box), - EndSponsoringFutureReservesResult(Box), - RevokeSponsorshipResultCode(Box), - RevokeSponsorshipResult(Box), - ClawbackResultCode(Box), - ClawbackResult(Box), - ClawbackClaimableBalanceResultCode(Box), - ClawbackClaimableBalanceResult(Box), - SetTrustLineFlagsResultCode(Box), - SetTrustLineFlagsResult(Box), - LiquidityPoolDepositResultCode(Box), - LiquidityPoolDepositResult(Box), - LiquidityPoolWithdrawResultCode(Box), - LiquidityPoolWithdrawResult(Box), - InvokeHostFunctionResultCode(Box), - InvokeHostFunctionResult(Box), - ExtendFootprintTtlResultCode(Box), - ExtendFootprintTtlResult(Box), - RestoreFootprintResultCode(Box), - RestoreFootprintResult(Box), - OperationResultCode(Box), - OperationResult(Box), - OperationResultTr(Box), - TransactionResultCode(Box), - InnerTransactionResult(Box), - InnerTransactionResultResult(Box), - InnerTransactionResultExt(Box), - InnerTransactionResultPair(Box), - TransactionResult(Box), - TransactionResultResult(Box), - TransactionResultExt(Box), - Hash(Box), - Uint256(Box), - Uint32(Box), - Int32(Box), - Uint64(Box), - Int64(Box), - TimePoint(Box), - Duration(Box), - ExtensionPoint(Box), - CryptoKeyType(Box), - PublicKeyType(Box), - SignerKeyType(Box), - PublicKey(Box), - SignerKey(Box), - SignerKeyEd25519SignedPayload(Box), - Signature(Box), - SignatureHint(Box), - NodeId(Box), - AccountId(Box), - ContractId(Box), - Curve25519Secret(Box), - Curve25519Public(Box), - HmacSha256Key(Box), - HmacSha256Mac(Box), - ShortHashSeed(Box), - BinaryFuseFilterType(Box), - SerializedBinaryFuseFilter(Box), - PoolId(Box), - ClaimableBalanceIdType(Box), - ClaimableBalanceId(Box), -} - -impl Type { - const _VARIANTS: &[TypeVariant] = &[ - TypeVariant::Value, - TypeVariant::ScpBallot, - TypeVariant::ScpStatementType, - TypeVariant::ScpNomination, - TypeVariant::ScpStatement, - TypeVariant::ScpStatementPledges, - TypeVariant::ScpStatementPrepare, - TypeVariant::ScpStatementConfirm, - TypeVariant::ScpStatementExternalize, - TypeVariant::ScpEnvelope, - TypeVariant::ScpQuorumSet, - TypeVariant::EncodedLedgerKey, - TypeVariant::ConfigSettingContractExecutionLanesV0, - TypeVariant::ConfigSettingContractComputeV0, - TypeVariant::ConfigSettingContractParallelComputeV0, - TypeVariant::ConfigSettingContractLedgerCostV0, - TypeVariant::ConfigSettingContractLedgerCostExtV0, - TypeVariant::ConfigSettingContractHistoricalDataV0, - TypeVariant::ConfigSettingContractEventsV0, - TypeVariant::ConfigSettingContractBandwidthV0, - TypeVariant::ContractCostType, - TypeVariant::ContractCostParamEntry, - TypeVariant::StateArchivalSettings, - TypeVariant::EvictionIterator, - TypeVariant::ConfigSettingScpTiming, - TypeVariant::FrozenLedgerKeys, - TypeVariant::FrozenLedgerKeysDelta, - TypeVariant::FreezeBypassTxs, - TypeVariant::FreezeBypassTxsDelta, - TypeVariant::ContractCostParams, - TypeVariant::ConfigSettingId, - TypeVariant::ConfigSettingEntry, - TypeVariant::ScEnvMetaKind, - TypeVariant::ScEnvMetaEntry, - TypeVariant::ScEnvMetaEntryInterfaceVersion, - TypeVariant::ScMetaV0, - TypeVariant::ScMetaKind, - TypeVariant::ScMetaEntry, - TypeVariant::ScSpecType, - TypeVariant::ScSpecTypeOption, - TypeVariant::ScSpecTypeResult, - TypeVariant::ScSpecTypeVec, - TypeVariant::ScSpecTypeMap, - TypeVariant::ScSpecTypeTuple, - TypeVariant::ScSpecTypeBytesN, - TypeVariant::ScSpecTypeUdt, - TypeVariant::ScSpecTypeDef, - TypeVariant::ScSpecUdtStructFieldV0, - TypeVariant::ScSpecUdtStructV0, - TypeVariant::ScSpecUdtUnionCaseVoidV0, - TypeVariant::ScSpecUdtUnionCaseTupleV0, - TypeVariant::ScSpecUdtUnionCaseV0Kind, - TypeVariant::ScSpecUdtUnionCaseV0, - TypeVariant::ScSpecUdtUnionV0, - TypeVariant::ScSpecUdtEnumCaseV0, - TypeVariant::ScSpecUdtEnumV0, - TypeVariant::ScSpecUdtErrorEnumCaseV0, - TypeVariant::ScSpecUdtErrorEnumV0, - TypeVariant::ScSpecFunctionInputV0, - TypeVariant::ScSpecFunctionV0, - TypeVariant::ScSpecEventParamLocationV0, - TypeVariant::ScSpecEventParamV0, - TypeVariant::ScSpecEventDataFormat, - TypeVariant::ScSpecEventV0, - TypeVariant::ScSpecEntryKind, - TypeVariant::ScSpecEntry, - TypeVariant::ScValType, - TypeVariant::ScErrorType, - TypeVariant::ScErrorCode, - TypeVariant::ScError, - TypeVariant::UInt128Parts, - TypeVariant::Int128Parts, - TypeVariant::UInt256Parts, - TypeVariant::Int256Parts, - TypeVariant::ContractExecutableType, - TypeVariant::ContractExecutable, - TypeVariant::ScAddressType, - TypeVariant::MuxedEd25519Account, - TypeVariant::ScAddress, - TypeVariant::ScVec, - TypeVariant::ScMap, - TypeVariant::ScBytes, - TypeVariant::ScString, - TypeVariant::ScSymbol, - TypeVariant::ScNonceKey, - TypeVariant::ScContractInstance, - TypeVariant::ScVal, - TypeVariant::ScMapEntry, - TypeVariant::LedgerCloseMetaBatch, - TypeVariant::StoredTransactionSet, - TypeVariant::StoredDebugTransactionSet, - TypeVariant::PersistedScpStateV0, - TypeVariant::PersistedScpStateV1, - TypeVariant::PersistedScpState, - TypeVariant::Thresholds, - TypeVariant::String32, - TypeVariant::String64, - TypeVariant::SequenceNumber, - TypeVariant::DataValue, - TypeVariant::AssetCode4, - TypeVariant::AssetCode12, - TypeVariant::AssetType, - TypeVariant::AssetCode, - TypeVariant::AlphaNum4, - TypeVariant::AlphaNum12, - TypeVariant::Asset, - TypeVariant::Price, - TypeVariant::Liabilities, - TypeVariant::ThresholdIndexes, - TypeVariant::LedgerEntryType, - TypeVariant::Signer, - TypeVariant::AccountFlags, - TypeVariant::SponsorshipDescriptor, - TypeVariant::AccountEntryExtensionV3, - TypeVariant::AccountEntryExtensionV2, - TypeVariant::AccountEntryExtensionV2Ext, - TypeVariant::AccountEntryExtensionV1, - TypeVariant::AccountEntryExtensionV1Ext, - TypeVariant::AccountEntry, - TypeVariant::AccountEntryExt, - TypeVariant::TrustLineFlags, - TypeVariant::LiquidityPoolType, - TypeVariant::TrustLineAsset, - TypeVariant::TrustLineEntryExtensionV2, - TypeVariant::TrustLineEntryExtensionV2Ext, - TypeVariant::TrustLineEntry, - TypeVariant::TrustLineEntryExt, - TypeVariant::TrustLineEntryV1, - TypeVariant::TrustLineEntryV1Ext, - TypeVariant::OfferEntryFlags, - TypeVariant::OfferEntry, - TypeVariant::OfferEntryExt, - TypeVariant::DataEntry, - TypeVariant::DataEntryExt, - TypeVariant::ClaimPredicateType, - TypeVariant::ClaimPredicate, - TypeVariant::ClaimantType, - TypeVariant::Claimant, - TypeVariant::ClaimantV0, - TypeVariant::ClaimableBalanceFlags, - TypeVariant::ClaimableBalanceEntryExtensionV1, - TypeVariant::ClaimableBalanceEntryExtensionV1Ext, - TypeVariant::ClaimableBalanceEntry, - TypeVariant::ClaimableBalanceEntryExt, - TypeVariant::LiquidityPoolConstantProductParameters, - TypeVariant::LiquidityPoolEntry, - TypeVariant::LiquidityPoolEntryBody, - TypeVariant::LiquidityPoolEntryConstantProduct, - TypeVariant::ContractDataDurability, - TypeVariant::ContractDataEntry, - TypeVariant::ContractCodeCostInputs, - TypeVariant::ContractCodeEntry, - TypeVariant::ContractCodeEntryExt, - TypeVariant::ContractCodeEntryV1, - TypeVariant::TtlEntry, - TypeVariant::LedgerEntryExtensionV1, - TypeVariant::LedgerEntryExtensionV1Ext, - TypeVariant::LedgerEntry, - TypeVariant::LedgerEntryData, - TypeVariant::LedgerEntryExt, - TypeVariant::LedgerKey, - TypeVariant::LedgerKeyAccount, - TypeVariant::LedgerKeyTrustLine, - TypeVariant::LedgerKeyOffer, - TypeVariant::LedgerKeyData, - TypeVariant::LedgerKeyClaimableBalance, - TypeVariant::LedgerKeyLiquidityPool, - TypeVariant::LedgerKeyContractData, - TypeVariant::LedgerKeyContractCode, - TypeVariant::LedgerKeyConfigSetting, - TypeVariant::LedgerKeyTtl, - TypeVariant::EnvelopeType, - TypeVariant::BucketListType, - TypeVariant::BucketEntryType, - TypeVariant::HotArchiveBucketEntryType, - TypeVariant::BucketMetadata, - TypeVariant::BucketMetadataExt, - TypeVariant::BucketEntry, - TypeVariant::HotArchiveBucketEntry, - TypeVariant::UpgradeType, - TypeVariant::StellarValueType, - TypeVariant::LedgerCloseValueSignature, - TypeVariant::StellarValue, - TypeVariant::StellarValueExt, - TypeVariant::LedgerHeaderFlags, - TypeVariant::LedgerHeaderExtensionV1, - TypeVariant::LedgerHeaderExtensionV1Ext, - TypeVariant::LedgerHeader, - TypeVariant::LedgerHeaderExt, - TypeVariant::LedgerUpgradeType, - TypeVariant::ConfigUpgradeSetKey, - TypeVariant::LedgerUpgrade, - TypeVariant::ConfigUpgradeSet, - TypeVariant::TxSetComponentType, - TypeVariant::DependentTxCluster, - TypeVariant::ParallelTxExecutionStage, - TypeVariant::ParallelTxsComponent, - TypeVariant::TxSetComponent, - TypeVariant::TxSetComponentTxsMaybeDiscountedFee, - TypeVariant::TransactionPhase, - TypeVariant::TransactionSet, - TypeVariant::TransactionSetV1, - TypeVariant::GeneralizedTransactionSet, - TypeVariant::TransactionResultPair, - TypeVariant::TransactionResultSet, - TypeVariant::TransactionHistoryEntry, - TypeVariant::TransactionHistoryEntryExt, - TypeVariant::TransactionHistoryResultEntry, - TypeVariant::TransactionHistoryResultEntryExt, - TypeVariant::LedgerHeaderHistoryEntry, - TypeVariant::LedgerHeaderHistoryEntryExt, - TypeVariant::LedgerScpMessages, - TypeVariant::ScpHistoryEntryV0, - TypeVariant::ScpHistoryEntry, - TypeVariant::LedgerEntryChangeType, - TypeVariant::LedgerEntryChange, - TypeVariant::LedgerEntryChanges, - TypeVariant::OperationMeta, - TypeVariant::TransactionMetaV1, - TypeVariant::TransactionMetaV2, - TypeVariant::ContractEventType, - TypeVariant::ContractEvent, - TypeVariant::ContractEventBody, - TypeVariant::ContractEventV0, - TypeVariant::DiagnosticEvent, - TypeVariant::SorobanTransactionMetaExtV1, - TypeVariant::SorobanTransactionMetaExt, - TypeVariant::SorobanTransactionMeta, - TypeVariant::TransactionMetaV3, - TypeVariant::OperationMetaV2, - TypeVariant::SorobanTransactionMetaV2, - TypeVariant::TransactionEventStage, - TypeVariant::TransactionEvent, - TypeVariant::TransactionMetaV4, - TypeVariant::InvokeHostFunctionSuccessPreImage, - TypeVariant::TransactionMeta, - TypeVariant::TransactionResultMeta, - TypeVariant::TransactionResultMetaV1, - TypeVariant::UpgradeEntryMeta, - TypeVariant::LedgerCloseMetaV0, - TypeVariant::LedgerCloseMetaExtV1, - TypeVariant::LedgerCloseMetaExt, - TypeVariant::LedgerCloseMetaV1, - TypeVariant::LedgerCloseMetaV2, - TypeVariant::LedgerCloseMeta, - TypeVariant::ErrorCode, - TypeVariant::SError, - TypeVariant::SendMore, - TypeVariant::SendMoreExtended, - TypeVariant::AuthCert, - TypeVariant::Hello, - TypeVariant::Auth, - TypeVariant::IpAddrType, - TypeVariant::PeerAddress, - TypeVariant::PeerAddressIp, - TypeVariant::MessageType, - TypeVariant::DontHave, - TypeVariant::SurveyMessageCommandType, - TypeVariant::SurveyMessageResponseType, - TypeVariant::TimeSlicedSurveyStartCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage, - TypeVariant::TimeSlicedSurveyStopCollectingMessage, - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage, - TypeVariant::SurveyRequestMessage, - TypeVariant::TimeSlicedSurveyRequestMessage, - TypeVariant::SignedTimeSlicedSurveyRequestMessage, - TypeVariant::EncryptedBody, - TypeVariant::SurveyResponseMessage, - TypeVariant::TimeSlicedSurveyResponseMessage, - TypeVariant::SignedTimeSlicedSurveyResponseMessage, - TypeVariant::PeerStats, - TypeVariant::TimeSlicedNodeData, - TypeVariant::TimeSlicedPeerData, - TypeVariant::TimeSlicedPeerDataList, - TypeVariant::TopologyResponseBodyV2, - TypeVariant::SurveyResponseBody, - TypeVariant::TxAdvertVector, - TypeVariant::FloodAdvert, - TypeVariant::TxDemandVector, - TypeVariant::FloodDemand, - TypeVariant::StellarMessage, - TypeVariant::AuthenticatedMessage, - TypeVariant::AuthenticatedMessageV0, - TypeVariant::LiquidityPoolParameters, - TypeVariant::MuxedAccount, - TypeVariant::MuxedAccountMed25519, - TypeVariant::DecoratedSignature, - TypeVariant::OperationType, - TypeVariant::CreateAccountOp, - TypeVariant::PaymentOp, - TypeVariant::PathPaymentStrictReceiveOp, - TypeVariant::PathPaymentStrictSendOp, - TypeVariant::ManageSellOfferOp, - TypeVariant::ManageBuyOfferOp, - TypeVariant::CreatePassiveSellOfferOp, - TypeVariant::SetOptionsOp, - TypeVariant::ChangeTrustAsset, - TypeVariant::ChangeTrustOp, - TypeVariant::AllowTrustOp, - TypeVariant::ManageDataOp, - TypeVariant::BumpSequenceOp, - TypeVariant::CreateClaimableBalanceOp, - TypeVariant::ClaimClaimableBalanceOp, - TypeVariant::BeginSponsoringFutureReservesOp, - TypeVariant::RevokeSponsorshipType, - TypeVariant::RevokeSponsorshipOp, - TypeVariant::RevokeSponsorshipOpSigner, - TypeVariant::ClawbackOp, - TypeVariant::ClawbackClaimableBalanceOp, - TypeVariant::SetTrustLineFlagsOp, - TypeVariant::LiquidityPoolDepositOp, - TypeVariant::LiquidityPoolWithdrawOp, - TypeVariant::HostFunctionType, - TypeVariant::ContractIdPreimageType, - TypeVariant::ContractIdPreimage, - TypeVariant::ContractIdPreimageFromAddress, - TypeVariant::CreateContractArgs, - TypeVariant::CreateContractArgsV2, - TypeVariant::InvokeContractArgs, - TypeVariant::HostFunction, - TypeVariant::SorobanAuthorizedFunctionType, - TypeVariant::SorobanAuthorizedFunction, - TypeVariant::SorobanAuthorizedInvocation, - TypeVariant::SorobanAddressCredentials, - TypeVariant::SorobanCredentialsType, - TypeVariant::SorobanCredentials, - TypeVariant::SorobanAuthorizationEntry, - TypeVariant::SorobanAuthorizationEntries, - TypeVariant::InvokeHostFunctionOp, - TypeVariant::ExtendFootprintTtlOp, - TypeVariant::RestoreFootprintOp, - TypeVariant::Operation, - TypeVariant::OperationBody, - TypeVariant::HashIdPreimage, - TypeVariant::HashIdPreimageOperationId, - TypeVariant::HashIdPreimageRevokeId, - TypeVariant::HashIdPreimageContractId, - TypeVariant::HashIdPreimageSorobanAuthorization, - TypeVariant::MemoType, - TypeVariant::Memo, - TypeVariant::TimeBounds, - TypeVariant::LedgerBounds, - TypeVariant::PreconditionsV2, - TypeVariant::PreconditionType, - TypeVariant::Preconditions, - TypeVariant::LedgerFootprint, - TypeVariant::SorobanResources, - TypeVariant::SorobanResourcesExtV0, - TypeVariant::SorobanTransactionData, - TypeVariant::SorobanTransactionDataExt, - TypeVariant::TransactionV0, - TypeVariant::TransactionV0Ext, - TypeVariant::TransactionV0Envelope, - TypeVariant::Transaction, - TypeVariant::TransactionExt, - TypeVariant::TransactionV1Envelope, - TypeVariant::FeeBumpTransaction, - TypeVariant::FeeBumpTransactionInnerTx, - TypeVariant::FeeBumpTransactionExt, - TypeVariant::FeeBumpTransactionEnvelope, - TypeVariant::TransactionEnvelope, - TypeVariant::TransactionSignaturePayload, - TypeVariant::TransactionSignaturePayloadTaggedTransaction, - TypeVariant::ClaimAtomType, - TypeVariant::ClaimOfferAtomV0, - TypeVariant::ClaimOfferAtom, - TypeVariant::ClaimLiquidityAtom, - TypeVariant::ClaimAtom, - TypeVariant::CreateAccountResultCode, - TypeVariant::CreateAccountResult, - TypeVariant::PaymentResultCode, - TypeVariant::PaymentResult, - TypeVariant::PathPaymentStrictReceiveResultCode, - TypeVariant::SimplePaymentResult, - TypeVariant::PathPaymentStrictReceiveResult, - TypeVariant::PathPaymentStrictReceiveResultSuccess, - TypeVariant::PathPaymentStrictSendResultCode, - TypeVariant::PathPaymentStrictSendResult, - TypeVariant::PathPaymentStrictSendResultSuccess, - TypeVariant::ManageSellOfferResultCode, - TypeVariant::ManageOfferEffect, - TypeVariant::ManageOfferSuccessResult, - TypeVariant::ManageOfferSuccessResultOffer, - TypeVariant::ManageSellOfferResult, - TypeVariant::ManageBuyOfferResultCode, - TypeVariant::ManageBuyOfferResult, - TypeVariant::SetOptionsResultCode, - TypeVariant::SetOptionsResult, - TypeVariant::ChangeTrustResultCode, - TypeVariant::ChangeTrustResult, - TypeVariant::AllowTrustResultCode, - TypeVariant::AllowTrustResult, - TypeVariant::AccountMergeResultCode, - TypeVariant::AccountMergeResult, - TypeVariant::InflationResultCode, - TypeVariant::InflationPayout, - TypeVariant::InflationResult, - TypeVariant::ManageDataResultCode, - TypeVariant::ManageDataResult, - TypeVariant::BumpSequenceResultCode, - TypeVariant::BumpSequenceResult, - TypeVariant::CreateClaimableBalanceResultCode, - TypeVariant::CreateClaimableBalanceResult, - TypeVariant::ClaimClaimableBalanceResultCode, - TypeVariant::ClaimClaimableBalanceResult, - TypeVariant::BeginSponsoringFutureReservesResultCode, - TypeVariant::BeginSponsoringFutureReservesResult, - TypeVariant::EndSponsoringFutureReservesResultCode, - TypeVariant::EndSponsoringFutureReservesResult, - TypeVariant::RevokeSponsorshipResultCode, - TypeVariant::RevokeSponsorshipResult, - TypeVariant::ClawbackResultCode, - TypeVariant::ClawbackResult, - TypeVariant::ClawbackClaimableBalanceResultCode, - TypeVariant::ClawbackClaimableBalanceResult, - TypeVariant::SetTrustLineFlagsResultCode, - TypeVariant::SetTrustLineFlagsResult, - TypeVariant::LiquidityPoolDepositResultCode, - TypeVariant::LiquidityPoolDepositResult, - TypeVariant::LiquidityPoolWithdrawResultCode, - TypeVariant::LiquidityPoolWithdrawResult, - TypeVariant::InvokeHostFunctionResultCode, - TypeVariant::InvokeHostFunctionResult, - TypeVariant::ExtendFootprintTtlResultCode, - TypeVariant::ExtendFootprintTtlResult, - TypeVariant::RestoreFootprintResultCode, - TypeVariant::RestoreFootprintResult, - TypeVariant::OperationResultCode, - TypeVariant::OperationResult, - TypeVariant::OperationResultTr, - TypeVariant::TransactionResultCode, - TypeVariant::InnerTransactionResult, - TypeVariant::InnerTransactionResultResult, - TypeVariant::InnerTransactionResultExt, - TypeVariant::InnerTransactionResultPair, - TypeVariant::TransactionResult, - TypeVariant::TransactionResultResult, - TypeVariant::TransactionResultExt, - TypeVariant::Hash, - TypeVariant::Uint256, - TypeVariant::Uint32, - TypeVariant::Int32, - TypeVariant::Uint64, - TypeVariant::Int64, - TypeVariant::TimePoint, - TypeVariant::Duration, - TypeVariant::ExtensionPoint, - TypeVariant::CryptoKeyType, - TypeVariant::PublicKeyType, - TypeVariant::SignerKeyType, - TypeVariant::PublicKey, - TypeVariant::SignerKey, - TypeVariant::SignerKeyEd25519SignedPayload, - TypeVariant::Signature, - TypeVariant::SignatureHint, - TypeVariant::NodeId, - TypeVariant::AccountId, - TypeVariant::ContractId, - TypeVariant::Curve25519Secret, - TypeVariant::Curve25519Public, - TypeVariant::HmacSha256Key, - TypeVariant::HmacSha256Mac, - TypeVariant::ShortHashSeed, - TypeVariant::BinaryFuseFilterType, - TypeVariant::SerializedBinaryFuseFilter, - TypeVariant::PoolId, - TypeVariant::ClaimableBalanceIdType, - TypeVariant::ClaimableBalanceId, - ]; - pub const VARIANTS: [TypeVariant; Self::_VARIANTS.len()] = { - let mut arr = [Self::_VARIANTS[0]; Self::_VARIANTS.len()]; - let mut i = 1; - while i < Self::_VARIANTS.len() { - arr[i] = Self::_VARIANTS[i]; - i += 1; - } - arr - }; - const _VARIANTS_STR: &[&str] = &[ - "Value", - "ScpBallot", - "ScpStatementType", - "ScpNomination", - "ScpStatement", - "ScpStatementPledges", - "ScpStatementPrepare", - "ScpStatementConfirm", - "ScpStatementExternalize", - "ScpEnvelope", - "ScpQuorumSet", - "EncodedLedgerKey", - "ConfigSettingContractExecutionLanesV0", - "ConfigSettingContractComputeV0", - "ConfigSettingContractParallelComputeV0", - "ConfigSettingContractLedgerCostV0", - "ConfigSettingContractLedgerCostExtV0", - "ConfigSettingContractHistoricalDataV0", - "ConfigSettingContractEventsV0", - "ConfigSettingContractBandwidthV0", - "ContractCostType", - "ContractCostParamEntry", - "StateArchivalSettings", - "EvictionIterator", - "ConfigSettingScpTiming", - "FrozenLedgerKeys", - "FrozenLedgerKeysDelta", - "FreezeBypassTxs", - "FreezeBypassTxsDelta", - "ContractCostParams", - "ConfigSettingId", - "ConfigSettingEntry", - "ScEnvMetaKind", - "ScEnvMetaEntry", - "ScEnvMetaEntryInterfaceVersion", - "ScMetaV0", - "ScMetaKind", - "ScMetaEntry", - "ScSpecType", - "ScSpecTypeOption", - "ScSpecTypeResult", - "ScSpecTypeVec", - "ScSpecTypeMap", - "ScSpecTypeTuple", - "ScSpecTypeBytesN", - "ScSpecTypeUdt", - "ScSpecTypeDef", - "ScSpecUdtStructFieldV0", - "ScSpecUdtStructV0", - "ScSpecUdtUnionCaseVoidV0", - "ScSpecUdtUnionCaseTupleV0", - "ScSpecUdtUnionCaseV0Kind", - "ScSpecUdtUnionCaseV0", - "ScSpecUdtUnionV0", - "ScSpecUdtEnumCaseV0", - "ScSpecUdtEnumV0", - "ScSpecUdtErrorEnumCaseV0", - "ScSpecUdtErrorEnumV0", - "ScSpecFunctionInputV0", - "ScSpecFunctionV0", - "ScSpecEventParamLocationV0", - "ScSpecEventParamV0", - "ScSpecEventDataFormat", - "ScSpecEventV0", - "ScSpecEntryKind", - "ScSpecEntry", - "ScValType", - "ScErrorType", - "ScErrorCode", - "ScError", - "UInt128Parts", - "Int128Parts", - "UInt256Parts", - "Int256Parts", - "ContractExecutableType", - "ContractExecutable", - "ScAddressType", - "MuxedEd25519Account", - "ScAddress", - "ScVec", - "ScMap", - "ScBytes", - "ScString", - "ScSymbol", - "ScNonceKey", - "ScContractInstance", - "ScVal", - "ScMapEntry", - "LedgerCloseMetaBatch", - "StoredTransactionSet", - "StoredDebugTransactionSet", - "PersistedScpStateV0", - "PersistedScpStateV1", - "PersistedScpState", - "Thresholds", - "String32", - "String64", - "SequenceNumber", - "DataValue", - "AssetCode4", - "AssetCode12", - "AssetType", - "AssetCode", - "AlphaNum4", - "AlphaNum12", - "Asset", - "Price", - "Liabilities", - "ThresholdIndexes", - "LedgerEntryType", - "Signer", - "AccountFlags", - "SponsorshipDescriptor", - "AccountEntryExtensionV3", - "AccountEntryExtensionV2", - "AccountEntryExtensionV2Ext", - "AccountEntryExtensionV1", - "AccountEntryExtensionV1Ext", - "AccountEntry", - "AccountEntryExt", - "TrustLineFlags", - "LiquidityPoolType", - "TrustLineAsset", - "TrustLineEntryExtensionV2", - "TrustLineEntryExtensionV2Ext", - "TrustLineEntry", - "TrustLineEntryExt", - "TrustLineEntryV1", - "TrustLineEntryV1Ext", - "OfferEntryFlags", - "OfferEntry", - "OfferEntryExt", - "DataEntry", - "DataEntryExt", - "ClaimPredicateType", - "ClaimPredicate", - "ClaimantType", - "Claimant", - "ClaimantV0", - "ClaimableBalanceFlags", - "ClaimableBalanceEntryExtensionV1", - "ClaimableBalanceEntryExtensionV1Ext", - "ClaimableBalanceEntry", - "ClaimableBalanceEntryExt", - "LiquidityPoolConstantProductParameters", - "LiquidityPoolEntry", - "LiquidityPoolEntryBody", - "LiquidityPoolEntryConstantProduct", - "ContractDataDurability", - "ContractDataEntry", - "ContractCodeCostInputs", - "ContractCodeEntry", - "ContractCodeEntryExt", - "ContractCodeEntryV1", - "TtlEntry", - "LedgerEntryExtensionV1", - "LedgerEntryExtensionV1Ext", - "LedgerEntry", - "LedgerEntryData", - "LedgerEntryExt", - "LedgerKey", - "LedgerKeyAccount", - "LedgerKeyTrustLine", - "LedgerKeyOffer", - "LedgerKeyData", - "LedgerKeyClaimableBalance", - "LedgerKeyLiquidityPool", - "LedgerKeyContractData", - "LedgerKeyContractCode", - "LedgerKeyConfigSetting", - "LedgerKeyTtl", - "EnvelopeType", - "BucketListType", - "BucketEntryType", - "HotArchiveBucketEntryType", - "BucketMetadata", - "BucketMetadataExt", - "BucketEntry", - "HotArchiveBucketEntry", - "UpgradeType", - "StellarValueType", - "LedgerCloseValueSignature", - "StellarValue", - "StellarValueExt", - "LedgerHeaderFlags", - "LedgerHeaderExtensionV1", - "LedgerHeaderExtensionV1Ext", - "LedgerHeader", - "LedgerHeaderExt", - "LedgerUpgradeType", - "ConfigUpgradeSetKey", - "LedgerUpgrade", - "ConfigUpgradeSet", - "TxSetComponentType", - "DependentTxCluster", - "ParallelTxExecutionStage", - "ParallelTxsComponent", - "TxSetComponent", - "TxSetComponentTxsMaybeDiscountedFee", - "TransactionPhase", - "TransactionSet", - "TransactionSetV1", - "GeneralizedTransactionSet", - "TransactionResultPair", - "TransactionResultSet", - "TransactionHistoryEntry", - "TransactionHistoryEntryExt", - "TransactionHistoryResultEntry", - "TransactionHistoryResultEntryExt", - "LedgerHeaderHistoryEntry", - "LedgerHeaderHistoryEntryExt", - "LedgerScpMessages", - "ScpHistoryEntryV0", - "ScpHistoryEntry", - "LedgerEntryChangeType", - "LedgerEntryChange", - "LedgerEntryChanges", - "OperationMeta", - "TransactionMetaV1", - "TransactionMetaV2", - "ContractEventType", - "ContractEvent", - "ContractEventBody", - "ContractEventV0", - "DiagnosticEvent", - "SorobanTransactionMetaExtV1", - "SorobanTransactionMetaExt", - "SorobanTransactionMeta", - "TransactionMetaV3", - "OperationMetaV2", - "SorobanTransactionMetaV2", - "TransactionEventStage", - "TransactionEvent", - "TransactionMetaV4", - "InvokeHostFunctionSuccessPreImage", - "TransactionMeta", - "TransactionResultMeta", - "TransactionResultMetaV1", - "UpgradeEntryMeta", - "LedgerCloseMetaV0", - "LedgerCloseMetaExtV1", - "LedgerCloseMetaExt", - "LedgerCloseMetaV1", - "LedgerCloseMetaV2", - "LedgerCloseMeta", - "ErrorCode", - "SError", - "SendMore", - "SendMoreExtended", - "AuthCert", - "Hello", - "Auth", - "IpAddrType", - "PeerAddress", - "PeerAddressIp", - "MessageType", - "DontHave", - "SurveyMessageCommandType", - "SurveyMessageResponseType", - "TimeSlicedSurveyStartCollectingMessage", - "SignedTimeSlicedSurveyStartCollectingMessage", - "TimeSlicedSurveyStopCollectingMessage", - "SignedTimeSlicedSurveyStopCollectingMessage", - "SurveyRequestMessage", - "TimeSlicedSurveyRequestMessage", - "SignedTimeSlicedSurveyRequestMessage", - "EncryptedBody", - "SurveyResponseMessage", - "TimeSlicedSurveyResponseMessage", - "SignedTimeSlicedSurveyResponseMessage", - "PeerStats", - "TimeSlicedNodeData", - "TimeSlicedPeerData", - "TimeSlicedPeerDataList", - "TopologyResponseBodyV2", - "SurveyResponseBody", - "TxAdvertVector", - "FloodAdvert", - "TxDemandVector", - "FloodDemand", - "StellarMessage", - "AuthenticatedMessage", - "AuthenticatedMessageV0", - "LiquidityPoolParameters", - "MuxedAccount", - "MuxedAccountMed25519", - "DecoratedSignature", - "OperationType", - "CreateAccountOp", - "PaymentOp", - "PathPaymentStrictReceiveOp", - "PathPaymentStrictSendOp", - "ManageSellOfferOp", - "ManageBuyOfferOp", - "CreatePassiveSellOfferOp", - "SetOptionsOp", - "ChangeTrustAsset", - "ChangeTrustOp", - "AllowTrustOp", - "ManageDataOp", - "BumpSequenceOp", - "CreateClaimableBalanceOp", - "ClaimClaimableBalanceOp", - "BeginSponsoringFutureReservesOp", - "RevokeSponsorshipType", - "RevokeSponsorshipOp", - "RevokeSponsorshipOpSigner", - "ClawbackOp", - "ClawbackClaimableBalanceOp", - "SetTrustLineFlagsOp", - "LiquidityPoolDepositOp", - "LiquidityPoolWithdrawOp", - "HostFunctionType", - "ContractIdPreimageType", - "ContractIdPreimage", - "ContractIdPreimageFromAddress", - "CreateContractArgs", - "CreateContractArgsV2", - "InvokeContractArgs", - "HostFunction", - "SorobanAuthorizedFunctionType", - "SorobanAuthorizedFunction", - "SorobanAuthorizedInvocation", - "SorobanAddressCredentials", - "SorobanCredentialsType", - "SorobanCredentials", - "SorobanAuthorizationEntry", - "SorobanAuthorizationEntries", - "InvokeHostFunctionOp", - "ExtendFootprintTtlOp", - "RestoreFootprintOp", - "Operation", - "OperationBody", - "HashIdPreimage", - "HashIdPreimageOperationId", - "HashIdPreimageRevokeId", - "HashIdPreimageContractId", - "HashIdPreimageSorobanAuthorization", - "MemoType", - "Memo", - "TimeBounds", - "LedgerBounds", - "PreconditionsV2", - "PreconditionType", - "Preconditions", - "LedgerFootprint", - "SorobanResources", - "SorobanResourcesExtV0", - "SorobanTransactionData", - "SorobanTransactionDataExt", - "TransactionV0", - "TransactionV0Ext", - "TransactionV0Envelope", - "Transaction", - "TransactionExt", - "TransactionV1Envelope", - "FeeBumpTransaction", - "FeeBumpTransactionInnerTx", - "FeeBumpTransactionExt", - "FeeBumpTransactionEnvelope", - "TransactionEnvelope", - "TransactionSignaturePayload", - "TransactionSignaturePayloadTaggedTransaction", - "ClaimAtomType", - "ClaimOfferAtomV0", - "ClaimOfferAtom", - "ClaimLiquidityAtom", - "ClaimAtom", - "CreateAccountResultCode", - "CreateAccountResult", - "PaymentResultCode", - "PaymentResult", - "PathPaymentStrictReceiveResultCode", - "SimplePaymentResult", - "PathPaymentStrictReceiveResult", - "PathPaymentStrictReceiveResultSuccess", - "PathPaymentStrictSendResultCode", - "PathPaymentStrictSendResult", - "PathPaymentStrictSendResultSuccess", - "ManageSellOfferResultCode", - "ManageOfferEffect", - "ManageOfferSuccessResult", - "ManageOfferSuccessResultOffer", - "ManageSellOfferResult", - "ManageBuyOfferResultCode", - "ManageBuyOfferResult", - "SetOptionsResultCode", - "SetOptionsResult", - "ChangeTrustResultCode", - "ChangeTrustResult", - "AllowTrustResultCode", - "AllowTrustResult", - "AccountMergeResultCode", - "AccountMergeResult", - "InflationResultCode", - "InflationPayout", - "InflationResult", - "ManageDataResultCode", - "ManageDataResult", - "BumpSequenceResultCode", - "BumpSequenceResult", - "CreateClaimableBalanceResultCode", - "CreateClaimableBalanceResult", - "ClaimClaimableBalanceResultCode", - "ClaimClaimableBalanceResult", - "BeginSponsoringFutureReservesResultCode", - "BeginSponsoringFutureReservesResult", - "EndSponsoringFutureReservesResultCode", - "EndSponsoringFutureReservesResult", - "RevokeSponsorshipResultCode", - "RevokeSponsorshipResult", - "ClawbackResultCode", - "ClawbackResult", - "ClawbackClaimableBalanceResultCode", - "ClawbackClaimableBalanceResult", - "SetTrustLineFlagsResultCode", - "SetTrustLineFlagsResult", - "LiquidityPoolDepositResultCode", - "LiquidityPoolDepositResult", - "LiquidityPoolWithdrawResultCode", - "LiquidityPoolWithdrawResult", - "InvokeHostFunctionResultCode", - "InvokeHostFunctionResult", - "ExtendFootprintTtlResultCode", - "ExtendFootprintTtlResult", - "RestoreFootprintResultCode", - "RestoreFootprintResult", - "OperationResultCode", - "OperationResult", - "OperationResultTr", - "TransactionResultCode", - "InnerTransactionResult", - "InnerTransactionResultResult", - "InnerTransactionResultExt", - "InnerTransactionResultPair", - "TransactionResult", - "TransactionResultResult", - "TransactionResultExt", - "Hash", - "Uint256", - "Uint32", - "Int32", - "Uint64", - "Int64", - "TimePoint", - "Duration", - "ExtensionPoint", - "CryptoKeyType", - "PublicKeyType", - "SignerKeyType", - "PublicKey", - "SignerKey", - "SignerKeyEd25519SignedPayload", - "Signature", - "SignatureHint", - "NodeId", - "AccountId", - "ContractId", - "Curve25519Secret", - "Curve25519Public", - "HmacSha256Key", - "HmacSha256Mac", - "ShortHashSeed", - "BinaryFuseFilterType", - "SerializedBinaryFuseFilter", - "PoolId", - "ClaimableBalanceIdType", - "ClaimableBalanceId", - ]; - pub const VARIANTS_STR: [&'static str; Self::_VARIANTS_STR.len()] = { - let mut arr = [Self::_VARIANTS_STR[0]; Self::_VARIANTS_STR.len()]; - let mut i = 1; - while i < Self::_VARIANTS_STR.len() { - arr[i] = Self::_VARIANTS_STR[i]; - i += 1; - } - arr - }; - - #[cfg(feature = "std")] - #[allow(clippy::too_many_lines)] - pub fn read_xdr(v: TypeVariant, r: &mut Limited) -> Result { - match v { - TypeVariant::Value => { - r.with_limited_depth(|r| Ok(Self::Value(Box::new(Value::read_xdr(r)?)))) - } - TypeVariant::ScpBallot => { - r.with_limited_depth(|r| Ok(Self::ScpBallot(Box::new(ScpBallot::read_xdr(r)?)))) - } - TypeVariant::ScpStatementType => r.with_limited_depth(|r| { - Ok(Self::ScpStatementType(Box::new( - ScpStatementType::read_xdr(r)?, - ))) - }), - TypeVariant::ScpNomination => r.with_limited_depth(|r| { - Ok(Self::ScpNomination(Box::new(ScpNomination::read_xdr(r)?))) - }), - TypeVariant::ScpStatement => r.with_limited_depth(|r| { - Ok(Self::ScpStatement(Box::new(ScpStatement::read_xdr(r)?))) - }), - TypeVariant::ScpStatementPledges => r.with_limited_depth(|r| { - Ok(Self::ScpStatementPledges(Box::new( - ScpStatementPledges::read_xdr(r)?, - ))) - }), - TypeVariant::ScpStatementPrepare => r.with_limited_depth(|r| { - Ok(Self::ScpStatementPrepare(Box::new( - ScpStatementPrepare::read_xdr(r)?, - ))) - }), - TypeVariant::ScpStatementConfirm => r.with_limited_depth(|r| { - Ok(Self::ScpStatementConfirm(Box::new( - ScpStatementConfirm::read_xdr(r)?, - ))) - }), - TypeVariant::ScpStatementExternalize => r.with_limited_depth(|r| { - Ok(Self::ScpStatementExternalize(Box::new( - ScpStatementExternalize::read_xdr(r)?, - ))) - }), - TypeVariant::ScpEnvelope => { - r.with_limited_depth(|r| Ok(Self::ScpEnvelope(Box::new(ScpEnvelope::read_xdr(r)?)))) - } - TypeVariant::ScpQuorumSet => r.with_limited_depth(|r| { - Ok(Self::ScpQuorumSet(Box::new(ScpQuorumSet::read_xdr(r)?))) - }), - TypeVariant::EncodedLedgerKey => r.with_limited_depth(|r| { - Ok(Self::EncodedLedgerKey(Box::new( - EncodedLedgerKey::read_xdr(r)?, - ))) - }), - TypeVariant::ConfigSettingContractExecutionLanesV0 => r.with_limited_depth(|r| { - Ok(Self::ConfigSettingContractExecutionLanesV0(Box::new( - ConfigSettingContractExecutionLanesV0::read_xdr(r)?, - ))) - }), - TypeVariant::ConfigSettingContractComputeV0 => r.with_limited_depth(|r| { - Ok(Self::ConfigSettingContractComputeV0(Box::new( - ConfigSettingContractComputeV0::read_xdr(r)?, - ))) - }), - TypeVariant::ConfigSettingContractParallelComputeV0 => r.with_limited_depth(|r| { - Ok(Self::ConfigSettingContractParallelComputeV0(Box::new( - ConfigSettingContractParallelComputeV0::read_xdr(r)?, - ))) - }), - TypeVariant::ConfigSettingContractLedgerCostV0 => r.with_limited_depth(|r| { - Ok(Self::ConfigSettingContractLedgerCostV0(Box::new( - ConfigSettingContractLedgerCostV0::read_xdr(r)?, - ))) - }), - TypeVariant::ConfigSettingContractLedgerCostExtV0 => r.with_limited_depth(|r| { - Ok(Self::ConfigSettingContractLedgerCostExtV0(Box::new( - ConfigSettingContractLedgerCostExtV0::read_xdr(r)?, - ))) - }), - TypeVariant::ConfigSettingContractHistoricalDataV0 => r.with_limited_depth(|r| { - Ok(Self::ConfigSettingContractHistoricalDataV0(Box::new( - ConfigSettingContractHistoricalDataV0::read_xdr(r)?, - ))) - }), - TypeVariant::ConfigSettingContractEventsV0 => r.with_limited_depth(|r| { - Ok(Self::ConfigSettingContractEventsV0(Box::new( - ConfigSettingContractEventsV0::read_xdr(r)?, - ))) - }), - TypeVariant::ConfigSettingContractBandwidthV0 => r.with_limited_depth(|r| { - Ok(Self::ConfigSettingContractBandwidthV0(Box::new( - ConfigSettingContractBandwidthV0::read_xdr(r)?, - ))) - }), - TypeVariant::ContractCostType => r.with_limited_depth(|r| { - Ok(Self::ContractCostType(Box::new( - ContractCostType::read_xdr(r)?, - ))) - }), - TypeVariant::ContractCostParamEntry => r.with_limited_depth(|r| { - Ok(Self::ContractCostParamEntry(Box::new( - ContractCostParamEntry::read_xdr(r)?, - ))) - }), - TypeVariant::StateArchivalSettings => r.with_limited_depth(|r| { - Ok(Self::StateArchivalSettings(Box::new( - StateArchivalSettings::read_xdr(r)?, - ))) - }), - TypeVariant::EvictionIterator => r.with_limited_depth(|r| { - Ok(Self::EvictionIterator(Box::new( - EvictionIterator::read_xdr(r)?, - ))) - }), - TypeVariant::ConfigSettingScpTiming => r.with_limited_depth(|r| { - Ok(Self::ConfigSettingScpTiming(Box::new( - ConfigSettingScpTiming::read_xdr(r)?, - ))) - }), - TypeVariant::FrozenLedgerKeys => r.with_limited_depth(|r| { - Ok(Self::FrozenLedgerKeys(Box::new( - FrozenLedgerKeys::read_xdr(r)?, - ))) - }), - TypeVariant::FrozenLedgerKeysDelta => r.with_limited_depth(|r| { - Ok(Self::FrozenLedgerKeysDelta(Box::new( - FrozenLedgerKeysDelta::read_xdr(r)?, - ))) - }), - TypeVariant::FreezeBypassTxs => r.with_limited_depth(|r| { - Ok(Self::FreezeBypassTxs(Box::new(FreezeBypassTxs::read_xdr( - r, - )?))) - }), - TypeVariant::FreezeBypassTxsDelta => r.with_limited_depth(|r| { - Ok(Self::FreezeBypassTxsDelta(Box::new( - FreezeBypassTxsDelta::read_xdr(r)?, - ))) - }), - TypeVariant::ContractCostParams => r.with_limited_depth(|r| { - Ok(Self::ContractCostParams(Box::new( - ContractCostParams::read_xdr(r)?, - ))) - }), - TypeVariant::ConfigSettingId => r.with_limited_depth(|r| { - Ok(Self::ConfigSettingId(Box::new(ConfigSettingId::read_xdr( - r, - )?))) - }), - TypeVariant::ConfigSettingEntry => r.with_limited_depth(|r| { - Ok(Self::ConfigSettingEntry(Box::new( - ConfigSettingEntry::read_xdr(r)?, - ))) - }), - TypeVariant::ScEnvMetaKind => r.with_limited_depth(|r| { - Ok(Self::ScEnvMetaKind(Box::new(ScEnvMetaKind::read_xdr(r)?))) - }), - TypeVariant::ScEnvMetaEntry => r.with_limited_depth(|r| { - Ok(Self::ScEnvMetaEntry(Box::new(ScEnvMetaEntry::read_xdr(r)?))) - }), - TypeVariant::ScEnvMetaEntryInterfaceVersion => r.with_limited_depth(|r| { - Ok(Self::ScEnvMetaEntryInterfaceVersion(Box::new( - ScEnvMetaEntryInterfaceVersion::read_xdr(r)?, - ))) - }), - TypeVariant::ScMetaV0 => { - r.with_limited_depth(|r| Ok(Self::ScMetaV0(Box::new(ScMetaV0::read_xdr(r)?)))) - } - TypeVariant::ScMetaKind => { - r.with_limited_depth(|r| Ok(Self::ScMetaKind(Box::new(ScMetaKind::read_xdr(r)?)))) - } - TypeVariant::ScMetaEntry => { - r.with_limited_depth(|r| Ok(Self::ScMetaEntry(Box::new(ScMetaEntry::read_xdr(r)?)))) - } - TypeVariant::ScSpecType => { - r.with_limited_depth(|r| Ok(Self::ScSpecType(Box::new(ScSpecType::read_xdr(r)?)))) - } - TypeVariant::ScSpecTypeOption => r.with_limited_depth(|r| { - Ok(Self::ScSpecTypeOption(Box::new( - ScSpecTypeOption::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecTypeResult => r.with_limited_depth(|r| { - Ok(Self::ScSpecTypeResult(Box::new( - ScSpecTypeResult::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecTypeVec => r.with_limited_depth(|r| { - Ok(Self::ScSpecTypeVec(Box::new(ScSpecTypeVec::read_xdr(r)?))) - }), - TypeVariant::ScSpecTypeMap => r.with_limited_depth(|r| { - Ok(Self::ScSpecTypeMap(Box::new(ScSpecTypeMap::read_xdr(r)?))) - }), - TypeVariant::ScSpecTypeTuple => r.with_limited_depth(|r| { - Ok(Self::ScSpecTypeTuple(Box::new(ScSpecTypeTuple::read_xdr( - r, - )?))) - }), - TypeVariant::ScSpecTypeBytesN => r.with_limited_depth(|r| { - Ok(Self::ScSpecTypeBytesN(Box::new( - ScSpecTypeBytesN::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecTypeUdt => r.with_limited_depth(|r| { - Ok(Self::ScSpecTypeUdt(Box::new(ScSpecTypeUdt::read_xdr(r)?))) - }), - TypeVariant::ScSpecTypeDef => r.with_limited_depth(|r| { - Ok(Self::ScSpecTypeDef(Box::new(ScSpecTypeDef::read_xdr(r)?))) - }), - TypeVariant::ScSpecUdtStructFieldV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecUdtStructFieldV0(Box::new( - ScSpecUdtStructFieldV0::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecUdtStructV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecUdtStructV0(Box::new( - ScSpecUdtStructV0::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecUdtUnionCaseVoidV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecUdtUnionCaseVoidV0(Box::new( - ScSpecUdtUnionCaseVoidV0::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecUdtUnionCaseTupleV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecUdtUnionCaseTupleV0(Box::new( - ScSpecUdtUnionCaseTupleV0::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecUdtUnionCaseV0Kind => r.with_limited_depth(|r| { - Ok(Self::ScSpecUdtUnionCaseV0Kind(Box::new( - ScSpecUdtUnionCaseV0Kind::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecUdtUnionCaseV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecUdtUnionCaseV0(Box::new( - ScSpecUdtUnionCaseV0::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecUdtUnionV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecUdtUnionV0(Box::new( - ScSpecUdtUnionV0::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecUdtEnumCaseV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecUdtEnumCaseV0(Box::new( - ScSpecUdtEnumCaseV0::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecUdtEnumV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecUdtEnumV0(Box::new(ScSpecUdtEnumV0::read_xdr( - r, - )?))) - }), - TypeVariant::ScSpecUdtErrorEnumCaseV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecUdtErrorEnumCaseV0(Box::new( - ScSpecUdtErrorEnumCaseV0::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecUdtErrorEnumV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecUdtErrorEnumV0(Box::new( - ScSpecUdtErrorEnumV0::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecFunctionInputV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecFunctionInputV0(Box::new( - ScSpecFunctionInputV0::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecFunctionV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecFunctionV0(Box::new( - ScSpecFunctionV0::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecEventParamLocationV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecEventParamLocationV0(Box::new( - ScSpecEventParamLocationV0::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecEventParamV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecEventParamV0(Box::new( - ScSpecEventParamV0::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecEventDataFormat => r.with_limited_depth(|r| { - Ok(Self::ScSpecEventDataFormat(Box::new( - ScSpecEventDataFormat::read_xdr(r)?, - ))) - }), - TypeVariant::ScSpecEventV0 => r.with_limited_depth(|r| { - Ok(Self::ScSpecEventV0(Box::new(ScSpecEventV0::read_xdr(r)?))) - }), - TypeVariant::ScSpecEntryKind => r.with_limited_depth(|r| { - Ok(Self::ScSpecEntryKind(Box::new(ScSpecEntryKind::read_xdr( - r, - )?))) - }), - TypeVariant::ScSpecEntry => { - r.with_limited_depth(|r| Ok(Self::ScSpecEntry(Box::new(ScSpecEntry::read_xdr(r)?)))) - } - TypeVariant::ScValType => { - r.with_limited_depth(|r| Ok(Self::ScValType(Box::new(ScValType::read_xdr(r)?)))) - } - TypeVariant::ScErrorType => { - r.with_limited_depth(|r| Ok(Self::ScErrorType(Box::new(ScErrorType::read_xdr(r)?)))) - } - TypeVariant::ScErrorCode => { - r.with_limited_depth(|r| Ok(Self::ScErrorCode(Box::new(ScErrorCode::read_xdr(r)?)))) - } - TypeVariant::ScError => { - r.with_limited_depth(|r| Ok(Self::ScError(Box::new(ScError::read_xdr(r)?)))) - } - TypeVariant::UInt128Parts => r.with_limited_depth(|r| { - Ok(Self::UInt128Parts(Box::new(UInt128Parts::read_xdr(r)?))) - }), - TypeVariant::Int128Parts => { - r.with_limited_depth(|r| Ok(Self::Int128Parts(Box::new(Int128Parts::read_xdr(r)?)))) - } - TypeVariant::UInt256Parts => r.with_limited_depth(|r| { - Ok(Self::UInt256Parts(Box::new(UInt256Parts::read_xdr(r)?))) - }), - TypeVariant::Int256Parts => { - r.with_limited_depth(|r| Ok(Self::Int256Parts(Box::new(Int256Parts::read_xdr(r)?)))) - } - TypeVariant::ContractExecutableType => r.with_limited_depth(|r| { - Ok(Self::ContractExecutableType(Box::new( - ContractExecutableType::read_xdr(r)?, - ))) - }), - TypeVariant::ContractExecutable => r.with_limited_depth(|r| { - Ok(Self::ContractExecutable(Box::new( - ContractExecutable::read_xdr(r)?, - ))) - }), - TypeVariant::ScAddressType => r.with_limited_depth(|r| { - Ok(Self::ScAddressType(Box::new(ScAddressType::read_xdr(r)?))) - }), - TypeVariant::MuxedEd25519Account => r.with_limited_depth(|r| { - Ok(Self::MuxedEd25519Account(Box::new( - MuxedEd25519Account::read_xdr(r)?, - ))) - }), - TypeVariant::ScAddress => { - r.with_limited_depth(|r| Ok(Self::ScAddress(Box::new(ScAddress::read_xdr(r)?)))) - } - TypeVariant::ScVec => { - r.with_limited_depth(|r| Ok(Self::ScVec(Box::new(ScVec::read_xdr(r)?)))) - } - TypeVariant::ScMap => { - r.with_limited_depth(|r| Ok(Self::ScMap(Box::new(ScMap::read_xdr(r)?)))) - } - TypeVariant::ScBytes => { - r.with_limited_depth(|r| Ok(Self::ScBytes(Box::new(ScBytes::read_xdr(r)?)))) - } - TypeVariant::ScString => { - r.with_limited_depth(|r| Ok(Self::ScString(Box::new(ScString::read_xdr(r)?)))) - } - TypeVariant::ScSymbol => { - r.with_limited_depth(|r| Ok(Self::ScSymbol(Box::new(ScSymbol::read_xdr(r)?)))) - } - TypeVariant::ScNonceKey => { - r.with_limited_depth(|r| Ok(Self::ScNonceKey(Box::new(ScNonceKey::read_xdr(r)?)))) - } - TypeVariant::ScContractInstance => r.with_limited_depth(|r| { - Ok(Self::ScContractInstance(Box::new( - ScContractInstance::read_xdr(r)?, - ))) - }), - TypeVariant::ScVal => { - r.with_limited_depth(|r| Ok(Self::ScVal(Box::new(ScVal::read_xdr(r)?)))) - } - TypeVariant::ScMapEntry => { - r.with_limited_depth(|r| Ok(Self::ScMapEntry(Box::new(ScMapEntry::read_xdr(r)?)))) - } - TypeVariant::LedgerCloseMetaBatch => r.with_limited_depth(|r| { - Ok(Self::LedgerCloseMetaBatch(Box::new( - LedgerCloseMetaBatch::read_xdr(r)?, - ))) - }), - TypeVariant::StoredTransactionSet => r.with_limited_depth(|r| { - Ok(Self::StoredTransactionSet(Box::new( - StoredTransactionSet::read_xdr(r)?, - ))) - }), - TypeVariant::StoredDebugTransactionSet => r.with_limited_depth(|r| { - Ok(Self::StoredDebugTransactionSet(Box::new( - StoredDebugTransactionSet::read_xdr(r)?, - ))) - }), - TypeVariant::PersistedScpStateV0 => r.with_limited_depth(|r| { - Ok(Self::PersistedScpStateV0(Box::new( - PersistedScpStateV0::read_xdr(r)?, - ))) - }), - TypeVariant::PersistedScpStateV1 => r.with_limited_depth(|r| { - Ok(Self::PersistedScpStateV1(Box::new( - PersistedScpStateV1::read_xdr(r)?, - ))) - }), - TypeVariant::PersistedScpState => r.with_limited_depth(|r| { - Ok(Self::PersistedScpState(Box::new( - PersistedScpState::read_xdr(r)?, - ))) - }), - TypeVariant::Thresholds => { - r.with_limited_depth(|r| Ok(Self::Thresholds(Box::new(Thresholds::read_xdr(r)?)))) - } - TypeVariant::String32 => { - r.with_limited_depth(|r| Ok(Self::String32(Box::new(String32::read_xdr(r)?)))) - } - TypeVariant::String64 => { - r.with_limited_depth(|r| Ok(Self::String64(Box::new(String64::read_xdr(r)?)))) - } - TypeVariant::SequenceNumber => r.with_limited_depth(|r| { - Ok(Self::SequenceNumber(Box::new(SequenceNumber::read_xdr(r)?))) - }), - TypeVariant::DataValue => { - r.with_limited_depth(|r| Ok(Self::DataValue(Box::new(DataValue::read_xdr(r)?)))) - } - TypeVariant::AssetCode4 => { - r.with_limited_depth(|r| Ok(Self::AssetCode4(Box::new(AssetCode4::read_xdr(r)?)))) - } - TypeVariant::AssetCode12 => { - r.with_limited_depth(|r| Ok(Self::AssetCode12(Box::new(AssetCode12::read_xdr(r)?)))) - } - TypeVariant::AssetType => { - r.with_limited_depth(|r| Ok(Self::AssetType(Box::new(AssetType::read_xdr(r)?)))) - } - TypeVariant::AssetCode => { - r.with_limited_depth(|r| Ok(Self::AssetCode(Box::new(AssetCode::read_xdr(r)?)))) - } - TypeVariant::AlphaNum4 => { - r.with_limited_depth(|r| Ok(Self::AlphaNum4(Box::new(AlphaNum4::read_xdr(r)?)))) - } - TypeVariant::AlphaNum12 => { - r.with_limited_depth(|r| Ok(Self::AlphaNum12(Box::new(AlphaNum12::read_xdr(r)?)))) - } - TypeVariant::Asset => { - r.with_limited_depth(|r| Ok(Self::Asset(Box::new(Asset::read_xdr(r)?)))) - } - TypeVariant::Price => { - r.with_limited_depth(|r| Ok(Self::Price(Box::new(Price::read_xdr(r)?)))) - } - TypeVariant::Liabilities => { - r.with_limited_depth(|r| Ok(Self::Liabilities(Box::new(Liabilities::read_xdr(r)?)))) - } - TypeVariant::ThresholdIndexes => r.with_limited_depth(|r| { - Ok(Self::ThresholdIndexes(Box::new( - ThresholdIndexes::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerEntryType => r.with_limited_depth(|r| { - Ok(Self::LedgerEntryType(Box::new(LedgerEntryType::read_xdr( - r, - )?))) - }), - TypeVariant::Signer => { - r.with_limited_depth(|r| Ok(Self::Signer(Box::new(Signer::read_xdr(r)?)))) - } - TypeVariant::AccountFlags => r.with_limited_depth(|r| { - Ok(Self::AccountFlags(Box::new(AccountFlags::read_xdr(r)?))) - }), - TypeVariant::SponsorshipDescriptor => r.with_limited_depth(|r| { - Ok(Self::SponsorshipDescriptor(Box::new( - SponsorshipDescriptor::read_xdr(r)?, - ))) - }), - TypeVariant::AccountEntryExtensionV3 => r.with_limited_depth(|r| { - Ok(Self::AccountEntryExtensionV3(Box::new( - AccountEntryExtensionV3::read_xdr(r)?, - ))) - }), - TypeVariant::AccountEntryExtensionV2 => r.with_limited_depth(|r| { - Ok(Self::AccountEntryExtensionV2(Box::new( - AccountEntryExtensionV2::read_xdr(r)?, - ))) - }), - TypeVariant::AccountEntryExtensionV2Ext => r.with_limited_depth(|r| { - Ok(Self::AccountEntryExtensionV2Ext(Box::new( - AccountEntryExtensionV2Ext::read_xdr(r)?, - ))) - }), - TypeVariant::AccountEntryExtensionV1 => r.with_limited_depth(|r| { - Ok(Self::AccountEntryExtensionV1(Box::new( - AccountEntryExtensionV1::read_xdr(r)?, - ))) - }), - TypeVariant::AccountEntryExtensionV1Ext => r.with_limited_depth(|r| { - Ok(Self::AccountEntryExtensionV1Ext(Box::new( - AccountEntryExtensionV1Ext::read_xdr(r)?, - ))) - }), - TypeVariant::AccountEntry => r.with_limited_depth(|r| { - Ok(Self::AccountEntry(Box::new(AccountEntry::read_xdr(r)?))) - }), - TypeVariant::AccountEntryExt => r.with_limited_depth(|r| { - Ok(Self::AccountEntryExt(Box::new(AccountEntryExt::read_xdr( - r, - )?))) - }), - TypeVariant::TrustLineFlags => r.with_limited_depth(|r| { - Ok(Self::TrustLineFlags(Box::new(TrustLineFlags::read_xdr(r)?))) - }), - TypeVariant::LiquidityPoolType => r.with_limited_depth(|r| { - Ok(Self::LiquidityPoolType(Box::new( - LiquidityPoolType::read_xdr(r)?, - ))) - }), - TypeVariant::TrustLineAsset => r.with_limited_depth(|r| { - Ok(Self::TrustLineAsset(Box::new(TrustLineAsset::read_xdr(r)?))) - }), - TypeVariant::TrustLineEntryExtensionV2 => r.with_limited_depth(|r| { - Ok(Self::TrustLineEntryExtensionV2(Box::new( - TrustLineEntryExtensionV2::read_xdr(r)?, - ))) - }), - TypeVariant::TrustLineEntryExtensionV2Ext => r.with_limited_depth(|r| { - Ok(Self::TrustLineEntryExtensionV2Ext(Box::new( - TrustLineEntryExtensionV2Ext::read_xdr(r)?, - ))) - }), - TypeVariant::TrustLineEntry => r.with_limited_depth(|r| { - Ok(Self::TrustLineEntry(Box::new(TrustLineEntry::read_xdr(r)?))) - }), - TypeVariant::TrustLineEntryExt => r.with_limited_depth(|r| { - Ok(Self::TrustLineEntryExt(Box::new( - TrustLineEntryExt::read_xdr(r)?, - ))) - }), - TypeVariant::TrustLineEntryV1 => r.with_limited_depth(|r| { - Ok(Self::TrustLineEntryV1(Box::new( - TrustLineEntryV1::read_xdr(r)?, - ))) - }), - TypeVariant::TrustLineEntryV1Ext => r.with_limited_depth(|r| { - Ok(Self::TrustLineEntryV1Ext(Box::new( - TrustLineEntryV1Ext::read_xdr(r)?, - ))) - }), - TypeVariant::OfferEntryFlags => r.with_limited_depth(|r| { - Ok(Self::OfferEntryFlags(Box::new(OfferEntryFlags::read_xdr( - r, - )?))) - }), - TypeVariant::OfferEntry => { - r.with_limited_depth(|r| Ok(Self::OfferEntry(Box::new(OfferEntry::read_xdr(r)?)))) - } - TypeVariant::OfferEntryExt => r.with_limited_depth(|r| { - Ok(Self::OfferEntryExt(Box::new(OfferEntryExt::read_xdr(r)?))) - }), - TypeVariant::DataEntry => { - r.with_limited_depth(|r| Ok(Self::DataEntry(Box::new(DataEntry::read_xdr(r)?)))) - } - TypeVariant::DataEntryExt => r.with_limited_depth(|r| { - Ok(Self::DataEntryExt(Box::new(DataEntryExt::read_xdr(r)?))) - }), - TypeVariant::ClaimPredicateType => r.with_limited_depth(|r| { - Ok(Self::ClaimPredicateType(Box::new( - ClaimPredicateType::read_xdr(r)?, - ))) - }), - TypeVariant::ClaimPredicate => r.with_limited_depth(|r| { - Ok(Self::ClaimPredicate(Box::new(ClaimPredicate::read_xdr(r)?))) - }), - TypeVariant::ClaimantType => r.with_limited_depth(|r| { - Ok(Self::ClaimantType(Box::new(ClaimantType::read_xdr(r)?))) - }), - TypeVariant::Claimant => { - r.with_limited_depth(|r| Ok(Self::Claimant(Box::new(Claimant::read_xdr(r)?)))) - } - TypeVariant::ClaimantV0 => { - r.with_limited_depth(|r| Ok(Self::ClaimantV0(Box::new(ClaimantV0::read_xdr(r)?)))) - } - TypeVariant::ClaimableBalanceFlags => r.with_limited_depth(|r| { - Ok(Self::ClaimableBalanceFlags(Box::new( - ClaimableBalanceFlags::read_xdr(r)?, - ))) - }), - TypeVariant::ClaimableBalanceEntryExtensionV1 => r.with_limited_depth(|r| { - Ok(Self::ClaimableBalanceEntryExtensionV1(Box::new( - ClaimableBalanceEntryExtensionV1::read_xdr(r)?, - ))) - }), - TypeVariant::ClaimableBalanceEntryExtensionV1Ext => r.with_limited_depth(|r| { - Ok(Self::ClaimableBalanceEntryExtensionV1Ext(Box::new( - ClaimableBalanceEntryExtensionV1Ext::read_xdr(r)?, - ))) - }), - TypeVariant::ClaimableBalanceEntry => r.with_limited_depth(|r| { - Ok(Self::ClaimableBalanceEntry(Box::new( - ClaimableBalanceEntry::read_xdr(r)?, - ))) - }), - TypeVariant::ClaimableBalanceEntryExt => r.with_limited_depth(|r| { - Ok(Self::ClaimableBalanceEntryExt(Box::new( - ClaimableBalanceEntryExt::read_xdr(r)?, - ))) - }), - TypeVariant::LiquidityPoolConstantProductParameters => r.with_limited_depth(|r| { - Ok(Self::LiquidityPoolConstantProductParameters(Box::new( - LiquidityPoolConstantProductParameters::read_xdr(r)?, - ))) - }), - TypeVariant::LiquidityPoolEntry => r.with_limited_depth(|r| { - Ok(Self::LiquidityPoolEntry(Box::new( - LiquidityPoolEntry::read_xdr(r)?, - ))) - }), - TypeVariant::LiquidityPoolEntryBody => r.with_limited_depth(|r| { - Ok(Self::LiquidityPoolEntryBody(Box::new( - LiquidityPoolEntryBody::read_xdr(r)?, - ))) - }), - TypeVariant::LiquidityPoolEntryConstantProduct => r.with_limited_depth(|r| { - Ok(Self::LiquidityPoolEntryConstantProduct(Box::new( - LiquidityPoolEntryConstantProduct::read_xdr(r)?, - ))) - }), - TypeVariant::ContractDataDurability => r.with_limited_depth(|r| { - Ok(Self::ContractDataDurability(Box::new( - ContractDataDurability::read_xdr(r)?, - ))) - }), - TypeVariant::ContractDataEntry => r.with_limited_depth(|r| { - Ok(Self::ContractDataEntry(Box::new( - ContractDataEntry::read_xdr(r)?, - ))) - }), - TypeVariant::ContractCodeCostInputs => r.with_limited_depth(|r| { - Ok(Self::ContractCodeCostInputs(Box::new( - ContractCodeCostInputs::read_xdr(r)?, - ))) - }), - TypeVariant::ContractCodeEntry => r.with_limited_depth(|r| { - Ok(Self::ContractCodeEntry(Box::new( - ContractCodeEntry::read_xdr(r)?, - ))) - }), - TypeVariant::ContractCodeEntryExt => r.with_limited_depth(|r| { - Ok(Self::ContractCodeEntryExt(Box::new( - ContractCodeEntryExt::read_xdr(r)?, - ))) - }), - TypeVariant::ContractCodeEntryV1 => r.with_limited_depth(|r| { - Ok(Self::ContractCodeEntryV1(Box::new( - ContractCodeEntryV1::read_xdr(r)?, - ))) - }), - TypeVariant::TtlEntry => { - r.with_limited_depth(|r| Ok(Self::TtlEntry(Box::new(TtlEntry::read_xdr(r)?)))) - } - TypeVariant::LedgerEntryExtensionV1 => r.with_limited_depth(|r| { - Ok(Self::LedgerEntryExtensionV1(Box::new( - LedgerEntryExtensionV1::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerEntryExtensionV1Ext => r.with_limited_depth(|r| { - Ok(Self::LedgerEntryExtensionV1Ext(Box::new( - LedgerEntryExtensionV1Ext::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerEntry => { - r.with_limited_depth(|r| Ok(Self::LedgerEntry(Box::new(LedgerEntry::read_xdr(r)?)))) - } - TypeVariant::LedgerEntryData => r.with_limited_depth(|r| { - Ok(Self::LedgerEntryData(Box::new(LedgerEntryData::read_xdr( - r, - )?))) - }), - TypeVariant::LedgerEntryExt => r.with_limited_depth(|r| { - Ok(Self::LedgerEntryExt(Box::new(LedgerEntryExt::read_xdr(r)?))) - }), - TypeVariant::LedgerKey => { - r.with_limited_depth(|r| Ok(Self::LedgerKey(Box::new(LedgerKey::read_xdr(r)?)))) - } - TypeVariant::LedgerKeyAccount => r.with_limited_depth(|r| { - Ok(Self::LedgerKeyAccount(Box::new( - LedgerKeyAccount::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerKeyTrustLine => r.with_limited_depth(|r| { - Ok(Self::LedgerKeyTrustLine(Box::new( - LedgerKeyTrustLine::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerKeyOffer => r.with_limited_depth(|r| { - Ok(Self::LedgerKeyOffer(Box::new(LedgerKeyOffer::read_xdr(r)?))) - }), - TypeVariant::LedgerKeyData => r.with_limited_depth(|r| { - Ok(Self::LedgerKeyData(Box::new(LedgerKeyData::read_xdr(r)?))) - }), - TypeVariant::LedgerKeyClaimableBalance => r.with_limited_depth(|r| { - Ok(Self::LedgerKeyClaimableBalance(Box::new( - LedgerKeyClaimableBalance::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerKeyLiquidityPool => r.with_limited_depth(|r| { - Ok(Self::LedgerKeyLiquidityPool(Box::new( - LedgerKeyLiquidityPool::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerKeyContractData => r.with_limited_depth(|r| { - Ok(Self::LedgerKeyContractData(Box::new( - LedgerKeyContractData::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerKeyContractCode => r.with_limited_depth(|r| { - Ok(Self::LedgerKeyContractCode(Box::new( - LedgerKeyContractCode::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerKeyConfigSetting => r.with_limited_depth(|r| { - Ok(Self::LedgerKeyConfigSetting(Box::new( - LedgerKeyConfigSetting::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerKeyTtl => r.with_limited_depth(|r| { - Ok(Self::LedgerKeyTtl(Box::new(LedgerKeyTtl::read_xdr(r)?))) - }), - TypeVariant::EnvelopeType => r.with_limited_depth(|r| { - Ok(Self::EnvelopeType(Box::new(EnvelopeType::read_xdr(r)?))) - }), - TypeVariant::BucketListType => r.with_limited_depth(|r| { - Ok(Self::BucketListType(Box::new(BucketListType::read_xdr(r)?))) - }), - TypeVariant::BucketEntryType => r.with_limited_depth(|r| { - Ok(Self::BucketEntryType(Box::new(BucketEntryType::read_xdr( - r, - )?))) - }), - TypeVariant::HotArchiveBucketEntryType => r.with_limited_depth(|r| { - Ok(Self::HotArchiveBucketEntryType(Box::new( - HotArchiveBucketEntryType::read_xdr(r)?, - ))) - }), - TypeVariant::BucketMetadata => r.with_limited_depth(|r| { - Ok(Self::BucketMetadata(Box::new(BucketMetadata::read_xdr(r)?))) - }), - TypeVariant::BucketMetadataExt => r.with_limited_depth(|r| { - Ok(Self::BucketMetadataExt(Box::new( - BucketMetadataExt::read_xdr(r)?, - ))) - }), - TypeVariant::BucketEntry => { - r.with_limited_depth(|r| Ok(Self::BucketEntry(Box::new(BucketEntry::read_xdr(r)?)))) - } - TypeVariant::HotArchiveBucketEntry => r.with_limited_depth(|r| { - Ok(Self::HotArchiveBucketEntry(Box::new( - HotArchiveBucketEntry::read_xdr(r)?, - ))) - }), - TypeVariant::UpgradeType => { - r.with_limited_depth(|r| Ok(Self::UpgradeType(Box::new(UpgradeType::read_xdr(r)?)))) - } - TypeVariant::StellarValueType => r.with_limited_depth(|r| { - Ok(Self::StellarValueType(Box::new( - StellarValueType::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerCloseValueSignature => r.with_limited_depth(|r| { - Ok(Self::LedgerCloseValueSignature(Box::new( - LedgerCloseValueSignature::read_xdr(r)?, - ))) - }), - TypeVariant::StellarValue => r.with_limited_depth(|r| { - Ok(Self::StellarValue(Box::new(StellarValue::read_xdr(r)?))) - }), - TypeVariant::StellarValueExt => r.with_limited_depth(|r| { - Ok(Self::StellarValueExt(Box::new(StellarValueExt::read_xdr( - r, - )?))) - }), - TypeVariant::LedgerHeaderFlags => r.with_limited_depth(|r| { - Ok(Self::LedgerHeaderFlags(Box::new( - LedgerHeaderFlags::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerHeaderExtensionV1 => r.with_limited_depth(|r| { - Ok(Self::LedgerHeaderExtensionV1(Box::new( - LedgerHeaderExtensionV1::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerHeaderExtensionV1Ext => r.with_limited_depth(|r| { - Ok(Self::LedgerHeaderExtensionV1Ext(Box::new( - LedgerHeaderExtensionV1Ext::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerHeader => r.with_limited_depth(|r| { - Ok(Self::LedgerHeader(Box::new(LedgerHeader::read_xdr(r)?))) - }), - TypeVariant::LedgerHeaderExt => r.with_limited_depth(|r| { - Ok(Self::LedgerHeaderExt(Box::new(LedgerHeaderExt::read_xdr( - r, - )?))) - }), - TypeVariant::LedgerUpgradeType => r.with_limited_depth(|r| { - Ok(Self::LedgerUpgradeType(Box::new( - LedgerUpgradeType::read_xdr(r)?, - ))) - }), - TypeVariant::ConfigUpgradeSetKey => r.with_limited_depth(|r| { - Ok(Self::ConfigUpgradeSetKey(Box::new( - ConfigUpgradeSetKey::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerUpgrade => r.with_limited_depth(|r| { - Ok(Self::LedgerUpgrade(Box::new(LedgerUpgrade::read_xdr(r)?))) - }), - TypeVariant::ConfigUpgradeSet => r.with_limited_depth(|r| { - Ok(Self::ConfigUpgradeSet(Box::new( - ConfigUpgradeSet::read_xdr(r)?, - ))) - }), - TypeVariant::TxSetComponentType => r.with_limited_depth(|r| { - Ok(Self::TxSetComponentType(Box::new( - TxSetComponentType::read_xdr(r)?, - ))) - }), - TypeVariant::DependentTxCluster => r.with_limited_depth(|r| { - Ok(Self::DependentTxCluster(Box::new( - DependentTxCluster::read_xdr(r)?, - ))) - }), - TypeVariant::ParallelTxExecutionStage => r.with_limited_depth(|r| { - Ok(Self::ParallelTxExecutionStage(Box::new( - ParallelTxExecutionStage::read_xdr(r)?, - ))) - }), - TypeVariant::ParallelTxsComponent => r.with_limited_depth(|r| { - Ok(Self::ParallelTxsComponent(Box::new( - ParallelTxsComponent::read_xdr(r)?, - ))) - }), - TypeVariant::TxSetComponent => r.with_limited_depth(|r| { - Ok(Self::TxSetComponent(Box::new(TxSetComponent::read_xdr(r)?))) - }), - TypeVariant::TxSetComponentTxsMaybeDiscountedFee => r.with_limited_depth(|r| { - Ok(Self::TxSetComponentTxsMaybeDiscountedFee(Box::new( - TxSetComponentTxsMaybeDiscountedFee::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionPhase => r.with_limited_depth(|r| { - Ok(Self::TransactionPhase(Box::new( - TransactionPhase::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionSet => r.with_limited_depth(|r| { - Ok(Self::TransactionSet(Box::new(TransactionSet::read_xdr(r)?))) - }), - TypeVariant::TransactionSetV1 => r.with_limited_depth(|r| { - Ok(Self::TransactionSetV1(Box::new( - TransactionSetV1::read_xdr(r)?, - ))) - }), - TypeVariant::GeneralizedTransactionSet => r.with_limited_depth(|r| { - Ok(Self::GeneralizedTransactionSet(Box::new( - GeneralizedTransactionSet::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionResultPair => r.with_limited_depth(|r| { - Ok(Self::TransactionResultPair(Box::new( - TransactionResultPair::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionResultSet => r.with_limited_depth(|r| { - Ok(Self::TransactionResultSet(Box::new( - TransactionResultSet::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionHistoryEntry => r.with_limited_depth(|r| { - Ok(Self::TransactionHistoryEntry(Box::new( - TransactionHistoryEntry::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionHistoryEntryExt => r.with_limited_depth(|r| { - Ok(Self::TransactionHistoryEntryExt(Box::new( - TransactionHistoryEntryExt::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionHistoryResultEntry => r.with_limited_depth(|r| { - Ok(Self::TransactionHistoryResultEntry(Box::new( - TransactionHistoryResultEntry::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionHistoryResultEntryExt => r.with_limited_depth(|r| { - Ok(Self::TransactionHistoryResultEntryExt(Box::new( - TransactionHistoryResultEntryExt::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerHeaderHistoryEntry => r.with_limited_depth(|r| { - Ok(Self::LedgerHeaderHistoryEntry(Box::new( - LedgerHeaderHistoryEntry::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerHeaderHistoryEntryExt => r.with_limited_depth(|r| { - Ok(Self::LedgerHeaderHistoryEntryExt(Box::new( - LedgerHeaderHistoryEntryExt::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerScpMessages => r.with_limited_depth(|r| { - Ok(Self::LedgerScpMessages(Box::new( - LedgerScpMessages::read_xdr(r)?, - ))) - }), - TypeVariant::ScpHistoryEntryV0 => r.with_limited_depth(|r| { - Ok(Self::ScpHistoryEntryV0(Box::new( - ScpHistoryEntryV0::read_xdr(r)?, - ))) - }), - TypeVariant::ScpHistoryEntry => r.with_limited_depth(|r| { - Ok(Self::ScpHistoryEntry(Box::new(ScpHistoryEntry::read_xdr( - r, - )?))) - }), - TypeVariant::LedgerEntryChangeType => r.with_limited_depth(|r| { - Ok(Self::LedgerEntryChangeType(Box::new( - LedgerEntryChangeType::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerEntryChange => r.with_limited_depth(|r| { - Ok(Self::LedgerEntryChange(Box::new( - LedgerEntryChange::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerEntryChanges => r.with_limited_depth(|r| { - Ok(Self::LedgerEntryChanges(Box::new( - LedgerEntryChanges::read_xdr(r)?, - ))) - }), - TypeVariant::OperationMeta => r.with_limited_depth(|r| { - Ok(Self::OperationMeta(Box::new(OperationMeta::read_xdr(r)?))) - }), - TypeVariant::TransactionMetaV1 => r.with_limited_depth(|r| { - Ok(Self::TransactionMetaV1(Box::new( - TransactionMetaV1::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionMetaV2 => r.with_limited_depth(|r| { - Ok(Self::TransactionMetaV2(Box::new( - TransactionMetaV2::read_xdr(r)?, - ))) - }), - TypeVariant::ContractEventType => r.with_limited_depth(|r| { - Ok(Self::ContractEventType(Box::new( - ContractEventType::read_xdr(r)?, - ))) - }), - TypeVariant::ContractEvent => r.with_limited_depth(|r| { - Ok(Self::ContractEvent(Box::new(ContractEvent::read_xdr(r)?))) - }), - TypeVariant::ContractEventBody => r.with_limited_depth(|r| { - Ok(Self::ContractEventBody(Box::new( - ContractEventBody::read_xdr(r)?, - ))) - }), - TypeVariant::ContractEventV0 => r.with_limited_depth(|r| { - Ok(Self::ContractEventV0(Box::new(ContractEventV0::read_xdr( - r, - )?))) - }), - TypeVariant::DiagnosticEvent => r.with_limited_depth(|r| { - Ok(Self::DiagnosticEvent(Box::new(DiagnosticEvent::read_xdr( - r, - )?))) - }), - TypeVariant::SorobanTransactionMetaExtV1 => r.with_limited_depth(|r| { - Ok(Self::SorobanTransactionMetaExtV1(Box::new( - SorobanTransactionMetaExtV1::read_xdr(r)?, - ))) - }), - TypeVariant::SorobanTransactionMetaExt => r.with_limited_depth(|r| { - Ok(Self::SorobanTransactionMetaExt(Box::new( - SorobanTransactionMetaExt::read_xdr(r)?, - ))) - }), - TypeVariant::SorobanTransactionMeta => r.with_limited_depth(|r| { - Ok(Self::SorobanTransactionMeta(Box::new( - SorobanTransactionMeta::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionMetaV3 => r.with_limited_depth(|r| { - Ok(Self::TransactionMetaV3(Box::new( - TransactionMetaV3::read_xdr(r)?, - ))) - }), - TypeVariant::OperationMetaV2 => r.with_limited_depth(|r| { - Ok(Self::OperationMetaV2(Box::new(OperationMetaV2::read_xdr( - r, - )?))) - }), - TypeVariant::SorobanTransactionMetaV2 => r.with_limited_depth(|r| { - Ok(Self::SorobanTransactionMetaV2(Box::new( - SorobanTransactionMetaV2::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionEventStage => r.with_limited_depth(|r| { - Ok(Self::TransactionEventStage(Box::new( - TransactionEventStage::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionEvent => r.with_limited_depth(|r| { - Ok(Self::TransactionEvent(Box::new( - TransactionEvent::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionMetaV4 => r.with_limited_depth(|r| { - Ok(Self::TransactionMetaV4(Box::new( - TransactionMetaV4::read_xdr(r)?, - ))) - }), - TypeVariant::InvokeHostFunctionSuccessPreImage => r.with_limited_depth(|r| { - Ok(Self::InvokeHostFunctionSuccessPreImage(Box::new( - InvokeHostFunctionSuccessPreImage::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionMeta => r.with_limited_depth(|r| { - Ok(Self::TransactionMeta(Box::new(TransactionMeta::read_xdr( - r, - )?))) - }), - TypeVariant::TransactionResultMeta => r.with_limited_depth(|r| { - Ok(Self::TransactionResultMeta(Box::new( - TransactionResultMeta::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionResultMetaV1 => r.with_limited_depth(|r| { - Ok(Self::TransactionResultMetaV1(Box::new( - TransactionResultMetaV1::read_xdr(r)?, - ))) - }), - TypeVariant::UpgradeEntryMeta => r.with_limited_depth(|r| { - Ok(Self::UpgradeEntryMeta(Box::new( - UpgradeEntryMeta::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerCloseMetaV0 => r.with_limited_depth(|r| { - Ok(Self::LedgerCloseMetaV0(Box::new( - LedgerCloseMetaV0::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerCloseMetaExtV1 => r.with_limited_depth(|r| { - Ok(Self::LedgerCloseMetaExtV1(Box::new( - LedgerCloseMetaExtV1::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerCloseMetaExt => r.with_limited_depth(|r| { - Ok(Self::LedgerCloseMetaExt(Box::new( - LedgerCloseMetaExt::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerCloseMetaV1 => r.with_limited_depth(|r| { - Ok(Self::LedgerCloseMetaV1(Box::new( - LedgerCloseMetaV1::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerCloseMetaV2 => r.with_limited_depth(|r| { - Ok(Self::LedgerCloseMetaV2(Box::new( - LedgerCloseMetaV2::read_xdr(r)?, - ))) - }), - TypeVariant::LedgerCloseMeta => r.with_limited_depth(|r| { - Ok(Self::LedgerCloseMeta(Box::new(LedgerCloseMeta::read_xdr( - r, - )?))) - }), - TypeVariant::ErrorCode => { - r.with_limited_depth(|r| Ok(Self::ErrorCode(Box::new(ErrorCode::read_xdr(r)?)))) - } - TypeVariant::SError => { - r.with_limited_depth(|r| Ok(Self::SError(Box::new(SError::read_xdr(r)?)))) - } - TypeVariant::SendMore => { - r.with_limited_depth(|r| Ok(Self::SendMore(Box::new(SendMore::read_xdr(r)?)))) - } - TypeVariant::SendMoreExtended => r.with_limited_depth(|r| { - Ok(Self::SendMoreExtended(Box::new( - SendMoreExtended::read_xdr(r)?, - ))) - }), - TypeVariant::AuthCert => { - r.with_limited_depth(|r| Ok(Self::AuthCert(Box::new(AuthCert::read_xdr(r)?)))) - } - TypeVariant::Hello => { - r.with_limited_depth(|r| Ok(Self::Hello(Box::new(Hello::read_xdr(r)?)))) - } - TypeVariant::Auth => { - r.with_limited_depth(|r| Ok(Self::Auth(Box::new(Auth::read_xdr(r)?)))) - } - TypeVariant::IpAddrType => { - r.with_limited_depth(|r| Ok(Self::IpAddrType(Box::new(IpAddrType::read_xdr(r)?)))) - } - TypeVariant::PeerAddress => { - r.with_limited_depth(|r| Ok(Self::PeerAddress(Box::new(PeerAddress::read_xdr(r)?)))) - } - TypeVariant::PeerAddressIp => r.with_limited_depth(|r| { - Ok(Self::PeerAddressIp(Box::new(PeerAddressIp::read_xdr(r)?))) - }), - TypeVariant::MessageType => { - r.with_limited_depth(|r| Ok(Self::MessageType(Box::new(MessageType::read_xdr(r)?)))) - } - TypeVariant::DontHave => { - r.with_limited_depth(|r| Ok(Self::DontHave(Box::new(DontHave::read_xdr(r)?)))) - } - TypeVariant::SurveyMessageCommandType => r.with_limited_depth(|r| { - Ok(Self::SurveyMessageCommandType(Box::new( - SurveyMessageCommandType::read_xdr(r)?, - ))) - }), - TypeVariant::SurveyMessageResponseType => r.with_limited_depth(|r| { - Ok(Self::SurveyMessageResponseType(Box::new( - SurveyMessageResponseType::read_xdr(r)?, - ))) - }), - TypeVariant::TimeSlicedSurveyStartCollectingMessage => r.with_limited_depth(|r| { - Ok(Self::TimeSlicedSurveyStartCollectingMessage(Box::new( - TimeSlicedSurveyStartCollectingMessage::read_xdr(r)?, - ))) - }), - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage => { - r.with_limited_depth(|r| { - Ok(Self::SignedTimeSlicedSurveyStartCollectingMessage( - Box::new(SignedTimeSlicedSurveyStartCollectingMessage::read_xdr(r)?), - )) - }) - } - TypeVariant::TimeSlicedSurveyStopCollectingMessage => r.with_limited_depth(|r| { - Ok(Self::TimeSlicedSurveyStopCollectingMessage(Box::new( - TimeSlicedSurveyStopCollectingMessage::read_xdr(r)?, - ))) - }), - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage => r.with_limited_depth(|r| { - Ok(Self::SignedTimeSlicedSurveyStopCollectingMessage(Box::new( - SignedTimeSlicedSurveyStopCollectingMessage::read_xdr(r)?, - ))) - }), - TypeVariant::SurveyRequestMessage => r.with_limited_depth(|r| { - Ok(Self::SurveyRequestMessage(Box::new( - SurveyRequestMessage::read_xdr(r)?, - ))) - }), - TypeVariant::TimeSlicedSurveyRequestMessage => r.with_limited_depth(|r| { - Ok(Self::TimeSlicedSurveyRequestMessage(Box::new( - TimeSlicedSurveyRequestMessage::read_xdr(r)?, - ))) - }), - TypeVariant::SignedTimeSlicedSurveyRequestMessage => r.with_limited_depth(|r| { - Ok(Self::SignedTimeSlicedSurveyRequestMessage(Box::new( - SignedTimeSlicedSurveyRequestMessage::read_xdr(r)?, - ))) - }), - TypeVariant::EncryptedBody => r.with_limited_depth(|r| { - Ok(Self::EncryptedBody(Box::new(EncryptedBody::read_xdr(r)?))) - }), - TypeVariant::SurveyResponseMessage => r.with_limited_depth(|r| { - Ok(Self::SurveyResponseMessage(Box::new( - SurveyResponseMessage::read_xdr(r)?, - ))) - }), - TypeVariant::TimeSlicedSurveyResponseMessage => r.with_limited_depth(|r| { - Ok(Self::TimeSlicedSurveyResponseMessage(Box::new( - TimeSlicedSurveyResponseMessage::read_xdr(r)?, - ))) - }), - TypeVariant::SignedTimeSlicedSurveyResponseMessage => r.with_limited_depth(|r| { - Ok(Self::SignedTimeSlicedSurveyResponseMessage(Box::new( - SignedTimeSlicedSurveyResponseMessage::read_xdr(r)?, - ))) - }), - TypeVariant::PeerStats => { - r.with_limited_depth(|r| Ok(Self::PeerStats(Box::new(PeerStats::read_xdr(r)?)))) - } - TypeVariant::TimeSlicedNodeData => r.with_limited_depth(|r| { - Ok(Self::TimeSlicedNodeData(Box::new( - TimeSlicedNodeData::read_xdr(r)?, - ))) - }), - TypeVariant::TimeSlicedPeerData => r.with_limited_depth(|r| { - Ok(Self::TimeSlicedPeerData(Box::new( - TimeSlicedPeerData::read_xdr(r)?, - ))) - }), - TypeVariant::TimeSlicedPeerDataList => r.with_limited_depth(|r| { - Ok(Self::TimeSlicedPeerDataList(Box::new( - TimeSlicedPeerDataList::read_xdr(r)?, - ))) - }), - TypeVariant::TopologyResponseBodyV2 => r.with_limited_depth(|r| { - Ok(Self::TopologyResponseBodyV2(Box::new( - TopologyResponseBodyV2::read_xdr(r)?, - ))) - }), - TypeVariant::SurveyResponseBody => r.with_limited_depth(|r| { - Ok(Self::SurveyResponseBody(Box::new( - SurveyResponseBody::read_xdr(r)?, - ))) - }), - TypeVariant::TxAdvertVector => r.with_limited_depth(|r| { - Ok(Self::TxAdvertVector(Box::new(TxAdvertVector::read_xdr(r)?))) - }), - TypeVariant::FloodAdvert => { - r.with_limited_depth(|r| Ok(Self::FloodAdvert(Box::new(FloodAdvert::read_xdr(r)?)))) - } - TypeVariant::TxDemandVector => r.with_limited_depth(|r| { - Ok(Self::TxDemandVector(Box::new(TxDemandVector::read_xdr(r)?))) - }), - TypeVariant::FloodDemand => { - r.with_limited_depth(|r| Ok(Self::FloodDemand(Box::new(FloodDemand::read_xdr(r)?)))) - } - TypeVariant::StellarMessage => r.with_limited_depth(|r| { - Ok(Self::StellarMessage(Box::new(StellarMessage::read_xdr(r)?))) - }), - TypeVariant::AuthenticatedMessage => r.with_limited_depth(|r| { - Ok(Self::AuthenticatedMessage(Box::new( - AuthenticatedMessage::read_xdr(r)?, - ))) - }), - TypeVariant::AuthenticatedMessageV0 => r.with_limited_depth(|r| { - Ok(Self::AuthenticatedMessageV0(Box::new( - AuthenticatedMessageV0::read_xdr(r)?, - ))) - }), - TypeVariant::LiquidityPoolParameters => r.with_limited_depth(|r| { - Ok(Self::LiquidityPoolParameters(Box::new( - LiquidityPoolParameters::read_xdr(r)?, - ))) - }), - TypeVariant::MuxedAccount => r.with_limited_depth(|r| { - Ok(Self::MuxedAccount(Box::new(MuxedAccount::read_xdr(r)?))) - }), - TypeVariant::MuxedAccountMed25519 => r.with_limited_depth(|r| { - Ok(Self::MuxedAccountMed25519(Box::new( - MuxedAccountMed25519::read_xdr(r)?, - ))) - }), - TypeVariant::DecoratedSignature => r.with_limited_depth(|r| { - Ok(Self::DecoratedSignature(Box::new( - DecoratedSignature::read_xdr(r)?, - ))) - }), - TypeVariant::OperationType => r.with_limited_depth(|r| { - Ok(Self::OperationType(Box::new(OperationType::read_xdr(r)?))) - }), - TypeVariant::CreateAccountOp => r.with_limited_depth(|r| { - Ok(Self::CreateAccountOp(Box::new(CreateAccountOp::read_xdr( - r, - )?))) - }), - TypeVariant::PaymentOp => { - r.with_limited_depth(|r| Ok(Self::PaymentOp(Box::new(PaymentOp::read_xdr(r)?)))) - } - TypeVariant::PathPaymentStrictReceiveOp => r.with_limited_depth(|r| { - Ok(Self::PathPaymentStrictReceiveOp(Box::new( - PathPaymentStrictReceiveOp::read_xdr(r)?, - ))) - }), - TypeVariant::PathPaymentStrictSendOp => r.with_limited_depth(|r| { - Ok(Self::PathPaymentStrictSendOp(Box::new( - PathPaymentStrictSendOp::read_xdr(r)?, - ))) - }), - TypeVariant::ManageSellOfferOp => r.with_limited_depth(|r| { - Ok(Self::ManageSellOfferOp(Box::new( - ManageSellOfferOp::read_xdr(r)?, - ))) - }), - TypeVariant::ManageBuyOfferOp => r.with_limited_depth(|r| { - Ok(Self::ManageBuyOfferOp(Box::new( - ManageBuyOfferOp::read_xdr(r)?, - ))) - }), - TypeVariant::CreatePassiveSellOfferOp => r.with_limited_depth(|r| { - Ok(Self::CreatePassiveSellOfferOp(Box::new( - CreatePassiveSellOfferOp::read_xdr(r)?, - ))) - }), - TypeVariant::SetOptionsOp => r.with_limited_depth(|r| { - Ok(Self::SetOptionsOp(Box::new(SetOptionsOp::read_xdr(r)?))) - }), - TypeVariant::ChangeTrustAsset => r.with_limited_depth(|r| { - Ok(Self::ChangeTrustAsset(Box::new( - ChangeTrustAsset::read_xdr(r)?, - ))) - }), - TypeVariant::ChangeTrustOp => r.with_limited_depth(|r| { - Ok(Self::ChangeTrustOp(Box::new(ChangeTrustOp::read_xdr(r)?))) - }), - TypeVariant::AllowTrustOp => r.with_limited_depth(|r| { - Ok(Self::AllowTrustOp(Box::new(AllowTrustOp::read_xdr(r)?))) - }), - TypeVariant::ManageDataOp => r.with_limited_depth(|r| { - Ok(Self::ManageDataOp(Box::new(ManageDataOp::read_xdr(r)?))) - }), - TypeVariant::BumpSequenceOp => r.with_limited_depth(|r| { - Ok(Self::BumpSequenceOp(Box::new(BumpSequenceOp::read_xdr(r)?))) - }), - TypeVariant::CreateClaimableBalanceOp => r.with_limited_depth(|r| { - Ok(Self::CreateClaimableBalanceOp(Box::new( - CreateClaimableBalanceOp::read_xdr(r)?, - ))) - }), - TypeVariant::ClaimClaimableBalanceOp => r.with_limited_depth(|r| { - Ok(Self::ClaimClaimableBalanceOp(Box::new( - ClaimClaimableBalanceOp::read_xdr(r)?, - ))) - }), - TypeVariant::BeginSponsoringFutureReservesOp => r.with_limited_depth(|r| { - Ok(Self::BeginSponsoringFutureReservesOp(Box::new( - BeginSponsoringFutureReservesOp::read_xdr(r)?, - ))) - }), - TypeVariant::RevokeSponsorshipType => r.with_limited_depth(|r| { - Ok(Self::RevokeSponsorshipType(Box::new( - RevokeSponsorshipType::read_xdr(r)?, - ))) - }), - TypeVariant::RevokeSponsorshipOp => r.with_limited_depth(|r| { - Ok(Self::RevokeSponsorshipOp(Box::new( - RevokeSponsorshipOp::read_xdr(r)?, - ))) - }), - TypeVariant::RevokeSponsorshipOpSigner => r.with_limited_depth(|r| { - Ok(Self::RevokeSponsorshipOpSigner(Box::new( - RevokeSponsorshipOpSigner::read_xdr(r)?, - ))) - }), - TypeVariant::ClawbackOp => { - r.with_limited_depth(|r| Ok(Self::ClawbackOp(Box::new(ClawbackOp::read_xdr(r)?)))) - } - TypeVariant::ClawbackClaimableBalanceOp => r.with_limited_depth(|r| { - Ok(Self::ClawbackClaimableBalanceOp(Box::new( - ClawbackClaimableBalanceOp::read_xdr(r)?, - ))) - }), - TypeVariant::SetTrustLineFlagsOp => r.with_limited_depth(|r| { - Ok(Self::SetTrustLineFlagsOp(Box::new( - SetTrustLineFlagsOp::read_xdr(r)?, - ))) - }), - TypeVariant::LiquidityPoolDepositOp => r.with_limited_depth(|r| { - Ok(Self::LiquidityPoolDepositOp(Box::new( - LiquidityPoolDepositOp::read_xdr(r)?, - ))) - }), - TypeVariant::LiquidityPoolWithdrawOp => r.with_limited_depth(|r| { - Ok(Self::LiquidityPoolWithdrawOp(Box::new( - LiquidityPoolWithdrawOp::read_xdr(r)?, - ))) - }), - TypeVariant::HostFunctionType => r.with_limited_depth(|r| { - Ok(Self::HostFunctionType(Box::new( - HostFunctionType::read_xdr(r)?, - ))) - }), - TypeVariant::ContractIdPreimageType => r.with_limited_depth(|r| { - Ok(Self::ContractIdPreimageType(Box::new( - ContractIdPreimageType::read_xdr(r)?, - ))) - }), - TypeVariant::ContractIdPreimage => r.with_limited_depth(|r| { - Ok(Self::ContractIdPreimage(Box::new( - ContractIdPreimage::read_xdr(r)?, - ))) - }), - TypeVariant::ContractIdPreimageFromAddress => r.with_limited_depth(|r| { - Ok(Self::ContractIdPreimageFromAddress(Box::new( - ContractIdPreimageFromAddress::read_xdr(r)?, - ))) - }), - TypeVariant::CreateContractArgs => r.with_limited_depth(|r| { - Ok(Self::CreateContractArgs(Box::new( - CreateContractArgs::read_xdr(r)?, - ))) - }), - TypeVariant::CreateContractArgsV2 => r.with_limited_depth(|r| { - Ok(Self::CreateContractArgsV2(Box::new( - CreateContractArgsV2::read_xdr(r)?, - ))) - }), - TypeVariant::InvokeContractArgs => r.with_limited_depth(|r| { - Ok(Self::InvokeContractArgs(Box::new( - InvokeContractArgs::read_xdr(r)?, - ))) - }), - TypeVariant::HostFunction => r.with_limited_depth(|r| { - Ok(Self::HostFunction(Box::new(HostFunction::read_xdr(r)?))) - }), - TypeVariant::SorobanAuthorizedFunctionType => r.with_limited_depth(|r| { - Ok(Self::SorobanAuthorizedFunctionType(Box::new( - SorobanAuthorizedFunctionType::read_xdr(r)?, - ))) - }), - TypeVariant::SorobanAuthorizedFunction => r.with_limited_depth(|r| { - Ok(Self::SorobanAuthorizedFunction(Box::new( - SorobanAuthorizedFunction::read_xdr(r)?, - ))) - }), - TypeVariant::SorobanAuthorizedInvocation => r.with_limited_depth(|r| { - Ok(Self::SorobanAuthorizedInvocation(Box::new( - SorobanAuthorizedInvocation::read_xdr(r)?, - ))) - }), - TypeVariant::SorobanAddressCredentials => r.with_limited_depth(|r| { - Ok(Self::SorobanAddressCredentials(Box::new( - SorobanAddressCredentials::read_xdr(r)?, - ))) - }), - TypeVariant::SorobanCredentialsType => r.with_limited_depth(|r| { - Ok(Self::SorobanCredentialsType(Box::new( - SorobanCredentialsType::read_xdr(r)?, - ))) - }), - TypeVariant::SorobanCredentials => r.with_limited_depth(|r| { - Ok(Self::SorobanCredentials(Box::new( - SorobanCredentials::read_xdr(r)?, - ))) - }), - TypeVariant::SorobanAuthorizationEntry => r.with_limited_depth(|r| { - Ok(Self::SorobanAuthorizationEntry(Box::new( - SorobanAuthorizationEntry::read_xdr(r)?, - ))) - }), - TypeVariant::SorobanAuthorizationEntries => r.with_limited_depth(|r| { - Ok(Self::SorobanAuthorizationEntries(Box::new( - SorobanAuthorizationEntries::read_xdr(r)?, - ))) - }), - TypeVariant::InvokeHostFunctionOp => r.with_limited_depth(|r| { - Ok(Self::InvokeHostFunctionOp(Box::new( - InvokeHostFunctionOp::read_xdr(r)?, - ))) - }), - TypeVariant::ExtendFootprintTtlOp => r.with_limited_depth(|r| { - Ok(Self::ExtendFootprintTtlOp(Box::new( - ExtendFootprintTtlOp::read_xdr(r)?, - ))) - }), - TypeVariant::RestoreFootprintOp => r.with_limited_depth(|r| { - Ok(Self::RestoreFootprintOp(Box::new( - RestoreFootprintOp::read_xdr(r)?, - ))) - }), - TypeVariant::Operation => { - r.with_limited_depth(|r| Ok(Self::Operation(Box::new(Operation::read_xdr(r)?)))) - } - TypeVariant::OperationBody => r.with_limited_depth(|r| { - Ok(Self::OperationBody(Box::new(OperationBody::read_xdr(r)?))) - }), - TypeVariant::HashIdPreimage => r.with_limited_depth(|r| { - Ok(Self::HashIdPreimage(Box::new(HashIdPreimage::read_xdr(r)?))) - }), - TypeVariant::HashIdPreimageOperationId => r.with_limited_depth(|r| { - Ok(Self::HashIdPreimageOperationId(Box::new( - HashIdPreimageOperationId::read_xdr(r)?, - ))) - }), - TypeVariant::HashIdPreimageRevokeId => r.with_limited_depth(|r| { - Ok(Self::HashIdPreimageRevokeId(Box::new( - HashIdPreimageRevokeId::read_xdr(r)?, - ))) - }), - TypeVariant::HashIdPreimageContractId => r.with_limited_depth(|r| { - Ok(Self::HashIdPreimageContractId(Box::new( - HashIdPreimageContractId::read_xdr(r)?, - ))) - }), - TypeVariant::HashIdPreimageSorobanAuthorization => r.with_limited_depth(|r| { - Ok(Self::HashIdPreimageSorobanAuthorization(Box::new( - HashIdPreimageSorobanAuthorization::read_xdr(r)?, - ))) - }), - TypeVariant::MemoType => { - r.with_limited_depth(|r| Ok(Self::MemoType(Box::new(MemoType::read_xdr(r)?)))) - } - TypeVariant::Memo => { - r.with_limited_depth(|r| Ok(Self::Memo(Box::new(Memo::read_xdr(r)?)))) - } - TypeVariant::TimeBounds => { - r.with_limited_depth(|r| Ok(Self::TimeBounds(Box::new(TimeBounds::read_xdr(r)?)))) - } - TypeVariant::LedgerBounds => r.with_limited_depth(|r| { - Ok(Self::LedgerBounds(Box::new(LedgerBounds::read_xdr(r)?))) - }), - TypeVariant::PreconditionsV2 => r.with_limited_depth(|r| { - Ok(Self::PreconditionsV2(Box::new(PreconditionsV2::read_xdr( - r, - )?))) - }), - TypeVariant::PreconditionType => r.with_limited_depth(|r| { - Ok(Self::PreconditionType(Box::new( - PreconditionType::read_xdr(r)?, - ))) - }), - TypeVariant::Preconditions => r.with_limited_depth(|r| { - Ok(Self::Preconditions(Box::new(Preconditions::read_xdr(r)?))) - }), - TypeVariant::LedgerFootprint => r.with_limited_depth(|r| { - Ok(Self::LedgerFootprint(Box::new(LedgerFootprint::read_xdr( - r, - )?))) - }), - TypeVariant::SorobanResources => r.with_limited_depth(|r| { - Ok(Self::SorobanResources(Box::new( - SorobanResources::read_xdr(r)?, - ))) - }), - TypeVariant::SorobanResourcesExtV0 => r.with_limited_depth(|r| { - Ok(Self::SorobanResourcesExtV0(Box::new( - SorobanResourcesExtV0::read_xdr(r)?, - ))) - }), - TypeVariant::SorobanTransactionData => r.with_limited_depth(|r| { - Ok(Self::SorobanTransactionData(Box::new( - SorobanTransactionData::read_xdr(r)?, - ))) - }), - TypeVariant::SorobanTransactionDataExt => r.with_limited_depth(|r| { - Ok(Self::SorobanTransactionDataExt(Box::new( - SorobanTransactionDataExt::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionV0 => r.with_limited_depth(|r| { - Ok(Self::TransactionV0(Box::new(TransactionV0::read_xdr(r)?))) - }), - TypeVariant::TransactionV0Ext => r.with_limited_depth(|r| { - Ok(Self::TransactionV0Ext(Box::new( - TransactionV0Ext::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionV0Envelope => r.with_limited_depth(|r| { - Ok(Self::TransactionV0Envelope(Box::new( - TransactionV0Envelope::read_xdr(r)?, - ))) - }), - TypeVariant::Transaction => { - r.with_limited_depth(|r| Ok(Self::Transaction(Box::new(Transaction::read_xdr(r)?)))) - } - TypeVariant::TransactionExt => r.with_limited_depth(|r| { - Ok(Self::TransactionExt(Box::new(TransactionExt::read_xdr(r)?))) - }), - TypeVariant::TransactionV1Envelope => r.with_limited_depth(|r| { - Ok(Self::TransactionV1Envelope(Box::new( - TransactionV1Envelope::read_xdr(r)?, - ))) - }), - TypeVariant::FeeBumpTransaction => r.with_limited_depth(|r| { - Ok(Self::FeeBumpTransaction(Box::new( - FeeBumpTransaction::read_xdr(r)?, - ))) - }), - TypeVariant::FeeBumpTransactionInnerTx => r.with_limited_depth(|r| { - Ok(Self::FeeBumpTransactionInnerTx(Box::new( - FeeBumpTransactionInnerTx::read_xdr(r)?, - ))) - }), - TypeVariant::FeeBumpTransactionExt => r.with_limited_depth(|r| { - Ok(Self::FeeBumpTransactionExt(Box::new( - FeeBumpTransactionExt::read_xdr(r)?, - ))) - }), - TypeVariant::FeeBumpTransactionEnvelope => r.with_limited_depth(|r| { - Ok(Self::FeeBumpTransactionEnvelope(Box::new( - FeeBumpTransactionEnvelope::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionEnvelope => r.with_limited_depth(|r| { - Ok(Self::TransactionEnvelope(Box::new( - TransactionEnvelope::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionSignaturePayload => r.with_limited_depth(|r| { - Ok(Self::TransactionSignaturePayload(Box::new( - TransactionSignaturePayload::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionSignaturePayloadTaggedTransaction => { - r.with_limited_depth(|r| { - Ok(Self::TransactionSignaturePayloadTaggedTransaction( - Box::new(TransactionSignaturePayloadTaggedTransaction::read_xdr(r)?), - )) - }) - } - TypeVariant::ClaimAtomType => r.with_limited_depth(|r| { - Ok(Self::ClaimAtomType(Box::new(ClaimAtomType::read_xdr(r)?))) - }), - TypeVariant::ClaimOfferAtomV0 => r.with_limited_depth(|r| { - Ok(Self::ClaimOfferAtomV0(Box::new( - ClaimOfferAtomV0::read_xdr(r)?, - ))) - }), - TypeVariant::ClaimOfferAtom => r.with_limited_depth(|r| { - Ok(Self::ClaimOfferAtom(Box::new(ClaimOfferAtom::read_xdr(r)?))) - }), - TypeVariant::ClaimLiquidityAtom => r.with_limited_depth(|r| { - Ok(Self::ClaimLiquidityAtom(Box::new( - ClaimLiquidityAtom::read_xdr(r)?, - ))) - }), - TypeVariant::ClaimAtom => { - r.with_limited_depth(|r| Ok(Self::ClaimAtom(Box::new(ClaimAtom::read_xdr(r)?)))) - } - TypeVariant::CreateAccountResultCode => r.with_limited_depth(|r| { - Ok(Self::CreateAccountResultCode(Box::new( - CreateAccountResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::CreateAccountResult => r.with_limited_depth(|r| { - Ok(Self::CreateAccountResult(Box::new( - CreateAccountResult::read_xdr(r)?, - ))) - }), - TypeVariant::PaymentResultCode => r.with_limited_depth(|r| { - Ok(Self::PaymentResultCode(Box::new( - PaymentResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::PaymentResult => r.with_limited_depth(|r| { - Ok(Self::PaymentResult(Box::new(PaymentResult::read_xdr(r)?))) - }), - TypeVariant::PathPaymentStrictReceiveResultCode => r.with_limited_depth(|r| { - Ok(Self::PathPaymentStrictReceiveResultCode(Box::new( - PathPaymentStrictReceiveResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::SimplePaymentResult => r.with_limited_depth(|r| { - Ok(Self::SimplePaymentResult(Box::new( - SimplePaymentResult::read_xdr(r)?, - ))) - }), - TypeVariant::PathPaymentStrictReceiveResult => r.with_limited_depth(|r| { - Ok(Self::PathPaymentStrictReceiveResult(Box::new( - PathPaymentStrictReceiveResult::read_xdr(r)?, - ))) - }), - TypeVariant::PathPaymentStrictReceiveResultSuccess => r.with_limited_depth(|r| { - Ok(Self::PathPaymentStrictReceiveResultSuccess(Box::new( - PathPaymentStrictReceiveResultSuccess::read_xdr(r)?, - ))) - }), - TypeVariant::PathPaymentStrictSendResultCode => r.with_limited_depth(|r| { - Ok(Self::PathPaymentStrictSendResultCode(Box::new( - PathPaymentStrictSendResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::PathPaymentStrictSendResult => r.with_limited_depth(|r| { - Ok(Self::PathPaymentStrictSendResult(Box::new( - PathPaymentStrictSendResult::read_xdr(r)?, - ))) - }), - TypeVariant::PathPaymentStrictSendResultSuccess => r.with_limited_depth(|r| { - Ok(Self::PathPaymentStrictSendResultSuccess(Box::new( - PathPaymentStrictSendResultSuccess::read_xdr(r)?, - ))) - }), - TypeVariant::ManageSellOfferResultCode => r.with_limited_depth(|r| { - Ok(Self::ManageSellOfferResultCode(Box::new( - ManageSellOfferResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::ManageOfferEffect => r.with_limited_depth(|r| { - Ok(Self::ManageOfferEffect(Box::new( - ManageOfferEffect::read_xdr(r)?, - ))) - }), - TypeVariant::ManageOfferSuccessResult => r.with_limited_depth(|r| { - Ok(Self::ManageOfferSuccessResult(Box::new( - ManageOfferSuccessResult::read_xdr(r)?, - ))) - }), - TypeVariant::ManageOfferSuccessResultOffer => r.with_limited_depth(|r| { - Ok(Self::ManageOfferSuccessResultOffer(Box::new( - ManageOfferSuccessResultOffer::read_xdr(r)?, - ))) - }), - TypeVariant::ManageSellOfferResult => r.with_limited_depth(|r| { - Ok(Self::ManageSellOfferResult(Box::new( - ManageSellOfferResult::read_xdr(r)?, - ))) - }), - TypeVariant::ManageBuyOfferResultCode => r.with_limited_depth(|r| { - Ok(Self::ManageBuyOfferResultCode(Box::new( - ManageBuyOfferResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::ManageBuyOfferResult => r.with_limited_depth(|r| { - Ok(Self::ManageBuyOfferResult(Box::new( - ManageBuyOfferResult::read_xdr(r)?, - ))) - }), - TypeVariant::SetOptionsResultCode => r.with_limited_depth(|r| { - Ok(Self::SetOptionsResultCode(Box::new( - SetOptionsResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::SetOptionsResult => r.with_limited_depth(|r| { - Ok(Self::SetOptionsResult(Box::new( - SetOptionsResult::read_xdr(r)?, - ))) - }), - TypeVariant::ChangeTrustResultCode => r.with_limited_depth(|r| { - Ok(Self::ChangeTrustResultCode(Box::new( - ChangeTrustResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::ChangeTrustResult => r.with_limited_depth(|r| { - Ok(Self::ChangeTrustResult(Box::new( - ChangeTrustResult::read_xdr(r)?, - ))) - }), - TypeVariant::AllowTrustResultCode => r.with_limited_depth(|r| { - Ok(Self::AllowTrustResultCode(Box::new( - AllowTrustResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::AllowTrustResult => r.with_limited_depth(|r| { - Ok(Self::AllowTrustResult(Box::new( - AllowTrustResult::read_xdr(r)?, - ))) - }), - TypeVariant::AccountMergeResultCode => r.with_limited_depth(|r| { - Ok(Self::AccountMergeResultCode(Box::new( - AccountMergeResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::AccountMergeResult => r.with_limited_depth(|r| { - Ok(Self::AccountMergeResult(Box::new( - AccountMergeResult::read_xdr(r)?, - ))) - }), - TypeVariant::InflationResultCode => r.with_limited_depth(|r| { - Ok(Self::InflationResultCode(Box::new( - InflationResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::InflationPayout => r.with_limited_depth(|r| { - Ok(Self::InflationPayout(Box::new(InflationPayout::read_xdr( - r, - )?))) - }), - TypeVariant::InflationResult => r.with_limited_depth(|r| { - Ok(Self::InflationResult(Box::new(InflationResult::read_xdr( - r, - )?))) - }), - TypeVariant::ManageDataResultCode => r.with_limited_depth(|r| { - Ok(Self::ManageDataResultCode(Box::new( - ManageDataResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::ManageDataResult => r.with_limited_depth(|r| { - Ok(Self::ManageDataResult(Box::new( - ManageDataResult::read_xdr(r)?, - ))) - }), - TypeVariant::BumpSequenceResultCode => r.with_limited_depth(|r| { - Ok(Self::BumpSequenceResultCode(Box::new( - BumpSequenceResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::BumpSequenceResult => r.with_limited_depth(|r| { - Ok(Self::BumpSequenceResult(Box::new( - BumpSequenceResult::read_xdr(r)?, - ))) - }), - TypeVariant::CreateClaimableBalanceResultCode => r.with_limited_depth(|r| { - Ok(Self::CreateClaimableBalanceResultCode(Box::new( - CreateClaimableBalanceResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::CreateClaimableBalanceResult => r.with_limited_depth(|r| { - Ok(Self::CreateClaimableBalanceResult(Box::new( - CreateClaimableBalanceResult::read_xdr(r)?, - ))) - }), - TypeVariant::ClaimClaimableBalanceResultCode => r.with_limited_depth(|r| { - Ok(Self::ClaimClaimableBalanceResultCode(Box::new( - ClaimClaimableBalanceResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::ClaimClaimableBalanceResult => r.with_limited_depth(|r| { - Ok(Self::ClaimClaimableBalanceResult(Box::new( - ClaimClaimableBalanceResult::read_xdr(r)?, - ))) - }), - TypeVariant::BeginSponsoringFutureReservesResultCode => r.with_limited_depth(|r| { - Ok(Self::BeginSponsoringFutureReservesResultCode(Box::new( - BeginSponsoringFutureReservesResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::BeginSponsoringFutureReservesResult => r.with_limited_depth(|r| { - Ok(Self::BeginSponsoringFutureReservesResult(Box::new( - BeginSponsoringFutureReservesResult::read_xdr(r)?, - ))) - }), - TypeVariant::EndSponsoringFutureReservesResultCode => r.with_limited_depth(|r| { - Ok(Self::EndSponsoringFutureReservesResultCode(Box::new( - EndSponsoringFutureReservesResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::EndSponsoringFutureReservesResult => r.with_limited_depth(|r| { - Ok(Self::EndSponsoringFutureReservesResult(Box::new( - EndSponsoringFutureReservesResult::read_xdr(r)?, - ))) - }), - TypeVariant::RevokeSponsorshipResultCode => r.with_limited_depth(|r| { - Ok(Self::RevokeSponsorshipResultCode(Box::new( - RevokeSponsorshipResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::RevokeSponsorshipResult => r.with_limited_depth(|r| { - Ok(Self::RevokeSponsorshipResult(Box::new( - RevokeSponsorshipResult::read_xdr(r)?, - ))) - }), - TypeVariant::ClawbackResultCode => r.with_limited_depth(|r| { - Ok(Self::ClawbackResultCode(Box::new( - ClawbackResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::ClawbackResult => r.with_limited_depth(|r| { - Ok(Self::ClawbackResult(Box::new(ClawbackResult::read_xdr(r)?))) - }), - TypeVariant::ClawbackClaimableBalanceResultCode => r.with_limited_depth(|r| { - Ok(Self::ClawbackClaimableBalanceResultCode(Box::new( - ClawbackClaimableBalanceResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::ClawbackClaimableBalanceResult => r.with_limited_depth(|r| { - Ok(Self::ClawbackClaimableBalanceResult(Box::new( - ClawbackClaimableBalanceResult::read_xdr(r)?, - ))) - }), - TypeVariant::SetTrustLineFlagsResultCode => r.with_limited_depth(|r| { - Ok(Self::SetTrustLineFlagsResultCode(Box::new( - SetTrustLineFlagsResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::SetTrustLineFlagsResult => r.with_limited_depth(|r| { - Ok(Self::SetTrustLineFlagsResult(Box::new( - SetTrustLineFlagsResult::read_xdr(r)?, - ))) - }), - TypeVariant::LiquidityPoolDepositResultCode => r.with_limited_depth(|r| { - Ok(Self::LiquidityPoolDepositResultCode(Box::new( - LiquidityPoolDepositResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::LiquidityPoolDepositResult => r.with_limited_depth(|r| { - Ok(Self::LiquidityPoolDepositResult(Box::new( - LiquidityPoolDepositResult::read_xdr(r)?, - ))) - }), - TypeVariant::LiquidityPoolWithdrawResultCode => r.with_limited_depth(|r| { - Ok(Self::LiquidityPoolWithdrawResultCode(Box::new( - LiquidityPoolWithdrawResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::LiquidityPoolWithdrawResult => r.with_limited_depth(|r| { - Ok(Self::LiquidityPoolWithdrawResult(Box::new( - LiquidityPoolWithdrawResult::read_xdr(r)?, - ))) - }), - TypeVariant::InvokeHostFunctionResultCode => r.with_limited_depth(|r| { - Ok(Self::InvokeHostFunctionResultCode(Box::new( - InvokeHostFunctionResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::InvokeHostFunctionResult => r.with_limited_depth(|r| { - Ok(Self::InvokeHostFunctionResult(Box::new( - InvokeHostFunctionResult::read_xdr(r)?, - ))) - }), - TypeVariant::ExtendFootprintTtlResultCode => r.with_limited_depth(|r| { - Ok(Self::ExtendFootprintTtlResultCode(Box::new( - ExtendFootprintTtlResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::ExtendFootprintTtlResult => r.with_limited_depth(|r| { - Ok(Self::ExtendFootprintTtlResult(Box::new( - ExtendFootprintTtlResult::read_xdr(r)?, - ))) - }), - TypeVariant::RestoreFootprintResultCode => r.with_limited_depth(|r| { - Ok(Self::RestoreFootprintResultCode(Box::new( - RestoreFootprintResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::RestoreFootprintResult => r.with_limited_depth(|r| { - Ok(Self::RestoreFootprintResult(Box::new( - RestoreFootprintResult::read_xdr(r)?, - ))) - }), - TypeVariant::OperationResultCode => r.with_limited_depth(|r| { - Ok(Self::OperationResultCode(Box::new( - OperationResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::OperationResult => r.with_limited_depth(|r| { - Ok(Self::OperationResult(Box::new(OperationResult::read_xdr( - r, - )?))) - }), - TypeVariant::OperationResultTr => r.with_limited_depth(|r| { - Ok(Self::OperationResultTr(Box::new( - OperationResultTr::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionResultCode => r.with_limited_depth(|r| { - Ok(Self::TransactionResultCode(Box::new( - TransactionResultCode::read_xdr(r)?, - ))) - }), - TypeVariant::InnerTransactionResult => r.with_limited_depth(|r| { - Ok(Self::InnerTransactionResult(Box::new( - InnerTransactionResult::read_xdr(r)?, - ))) - }), - TypeVariant::InnerTransactionResultResult => r.with_limited_depth(|r| { - Ok(Self::InnerTransactionResultResult(Box::new( - InnerTransactionResultResult::read_xdr(r)?, - ))) - }), - TypeVariant::InnerTransactionResultExt => r.with_limited_depth(|r| { - Ok(Self::InnerTransactionResultExt(Box::new( - InnerTransactionResultExt::read_xdr(r)?, - ))) - }), - TypeVariant::InnerTransactionResultPair => r.with_limited_depth(|r| { - Ok(Self::InnerTransactionResultPair(Box::new( - InnerTransactionResultPair::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionResult => r.with_limited_depth(|r| { - Ok(Self::TransactionResult(Box::new( - TransactionResult::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionResultResult => r.with_limited_depth(|r| { - Ok(Self::TransactionResultResult(Box::new( - TransactionResultResult::read_xdr(r)?, - ))) - }), - TypeVariant::TransactionResultExt => r.with_limited_depth(|r| { - Ok(Self::TransactionResultExt(Box::new( - TransactionResultExt::read_xdr(r)?, - ))) - }), - TypeVariant::Hash => { - r.with_limited_depth(|r| Ok(Self::Hash(Box::new(Hash::read_xdr(r)?)))) - } - TypeVariant::Uint256 => { - r.with_limited_depth(|r| Ok(Self::Uint256(Box::new(Uint256::read_xdr(r)?)))) - } - TypeVariant::Uint32 => { - r.with_limited_depth(|r| Ok(Self::Uint32(Box::new(Uint32::read_xdr(r)?)))) - } - TypeVariant::Int32 => { - r.with_limited_depth(|r| Ok(Self::Int32(Box::new(Int32::read_xdr(r)?)))) - } - TypeVariant::Uint64 => { - r.with_limited_depth(|r| Ok(Self::Uint64(Box::new(Uint64::read_xdr(r)?)))) - } - TypeVariant::Int64 => { - r.with_limited_depth(|r| Ok(Self::Int64(Box::new(Int64::read_xdr(r)?)))) - } - TypeVariant::TimePoint => { - r.with_limited_depth(|r| Ok(Self::TimePoint(Box::new(TimePoint::read_xdr(r)?)))) - } - TypeVariant::Duration => { - r.with_limited_depth(|r| Ok(Self::Duration(Box::new(Duration::read_xdr(r)?)))) - } - TypeVariant::ExtensionPoint => r.with_limited_depth(|r| { - Ok(Self::ExtensionPoint(Box::new(ExtensionPoint::read_xdr(r)?))) - }), - TypeVariant::CryptoKeyType => r.with_limited_depth(|r| { - Ok(Self::CryptoKeyType(Box::new(CryptoKeyType::read_xdr(r)?))) - }), - TypeVariant::PublicKeyType => r.with_limited_depth(|r| { - Ok(Self::PublicKeyType(Box::new(PublicKeyType::read_xdr(r)?))) - }), - TypeVariant::SignerKeyType => r.with_limited_depth(|r| { - Ok(Self::SignerKeyType(Box::new(SignerKeyType::read_xdr(r)?))) - }), - TypeVariant::PublicKey => { - r.with_limited_depth(|r| Ok(Self::PublicKey(Box::new(PublicKey::read_xdr(r)?)))) - } - TypeVariant::SignerKey => { - r.with_limited_depth(|r| Ok(Self::SignerKey(Box::new(SignerKey::read_xdr(r)?)))) - } - TypeVariant::SignerKeyEd25519SignedPayload => r.with_limited_depth(|r| { - Ok(Self::SignerKeyEd25519SignedPayload(Box::new( - SignerKeyEd25519SignedPayload::read_xdr(r)?, - ))) - }), - TypeVariant::Signature => { - r.with_limited_depth(|r| Ok(Self::Signature(Box::new(Signature::read_xdr(r)?)))) - } - TypeVariant::SignatureHint => r.with_limited_depth(|r| { - Ok(Self::SignatureHint(Box::new(SignatureHint::read_xdr(r)?))) - }), - TypeVariant::NodeId => { - r.with_limited_depth(|r| Ok(Self::NodeId(Box::new(NodeId::read_xdr(r)?)))) - } - TypeVariant::AccountId => { - r.with_limited_depth(|r| Ok(Self::AccountId(Box::new(AccountId::read_xdr(r)?)))) - } - TypeVariant::ContractId => { - r.with_limited_depth(|r| Ok(Self::ContractId(Box::new(ContractId::read_xdr(r)?)))) - } - TypeVariant::Curve25519Secret => r.with_limited_depth(|r| { - Ok(Self::Curve25519Secret(Box::new( - Curve25519Secret::read_xdr(r)?, - ))) - }), - TypeVariant::Curve25519Public => r.with_limited_depth(|r| { - Ok(Self::Curve25519Public(Box::new( - Curve25519Public::read_xdr(r)?, - ))) - }), - TypeVariant::HmacSha256Key => r.with_limited_depth(|r| { - Ok(Self::HmacSha256Key(Box::new(HmacSha256Key::read_xdr(r)?))) - }), - TypeVariant::HmacSha256Mac => r.with_limited_depth(|r| { - Ok(Self::HmacSha256Mac(Box::new(HmacSha256Mac::read_xdr(r)?))) - }), - TypeVariant::ShortHashSeed => r.with_limited_depth(|r| { - Ok(Self::ShortHashSeed(Box::new(ShortHashSeed::read_xdr(r)?))) - }), - TypeVariant::BinaryFuseFilterType => r.with_limited_depth(|r| { - Ok(Self::BinaryFuseFilterType(Box::new( - BinaryFuseFilterType::read_xdr(r)?, - ))) - }), - TypeVariant::SerializedBinaryFuseFilter => r.with_limited_depth(|r| { - Ok(Self::SerializedBinaryFuseFilter(Box::new( - SerializedBinaryFuseFilter::read_xdr(r)?, - ))) - }), - TypeVariant::PoolId => { - r.with_limited_depth(|r| Ok(Self::PoolId(Box::new(PoolId::read_xdr(r)?)))) - } - TypeVariant::ClaimableBalanceIdType => r.with_limited_depth(|r| { - Ok(Self::ClaimableBalanceIdType(Box::new( - ClaimableBalanceIdType::read_xdr(r)?, - ))) - }), - TypeVariant::ClaimableBalanceId => r.with_limited_depth(|r| { - Ok(Self::ClaimableBalanceId(Box::new( - ClaimableBalanceId::read_xdr(r)?, - ))) - }), - } - } - - #[cfg(feature = "base64")] - pub fn read_xdr_base64(v: TypeVariant, r: &mut Limited) -> Result { - let mut dec = Limited::new( - base64::read::DecoderReader::new( - SkipWhitespace::new(&mut r.inner), - &base64::engine::general_purpose::STANDARD, - ), - r.limits.clone(), - ); - let t = Self::read_xdr(v, &mut dec)?; - Ok(t) - } - - #[cfg(feature = "std")] - pub fn read_xdr_to_end(v: TypeVariant, r: &mut Limited) -> Result { - let s = Self::read_xdr(v, r)?; - // Check that any further reads, such as this read of one byte, read no - // data, indicating EOF. If a byte is read the data is invalid. - if r.read(&mut [0u8; 1])? == 0 { - Ok(s) - } else { - Err(Error::Invalid) - } - } - - #[cfg(feature = "base64")] - pub fn read_xdr_base64_to_end( - v: TypeVariant, - r: &mut Limited, - ) -> Result { - let mut dec = Limited::new( - base64::read::DecoderReader::new( - SkipWhitespace::new(&mut r.inner), - &base64::engine::general_purpose::STANDARD, - ), - r.limits.clone(), - ); - let t = Self::read_xdr_to_end(v, &mut dec)?; - Ok(t) - } - - #[cfg(feature = "std")] - #[allow(clippy::too_many_lines)] - pub fn read_xdr_iter( - v: TypeVariant, - r: &mut Limited, - ) -> Box> + '_> { - match v { - TypeVariant::Value => Box::new( - ReadXdrIter::<_, Value>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Value(Box::new(t)))), - ), - TypeVariant::ScpBallot => Box::new( - ReadXdrIter::<_, ScpBallot>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpBallot(Box::new(t)))), - ), - TypeVariant::ScpStatementType => Box::new( - ReadXdrIter::<_, ScpStatementType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatementType(Box::new(t)))), - ), - TypeVariant::ScpNomination => Box::new( - ReadXdrIter::<_, ScpNomination>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpNomination(Box::new(t)))), - ), - TypeVariant::ScpStatement => Box::new( - ReadXdrIter::<_, ScpStatement>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatement(Box::new(t)))), - ), - TypeVariant::ScpStatementPledges => Box::new( - ReadXdrIter::<_, ScpStatementPledges>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatementPledges(Box::new(t)))), - ), - TypeVariant::ScpStatementPrepare => Box::new( - ReadXdrIter::<_, ScpStatementPrepare>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatementPrepare(Box::new(t)))), - ), - TypeVariant::ScpStatementConfirm => Box::new( - ReadXdrIter::<_, ScpStatementConfirm>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatementConfirm(Box::new(t)))), - ), - TypeVariant::ScpStatementExternalize => Box::new( - ReadXdrIter::<_, ScpStatementExternalize>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatementExternalize(Box::new(t)))), - ), - TypeVariant::ScpEnvelope => Box::new( - ReadXdrIter::<_, ScpEnvelope>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpEnvelope(Box::new(t)))), - ), - TypeVariant::ScpQuorumSet => Box::new( - ReadXdrIter::<_, ScpQuorumSet>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpQuorumSet(Box::new(t)))), - ), - TypeVariant::EncodedLedgerKey => Box::new( - ReadXdrIter::<_, EncodedLedgerKey>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::EncodedLedgerKey(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractExecutionLanesV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractExecutionLanesV0>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractExecutionLanesV0(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractComputeV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractComputeV0>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractComputeV0(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractParallelComputeV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractParallelComputeV0>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractParallelComputeV0(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractLedgerCostV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractLedgerCostV0>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractLedgerCostV0(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractLedgerCostExtV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractLedgerCostExtV0>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractLedgerCostExtV0(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractHistoricalDataV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractHistoricalDataV0>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractHistoricalDataV0(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractEventsV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractEventsV0>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractEventsV0(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractBandwidthV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractBandwidthV0>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractBandwidthV0(Box::new(t)))), - ), - TypeVariant::ContractCostType => Box::new( - ReadXdrIter::<_, ContractCostType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCostType(Box::new(t)))), - ), - TypeVariant::ContractCostParamEntry => Box::new( - ReadXdrIter::<_, ContractCostParamEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCostParamEntry(Box::new(t)))), - ), - TypeVariant::StateArchivalSettings => Box::new( - ReadXdrIter::<_, StateArchivalSettings>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::StateArchivalSettings(Box::new(t)))), - ), - TypeVariant::EvictionIterator => Box::new( - ReadXdrIter::<_, EvictionIterator>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::EvictionIterator(Box::new(t)))), - ), - TypeVariant::ConfigSettingScpTiming => Box::new( - ReadXdrIter::<_, ConfigSettingScpTiming>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingScpTiming(Box::new(t)))), - ), - TypeVariant::FrozenLedgerKeys => Box::new( - ReadXdrIter::<_, FrozenLedgerKeys>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FrozenLedgerKeys(Box::new(t)))), - ), - TypeVariant::FrozenLedgerKeysDelta => Box::new( - ReadXdrIter::<_, FrozenLedgerKeysDelta>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FrozenLedgerKeysDelta(Box::new(t)))), - ), - TypeVariant::FreezeBypassTxs => Box::new( - ReadXdrIter::<_, FreezeBypassTxs>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FreezeBypassTxs(Box::new(t)))), - ), - TypeVariant::FreezeBypassTxsDelta => Box::new( - ReadXdrIter::<_, FreezeBypassTxsDelta>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FreezeBypassTxsDelta(Box::new(t)))), - ), - TypeVariant::ContractCostParams => Box::new( - ReadXdrIter::<_, ContractCostParams>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCostParams(Box::new(t)))), - ), - TypeVariant::ConfigSettingId => Box::new( - ReadXdrIter::<_, ConfigSettingId>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingId(Box::new(t)))), - ), - TypeVariant::ConfigSettingEntry => Box::new( - ReadXdrIter::<_, ConfigSettingEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingEntry(Box::new(t)))), - ), - TypeVariant::ScEnvMetaKind => Box::new( - ReadXdrIter::<_, ScEnvMetaKind>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScEnvMetaKind(Box::new(t)))), - ), - TypeVariant::ScEnvMetaEntry => Box::new( - ReadXdrIter::<_, ScEnvMetaEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScEnvMetaEntry(Box::new(t)))), - ), - TypeVariant::ScEnvMetaEntryInterfaceVersion => Box::new( - ReadXdrIter::<_, ScEnvMetaEntryInterfaceVersion>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ScEnvMetaEntryInterfaceVersion(Box::new(t)))), - ), - TypeVariant::ScMetaV0 => Box::new( - ReadXdrIter::<_, ScMetaV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMetaV0(Box::new(t)))), - ), - TypeVariant::ScMetaKind => Box::new( - ReadXdrIter::<_, ScMetaKind>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMetaKind(Box::new(t)))), - ), - TypeVariant::ScMetaEntry => Box::new( - ReadXdrIter::<_, ScMetaEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMetaEntry(Box::new(t)))), - ), - TypeVariant::ScSpecType => Box::new( - ReadXdrIter::<_, ScSpecType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecType(Box::new(t)))), - ), - TypeVariant::ScSpecTypeOption => Box::new( - ReadXdrIter::<_, ScSpecTypeOption>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeOption(Box::new(t)))), - ), - TypeVariant::ScSpecTypeResult => Box::new( - ReadXdrIter::<_, ScSpecTypeResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeResult(Box::new(t)))), - ), - TypeVariant::ScSpecTypeVec => Box::new( - ReadXdrIter::<_, ScSpecTypeVec>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeVec(Box::new(t)))), - ), - TypeVariant::ScSpecTypeMap => Box::new( - ReadXdrIter::<_, ScSpecTypeMap>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeMap(Box::new(t)))), - ), - TypeVariant::ScSpecTypeTuple => Box::new( - ReadXdrIter::<_, ScSpecTypeTuple>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeTuple(Box::new(t)))), - ), - TypeVariant::ScSpecTypeBytesN => Box::new( - ReadXdrIter::<_, ScSpecTypeBytesN>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeBytesN(Box::new(t)))), - ), - TypeVariant::ScSpecTypeUdt => Box::new( - ReadXdrIter::<_, ScSpecTypeUdt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeUdt(Box::new(t)))), - ), - TypeVariant::ScSpecTypeDef => Box::new( - ReadXdrIter::<_, ScSpecTypeDef>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeDef(Box::new(t)))), - ), - TypeVariant::ScSpecUdtStructFieldV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtStructFieldV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtStructFieldV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtStructV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtStructV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtStructV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtUnionCaseVoidV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtUnionCaseVoidV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtUnionCaseVoidV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtUnionCaseTupleV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtUnionCaseTupleV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtUnionCaseTupleV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtUnionCaseV0Kind => Box::new( - ReadXdrIter::<_, ScSpecUdtUnionCaseV0Kind>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtUnionCaseV0Kind(Box::new(t)))), - ), - TypeVariant::ScSpecUdtUnionCaseV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtUnionCaseV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtUnionCaseV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtUnionV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtUnionV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtUnionV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtEnumCaseV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtEnumCaseV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtEnumCaseV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtEnumV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtEnumV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtEnumV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtErrorEnumCaseV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtErrorEnumCaseV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtErrorEnumCaseV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtErrorEnumV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtErrorEnumV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtErrorEnumV0(Box::new(t)))), - ), - TypeVariant::ScSpecFunctionInputV0 => Box::new( - ReadXdrIter::<_, ScSpecFunctionInputV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecFunctionInputV0(Box::new(t)))), - ), - TypeVariant::ScSpecFunctionV0 => Box::new( - ReadXdrIter::<_, ScSpecFunctionV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecFunctionV0(Box::new(t)))), - ), - TypeVariant::ScSpecEventParamLocationV0 => Box::new( - ReadXdrIter::<_, ScSpecEventParamLocationV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEventParamLocationV0(Box::new(t)))), - ), - TypeVariant::ScSpecEventParamV0 => Box::new( - ReadXdrIter::<_, ScSpecEventParamV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEventParamV0(Box::new(t)))), - ), - TypeVariant::ScSpecEventDataFormat => Box::new( - ReadXdrIter::<_, ScSpecEventDataFormat>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEventDataFormat(Box::new(t)))), - ), - TypeVariant::ScSpecEventV0 => Box::new( - ReadXdrIter::<_, ScSpecEventV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEventV0(Box::new(t)))), - ), - TypeVariant::ScSpecEntryKind => Box::new( - ReadXdrIter::<_, ScSpecEntryKind>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEntryKind(Box::new(t)))), - ), - TypeVariant::ScSpecEntry => Box::new( - ReadXdrIter::<_, ScSpecEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEntry(Box::new(t)))), - ), - TypeVariant::ScValType => Box::new( - ReadXdrIter::<_, ScValType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScValType(Box::new(t)))), - ), - TypeVariant::ScErrorType => Box::new( - ReadXdrIter::<_, ScErrorType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScErrorType(Box::new(t)))), - ), - TypeVariant::ScErrorCode => Box::new( - ReadXdrIter::<_, ScErrorCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScErrorCode(Box::new(t)))), - ), - TypeVariant::ScError => Box::new( - ReadXdrIter::<_, ScError>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScError(Box::new(t)))), - ), - TypeVariant::UInt128Parts => Box::new( - ReadXdrIter::<_, UInt128Parts>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::UInt128Parts(Box::new(t)))), - ), - TypeVariant::Int128Parts => Box::new( - ReadXdrIter::<_, Int128Parts>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Int128Parts(Box::new(t)))), - ), - TypeVariant::UInt256Parts => Box::new( - ReadXdrIter::<_, UInt256Parts>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::UInt256Parts(Box::new(t)))), - ), - TypeVariant::Int256Parts => Box::new( - ReadXdrIter::<_, Int256Parts>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Int256Parts(Box::new(t)))), - ), - TypeVariant::ContractExecutableType => Box::new( - ReadXdrIter::<_, ContractExecutableType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractExecutableType(Box::new(t)))), - ), - TypeVariant::ContractExecutable => Box::new( - ReadXdrIter::<_, ContractExecutable>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractExecutable(Box::new(t)))), - ), - TypeVariant::ScAddressType => Box::new( - ReadXdrIter::<_, ScAddressType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScAddressType(Box::new(t)))), - ), - TypeVariant::MuxedEd25519Account => Box::new( - ReadXdrIter::<_, MuxedEd25519Account>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::MuxedEd25519Account(Box::new(t)))), - ), - TypeVariant::ScAddress => Box::new( - ReadXdrIter::<_, ScAddress>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScAddress(Box::new(t)))), - ), - TypeVariant::ScVec => Box::new( - ReadXdrIter::<_, ScVec>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScVec(Box::new(t)))), - ), - TypeVariant::ScMap => Box::new( - ReadXdrIter::<_, ScMap>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMap(Box::new(t)))), - ), - TypeVariant::ScBytes => Box::new( - ReadXdrIter::<_, ScBytes>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScBytes(Box::new(t)))), - ), - TypeVariant::ScString => Box::new( - ReadXdrIter::<_, ScString>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScString(Box::new(t)))), - ), - TypeVariant::ScSymbol => Box::new( - ReadXdrIter::<_, ScSymbol>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSymbol(Box::new(t)))), - ), - TypeVariant::ScNonceKey => Box::new( - ReadXdrIter::<_, ScNonceKey>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScNonceKey(Box::new(t)))), - ), - TypeVariant::ScContractInstance => Box::new( - ReadXdrIter::<_, ScContractInstance>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScContractInstance(Box::new(t)))), - ), - TypeVariant::ScVal => Box::new( - ReadXdrIter::<_, ScVal>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScVal(Box::new(t)))), - ), - TypeVariant::ScMapEntry => Box::new( - ReadXdrIter::<_, ScMapEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMapEntry(Box::new(t)))), - ), - TypeVariant::LedgerCloseMetaBatch => Box::new( - ReadXdrIter::<_, LedgerCloseMetaBatch>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaBatch(Box::new(t)))), - ), - TypeVariant::StoredTransactionSet => Box::new( - ReadXdrIter::<_, StoredTransactionSet>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::StoredTransactionSet(Box::new(t)))), - ), - TypeVariant::StoredDebugTransactionSet => Box::new( - ReadXdrIter::<_, StoredDebugTransactionSet>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::StoredDebugTransactionSet(Box::new(t)))), - ), - TypeVariant::PersistedScpStateV0 => Box::new( - ReadXdrIter::<_, PersistedScpStateV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PersistedScpStateV0(Box::new(t)))), - ), - TypeVariant::PersistedScpStateV1 => Box::new( - ReadXdrIter::<_, PersistedScpStateV1>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PersistedScpStateV1(Box::new(t)))), - ), - TypeVariant::PersistedScpState => Box::new( - ReadXdrIter::<_, PersistedScpState>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PersistedScpState(Box::new(t)))), - ), - TypeVariant::Thresholds => Box::new( - ReadXdrIter::<_, Thresholds>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Thresholds(Box::new(t)))), - ), - TypeVariant::String32 => Box::new( - ReadXdrIter::<_, String32>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::String32(Box::new(t)))), - ), - TypeVariant::String64 => Box::new( - ReadXdrIter::<_, String64>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::String64(Box::new(t)))), - ), - TypeVariant::SequenceNumber => Box::new( - ReadXdrIter::<_, SequenceNumber>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SequenceNumber(Box::new(t)))), - ), - TypeVariant::DataValue => Box::new( - ReadXdrIter::<_, DataValue>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::DataValue(Box::new(t)))), - ), - TypeVariant::AssetCode4 => Box::new( - ReadXdrIter::<_, AssetCode4>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AssetCode4(Box::new(t)))), - ), - TypeVariant::AssetCode12 => Box::new( - ReadXdrIter::<_, AssetCode12>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AssetCode12(Box::new(t)))), - ), - TypeVariant::AssetType => Box::new( - ReadXdrIter::<_, AssetType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AssetType(Box::new(t)))), - ), - TypeVariant::AssetCode => Box::new( - ReadXdrIter::<_, AssetCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AssetCode(Box::new(t)))), - ), - TypeVariant::AlphaNum4 => Box::new( - ReadXdrIter::<_, AlphaNum4>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AlphaNum4(Box::new(t)))), - ), - TypeVariant::AlphaNum12 => Box::new( - ReadXdrIter::<_, AlphaNum12>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AlphaNum12(Box::new(t)))), - ), - TypeVariant::Asset => Box::new( - ReadXdrIter::<_, Asset>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Asset(Box::new(t)))), - ), - TypeVariant::Price => Box::new( - ReadXdrIter::<_, Price>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Price(Box::new(t)))), - ), - TypeVariant::Liabilities => Box::new( - ReadXdrIter::<_, Liabilities>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Liabilities(Box::new(t)))), - ), - TypeVariant::ThresholdIndexes => Box::new( - ReadXdrIter::<_, ThresholdIndexes>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ThresholdIndexes(Box::new(t)))), - ), - TypeVariant::LedgerEntryType => Box::new( - ReadXdrIter::<_, LedgerEntryType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryType(Box::new(t)))), - ), - TypeVariant::Signer => Box::new( - ReadXdrIter::<_, Signer>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Signer(Box::new(t)))), - ), - TypeVariant::AccountFlags => Box::new( - ReadXdrIter::<_, AccountFlags>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountFlags(Box::new(t)))), - ), - TypeVariant::SponsorshipDescriptor => Box::new( - ReadXdrIter::<_, SponsorshipDescriptor>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SponsorshipDescriptor(Box::new(t)))), - ), - TypeVariant::AccountEntryExtensionV3 => Box::new( - ReadXdrIter::<_, AccountEntryExtensionV3>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntryExtensionV3(Box::new(t)))), - ), - TypeVariant::AccountEntryExtensionV2 => Box::new( - ReadXdrIter::<_, AccountEntryExtensionV2>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntryExtensionV2(Box::new(t)))), - ), - TypeVariant::AccountEntryExtensionV2Ext => Box::new( - ReadXdrIter::<_, AccountEntryExtensionV2Ext>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntryExtensionV2Ext(Box::new(t)))), - ), - TypeVariant::AccountEntryExtensionV1 => Box::new( - ReadXdrIter::<_, AccountEntryExtensionV1>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntryExtensionV1(Box::new(t)))), - ), - TypeVariant::AccountEntryExtensionV1Ext => Box::new( - ReadXdrIter::<_, AccountEntryExtensionV1Ext>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntryExtensionV1Ext(Box::new(t)))), - ), - TypeVariant::AccountEntry => Box::new( - ReadXdrIter::<_, AccountEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntry(Box::new(t)))), - ), - TypeVariant::AccountEntryExt => Box::new( - ReadXdrIter::<_, AccountEntryExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntryExt(Box::new(t)))), - ), - TypeVariant::TrustLineFlags => Box::new( - ReadXdrIter::<_, TrustLineFlags>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineFlags(Box::new(t)))), - ), - TypeVariant::LiquidityPoolType => Box::new( - ReadXdrIter::<_, LiquidityPoolType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolType(Box::new(t)))), - ), - TypeVariant::TrustLineAsset => Box::new( - ReadXdrIter::<_, TrustLineAsset>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineAsset(Box::new(t)))), - ), - TypeVariant::TrustLineEntryExtensionV2 => Box::new( - ReadXdrIter::<_, TrustLineEntryExtensionV2>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntryExtensionV2(Box::new(t)))), - ), - TypeVariant::TrustLineEntryExtensionV2Ext => Box::new( - ReadXdrIter::<_, TrustLineEntryExtensionV2Ext>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntryExtensionV2Ext(Box::new(t)))), - ), - TypeVariant::TrustLineEntry => Box::new( - ReadXdrIter::<_, TrustLineEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntry(Box::new(t)))), - ), - TypeVariant::TrustLineEntryExt => Box::new( - ReadXdrIter::<_, TrustLineEntryExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntryExt(Box::new(t)))), - ), - TypeVariant::TrustLineEntryV1 => Box::new( - ReadXdrIter::<_, TrustLineEntryV1>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntryV1(Box::new(t)))), - ), - TypeVariant::TrustLineEntryV1Ext => Box::new( - ReadXdrIter::<_, TrustLineEntryV1Ext>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntryV1Ext(Box::new(t)))), - ), - TypeVariant::OfferEntryFlags => Box::new( - ReadXdrIter::<_, OfferEntryFlags>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OfferEntryFlags(Box::new(t)))), - ), - TypeVariant::OfferEntry => Box::new( - ReadXdrIter::<_, OfferEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OfferEntry(Box::new(t)))), - ), - TypeVariant::OfferEntryExt => Box::new( - ReadXdrIter::<_, OfferEntryExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OfferEntryExt(Box::new(t)))), - ), - TypeVariant::DataEntry => Box::new( - ReadXdrIter::<_, DataEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::DataEntry(Box::new(t)))), - ), - TypeVariant::DataEntryExt => Box::new( - ReadXdrIter::<_, DataEntryExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::DataEntryExt(Box::new(t)))), - ), - TypeVariant::ClaimPredicateType => Box::new( - ReadXdrIter::<_, ClaimPredicateType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimPredicateType(Box::new(t)))), - ), - TypeVariant::ClaimPredicate => Box::new( - ReadXdrIter::<_, ClaimPredicate>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimPredicate(Box::new(t)))), - ), - TypeVariant::ClaimantType => Box::new( - ReadXdrIter::<_, ClaimantType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimantType(Box::new(t)))), - ), - TypeVariant::Claimant => Box::new( - ReadXdrIter::<_, Claimant>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Claimant(Box::new(t)))), - ), - TypeVariant::ClaimantV0 => Box::new( - ReadXdrIter::<_, ClaimantV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimantV0(Box::new(t)))), - ), - TypeVariant::ClaimableBalanceFlags => Box::new( - ReadXdrIter::<_, ClaimableBalanceFlags>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceFlags(Box::new(t)))), - ), - TypeVariant::ClaimableBalanceEntryExtensionV1 => Box::new( - ReadXdrIter::<_, ClaimableBalanceEntryExtensionV1>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClaimableBalanceEntryExtensionV1(Box::new(t)))), - ), - TypeVariant::ClaimableBalanceEntryExtensionV1Ext => Box::new( - ReadXdrIter::<_, ClaimableBalanceEntryExtensionV1Ext>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClaimableBalanceEntryExtensionV1Ext(Box::new(t)))), - ), - TypeVariant::ClaimableBalanceEntry => Box::new( - ReadXdrIter::<_, ClaimableBalanceEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceEntry(Box::new(t)))), - ), - TypeVariant::ClaimableBalanceEntryExt => Box::new( - ReadXdrIter::<_, ClaimableBalanceEntryExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceEntryExt(Box::new(t)))), - ), - TypeVariant::LiquidityPoolConstantProductParameters => Box::new( - ReadXdrIter::<_, LiquidityPoolConstantProductParameters>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolConstantProductParameters(Box::new(t)))), - ), - TypeVariant::LiquidityPoolEntry => Box::new( - ReadXdrIter::<_, LiquidityPoolEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolEntry(Box::new(t)))), - ), - TypeVariant::LiquidityPoolEntryBody => Box::new( - ReadXdrIter::<_, LiquidityPoolEntryBody>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolEntryBody(Box::new(t)))), - ), - TypeVariant::LiquidityPoolEntryConstantProduct => Box::new( - ReadXdrIter::<_, LiquidityPoolEntryConstantProduct>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolEntryConstantProduct(Box::new(t)))), - ), - TypeVariant::ContractDataDurability => Box::new( - ReadXdrIter::<_, ContractDataDurability>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractDataDurability(Box::new(t)))), - ), - TypeVariant::ContractDataEntry => Box::new( - ReadXdrIter::<_, ContractDataEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractDataEntry(Box::new(t)))), - ), - TypeVariant::ContractCodeCostInputs => Box::new( - ReadXdrIter::<_, ContractCodeCostInputs>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCodeCostInputs(Box::new(t)))), - ), - TypeVariant::ContractCodeEntry => Box::new( - ReadXdrIter::<_, ContractCodeEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCodeEntry(Box::new(t)))), - ), - TypeVariant::ContractCodeEntryExt => Box::new( - ReadXdrIter::<_, ContractCodeEntryExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCodeEntryExt(Box::new(t)))), - ), - TypeVariant::ContractCodeEntryV1 => Box::new( - ReadXdrIter::<_, ContractCodeEntryV1>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCodeEntryV1(Box::new(t)))), - ), - TypeVariant::TtlEntry => Box::new( - ReadXdrIter::<_, TtlEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TtlEntry(Box::new(t)))), - ), - TypeVariant::LedgerEntryExtensionV1 => Box::new( - ReadXdrIter::<_, LedgerEntryExtensionV1>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryExtensionV1(Box::new(t)))), - ), - TypeVariant::LedgerEntryExtensionV1Ext => Box::new( - ReadXdrIter::<_, LedgerEntryExtensionV1Ext>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryExtensionV1Ext(Box::new(t)))), - ), - TypeVariant::LedgerEntry => Box::new( - ReadXdrIter::<_, LedgerEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntry(Box::new(t)))), - ), - TypeVariant::LedgerEntryData => Box::new( - ReadXdrIter::<_, LedgerEntryData>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryData(Box::new(t)))), - ), - TypeVariant::LedgerEntryExt => Box::new( - ReadXdrIter::<_, LedgerEntryExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryExt(Box::new(t)))), - ), - TypeVariant::LedgerKey => Box::new( - ReadXdrIter::<_, LedgerKey>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKey(Box::new(t)))), - ), - TypeVariant::LedgerKeyAccount => Box::new( - ReadXdrIter::<_, LedgerKeyAccount>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyAccount(Box::new(t)))), - ), - TypeVariant::LedgerKeyTrustLine => Box::new( - ReadXdrIter::<_, LedgerKeyTrustLine>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyTrustLine(Box::new(t)))), - ), - TypeVariant::LedgerKeyOffer => Box::new( - ReadXdrIter::<_, LedgerKeyOffer>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyOffer(Box::new(t)))), - ), - TypeVariant::LedgerKeyData => Box::new( - ReadXdrIter::<_, LedgerKeyData>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyData(Box::new(t)))), - ), - TypeVariant::LedgerKeyClaimableBalance => Box::new( - ReadXdrIter::<_, LedgerKeyClaimableBalance>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyClaimableBalance(Box::new(t)))), - ), - TypeVariant::LedgerKeyLiquidityPool => Box::new( - ReadXdrIter::<_, LedgerKeyLiquidityPool>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyLiquidityPool(Box::new(t)))), - ), - TypeVariant::LedgerKeyContractData => Box::new( - ReadXdrIter::<_, LedgerKeyContractData>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyContractData(Box::new(t)))), - ), - TypeVariant::LedgerKeyContractCode => Box::new( - ReadXdrIter::<_, LedgerKeyContractCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyContractCode(Box::new(t)))), - ), - TypeVariant::LedgerKeyConfigSetting => Box::new( - ReadXdrIter::<_, LedgerKeyConfigSetting>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyConfigSetting(Box::new(t)))), - ), - TypeVariant::LedgerKeyTtl => Box::new( - ReadXdrIter::<_, LedgerKeyTtl>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyTtl(Box::new(t)))), - ), - TypeVariant::EnvelopeType => Box::new( - ReadXdrIter::<_, EnvelopeType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::EnvelopeType(Box::new(t)))), - ), - TypeVariant::BucketListType => Box::new( - ReadXdrIter::<_, BucketListType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketListType(Box::new(t)))), - ), - TypeVariant::BucketEntryType => Box::new( - ReadXdrIter::<_, BucketEntryType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketEntryType(Box::new(t)))), - ), - TypeVariant::HotArchiveBucketEntryType => Box::new( - ReadXdrIter::<_, HotArchiveBucketEntryType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HotArchiveBucketEntryType(Box::new(t)))), - ), - TypeVariant::BucketMetadata => Box::new( - ReadXdrIter::<_, BucketMetadata>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketMetadata(Box::new(t)))), - ), - TypeVariant::BucketMetadataExt => Box::new( - ReadXdrIter::<_, BucketMetadataExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketMetadataExt(Box::new(t)))), - ), - TypeVariant::BucketEntry => Box::new( - ReadXdrIter::<_, BucketEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketEntry(Box::new(t)))), - ), - TypeVariant::HotArchiveBucketEntry => Box::new( - ReadXdrIter::<_, HotArchiveBucketEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HotArchiveBucketEntry(Box::new(t)))), - ), - TypeVariant::UpgradeType => Box::new( - ReadXdrIter::<_, UpgradeType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::UpgradeType(Box::new(t)))), - ), - TypeVariant::StellarValueType => Box::new( - ReadXdrIter::<_, StellarValueType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::StellarValueType(Box::new(t)))), - ), - TypeVariant::LedgerCloseValueSignature => Box::new( - ReadXdrIter::<_, LedgerCloseValueSignature>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseValueSignature(Box::new(t)))), - ), - TypeVariant::StellarValue => Box::new( - ReadXdrIter::<_, StellarValue>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::StellarValue(Box::new(t)))), - ), - TypeVariant::StellarValueExt => Box::new( - ReadXdrIter::<_, StellarValueExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::StellarValueExt(Box::new(t)))), - ), - TypeVariant::LedgerHeaderFlags => Box::new( - ReadXdrIter::<_, LedgerHeaderFlags>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeaderFlags(Box::new(t)))), - ), - TypeVariant::LedgerHeaderExtensionV1 => Box::new( - ReadXdrIter::<_, LedgerHeaderExtensionV1>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeaderExtensionV1(Box::new(t)))), - ), - TypeVariant::LedgerHeaderExtensionV1Ext => Box::new( - ReadXdrIter::<_, LedgerHeaderExtensionV1Ext>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeaderExtensionV1Ext(Box::new(t)))), - ), - TypeVariant::LedgerHeader => Box::new( - ReadXdrIter::<_, LedgerHeader>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeader(Box::new(t)))), - ), - TypeVariant::LedgerHeaderExt => Box::new( - ReadXdrIter::<_, LedgerHeaderExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeaderExt(Box::new(t)))), - ), - TypeVariant::LedgerUpgradeType => Box::new( - ReadXdrIter::<_, LedgerUpgradeType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerUpgradeType(Box::new(t)))), - ), - TypeVariant::ConfigUpgradeSetKey => Box::new( - ReadXdrIter::<_, ConfigUpgradeSetKey>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigUpgradeSetKey(Box::new(t)))), - ), - TypeVariant::LedgerUpgrade => Box::new( - ReadXdrIter::<_, LedgerUpgrade>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerUpgrade(Box::new(t)))), - ), - TypeVariant::ConfigUpgradeSet => Box::new( - ReadXdrIter::<_, ConfigUpgradeSet>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigUpgradeSet(Box::new(t)))), - ), - TypeVariant::TxSetComponentType => Box::new( - ReadXdrIter::<_, TxSetComponentType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TxSetComponentType(Box::new(t)))), - ), - TypeVariant::DependentTxCluster => Box::new( - ReadXdrIter::<_, DependentTxCluster>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::DependentTxCluster(Box::new(t)))), - ), - TypeVariant::ParallelTxExecutionStage => Box::new( - ReadXdrIter::<_, ParallelTxExecutionStage>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ParallelTxExecutionStage(Box::new(t)))), - ), - TypeVariant::ParallelTxsComponent => Box::new( - ReadXdrIter::<_, ParallelTxsComponent>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ParallelTxsComponent(Box::new(t)))), - ), - TypeVariant::TxSetComponent => Box::new( - ReadXdrIter::<_, TxSetComponent>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TxSetComponent(Box::new(t)))), - ), - TypeVariant::TxSetComponentTxsMaybeDiscountedFee => Box::new( - ReadXdrIter::<_, TxSetComponentTxsMaybeDiscountedFee>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TxSetComponentTxsMaybeDiscountedFee(Box::new(t)))), - ), - TypeVariant::TransactionPhase => Box::new( - ReadXdrIter::<_, TransactionPhase>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionPhase(Box::new(t)))), - ), - TypeVariant::TransactionSet => Box::new( - ReadXdrIter::<_, TransactionSet>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionSet(Box::new(t)))), - ), - TypeVariant::TransactionSetV1 => Box::new( - ReadXdrIter::<_, TransactionSetV1>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionSetV1(Box::new(t)))), - ), - TypeVariant::GeneralizedTransactionSet => Box::new( - ReadXdrIter::<_, GeneralizedTransactionSet>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::GeneralizedTransactionSet(Box::new(t)))), - ), - TypeVariant::TransactionResultPair => Box::new( - ReadXdrIter::<_, TransactionResultPair>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultPair(Box::new(t)))), - ), - TypeVariant::TransactionResultSet => Box::new( - ReadXdrIter::<_, TransactionResultSet>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultSet(Box::new(t)))), - ), - TypeVariant::TransactionHistoryEntry => Box::new( - ReadXdrIter::<_, TransactionHistoryEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionHistoryEntry(Box::new(t)))), - ), - TypeVariant::TransactionHistoryEntryExt => Box::new( - ReadXdrIter::<_, TransactionHistoryEntryExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionHistoryEntryExt(Box::new(t)))), - ), - TypeVariant::TransactionHistoryResultEntry => Box::new( - ReadXdrIter::<_, TransactionHistoryResultEntry>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TransactionHistoryResultEntry(Box::new(t)))), - ), - TypeVariant::TransactionHistoryResultEntryExt => Box::new( - ReadXdrIter::<_, TransactionHistoryResultEntryExt>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TransactionHistoryResultEntryExt(Box::new(t)))), - ), - TypeVariant::LedgerHeaderHistoryEntry => Box::new( - ReadXdrIter::<_, LedgerHeaderHistoryEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeaderHistoryEntry(Box::new(t)))), - ), - TypeVariant::LedgerHeaderHistoryEntryExt => Box::new( - ReadXdrIter::<_, LedgerHeaderHistoryEntryExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeaderHistoryEntryExt(Box::new(t)))), - ), - TypeVariant::LedgerScpMessages => Box::new( - ReadXdrIter::<_, LedgerScpMessages>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerScpMessages(Box::new(t)))), - ), - TypeVariant::ScpHistoryEntryV0 => Box::new( - ReadXdrIter::<_, ScpHistoryEntryV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpHistoryEntryV0(Box::new(t)))), - ), - TypeVariant::ScpHistoryEntry => Box::new( - ReadXdrIter::<_, ScpHistoryEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpHistoryEntry(Box::new(t)))), - ), - TypeVariant::LedgerEntryChangeType => Box::new( - ReadXdrIter::<_, LedgerEntryChangeType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryChangeType(Box::new(t)))), - ), - TypeVariant::LedgerEntryChange => Box::new( - ReadXdrIter::<_, LedgerEntryChange>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryChange(Box::new(t)))), - ), - TypeVariant::LedgerEntryChanges => Box::new( - ReadXdrIter::<_, LedgerEntryChanges>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryChanges(Box::new(t)))), - ), - TypeVariant::OperationMeta => Box::new( - ReadXdrIter::<_, OperationMeta>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationMeta(Box::new(t)))), - ), - TypeVariant::TransactionMetaV1 => Box::new( - ReadXdrIter::<_, TransactionMetaV1>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMetaV1(Box::new(t)))), - ), - TypeVariant::TransactionMetaV2 => Box::new( - ReadXdrIter::<_, TransactionMetaV2>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMetaV2(Box::new(t)))), - ), - TypeVariant::ContractEventType => Box::new( - ReadXdrIter::<_, ContractEventType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractEventType(Box::new(t)))), - ), - TypeVariant::ContractEvent => Box::new( - ReadXdrIter::<_, ContractEvent>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractEvent(Box::new(t)))), - ), - TypeVariant::ContractEventBody => Box::new( - ReadXdrIter::<_, ContractEventBody>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractEventBody(Box::new(t)))), - ), - TypeVariant::ContractEventV0 => Box::new( - ReadXdrIter::<_, ContractEventV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractEventV0(Box::new(t)))), - ), - TypeVariant::DiagnosticEvent => Box::new( - ReadXdrIter::<_, DiagnosticEvent>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::DiagnosticEvent(Box::new(t)))), - ), - TypeVariant::SorobanTransactionMetaExtV1 => Box::new( - ReadXdrIter::<_, SorobanTransactionMetaExtV1>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanTransactionMetaExtV1(Box::new(t)))), - ), - TypeVariant::SorobanTransactionMetaExt => Box::new( - ReadXdrIter::<_, SorobanTransactionMetaExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanTransactionMetaExt(Box::new(t)))), - ), - TypeVariant::SorobanTransactionMeta => Box::new( - ReadXdrIter::<_, SorobanTransactionMeta>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanTransactionMeta(Box::new(t)))), - ), - TypeVariant::TransactionMetaV3 => Box::new( - ReadXdrIter::<_, TransactionMetaV3>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMetaV3(Box::new(t)))), - ), - TypeVariant::OperationMetaV2 => Box::new( - ReadXdrIter::<_, OperationMetaV2>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationMetaV2(Box::new(t)))), - ), - TypeVariant::SorobanTransactionMetaV2 => Box::new( - ReadXdrIter::<_, SorobanTransactionMetaV2>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanTransactionMetaV2(Box::new(t)))), - ), - TypeVariant::TransactionEventStage => Box::new( - ReadXdrIter::<_, TransactionEventStage>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionEventStage(Box::new(t)))), - ), - TypeVariant::TransactionEvent => Box::new( - ReadXdrIter::<_, TransactionEvent>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionEvent(Box::new(t)))), - ), - TypeVariant::TransactionMetaV4 => Box::new( - ReadXdrIter::<_, TransactionMetaV4>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMetaV4(Box::new(t)))), - ), - TypeVariant::InvokeHostFunctionSuccessPreImage => Box::new( - ReadXdrIter::<_, InvokeHostFunctionSuccessPreImage>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::InvokeHostFunctionSuccessPreImage(Box::new(t)))), - ), - TypeVariant::TransactionMeta => Box::new( - ReadXdrIter::<_, TransactionMeta>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMeta(Box::new(t)))), - ), - TypeVariant::TransactionResultMeta => Box::new( - ReadXdrIter::<_, TransactionResultMeta>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultMeta(Box::new(t)))), - ), - TypeVariant::TransactionResultMetaV1 => Box::new( - ReadXdrIter::<_, TransactionResultMetaV1>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultMetaV1(Box::new(t)))), - ), - TypeVariant::UpgradeEntryMeta => Box::new( - ReadXdrIter::<_, UpgradeEntryMeta>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::UpgradeEntryMeta(Box::new(t)))), - ), - TypeVariant::LedgerCloseMetaV0 => Box::new( - ReadXdrIter::<_, LedgerCloseMetaV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaV0(Box::new(t)))), - ), - TypeVariant::LedgerCloseMetaExtV1 => Box::new( - ReadXdrIter::<_, LedgerCloseMetaExtV1>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaExtV1(Box::new(t)))), - ), - TypeVariant::LedgerCloseMetaExt => Box::new( - ReadXdrIter::<_, LedgerCloseMetaExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaExt(Box::new(t)))), - ), - TypeVariant::LedgerCloseMetaV1 => Box::new( - ReadXdrIter::<_, LedgerCloseMetaV1>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaV1(Box::new(t)))), - ), - TypeVariant::LedgerCloseMetaV2 => Box::new( - ReadXdrIter::<_, LedgerCloseMetaV2>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaV2(Box::new(t)))), - ), - TypeVariant::LedgerCloseMeta => Box::new( - ReadXdrIter::<_, LedgerCloseMeta>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMeta(Box::new(t)))), - ), - TypeVariant::ErrorCode => Box::new( - ReadXdrIter::<_, ErrorCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ErrorCode(Box::new(t)))), - ), - TypeVariant::SError => Box::new( - ReadXdrIter::<_, SError>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SError(Box::new(t)))), - ), - TypeVariant::SendMore => Box::new( - ReadXdrIter::<_, SendMore>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SendMore(Box::new(t)))), - ), - TypeVariant::SendMoreExtended => Box::new( - ReadXdrIter::<_, SendMoreExtended>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SendMoreExtended(Box::new(t)))), - ), - TypeVariant::AuthCert => Box::new( - ReadXdrIter::<_, AuthCert>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AuthCert(Box::new(t)))), - ), - TypeVariant::Hello => Box::new( - ReadXdrIter::<_, Hello>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Hello(Box::new(t)))), - ), - TypeVariant::Auth => Box::new( - ReadXdrIter::<_, Auth>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Auth(Box::new(t)))), - ), - TypeVariant::IpAddrType => Box::new( - ReadXdrIter::<_, IpAddrType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::IpAddrType(Box::new(t)))), - ), - TypeVariant::PeerAddress => Box::new( - ReadXdrIter::<_, PeerAddress>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PeerAddress(Box::new(t)))), - ), - TypeVariant::PeerAddressIp => Box::new( - ReadXdrIter::<_, PeerAddressIp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PeerAddressIp(Box::new(t)))), - ), - TypeVariant::MessageType => Box::new( - ReadXdrIter::<_, MessageType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::MessageType(Box::new(t)))), - ), - TypeVariant::DontHave => Box::new( - ReadXdrIter::<_, DontHave>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::DontHave(Box::new(t)))), - ), - TypeVariant::SurveyMessageCommandType => Box::new( - ReadXdrIter::<_, SurveyMessageCommandType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SurveyMessageCommandType(Box::new(t)))), - ), - TypeVariant::SurveyMessageResponseType => Box::new( - ReadXdrIter::<_, SurveyMessageResponseType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SurveyMessageResponseType(Box::new(t)))), - ), - TypeVariant::TimeSlicedSurveyStartCollectingMessage => Box::new( - ReadXdrIter::<_, TimeSlicedSurveyStartCollectingMessage>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TimeSlicedSurveyStartCollectingMessage(Box::new(t)))), - ), - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage => Box::new( - ReadXdrIter::<_, SignedTimeSlicedSurveyStartCollectingMessage>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| { - r.map(|t| Self::SignedTimeSlicedSurveyStartCollectingMessage(Box::new(t))) - }), - ), - TypeVariant::TimeSlicedSurveyStopCollectingMessage => Box::new( - ReadXdrIter::<_, TimeSlicedSurveyStopCollectingMessage>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TimeSlicedSurveyStopCollectingMessage(Box::new(t)))), - ), - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage => Box::new( - ReadXdrIter::<_, SignedTimeSlicedSurveyStopCollectingMessage>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SignedTimeSlicedSurveyStopCollectingMessage(Box::new(t)))), - ), - TypeVariant::SurveyRequestMessage => Box::new( - ReadXdrIter::<_, SurveyRequestMessage>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SurveyRequestMessage(Box::new(t)))), - ), - TypeVariant::TimeSlicedSurveyRequestMessage => Box::new( - ReadXdrIter::<_, TimeSlicedSurveyRequestMessage>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TimeSlicedSurveyRequestMessage(Box::new(t)))), - ), - TypeVariant::SignedTimeSlicedSurveyRequestMessage => Box::new( - ReadXdrIter::<_, SignedTimeSlicedSurveyRequestMessage>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SignedTimeSlicedSurveyRequestMessage(Box::new(t)))), - ), - TypeVariant::EncryptedBody => Box::new( - ReadXdrIter::<_, EncryptedBody>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::EncryptedBody(Box::new(t)))), - ), - TypeVariant::SurveyResponseMessage => Box::new( - ReadXdrIter::<_, SurveyResponseMessage>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SurveyResponseMessage(Box::new(t)))), - ), - TypeVariant::TimeSlicedSurveyResponseMessage => Box::new( - ReadXdrIter::<_, TimeSlicedSurveyResponseMessage>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TimeSlicedSurveyResponseMessage(Box::new(t)))), - ), - TypeVariant::SignedTimeSlicedSurveyResponseMessage => Box::new( - ReadXdrIter::<_, SignedTimeSlicedSurveyResponseMessage>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SignedTimeSlicedSurveyResponseMessage(Box::new(t)))), - ), - TypeVariant::PeerStats => Box::new( - ReadXdrIter::<_, PeerStats>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PeerStats(Box::new(t)))), - ), - TypeVariant::TimeSlicedNodeData => Box::new( - ReadXdrIter::<_, TimeSlicedNodeData>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TimeSlicedNodeData(Box::new(t)))), - ), - TypeVariant::TimeSlicedPeerData => Box::new( - ReadXdrIter::<_, TimeSlicedPeerData>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TimeSlicedPeerData(Box::new(t)))), - ), - TypeVariant::TimeSlicedPeerDataList => Box::new( - ReadXdrIter::<_, TimeSlicedPeerDataList>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TimeSlicedPeerDataList(Box::new(t)))), - ), - TypeVariant::TopologyResponseBodyV2 => Box::new( - ReadXdrIter::<_, TopologyResponseBodyV2>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TopologyResponseBodyV2(Box::new(t)))), - ), - TypeVariant::SurveyResponseBody => Box::new( - ReadXdrIter::<_, SurveyResponseBody>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SurveyResponseBody(Box::new(t)))), - ), - TypeVariant::TxAdvertVector => Box::new( - ReadXdrIter::<_, TxAdvertVector>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TxAdvertVector(Box::new(t)))), - ), - TypeVariant::FloodAdvert => Box::new( - ReadXdrIter::<_, FloodAdvert>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FloodAdvert(Box::new(t)))), - ), - TypeVariant::TxDemandVector => Box::new( - ReadXdrIter::<_, TxDemandVector>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TxDemandVector(Box::new(t)))), - ), - TypeVariant::FloodDemand => Box::new( - ReadXdrIter::<_, FloodDemand>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FloodDemand(Box::new(t)))), - ), - TypeVariant::StellarMessage => Box::new( - ReadXdrIter::<_, StellarMessage>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::StellarMessage(Box::new(t)))), - ), - TypeVariant::AuthenticatedMessage => Box::new( - ReadXdrIter::<_, AuthenticatedMessage>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AuthenticatedMessage(Box::new(t)))), - ), - TypeVariant::AuthenticatedMessageV0 => Box::new( - ReadXdrIter::<_, AuthenticatedMessageV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AuthenticatedMessageV0(Box::new(t)))), - ), - TypeVariant::LiquidityPoolParameters => Box::new( - ReadXdrIter::<_, LiquidityPoolParameters>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolParameters(Box::new(t)))), - ), - TypeVariant::MuxedAccount => Box::new( - ReadXdrIter::<_, MuxedAccount>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::MuxedAccount(Box::new(t)))), - ), - TypeVariant::MuxedAccountMed25519 => Box::new( - ReadXdrIter::<_, MuxedAccountMed25519>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::MuxedAccountMed25519(Box::new(t)))), - ), - TypeVariant::DecoratedSignature => Box::new( - ReadXdrIter::<_, DecoratedSignature>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::DecoratedSignature(Box::new(t)))), - ), - TypeVariant::OperationType => Box::new( - ReadXdrIter::<_, OperationType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationType(Box::new(t)))), - ), - TypeVariant::CreateAccountOp => Box::new( - ReadXdrIter::<_, CreateAccountOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateAccountOp(Box::new(t)))), - ), - TypeVariant::PaymentOp => Box::new( - ReadXdrIter::<_, PaymentOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PaymentOp(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictReceiveOp => Box::new( - ReadXdrIter::<_, PathPaymentStrictReceiveOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PathPaymentStrictReceiveOp(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictSendOp => Box::new( - ReadXdrIter::<_, PathPaymentStrictSendOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PathPaymentStrictSendOp(Box::new(t)))), - ), - TypeVariant::ManageSellOfferOp => Box::new( - ReadXdrIter::<_, ManageSellOfferOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageSellOfferOp(Box::new(t)))), - ), - TypeVariant::ManageBuyOfferOp => Box::new( - ReadXdrIter::<_, ManageBuyOfferOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageBuyOfferOp(Box::new(t)))), - ), - TypeVariant::CreatePassiveSellOfferOp => Box::new( - ReadXdrIter::<_, CreatePassiveSellOfferOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::CreatePassiveSellOfferOp(Box::new(t)))), - ), - TypeVariant::SetOptionsOp => Box::new( - ReadXdrIter::<_, SetOptionsOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SetOptionsOp(Box::new(t)))), - ), - TypeVariant::ChangeTrustAsset => Box::new( - ReadXdrIter::<_, ChangeTrustAsset>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ChangeTrustAsset(Box::new(t)))), - ), - TypeVariant::ChangeTrustOp => Box::new( - ReadXdrIter::<_, ChangeTrustOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ChangeTrustOp(Box::new(t)))), - ), - TypeVariant::AllowTrustOp => Box::new( - ReadXdrIter::<_, AllowTrustOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AllowTrustOp(Box::new(t)))), - ), - TypeVariant::ManageDataOp => Box::new( - ReadXdrIter::<_, ManageDataOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageDataOp(Box::new(t)))), - ), - TypeVariant::BumpSequenceOp => Box::new( - ReadXdrIter::<_, BumpSequenceOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BumpSequenceOp(Box::new(t)))), - ), - TypeVariant::CreateClaimableBalanceOp => Box::new( - ReadXdrIter::<_, CreateClaimableBalanceOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateClaimableBalanceOp(Box::new(t)))), - ), - TypeVariant::ClaimClaimableBalanceOp => Box::new( - ReadXdrIter::<_, ClaimClaimableBalanceOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimClaimableBalanceOp(Box::new(t)))), - ), - TypeVariant::BeginSponsoringFutureReservesOp => Box::new( - ReadXdrIter::<_, BeginSponsoringFutureReservesOp>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::BeginSponsoringFutureReservesOp(Box::new(t)))), - ), - TypeVariant::RevokeSponsorshipType => Box::new( - ReadXdrIter::<_, RevokeSponsorshipType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::RevokeSponsorshipType(Box::new(t)))), - ), - TypeVariant::RevokeSponsorshipOp => Box::new( - ReadXdrIter::<_, RevokeSponsorshipOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::RevokeSponsorshipOp(Box::new(t)))), - ), - TypeVariant::RevokeSponsorshipOpSigner => Box::new( - ReadXdrIter::<_, RevokeSponsorshipOpSigner>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::RevokeSponsorshipOpSigner(Box::new(t)))), - ), - TypeVariant::ClawbackOp => Box::new( - ReadXdrIter::<_, ClawbackOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClawbackOp(Box::new(t)))), - ), - TypeVariant::ClawbackClaimableBalanceOp => Box::new( - ReadXdrIter::<_, ClawbackClaimableBalanceOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClawbackClaimableBalanceOp(Box::new(t)))), - ), - TypeVariant::SetTrustLineFlagsOp => Box::new( - ReadXdrIter::<_, SetTrustLineFlagsOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SetTrustLineFlagsOp(Box::new(t)))), - ), - TypeVariant::LiquidityPoolDepositOp => Box::new( - ReadXdrIter::<_, LiquidityPoolDepositOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolDepositOp(Box::new(t)))), - ), - TypeVariant::LiquidityPoolWithdrawOp => Box::new( - ReadXdrIter::<_, LiquidityPoolWithdrawOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolWithdrawOp(Box::new(t)))), - ), - TypeVariant::HostFunctionType => Box::new( - ReadXdrIter::<_, HostFunctionType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HostFunctionType(Box::new(t)))), - ), - TypeVariant::ContractIdPreimageType => Box::new( - ReadXdrIter::<_, ContractIdPreimageType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractIdPreimageType(Box::new(t)))), - ), - TypeVariant::ContractIdPreimage => Box::new( - ReadXdrIter::<_, ContractIdPreimage>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractIdPreimage(Box::new(t)))), - ), - TypeVariant::ContractIdPreimageFromAddress => Box::new( - ReadXdrIter::<_, ContractIdPreimageFromAddress>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ContractIdPreimageFromAddress(Box::new(t)))), - ), - TypeVariant::CreateContractArgs => Box::new( - ReadXdrIter::<_, CreateContractArgs>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateContractArgs(Box::new(t)))), - ), - TypeVariant::CreateContractArgsV2 => Box::new( - ReadXdrIter::<_, CreateContractArgsV2>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateContractArgsV2(Box::new(t)))), - ), - TypeVariant::InvokeContractArgs => Box::new( - ReadXdrIter::<_, InvokeContractArgs>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InvokeContractArgs(Box::new(t)))), - ), - TypeVariant::HostFunction => Box::new( - ReadXdrIter::<_, HostFunction>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HostFunction(Box::new(t)))), - ), - TypeVariant::SorobanAuthorizedFunctionType => Box::new( - ReadXdrIter::<_, SorobanAuthorizedFunctionType>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SorobanAuthorizedFunctionType(Box::new(t)))), - ), - TypeVariant::SorobanAuthorizedFunction => Box::new( - ReadXdrIter::<_, SorobanAuthorizedFunction>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanAuthorizedFunction(Box::new(t)))), - ), - TypeVariant::SorobanAuthorizedInvocation => Box::new( - ReadXdrIter::<_, SorobanAuthorizedInvocation>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanAuthorizedInvocation(Box::new(t)))), - ), - TypeVariant::SorobanAddressCredentials => Box::new( - ReadXdrIter::<_, SorobanAddressCredentials>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanAddressCredentials(Box::new(t)))), - ), - TypeVariant::SorobanCredentialsType => Box::new( - ReadXdrIter::<_, SorobanCredentialsType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanCredentialsType(Box::new(t)))), - ), - TypeVariant::SorobanCredentials => Box::new( - ReadXdrIter::<_, SorobanCredentials>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanCredentials(Box::new(t)))), - ), - TypeVariant::SorobanAuthorizationEntry => Box::new( - ReadXdrIter::<_, SorobanAuthorizationEntry>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanAuthorizationEntry(Box::new(t)))), - ), - TypeVariant::SorobanAuthorizationEntries => Box::new( - ReadXdrIter::<_, SorobanAuthorizationEntries>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanAuthorizationEntries(Box::new(t)))), - ), - TypeVariant::InvokeHostFunctionOp => Box::new( - ReadXdrIter::<_, InvokeHostFunctionOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InvokeHostFunctionOp(Box::new(t)))), - ), - TypeVariant::ExtendFootprintTtlOp => Box::new( - ReadXdrIter::<_, ExtendFootprintTtlOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtendFootprintTtlOp(Box::new(t)))), - ), - TypeVariant::RestoreFootprintOp => Box::new( - ReadXdrIter::<_, RestoreFootprintOp>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::RestoreFootprintOp(Box::new(t)))), - ), - TypeVariant::Operation => Box::new( - ReadXdrIter::<_, Operation>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Operation(Box::new(t)))), - ), - TypeVariant::OperationBody => Box::new( - ReadXdrIter::<_, OperationBody>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationBody(Box::new(t)))), - ), - TypeVariant::HashIdPreimage => Box::new( - ReadXdrIter::<_, HashIdPreimage>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HashIdPreimage(Box::new(t)))), - ), - TypeVariant::HashIdPreimageOperationId => Box::new( - ReadXdrIter::<_, HashIdPreimageOperationId>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HashIdPreimageOperationId(Box::new(t)))), - ), - TypeVariant::HashIdPreimageRevokeId => Box::new( - ReadXdrIter::<_, HashIdPreimageRevokeId>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HashIdPreimageRevokeId(Box::new(t)))), - ), - TypeVariant::HashIdPreimageContractId => Box::new( - ReadXdrIter::<_, HashIdPreimageContractId>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HashIdPreimageContractId(Box::new(t)))), - ), - TypeVariant::HashIdPreimageSorobanAuthorization => Box::new( - ReadXdrIter::<_, HashIdPreimageSorobanAuthorization>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::HashIdPreimageSorobanAuthorization(Box::new(t)))), - ), - TypeVariant::MemoType => Box::new( - ReadXdrIter::<_, MemoType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::MemoType(Box::new(t)))), - ), - TypeVariant::Memo => Box::new( - ReadXdrIter::<_, Memo>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Memo(Box::new(t)))), - ), - TypeVariant::TimeBounds => Box::new( - ReadXdrIter::<_, TimeBounds>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TimeBounds(Box::new(t)))), - ), - TypeVariant::LedgerBounds => Box::new( - ReadXdrIter::<_, LedgerBounds>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerBounds(Box::new(t)))), - ), - TypeVariant::PreconditionsV2 => Box::new( - ReadXdrIter::<_, PreconditionsV2>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PreconditionsV2(Box::new(t)))), - ), - TypeVariant::PreconditionType => Box::new( - ReadXdrIter::<_, PreconditionType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PreconditionType(Box::new(t)))), - ), - TypeVariant::Preconditions => Box::new( - ReadXdrIter::<_, Preconditions>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Preconditions(Box::new(t)))), - ), - TypeVariant::LedgerFootprint => Box::new( - ReadXdrIter::<_, LedgerFootprint>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerFootprint(Box::new(t)))), - ), - TypeVariant::SorobanResources => Box::new( - ReadXdrIter::<_, SorobanResources>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanResources(Box::new(t)))), - ), - TypeVariant::SorobanResourcesExtV0 => Box::new( - ReadXdrIter::<_, SorobanResourcesExtV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanResourcesExtV0(Box::new(t)))), - ), - TypeVariant::SorobanTransactionData => Box::new( - ReadXdrIter::<_, SorobanTransactionData>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanTransactionData(Box::new(t)))), - ), - TypeVariant::SorobanTransactionDataExt => Box::new( - ReadXdrIter::<_, SorobanTransactionDataExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanTransactionDataExt(Box::new(t)))), - ), - TypeVariant::TransactionV0 => Box::new( - ReadXdrIter::<_, TransactionV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionV0(Box::new(t)))), - ), - TypeVariant::TransactionV0Ext => Box::new( - ReadXdrIter::<_, TransactionV0Ext>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionV0Ext(Box::new(t)))), - ), - TypeVariant::TransactionV0Envelope => Box::new( - ReadXdrIter::<_, TransactionV0Envelope>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionV0Envelope(Box::new(t)))), - ), - TypeVariant::Transaction => Box::new( - ReadXdrIter::<_, Transaction>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Transaction(Box::new(t)))), - ), - TypeVariant::TransactionExt => Box::new( - ReadXdrIter::<_, TransactionExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionExt(Box::new(t)))), - ), - TypeVariant::TransactionV1Envelope => Box::new( - ReadXdrIter::<_, TransactionV1Envelope>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionV1Envelope(Box::new(t)))), - ), - TypeVariant::FeeBumpTransaction => Box::new( - ReadXdrIter::<_, FeeBumpTransaction>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FeeBumpTransaction(Box::new(t)))), - ), - TypeVariant::FeeBumpTransactionInnerTx => Box::new( - ReadXdrIter::<_, FeeBumpTransactionInnerTx>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FeeBumpTransactionInnerTx(Box::new(t)))), - ), - TypeVariant::FeeBumpTransactionExt => Box::new( - ReadXdrIter::<_, FeeBumpTransactionExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FeeBumpTransactionExt(Box::new(t)))), - ), - TypeVariant::FeeBumpTransactionEnvelope => Box::new( - ReadXdrIter::<_, FeeBumpTransactionEnvelope>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FeeBumpTransactionEnvelope(Box::new(t)))), - ), - TypeVariant::TransactionEnvelope => Box::new( - ReadXdrIter::<_, TransactionEnvelope>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionEnvelope(Box::new(t)))), - ), - TypeVariant::TransactionSignaturePayload => Box::new( - ReadXdrIter::<_, TransactionSignaturePayload>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionSignaturePayload(Box::new(t)))), - ), - TypeVariant::TransactionSignaturePayloadTaggedTransaction => Box::new( - ReadXdrIter::<_, TransactionSignaturePayloadTaggedTransaction>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| { - r.map(|t| Self::TransactionSignaturePayloadTaggedTransaction(Box::new(t))) - }), - ), - TypeVariant::ClaimAtomType => Box::new( - ReadXdrIter::<_, ClaimAtomType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimAtomType(Box::new(t)))), - ), - TypeVariant::ClaimOfferAtomV0 => Box::new( - ReadXdrIter::<_, ClaimOfferAtomV0>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimOfferAtomV0(Box::new(t)))), - ), - TypeVariant::ClaimOfferAtom => Box::new( - ReadXdrIter::<_, ClaimOfferAtom>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimOfferAtom(Box::new(t)))), - ), - TypeVariant::ClaimLiquidityAtom => Box::new( - ReadXdrIter::<_, ClaimLiquidityAtom>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimLiquidityAtom(Box::new(t)))), - ), - TypeVariant::ClaimAtom => Box::new( - ReadXdrIter::<_, ClaimAtom>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimAtom(Box::new(t)))), - ), - TypeVariant::CreateAccountResultCode => Box::new( - ReadXdrIter::<_, CreateAccountResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateAccountResultCode(Box::new(t)))), - ), - TypeVariant::CreateAccountResult => Box::new( - ReadXdrIter::<_, CreateAccountResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateAccountResult(Box::new(t)))), - ), - TypeVariant::PaymentResultCode => Box::new( - ReadXdrIter::<_, PaymentResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PaymentResultCode(Box::new(t)))), - ), - TypeVariant::PaymentResult => Box::new( - ReadXdrIter::<_, PaymentResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PaymentResult(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictReceiveResultCode => Box::new( - ReadXdrIter::<_, PathPaymentStrictReceiveResultCode>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::PathPaymentStrictReceiveResultCode(Box::new(t)))), - ), - TypeVariant::SimplePaymentResult => Box::new( - ReadXdrIter::<_, SimplePaymentResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SimplePaymentResult(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictReceiveResult => Box::new( - ReadXdrIter::<_, PathPaymentStrictReceiveResult>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::PathPaymentStrictReceiveResult(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictReceiveResultSuccess => Box::new( - ReadXdrIter::<_, PathPaymentStrictReceiveResultSuccess>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::PathPaymentStrictReceiveResultSuccess(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictSendResultCode => Box::new( - ReadXdrIter::<_, PathPaymentStrictSendResultCode>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::PathPaymentStrictSendResultCode(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictSendResult => Box::new( - ReadXdrIter::<_, PathPaymentStrictSendResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PathPaymentStrictSendResult(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictSendResultSuccess => Box::new( - ReadXdrIter::<_, PathPaymentStrictSendResultSuccess>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::PathPaymentStrictSendResultSuccess(Box::new(t)))), - ), - TypeVariant::ManageSellOfferResultCode => Box::new( - ReadXdrIter::<_, ManageSellOfferResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageSellOfferResultCode(Box::new(t)))), - ), - TypeVariant::ManageOfferEffect => Box::new( - ReadXdrIter::<_, ManageOfferEffect>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageOfferEffect(Box::new(t)))), - ), - TypeVariant::ManageOfferSuccessResult => Box::new( - ReadXdrIter::<_, ManageOfferSuccessResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageOfferSuccessResult(Box::new(t)))), - ), - TypeVariant::ManageOfferSuccessResultOffer => Box::new( - ReadXdrIter::<_, ManageOfferSuccessResultOffer>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ManageOfferSuccessResultOffer(Box::new(t)))), - ), - TypeVariant::ManageSellOfferResult => Box::new( - ReadXdrIter::<_, ManageSellOfferResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageSellOfferResult(Box::new(t)))), - ), - TypeVariant::ManageBuyOfferResultCode => Box::new( - ReadXdrIter::<_, ManageBuyOfferResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageBuyOfferResultCode(Box::new(t)))), - ), - TypeVariant::ManageBuyOfferResult => Box::new( - ReadXdrIter::<_, ManageBuyOfferResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageBuyOfferResult(Box::new(t)))), - ), - TypeVariant::SetOptionsResultCode => Box::new( - ReadXdrIter::<_, SetOptionsResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SetOptionsResultCode(Box::new(t)))), - ), - TypeVariant::SetOptionsResult => Box::new( - ReadXdrIter::<_, SetOptionsResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SetOptionsResult(Box::new(t)))), - ), - TypeVariant::ChangeTrustResultCode => Box::new( - ReadXdrIter::<_, ChangeTrustResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ChangeTrustResultCode(Box::new(t)))), - ), - TypeVariant::ChangeTrustResult => Box::new( - ReadXdrIter::<_, ChangeTrustResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ChangeTrustResult(Box::new(t)))), - ), - TypeVariant::AllowTrustResultCode => Box::new( - ReadXdrIter::<_, AllowTrustResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AllowTrustResultCode(Box::new(t)))), - ), - TypeVariant::AllowTrustResult => Box::new( - ReadXdrIter::<_, AllowTrustResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AllowTrustResult(Box::new(t)))), - ), - TypeVariant::AccountMergeResultCode => Box::new( - ReadXdrIter::<_, AccountMergeResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountMergeResultCode(Box::new(t)))), - ), - TypeVariant::AccountMergeResult => Box::new( - ReadXdrIter::<_, AccountMergeResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountMergeResult(Box::new(t)))), - ), - TypeVariant::InflationResultCode => Box::new( - ReadXdrIter::<_, InflationResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InflationResultCode(Box::new(t)))), - ), - TypeVariant::InflationPayout => Box::new( - ReadXdrIter::<_, InflationPayout>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InflationPayout(Box::new(t)))), - ), - TypeVariant::InflationResult => Box::new( - ReadXdrIter::<_, InflationResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InflationResult(Box::new(t)))), - ), - TypeVariant::ManageDataResultCode => Box::new( - ReadXdrIter::<_, ManageDataResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageDataResultCode(Box::new(t)))), - ), - TypeVariant::ManageDataResult => Box::new( - ReadXdrIter::<_, ManageDataResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageDataResult(Box::new(t)))), - ), - TypeVariant::BumpSequenceResultCode => Box::new( - ReadXdrIter::<_, BumpSequenceResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BumpSequenceResultCode(Box::new(t)))), - ), - TypeVariant::BumpSequenceResult => Box::new( - ReadXdrIter::<_, BumpSequenceResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BumpSequenceResult(Box::new(t)))), - ), - TypeVariant::CreateClaimableBalanceResultCode => Box::new( - ReadXdrIter::<_, CreateClaimableBalanceResultCode>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::CreateClaimableBalanceResultCode(Box::new(t)))), - ), - TypeVariant::CreateClaimableBalanceResult => Box::new( - ReadXdrIter::<_, CreateClaimableBalanceResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateClaimableBalanceResult(Box::new(t)))), - ), - TypeVariant::ClaimClaimableBalanceResultCode => Box::new( - ReadXdrIter::<_, ClaimClaimableBalanceResultCode>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClaimClaimableBalanceResultCode(Box::new(t)))), - ), - TypeVariant::ClaimClaimableBalanceResult => Box::new( - ReadXdrIter::<_, ClaimClaimableBalanceResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimClaimableBalanceResult(Box::new(t)))), - ), - TypeVariant::BeginSponsoringFutureReservesResultCode => Box::new( - ReadXdrIter::<_, BeginSponsoringFutureReservesResultCode>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::BeginSponsoringFutureReservesResultCode(Box::new(t)))), - ), - TypeVariant::BeginSponsoringFutureReservesResult => Box::new( - ReadXdrIter::<_, BeginSponsoringFutureReservesResult>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::BeginSponsoringFutureReservesResult(Box::new(t)))), - ), - TypeVariant::EndSponsoringFutureReservesResultCode => Box::new( - ReadXdrIter::<_, EndSponsoringFutureReservesResultCode>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::EndSponsoringFutureReservesResultCode(Box::new(t)))), - ), - TypeVariant::EndSponsoringFutureReservesResult => Box::new( - ReadXdrIter::<_, EndSponsoringFutureReservesResult>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::EndSponsoringFutureReservesResult(Box::new(t)))), - ), - TypeVariant::RevokeSponsorshipResultCode => Box::new( - ReadXdrIter::<_, RevokeSponsorshipResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::RevokeSponsorshipResultCode(Box::new(t)))), - ), - TypeVariant::RevokeSponsorshipResult => Box::new( - ReadXdrIter::<_, RevokeSponsorshipResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::RevokeSponsorshipResult(Box::new(t)))), - ), - TypeVariant::ClawbackResultCode => Box::new( - ReadXdrIter::<_, ClawbackResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClawbackResultCode(Box::new(t)))), - ), - TypeVariant::ClawbackResult => Box::new( - ReadXdrIter::<_, ClawbackResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClawbackResult(Box::new(t)))), - ), - TypeVariant::ClawbackClaimableBalanceResultCode => Box::new( - ReadXdrIter::<_, ClawbackClaimableBalanceResultCode>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClawbackClaimableBalanceResultCode(Box::new(t)))), - ), - TypeVariant::ClawbackClaimableBalanceResult => Box::new( - ReadXdrIter::<_, ClawbackClaimableBalanceResult>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClawbackClaimableBalanceResult(Box::new(t)))), - ), - TypeVariant::SetTrustLineFlagsResultCode => Box::new( - ReadXdrIter::<_, SetTrustLineFlagsResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SetTrustLineFlagsResultCode(Box::new(t)))), - ), - TypeVariant::SetTrustLineFlagsResult => Box::new( - ReadXdrIter::<_, SetTrustLineFlagsResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SetTrustLineFlagsResult(Box::new(t)))), - ), - TypeVariant::LiquidityPoolDepositResultCode => Box::new( - ReadXdrIter::<_, LiquidityPoolDepositResultCode>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolDepositResultCode(Box::new(t)))), - ), - TypeVariant::LiquidityPoolDepositResult => Box::new( - ReadXdrIter::<_, LiquidityPoolDepositResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolDepositResult(Box::new(t)))), - ), - TypeVariant::LiquidityPoolWithdrawResultCode => Box::new( - ReadXdrIter::<_, LiquidityPoolWithdrawResultCode>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolWithdrawResultCode(Box::new(t)))), - ), - TypeVariant::LiquidityPoolWithdrawResult => Box::new( - ReadXdrIter::<_, LiquidityPoolWithdrawResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolWithdrawResult(Box::new(t)))), - ), - TypeVariant::InvokeHostFunctionResultCode => Box::new( - ReadXdrIter::<_, InvokeHostFunctionResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InvokeHostFunctionResultCode(Box::new(t)))), - ), - TypeVariant::InvokeHostFunctionResult => Box::new( - ReadXdrIter::<_, InvokeHostFunctionResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InvokeHostFunctionResult(Box::new(t)))), - ), - TypeVariant::ExtendFootprintTtlResultCode => Box::new( - ReadXdrIter::<_, ExtendFootprintTtlResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtendFootprintTtlResultCode(Box::new(t)))), - ), - TypeVariant::ExtendFootprintTtlResult => Box::new( - ReadXdrIter::<_, ExtendFootprintTtlResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtendFootprintTtlResult(Box::new(t)))), - ), - TypeVariant::RestoreFootprintResultCode => Box::new( - ReadXdrIter::<_, RestoreFootprintResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::RestoreFootprintResultCode(Box::new(t)))), - ), - TypeVariant::RestoreFootprintResult => Box::new( - ReadXdrIter::<_, RestoreFootprintResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::RestoreFootprintResult(Box::new(t)))), - ), - TypeVariant::OperationResultCode => Box::new( - ReadXdrIter::<_, OperationResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationResultCode(Box::new(t)))), - ), - TypeVariant::OperationResult => Box::new( - ReadXdrIter::<_, OperationResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationResult(Box::new(t)))), - ), - TypeVariant::OperationResultTr => Box::new( - ReadXdrIter::<_, OperationResultTr>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationResultTr(Box::new(t)))), - ), - TypeVariant::TransactionResultCode => Box::new( - ReadXdrIter::<_, TransactionResultCode>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultCode(Box::new(t)))), - ), - TypeVariant::InnerTransactionResult => Box::new( - ReadXdrIter::<_, InnerTransactionResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InnerTransactionResult(Box::new(t)))), - ), - TypeVariant::InnerTransactionResultResult => Box::new( - ReadXdrIter::<_, InnerTransactionResultResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InnerTransactionResultResult(Box::new(t)))), - ), - TypeVariant::InnerTransactionResultExt => Box::new( - ReadXdrIter::<_, InnerTransactionResultExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InnerTransactionResultExt(Box::new(t)))), - ), - TypeVariant::InnerTransactionResultPair => Box::new( - ReadXdrIter::<_, InnerTransactionResultPair>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InnerTransactionResultPair(Box::new(t)))), - ), - TypeVariant::TransactionResult => Box::new( - ReadXdrIter::<_, TransactionResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResult(Box::new(t)))), - ), - TypeVariant::TransactionResultResult => Box::new( - ReadXdrIter::<_, TransactionResultResult>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultResult(Box::new(t)))), - ), - TypeVariant::TransactionResultExt => Box::new( - ReadXdrIter::<_, TransactionResultExt>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultExt(Box::new(t)))), - ), - TypeVariant::Hash => Box::new( - ReadXdrIter::<_, Hash>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Hash(Box::new(t)))), - ), - TypeVariant::Uint256 => Box::new( - ReadXdrIter::<_, Uint256>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Uint256(Box::new(t)))), - ), - TypeVariant::Uint32 => Box::new( - ReadXdrIter::<_, Uint32>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Uint32(Box::new(t)))), - ), - TypeVariant::Int32 => Box::new( - ReadXdrIter::<_, Int32>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Int32(Box::new(t)))), - ), - TypeVariant::Uint64 => Box::new( - ReadXdrIter::<_, Uint64>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Uint64(Box::new(t)))), - ), - TypeVariant::Int64 => Box::new( - ReadXdrIter::<_, Int64>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Int64(Box::new(t)))), - ), - TypeVariant::TimePoint => Box::new( - ReadXdrIter::<_, TimePoint>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TimePoint(Box::new(t)))), - ), - TypeVariant::Duration => Box::new( - ReadXdrIter::<_, Duration>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Duration(Box::new(t)))), - ), - TypeVariant::ExtensionPoint => Box::new( - ReadXdrIter::<_, ExtensionPoint>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtensionPoint(Box::new(t)))), - ), - TypeVariant::CryptoKeyType => Box::new( - ReadXdrIter::<_, CryptoKeyType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::CryptoKeyType(Box::new(t)))), - ), - TypeVariant::PublicKeyType => Box::new( - ReadXdrIter::<_, PublicKeyType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PublicKeyType(Box::new(t)))), - ), - TypeVariant::SignerKeyType => Box::new( - ReadXdrIter::<_, SignerKeyType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SignerKeyType(Box::new(t)))), - ), - TypeVariant::PublicKey => Box::new( - ReadXdrIter::<_, PublicKey>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PublicKey(Box::new(t)))), - ), - TypeVariant::SignerKey => Box::new( - ReadXdrIter::<_, SignerKey>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SignerKey(Box::new(t)))), - ), - TypeVariant::SignerKeyEd25519SignedPayload => Box::new( - ReadXdrIter::<_, SignerKeyEd25519SignedPayload>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SignerKeyEd25519SignedPayload(Box::new(t)))), - ), - TypeVariant::Signature => Box::new( - ReadXdrIter::<_, Signature>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Signature(Box::new(t)))), - ), - TypeVariant::SignatureHint => Box::new( - ReadXdrIter::<_, SignatureHint>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SignatureHint(Box::new(t)))), - ), - TypeVariant::NodeId => Box::new( - ReadXdrIter::<_, NodeId>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::NodeId(Box::new(t)))), - ), - TypeVariant::AccountId => Box::new( - ReadXdrIter::<_, AccountId>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountId(Box::new(t)))), - ), - TypeVariant::ContractId => Box::new( - ReadXdrIter::<_, ContractId>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractId(Box::new(t)))), - ), - TypeVariant::Curve25519Secret => Box::new( - ReadXdrIter::<_, Curve25519Secret>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Curve25519Secret(Box::new(t)))), - ), - TypeVariant::Curve25519Public => Box::new( - ReadXdrIter::<_, Curve25519Public>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Curve25519Public(Box::new(t)))), - ), - TypeVariant::HmacSha256Key => Box::new( - ReadXdrIter::<_, HmacSha256Key>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HmacSha256Key(Box::new(t)))), - ), - TypeVariant::HmacSha256Mac => Box::new( - ReadXdrIter::<_, HmacSha256Mac>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HmacSha256Mac(Box::new(t)))), - ), - TypeVariant::ShortHashSeed => Box::new( - ReadXdrIter::<_, ShortHashSeed>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ShortHashSeed(Box::new(t)))), - ), - TypeVariant::BinaryFuseFilterType => Box::new( - ReadXdrIter::<_, BinaryFuseFilterType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BinaryFuseFilterType(Box::new(t)))), - ), - TypeVariant::SerializedBinaryFuseFilter => Box::new( - ReadXdrIter::<_, SerializedBinaryFuseFilter>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SerializedBinaryFuseFilter(Box::new(t)))), - ), - TypeVariant::PoolId => Box::new( - ReadXdrIter::<_, PoolId>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PoolId(Box::new(t)))), - ), - TypeVariant::ClaimableBalanceIdType => Box::new( - ReadXdrIter::<_, ClaimableBalanceIdType>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceIdType(Box::new(t)))), - ), - TypeVariant::ClaimableBalanceId => Box::new( - ReadXdrIter::<_, ClaimableBalanceId>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceId(Box::new(t)))), - ), - } - } - - #[cfg(feature = "std")] - #[allow(clippy::too_many_lines)] - pub fn read_xdr_framed_iter( - v: TypeVariant, - r: &mut Limited, - ) -> Box> + '_> { - match v { - TypeVariant::Value => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Value(Box::new(t.0)))), - ), - TypeVariant::ScpBallot => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpBallot(Box::new(t.0)))), - ), - TypeVariant::ScpStatementType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatementType(Box::new(t.0)))), - ), - TypeVariant::ScpNomination => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpNomination(Box::new(t.0)))), - ), - TypeVariant::ScpStatement => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatement(Box::new(t.0)))), - ), - TypeVariant::ScpStatementPledges => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatementPledges(Box::new(t.0)))), - ), - TypeVariant::ScpStatementPrepare => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatementPrepare(Box::new(t.0)))), - ), - TypeVariant::ScpStatementConfirm => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatementConfirm(Box::new(t.0)))), - ), - TypeVariant::ScpStatementExternalize => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ScpStatementExternalize(Box::new(t.0)))), - ), - TypeVariant::ScpEnvelope => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpEnvelope(Box::new(t.0)))), - ), - TypeVariant::ScpQuorumSet => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpQuorumSet(Box::new(t.0)))), - ), - TypeVariant::EncodedLedgerKey => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::EncodedLedgerKey(Box::new(t.0)))), - ), - TypeVariant::ConfigSettingContractExecutionLanesV0 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractExecutionLanesV0(Box::new(t.0)))), - ), - TypeVariant::ConfigSettingContractComputeV0 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractComputeV0(Box::new(t.0)))), - ), - TypeVariant::ConfigSettingContractParallelComputeV0 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractParallelComputeV0(Box::new(t.0)))), - ), - TypeVariant::ConfigSettingContractLedgerCostV0 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractLedgerCostV0(Box::new(t.0)))), - ), - TypeVariant::ConfigSettingContractLedgerCostExtV0 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractLedgerCostExtV0(Box::new(t.0)))), - ), - TypeVariant::ConfigSettingContractHistoricalDataV0 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractHistoricalDataV0(Box::new(t.0)))), - ), - TypeVariant::ConfigSettingContractEventsV0 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractEventsV0(Box::new(t.0)))), - ), - TypeVariant::ConfigSettingContractBandwidthV0 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractBandwidthV0(Box::new(t.0)))), - ), - TypeVariant::ContractCostType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCostType(Box::new(t.0)))), - ), - TypeVariant::ContractCostParamEntry => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ContractCostParamEntry(Box::new(t.0)))), - ), - TypeVariant::StateArchivalSettings => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::StateArchivalSettings(Box::new(t.0)))), - ), - TypeVariant::EvictionIterator => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::EvictionIterator(Box::new(t.0)))), - ), - TypeVariant::ConfigSettingScpTiming => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingScpTiming(Box::new(t.0)))), - ), - TypeVariant::FrozenLedgerKeys => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FrozenLedgerKeys(Box::new(t.0)))), - ), - TypeVariant::FrozenLedgerKeysDelta => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FrozenLedgerKeysDelta(Box::new(t.0)))), - ), - TypeVariant::FreezeBypassTxs => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FreezeBypassTxs(Box::new(t.0)))), - ), - TypeVariant::FreezeBypassTxsDelta => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FreezeBypassTxsDelta(Box::new(t.0)))), - ), - TypeVariant::ContractCostParams => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCostParams(Box::new(t.0)))), - ), - TypeVariant::ConfigSettingId => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingId(Box::new(t.0)))), - ), - TypeVariant::ConfigSettingEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingEntry(Box::new(t.0)))), - ), - TypeVariant::ScEnvMetaKind => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScEnvMetaKind(Box::new(t.0)))), - ), - TypeVariant::ScEnvMetaEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScEnvMetaEntry(Box::new(t.0)))), - ), - TypeVariant::ScEnvMetaEntryInterfaceVersion => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ScEnvMetaEntryInterfaceVersion(Box::new(t.0)))), - ), - TypeVariant::ScMetaV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMetaV0(Box::new(t.0)))), - ), - TypeVariant::ScMetaKind => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMetaKind(Box::new(t.0)))), - ), - TypeVariant::ScMetaEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMetaEntry(Box::new(t.0)))), - ), - TypeVariant::ScSpecType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecType(Box::new(t.0)))), - ), - TypeVariant::ScSpecTypeOption => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeOption(Box::new(t.0)))), - ), - TypeVariant::ScSpecTypeResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeResult(Box::new(t.0)))), - ), - TypeVariant::ScSpecTypeVec => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeVec(Box::new(t.0)))), - ), - TypeVariant::ScSpecTypeMap => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeMap(Box::new(t.0)))), - ), - TypeVariant::ScSpecTypeTuple => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeTuple(Box::new(t.0)))), - ), - TypeVariant::ScSpecTypeBytesN => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeBytesN(Box::new(t.0)))), - ), - TypeVariant::ScSpecTypeUdt => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeUdt(Box::new(t.0)))), - ), - TypeVariant::ScSpecTypeDef => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeDef(Box::new(t.0)))), - ), - TypeVariant::ScSpecUdtStructFieldV0 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ScSpecUdtStructFieldV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecUdtStructV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtStructV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecUdtUnionCaseVoidV0 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ScSpecUdtUnionCaseVoidV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecUdtUnionCaseTupleV0 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ScSpecUdtUnionCaseTupleV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecUdtUnionCaseV0Kind => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ScSpecUdtUnionCaseV0Kind(Box::new(t.0)))), - ), - TypeVariant::ScSpecUdtUnionCaseV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtUnionCaseV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecUdtUnionV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtUnionV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecUdtEnumCaseV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtEnumCaseV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecUdtEnumV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtEnumV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecUdtErrorEnumCaseV0 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ScSpecUdtErrorEnumCaseV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecUdtErrorEnumV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtErrorEnumV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecFunctionInputV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecFunctionInputV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecFunctionV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecFunctionV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecEventParamLocationV0 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ScSpecEventParamLocationV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecEventParamV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEventParamV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecEventDataFormat => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEventDataFormat(Box::new(t.0)))), - ), - TypeVariant::ScSpecEventV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEventV0(Box::new(t.0)))), - ), - TypeVariant::ScSpecEntryKind => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEntryKind(Box::new(t.0)))), - ), - TypeVariant::ScSpecEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEntry(Box::new(t.0)))), - ), - TypeVariant::ScValType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScValType(Box::new(t.0)))), - ), - TypeVariant::ScErrorType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScErrorType(Box::new(t.0)))), - ), - TypeVariant::ScErrorCode => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScErrorCode(Box::new(t.0)))), - ), - TypeVariant::ScError => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScError(Box::new(t.0)))), - ), - TypeVariant::UInt128Parts => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::UInt128Parts(Box::new(t.0)))), - ), - TypeVariant::Int128Parts => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Int128Parts(Box::new(t.0)))), - ), - TypeVariant::UInt256Parts => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::UInt256Parts(Box::new(t.0)))), - ), - TypeVariant::Int256Parts => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Int256Parts(Box::new(t.0)))), - ), - TypeVariant::ContractExecutableType => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ContractExecutableType(Box::new(t.0)))), - ), - TypeVariant::ContractExecutable => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractExecutable(Box::new(t.0)))), - ), - TypeVariant::ScAddressType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScAddressType(Box::new(t.0)))), - ), - TypeVariant::MuxedEd25519Account => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::MuxedEd25519Account(Box::new(t.0)))), - ), - TypeVariant::ScAddress => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScAddress(Box::new(t.0)))), - ), - TypeVariant::ScVec => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScVec(Box::new(t.0)))), - ), - TypeVariant::ScMap => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMap(Box::new(t.0)))), - ), - TypeVariant::ScBytes => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScBytes(Box::new(t.0)))), - ), - TypeVariant::ScString => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScString(Box::new(t.0)))), - ), - TypeVariant::ScSymbol => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSymbol(Box::new(t.0)))), - ), - TypeVariant::ScNonceKey => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScNonceKey(Box::new(t.0)))), - ), - TypeVariant::ScContractInstance => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScContractInstance(Box::new(t.0)))), - ), - TypeVariant::ScVal => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScVal(Box::new(t.0)))), - ), - TypeVariant::ScMapEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMapEntry(Box::new(t.0)))), - ), - TypeVariant::LedgerCloseMetaBatch => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaBatch(Box::new(t.0)))), - ), - TypeVariant::StoredTransactionSet => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::StoredTransactionSet(Box::new(t.0)))), - ), - TypeVariant::StoredDebugTransactionSet => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::StoredDebugTransactionSet(Box::new(t.0)))), - ), - TypeVariant::PersistedScpStateV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PersistedScpStateV0(Box::new(t.0)))), - ), - TypeVariant::PersistedScpStateV1 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PersistedScpStateV1(Box::new(t.0)))), - ), - TypeVariant::PersistedScpState => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PersistedScpState(Box::new(t.0)))), - ), - TypeVariant::Thresholds => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Thresholds(Box::new(t.0)))), - ), - TypeVariant::String32 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::String32(Box::new(t.0)))), - ), - TypeVariant::String64 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::String64(Box::new(t.0)))), - ), - TypeVariant::SequenceNumber => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SequenceNumber(Box::new(t.0)))), - ), - TypeVariant::DataValue => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::DataValue(Box::new(t.0)))), - ), - TypeVariant::AssetCode4 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AssetCode4(Box::new(t.0)))), - ), - TypeVariant::AssetCode12 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AssetCode12(Box::new(t.0)))), - ), - TypeVariant::AssetType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AssetType(Box::new(t.0)))), - ), - TypeVariant::AssetCode => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AssetCode(Box::new(t.0)))), - ), - TypeVariant::AlphaNum4 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AlphaNum4(Box::new(t.0)))), - ), - TypeVariant::AlphaNum12 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AlphaNum12(Box::new(t.0)))), - ), - TypeVariant::Asset => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Asset(Box::new(t.0)))), - ), - TypeVariant::Price => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Price(Box::new(t.0)))), - ), - TypeVariant::Liabilities => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Liabilities(Box::new(t.0)))), - ), - TypeVariant::ThresholdIndexes => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ThresholdIndexes(Box::new(t.0)))), - ), - TypeVariant::LedgerEntryType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryType(Box::new(t.0)))), - ), - TypeVariant::Signer => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Signer(Box::new(t.0)))), - ), - TypeVariant::AccountFlags => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountFlags(Box::new(t.0)))), - ), - TypeVariant::SponsorshipDescriptor => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SponsorshipDescriptor(Box::new(t.0)))), - ), - TypeVariant::AccountEntryExtensionV3 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::AccountEntryExtensionV3(Box::new(t.0)))), - ), - TypeVariant::AccountEntryExtensionV2 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::AccountEntryExtensionV2(Box::new(t.0)))), - ), - TypeVariant::AccountEntryExtensionV2Ext => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::AccountEntryExtensionV2Ext(Box::new(t.0)))), - ), - TypeVariant::AccountEntryExtensionV1 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::AccountEntryExtensionV1(Box::new(t.0)))), - ), - TypeVariant::AccountEntryExtensionV1Ext => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::AccountEntryExtensionV1Ext(Box::new(t.0)))), - ), - TypeVariant::AccountEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntry(Box::new(t.0)))), - ), - TypeVariant::AccountEntryExt => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntryExt(Box::new(t.0)))), - ), - TypeVariant::TrustLineFlags => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineFlags(Box::new(t.0)))), - ), - TypeVariant::LiquidityPoolType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolType(Box::new(t.0)))), - ), - TypeVariant::TrustLineAsset => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineAsset(Box::new(t.0)))), - ), - TypeVariant::TrustLineEntryExtensionV2 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TrustLineEntryExtensionV2(Box::new(t.0)))), - ), - TypeVariant::TrustLineEntryExtensionV2Ext => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TrustLineEntryExtensionV2Ext(Box::new(t.0)))), - ), - TypeVariant::TrustLineEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntry(Box::new(t.0)))), - ), - TypeVariant::TrustLineEntryExt => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntryExt(Box::new(t.0)))), - ), - TypeVariant::TrustLineEntryV1 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntryV1(Box::new(t.0)))), - ), - TypeVariant::TrustLineEntryV1Ext => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntryV1Ext(Box::new(t.0)))), - ), - TypeVariant::OfferEntryFlags => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OfferEntryFlags(Box::new(t.0)))), - ), - TypeVariant::OfferEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OfferEntry(Box::new(t.0)))), - ), - TypeVariant::OfferEntryExt => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OfferEntryExt(Box::new(t.0)))), - ), - TypeVariant::DataEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::DataEntry(Box::new(t.0)))), - ), - TypeVariant::DataEntryExt => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::DataEntryExt(Box::new(t.0)))), - ), - TypeVariant::ClaimPredicateType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimPredicateType(Box::new(t.0)))), - ), - TypeVariant::ClaimPredicate => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimPredicate(Box::new(t.0)))), - ), - TypeVariant::ClaimantType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimantType(Box::new(t.0)))), - ), - TypeVariant::Claimant => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Claimant(Box::new(t.0)))), - ), - TypeVariant::ClaimantV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimantV0(Box::new(t.0)))), - ), - TypeVariant::ClaimableBalanceFlags => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceFlags(Box::new(t.0)))), - ), - TypeVariant::ClaimableBalanceEntryExtensionV1 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClaimableBalanceEntryExtensionV1(Box::new(t.0)))), - ), - TypeVariant::ClaimableBalanceEntryExtensionV1Ext => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClaimableBalanceEntryExtensionV1Ext(Box::new(t.0)))), - ), - TypeVariant::ClaimableBalanceEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceEntry(Box::new(t.0)))), - ), - TypeVariant::ClaimableBalanceEntryExt => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClaimableBalanceEntryExt(Box::new(t.0)))), - ), - TypeVariant::LiquidityPoolConstantProductParameters => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolConstantProductParameters(Box::new(t.0)))), - ), - TypeVariant::LiquidityPoolEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolEntry(Box::new(t.0)))), - ), - TypeVariant::LiquidityPoolEntryBody => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolEntryBody(Box::new(t.0)))), - ), - TypeVariant::LiquidityPoolEntryConstantProduct => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolEntryConstantProduct(Box::new(t.0)))), - ), - TypeVariant::ContractDataDurability => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ContractDataDurability(Box::new(t.0)))), - ), - TypeVariant::ContractDataEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractDataEntry(Box::new(t.0)))), - ), - TypeVariant::ContractCodeCostInputs => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ContractCodeCostInputs(Box::new(t.0)))), - ), - TypeVariant::ContractCodeEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCodeEntry(Box::new(t.0)))), - ), - TypeVariant::ContractCodeEntryExt => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCodeEntryExt(Box::new(t.0)))), - ), - TypeVariant::ContractCodeEntryV1 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCodeEntryV1(Box::new(t.0)))), - ), - TypeVariant::TtlEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TtlEntry(Box::new(t.0)))), - ), - TypeVariant::LedgerEntryExtensionV1 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LedgerEntryExtensionV1(Box::new(t.0)))), - ), - TypeVariant::LedgerEntryExtensionV1Ext => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LedgerEntryExtensionV1Ext(Box::new(t.0)))), - ), - TypeVariant::LedgerEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntry(Box::new(t.0)))), - ), - TypeVariant::LedgerEntryData => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryData(Box::new(t.0)))), - ), - TypeVariant::LedgerEntryExt => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryExt(Box::new(t.0)))), - ), - TypeVariant::LedgerKey => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKey(Box::new(t.0)))), - ), - TypeVariant::LedgerKeyAccount => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyAccount(Box::new(t.0)))), - ), - TypeVariant::LedgerKeyTrustLine => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyTrustLine(Box::new(t.0)))), - ), - TypeVariant::LedgerKeyOffer => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyOffer(Box::new(t.0)))), - ), - TypeVariant::LedgerKeyData => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyData(Box::new(t.0)))), - ), - TypeVariant::LedgerKeyClaimableBalance => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LedgerKeyClaimableBalance(Box::new(t.0)))), - ), - TypeVariant::LedgerKeyLiquidityPool => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LedgerKeyLiquidityPool(Box::new(t.0)))), - ), - TypeVariant::LedgerKeyContractData => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyContractData(Box::new(t.0)))), - ), - TypeVariant::LedgerKeyContractCode => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyContractCode(Box::new(t.0)))), - ), - TypeVariant::LedgerKeyConfigSetting => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LedgerKeyConfigSetting(Box::new(t.0)))), - ), - TypeVariant::LedgerKeyTtl => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyTtl(Box::new(t.0)))), - ), - TypeVariant::EnvelopeType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::EnvelopeType(Box::new(t.0)))), - ), - TypeVariant::BucketListType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketListType(Box::new(t.0)))), - ), - TypeVariant::BucketEntryType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketEntryType(Box::new(t.0)))), - ), - TypeVariant::HotArchiveBucketEntryType => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::HotArchiveBucketEntryType(Box::new(t.0)))), - ), - TypeVariant::BucketMetadata => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketMetadata(Box::new(t.0)))), - ), - TypeVariant::BucketMetadataExt => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketMetadataExt(Box::new(t.0)))), - ), - TypeVariant::BucketEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketEntry(Box::new(t.0)))), - ), - TypeVariant::HotArchiveBucketEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HotArchiveBucketEntry(Box::new(t.0)))), - ), - TypeVariant::UpgradeType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::UpgradeType(Box::new(t.0)))), - ), - TypeVariant::StellarValueType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::StellarValueType(Box::new(t.0)))), - ), - TypeVariant::LedgerCloseValueSignature => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LedgerCloseValueSignature(Box::new(t.0)))), - ), - TypeVariant::StellarValue => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::StellarValue(Box::new(t.0)))), - ), - TypeVariant::StellarValueExt => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::StellarValueExt(Box::new(t.0)))), - ), - TypeVariant::LedgerHeaderFlags => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeaderFlags(Box::new(t.0)))), - ), - TypeVariant::LedgerHeaderExtensionV1 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LedgerHeaderExtensionV1(Box::new(t.0)))), - ), - TypeVariant::LedgerHeaderExtensionV1Ext => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LedgerHeaderExtensionV1Ext(Box::new(t.0)))), - ), - TypeVariant::LedgerHeader => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeader(Box::new(t.0)))), - ), - TypeVariant::LedgerHeaderExt => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeaderExt(Box::new(t.0)))), - ), - TypeVariant::LedgerUpgradeType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerUpgradeType(Box::new(t.0)))), - ), - TypeVariant::ConfigUpgradeSetKey => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigUpgradeSetKey(Box::new(t.0)))), - ), - TypeVariant::LedgerUpgrade => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerUpgrade(Box::new(t.0)))), - ), - TypeVariant::ConfigUpgradeSet => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigUpgradeSet(Box::new(t.0)))), - ), - TypeVariant::TxSetComponentType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TxSetComponentType(Box::new(t.0)))), - ), - TypeVariant::DependentTxCluster => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::DependentTxCluster(Box::new(t.0)))), - ), - TypeVariant::ParallelTxExecutionStage => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ParallelTxExecutionStage(Box::new(t.0)))), - ), - TypeVariant::ParallelTxsComponent => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ParallelTxsComponent(Box::new(t.0)))), - ), - TypeVariant::TxSetComponent => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TxSetComponent(Box::new(t.0)))), - ), - TypeVariant::TxSetComponentTxsMaybeDiscountedFee => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TxSetComponentTxsMaybeDiscountedFee(Box::new(t.0)))), - ), - TypeVariant::TransactionPhase => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionPhase(Box::new(t.0)))), - ), - TypeVariant::TransactionSet => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionSet(Box::new(t.0)))), - ), - TypeVariant::TransactionSetV1 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionSetV1(Box::new(t.0)))), - ), - TypeVariant::GeneralizedTransactionSet => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::GeneralizedTransactionSet(Box::new(t.0)))), - ), - TypeVariant::TransactionResultPair => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultPair(Box::new(t.0)))), - ), - TypeVariant::TransactionResultSet => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultSet(Box::new(t.0)))), - ), - TypeVariant::TransactionHistoryEntry => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TransactionHistoryEntry(Box::new(t.0)))), - ), - TypeVariant::TransactionHistoryEntryExt => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TransactionHistoryEntryExt(Box::new(t.0)))), - ), - TypeVariant::TransactionHistoryResultEntry => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TransactionHistoryResultEntry(Box::new(t.0)))), - ), - TypeVariant::TransactionHistoryResultEntryExt => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TransactionHistoryResultEntryExt(Box::new(t.0)))), - ), - TypeVariant::LedgerHeaderHistoryEntry => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LedgerHeaderHistoryEntry(Box::new(t.0)))), - ), - TypeVariant::LedgerHeaderHistoryEntryExt => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LedgerHeaderHistoryEntryExt(Box::new(t.0)))), - ), - TypeVariant::LedgerScpMessages => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerScpMessages(Box::new(t.0)))), - ), - TypeVariant::ScpHistoryEntryV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpHistoryEntryV0(Box::new(t.0)))), - ), - TypeVariant::ScpHistoryEntry => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpHistoryEntry(Box::new(t.0)))), - ), - TypeVariant::LedgerEntryChangeType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryChangeType(Box::new(t.0)))), - ), - TypeVariant::LedgerEntryChange => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryChange(Box::new(t.0)))), - ), - TypeVariant::LedgerEntryChanges => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryChanges(Box::new(t.0)))), - ), - TypeVariant::OperationMeta => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationMeta(Box::new(t.0)))), - ), - TypeVariant::TransactionMetaV1 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMetaV1(Box::new(t.0)))), - ), - TypeVariant::TransactionMetaV2 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMetaV2(Box::new(t.0)))), - ), - TypeVariant::ContractEventType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractEventType(Box::new(t.0)))), - ), - TypeVariant::ContractEvent => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractEvent(Box::new(t.0)))), - ), - TypeVariant::ContractEventBody => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractEventBody(Box::new(t.0)))), - ), - TypeVariant::ContractEventV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractEventV0(Box::new(t.0)))), - ), - TypeVariant::DiagnosticEvent => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::DiagnosticEvent(Box::new(t.0)))), - ), - TypeVariant::SorobanTransactionMetaExtV1 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SorobanTransactionMetaExtV1(Box::new(t.0)))), - ), - TypeVariant::SorobanTransactionMetaExt => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SorobanTransactionMetaExt(Box::new(t.0)))), - ), - TypeVariant::SorobanTransactionMeta => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SorobanTransactionMeta(Box::new(t.0)))), - ), - TypeVariant::TransactionMetaV3 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMetaV3(Box::new(t.0)))), - ), - TypeVariant::OperationMetaV2 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationMetaV2(Box::new(t.0)))), - ), - TypeVariant::SorobanTransactionMetaV2 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SorobanTransactionMetaV2(Box::new(t.0)))), - ), - TypeVariant::TransactionEventStage => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionEventStage(Box::new(t.0)))), - ), - TypeVariant::TransactionEvent => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionEvent(Box::new(t.0)))), - ), - TypeVariant::TransactionMetaV4 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMetaV4(Box::new(t.0)))), - ), - TypeVariant::InvokeHostFunctionSuccessPreImage => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::InvokeHostFunctionSuccessPreImage(Box::new(t.0)))), - ), - TypeVariant::TransactionMeta => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMeta(Box::new(t.0)))), - ), - TypeVariant::TransactionResultMeta => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultMeta(Box::new(t.0)))), - ), - TypeVariant::TransactionResultMetaV1 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TransactionResultMetaV1(Box::new(t.0)))), - ), - TypeVariant::UpgradeEntryMeta => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::UpgradeEntryMeta(Box::new(t.0)))), - ), - TypeVariant::LedgerCloseMetaV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaV0(Box::new(t.0)))), - ), - TypeVariant::LedgerCloseMetaExtV1 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaExtV1(Box::new(t.0)))), - ), - TypeVariant::LedgerCloseMetaExt => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaExt(Box::new(t.0)))), - ), - TypeVariant::LedgerCloseMetaV1 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaV1(Box::new(t.0)))), - ), - TypeVariant::LedgerCloseMetaV2 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaV2(Box::new(t.0)))), - ), - TypeVariant::LedgerCloseMeta => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMeta(Box::new(t.0)))), - ), - TypeVariant::ErrorCode => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ErrorCode(Box::new(t.0)))), - ), - TypeVariant::SError => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SError(Box::new(t.0)))), - ), - TypeVariant::SendMore => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SendMore(Box::new(t.0)))), - ), - TypeVariant::SendMoreExtended => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SendMoreExtended(Box::new(t.0)))), - ), - TypeVariant::AuthCert => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AuthCert(Box::new(t.0)))), - ), - TypeVariant::Hello => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Hello(Box::new(t.0)))), - ), - TypeVariant::Auth => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Auth(Box::new(t.0)))), - ), - TypeVariant::IpAddrType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::IpAddrType(Box::new(t.0)))), - ), - TypeVariant::PeerAddress => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PeerAddress(Box::new(t.0)))), - ), - TypeVariant::PeerAddressIp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PeerAddressIp(Box::new(t.0)))), - ), - TypeVariant::MessageType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::MessageType(Box::new(t.0)))), - ), - TypeVariant::DontHave => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::DontHave(Box::new(t.0)))), - ), - TypeVariant::SurveyMessageCommandType => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SurveyMessageCommandType(Box::new(t.0)))), - ), - TypeVariant::SurveyMessageResponseType => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SurveyMessageResponseType(Box::new(t.0)))), - ), - TypeVariant::TimeSlicedSurveyStartCollectingMessage => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TimeSlicedSurveyStartCollectingMessage(Box::new(t.0)))), - ), - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| { - r.map(|t| Self::SignedTimeSlicedSurveyStartCollectingMessage(Box::new(t.0))) - }), - ), - TypeVariant::TimeSlicedSurveyStopCollectingMessage => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TimeSlicedSurveyStopCollectingMessage(Box::new(t.0)))), - ), - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| { - r.map(|t| Self::SignedTimeSlicedSurveyStopCollectingMessage(Box::new(t.0))) - }), - ), - TypeVariant::SurveyRequestMessage => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SurveyRequestMessage(Box::new(t.0)))), - ), - TypeVariant::TimeSlicedSurveyRequestMessage => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TimeSlicedSurveyRequestMessage(Box::new(t.0)))), - ), - TypeVariant::SignedTimeSlicedSurveyRequestMessage => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SignedTimeSlicedSurveyRequestMessage(Box::new(t.0)))), - ), - TypeVariant::EncryptedBody => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::EncryptedBody(Box::new(t.0)))), - ), - TypeVariant::SurveyResponseMessage => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SurveyResponseMessage(Box::new(t.0)))), - ), - TypeVariant::TimeSlicedSurveyResponseMessage => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TimeSlicedSurveyResponseMessage(Box::new(t.0)))), - ), - TypeVariant::SignedTimeSlicedSurveyResponseMessage => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SignedTimeSlicedSurveyResponseMessage(Box::new(t.0)))), - ), - TypeVariant::PeerStats => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PeerStats(Box::new(t.0)))), - ), - TypeVariant::TimeSlicedNodeData => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TimeSlicedNodeData(Box::new(t.0)))), - ), - TypeVariant::TimeSlicedPeerData => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TimeSlicedPeerData(Box::new(t.0)))), - ), - TypeVariant::TimeSlicedPeerDataList => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TimeSlicedPeerDataList(Box::new(t.0)))), - ), - TypeVariant::TopologyResponseBodyV2 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TopologyResponseBodyV2(Box::new(t.0)))), - ), - TypeVariant::SurveyResponseBody => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SurveyResponseBody(Box::new(t.0)))), - ), - TypeVariant::TxAdvertVector => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TxAdvertVector(Box::new(t.0)))), - ), - TypeVariant::FloodAdvert => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FloodAdvert(Box::new(t.0)))), - ), - TypeVariant::TxDemandVector => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TxDemandVector(Box::new(t.0)))), - ), - TypeVariant::FloodDemand => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FloodDemand(Box::new(t.0)))), - ), - TypeVariant::StellarMessage => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::StellarMessage(Box::new(t.0)))), - ), - TypeVariant::AuthenticatedMessage => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AuthenticatedMessage(Box::new(t.0)))), - ), - TypeVariant::AuthenticatedMessageV0 => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::AuthenticatedMessageV0(Box::new(t.0)))), - ), - TypeVariant::LiquidityPoolParameters => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolParameters(Box::new(t.0)))), - ), - TypeVariant::MuxedAccount => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::MuxedAccount(Box::new(t.0)))), - ), - TypeVariant::MuxedAccountMed25519 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::MuxedAccountMed25519(Box::new(t.0)))), - ), - TypeVariant::DecoratedSignature => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::DecoratedSignature(Box::new(t.0)))), - ), - TypeVariant::OperationType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationType(Box::new(t.0)))), - ), - TypeVariant::CreateAccountOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateAccountOp(Box::new(t.0)))), - ), - TypeVariant::PaymentOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PaymentOp(Box::new(t.0)))), - ), - TypeVariant::PathPaymentStrictReceiveOp => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::PathPaymentStrictReceiveOp(Box::new(t.0)))), - ), - TypeVariant::PathPaymentStrictSendOp => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::PathPaymentStrictSendOp(Box::new(t.0)))), - ), - TypeVariant::ManageSellOfferOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageSellOfferOp(Box::new(t.0)))), - ), - TypeVariant::ManageBuyOfferOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageBuyOfferOp(Box::new(t.0)))), - ), - TypeVariant::CreatePassiveSellOfferOp => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::CreatePassiveSellOfferOp(Box::new(t.0)))), - ), - TypeVariant::SetOptionsOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SetOptionsOp(Box::new(t.0)))), - ), - TypeVariant::ChangeTrustAsset => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ChangeTrustAsset(Box::new(t.0)))), - ), - TypeVariant::ChangeTrustOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ChangeTrustOp(Box::new(t.0)))), - ), - TypeVariant::AllowTrustOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AllowTrustOp(Box::new(t.0)))), - ), - TypeVariant::ManageDataOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageDataOp(Box::new(t.0)))), - ), - TypeVariant::BumpSequenceOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BumpSequenceOp(Box::new(t.0)))), - ), - TypeVariant::CreateClaimableBalanceOp => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::CreateClaimableBalanceOp(Box::new(t.0)))), - ), - TypeVariant::ClaimClaimableBalanceOp => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClaimClaimableBalanceOp(Box::new(t.0)))), - ), - TypeVariant::BeginSponsoringFutureReservesOp => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::BeginSponsoringFutureReservesOp(Box::new(t.0)))), - ), - TypeVariant::RevokeSponsorshipType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::RevokeSponsorshipType(Box::new(t.0)))), - ), - TypeVariant::RevokeSponsorshipOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::RevokeSponsorshipOp(Box::new(t.0)))), - ), - TypeVariant::RevokeSponsorshipOpSigner => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::RevokeSponsorshipOpSigner(Box::new(t.0)))), - ), - TypeVariant::ClawbackOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClawbackOp(Box::new(t.0)))), - ), - TypeVariant::ClawbackClaimableBalanceOp => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClawbackClaimableBalanceOp(Box::new(t.0)))), - ), - TypeVariant::SetTrustLineFlagsOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SetTrustLineFlagsOp(Box::new(t.0)))), - ), - TypeVariant::LiquidityPoolDepositOp => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolDepositOp(Box::new(t.0)))), - ), - TypeVariant::LiquidityPoolWithdrawOp => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolWithdrawOp(Box::new(t.0)))), - ), - TypeVariant::HostFunctionType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HostFunctionType(Box::new(t.0)))), - ), - TypeVariant::ContractIdPreimageType => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ContractIdPreimageType(Box::new(t.0)))), - ), - TypeVariant::ContractIdPreimage => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractIdPreimage(Box::new(t.0)))), - ), - TypeVariant::ContractIdPreimageFromAddress => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ContractIdPreimageFromAddress(Box::new(t.0)))), - ), - TypeVariant::CreateContractArgs => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateContractArgs(Box::new(t.0)))), - ), - TypeVariant::CreateContractArgsV2 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateContractArgsV2(Box::new(t.0)))), - ), - TypeVariant::InvokeContractArgs => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InvokeContractArgs(Box::new(t.0)))), - ), - TypeVariant::HostFunction => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HostFunction(Box::new(t.0)))), - ), - TypeVariant::SorobanAuthorizedFunctionType => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SorobanAuthorizedFunctionType(Box::new(t.0)))), - ), - TypeVariant::SorobanAuthorizedFunction => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SorobanAuthorizedFunction(Box::new(t.0)))), - ), - TypeVariant::SorobanAuthorizedInvocation => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SorobanAuthorizedInvocation(Box::new(t.0)))), - ), - TypeVariant::SorobanAddressCredentials => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SorobanAddressCredentials(Box::new(t.0)))), - ), - TypeVariant::SorobanCredentialsType => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SorobanCredentialsType(Box::new(t.0)))), - ), - TypeVariant::SorobanCredentials => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanCredentials(Box::new(t.0)))), - ), - TypeVariant::SorobanAuthorizationEntry => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SorobanAuthorizationEntry(Box::new(t.0)))), - ), - TypeVariant::SorobanAuthorizationEntries => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SorobanAuthorizationEntries(Box::new(t.0)))), - ), - TypeVariant::InvokeHostFunctionOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InvokeHostFunctionOp(Box::new(t.0)))), - ), - TypeVariant::ExtendFootprintTtlOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtendFootprintTtlOp(Box::new(t.0)))), - ), - TypeVariant::RestoreFootprintOp => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::RestoreFootprintOp(Box::new(t.0)))), - ), - TypeVariant::Operation => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Operation(Box::new(t.0)))), - ), - TypeVariant::OperationBody => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationBody(Box::new(t.0)))), - ), - TypeVariant::HashIdPreimage => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HashIdPreimage(Box::new(t.0)))), - ), - TypeVariant::HashIdPreimageOperationId => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::HashIdPreimageOperationId(Box::new(t.0)))), - ), - TypeVariant::HashIdPreimageRevokeId => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::HashIdPreimageRevokeId(Box::new(t.0)))), - ), - TypeVariant::HashIdPreimageContractId => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::HashIdPreimageContractId(Box::new(t.0)))), - ), - TypeVariant::HashIdPreimageSorobanAuthorization => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::HashIdPreimageSorobanAuthorization(Box::new(t.0)))), - ), - TypeVariant::MemoType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::MemoType(Box::new(t.0)))), - ), - TypeVariant::Memo => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Memo(Box::new(t.0)))), - ), - TypeVariant::TimeBounds => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TimeBounds(Box::new(t.0)))), - ), - TypeVariant::LedgerBounds => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerBounds(Box::new(t.0)))), - ), - TypeVariant::PreconditionsV2 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PreconditionsV2(Box::new(t.0)))), - ), - TypeVariant::PreconditionType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PreconditionType(Box::new(t.0)))), - ), - TypeVariant::Preconditions => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Preconditions(Box::new(t.0)))), - ), - TypeVariant::LedgerFootprint => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerFootprint(Box::new(t.0)))), - ), - TypeVariant::SorobanResources => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanResources(Box::new(t.0)))), - ), - TypeVariant::SorobanResourcesExtV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanResourcesExtV0(Box::new(t.0)))), - ), - TypeVariant::SorobanTransactionData => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SorobanTransactionData(Box::new(t.0)))), - ), - TypeVariant::SorobanTransactionDataExt => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SorobanTransactionDataExt(Box::new(t.0)))), - ), - TypeVariant::TransactionV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionV0(Box::new(t.0)))), - ), - TypeVariant::TransactionV0Ext => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionV0Ext(Box::new(t.0)))), - ), - TypeVariant::TransactionV0Envelope => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionV0Envelope(Box::new(t.0)))), - ), - TypeVariant::Transaction => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Transaction(Box::new(t.0)))), - ), - TypeVariant::TransactionExt => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionExt(Box::new(t.0)))), - ), - TypeVariant::TransactionV1Envelope => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionV1Envelope(Box::new(t.0)))), - ), - TypeVariant::FeeBumpTransaction => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FeeBumpTransaction(Box::new(t.0)))), - ), - TypeVariant::FeeBumpTransactionInnerTx => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::FeeBumpTransactionInnerTx(Box::new(t.0)))), - ), - TypeVariant::FeeBumpTransactionExt => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::FeeBumpTransactionExt(Box::new(t.0)))), - ), - TypeVariant::FeeBumpTransactionEnvelope => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::FeeBumpTransactionEnvelope(Box::new(t.0)))), - ), - TypeVariant::TransactionEnvelope => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionEnvelope(Box::new(t.0)))), - ), - TypeVariant::TransactionSignaturePayload => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TransactionSignaturePayload(Box::new(t.0)))), - ), - TypeVariant::TransactionSignaturePayloadTaggedTransaction => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| { - r.map(|t| Self::TransactionSignaturePayloadTaggedTransaction(Box::new(t.0))) - }), - ), - TypeVariant::ClaimAtomType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimAtomType(Box::new(t.0)))), - ), - TypeVariant::ClaimOfferAtomV0 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimOfferAtomV0(Box::new(t.0)))), - ), - TypeVariant::ClaimOfferAtom => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimOfferAtom(Box::new(t.0)))), - ), - TypeVariant::ClaimLiquidityAtom => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimLiquidityAtom(Box::new(t.0)))), - ), - TypeVariant::ClaimAtom => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimAtom(Box::new(t.0)))), - ), - TypeVariant::CreateAccountResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::CreateAccountResultCode(Box::new(t.0)))), - ), - TypeVariant::CreateAccountResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateAccountResult(Box::new(t.0)))), - ), - TypeVariant::PaymentResultCode => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PaymentResultCode(Box::new(t.0)))), - ), - TypeVariant::PaymentResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PaymentResult(Box::new(t.0)))), - ), - TypeVariant::PathPaymentStrictReceiveResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::PathPaymentStrictReceiveResultCode(Box::new(t.0)))), - ), - TypeVariant::SimplePaymentResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SimplePaymentResult(Box::new(t.0)))), - ), - TypeVariant::PathPaymentStrictReceiveResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::PathPaymentStrictReceiveResult(Box::new(t.0)))), - ), - TypeVariant::PathPaymentStrictReceiveResultSuccess => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::PathPaymentStrictReceiveResultSuccess(Box::new(t.0)))), - ), - TypeVariant::PathPaymentStrictSendResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::PathPaymentStrictSendResultCode(Box::new(t.0)))), - ), - TypeVariant::PathPaymentStrictSendResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::PathPaymentStrictSendResult(Box::new(t.0)))), - ), - TypeVariant::PathPaymentStrictSendResultSuccess => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::PathPaymentStrictSendResultSuccess(Box::new(t.0)))), - ), - TypeVariant::ManageSellOfferResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ManageSellOfferResultCode(Box::new(t.0)))), - ), - TypeVariant::ManageOfferEffect => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageOfferEffect(Box::new(t.0)))), - ), - TypeVariant::ManageOfferSuccessResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ManageOfferSuccessResult(Box::new(t.0)))), - ), - TypeVariant::ManageOfferSuccessResultOffer => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ManageOfferSuccessResultOffer(Box::new(t.0)))), - ), - TypeVariant::ManageSellOfferResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageSellOfferResult(Box::new(t.0)))), - ), - TypeVariant::ManageBuyOfferResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ManageBuyOfferResultCode(Box::new(t.0)))), - ), - TypeVariant::ManageBuyOfferResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageBuyOfferResult(Box::new(t.0)))), - ), - TypeVariant::SetOptionsResultCode => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SetOptionsResultCode(Box::new(t.0)))), - ), - TypeVariant::SetOptionsResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SetOptionsResult(Box::new(t.0)))), - ), - TypeVariant::ChangeTrustResultCode => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ChangeTrustResultCode(Box::new(t.0)))), - ), - TypeVariant::ChangeTrustResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ChangeTrustResult(Box::new(t.0)))), - ), - TypeVariant::AllowTrustResultCode => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AllowTrustResultCode(Box::new(t.0)))), - ), - TypeVariant::AllowTrustResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AllowTrustResult(Box::new(t.0)))), - ), - TypeVariant::AccountMergeResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::AccountMergeResultCode(Box::new(t.0)))), - ), - TypeVariant::AccountMergeResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountMergeResult(Box::new(t.0)))), - ), - TypeVariant::InflationResultCode => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InflationResultCode(Box::new(t.0)))), - ), - TypeVariant::InflationPayout => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InflationPayout(Box::new(t.0)))), - ), - TypeVariant::InflationResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::InflationResult(Box::new(t.0)))), - ), - TypeVariant::ManageDataResultCode => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageDataResultCode(Box::new(t.0)))), - ), - TypeVariant::ManageDataResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageDataResult(Box::new(t.0)))), - ), - TypeVariant::BumpSequenceResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::BumpSequenceResultCode(Box::new(t.0)))), - ), - TypeVariant::BumpSequenceResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BumpSequenceResult(Box::new(t.0)))), - ), - TypeVariant::CreateClaimableBalanceResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::CreateClaimableBalanceResultCode(Box::new(t.0)))), - ), - TypeVariant::CreateClaimableBalanceResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::CreateClaimableBalanceResult(Box::new(t.0)))), - ), - TypeVariant::ClaimClaimableBalanceResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClaimClaimableBalanceResultCode(Box::new(t.0)))), - ), - TypeVariant::ClaimClaimableBalanceResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClaimClaimableBalanceResult(Box::new(t.0)))), - ), - TypeVariant::BeginSponsoringFutureReservesResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::BeginSponsoringFutureReservesResultCode(Box::new(t.0)))), - ), - TypeVariant::BeginSponsoringFutureReservesResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::BeginSponsoringFutureReservesResult(Box::new(t.0)))), - ), - TypeVariant::EndSponsoringFutureReservesResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::EndSponsoringFutureReservesResultCode(Box::new(t.0)))), - ), - TypeVariant::EndSponsoringFutureReservesResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::EndSponsoringFutureReservesResult(Box::new(t.0)))), - ), - TypeVariant::RevokeSponsorshipResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::RevokeSponsorshipResultCode(Box::new(t.0)))), - ), - TypeVariant::RevokeSponsorshipResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::RevokeSponsorshipResult(Box::new(t.0)))), - ), - TypeVariant::ClawbackResultCode => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClawbackResultCode(Box::new(t.0)))), - ), - TypeVariant::ClawbackResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClawbackResult(Box::new(t.0)))), - ), - TypeVariant::ClawbackClaimableBalanceResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClawbackClaimableBalanceResultCode(Box::new(t.0)))), - ), - TypeVariant::ClawbackClaimableBalanceResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClawbackClaimableBalanceResult(Box::new(t.0)))), - ), - TypeVariant::SetTrustLineFlagsResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SetTrustLineFlagsResultCode(Box::new(t.0)))), - ), - TypeVariant::SetTrustLineFlagsResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SetTrustLineFlagsResult(Box::new(t.0)))), - ), - TypeVariant::LiquidityPoolDepositResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolDepositResultCode(Box::new(t.0)))), - ), - TypeVariant::LiquidityPoolDepositResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolDepositResult(Box::new(t.0)))), - ), - TypeVariant::LiquidityPoolWithdrawResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolWithdrawResultCode(Box::new(t.0)))), - ), - TypeVariant::LiquidityPoolWithdrawResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolWithdrawResult(Box::new(t.0)))), - ), - TypeVariant::InvokeHostFunctionResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::InvokeHostFunctionResultCode(Box::new(t.0)))), - ), - TypeVariant::InvokeHostFunctionResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::InvokeHostFunctionResult(Box::new(t.0)))), - ), - TypeVariant::ExtendFootprintTtlResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ExtendFootprintTtlResultCode(Box::new(t.0)))), - ), - TypeVariant::ExtendFootprintTtlResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ExtendFootprintTtlResult(Box::new(t.0)))), - ), - TypeVariant::RestoreFootprintResultCode => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::RestoreFootprintResultCode(Box::new(t.0)))), - ), - TypeVariant::RestoreFootprintResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::RestoreFootprintResult(Box::new(t.0)))), - ), - TypeVariant::OperationResultCode => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationResultCode(Box::new(t.0)))), - ), - TypeVariant::OperationResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationResult(Box::new(t.0)))), - ), - TypeVariant::OperationResultTr => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationResultTr(Box::new(t.0)))), - ), - TypeVariant::TransactionResultCode => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultCode(Box::new(t.0)))), - ), - TypeVariant::InnerTransactionResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::InnerTransactionResult(Box::new(t.0)))), - ), - TypeVariant::InnerTransactionResultResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::InnerTransactionResultResult(Box::new(t.0)))), - ), - TypeVariant::InnerTransactionResultExt => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::InnerTransactionResultExt(Box::new(t.0)))), - ), - TypeVariant::InnerTransactionResultPair => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::InnerTransactionResultPair(Box::new(t.0)))), - ), - TypeVariant::TransactionResult => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResult(Box::new(t.0)))), - ), - TypeVariant::TransactionResultResult => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TransactionResultResult(Box::new(t.0)))), - ), - TypeVariant::TransactionResultExt => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultExt(Box::new(t.0)))), - ), - TypeVariant::Hash => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Hash(Box::new(t.0)))), - ), - TypeVariant::Uint256 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Uint256(Box::new(t.0)))), - ), - TypeVariant::Uint32 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Uint32(Box::new(t.0)))), - ), - TypeVariant::Int32 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Int32(Box::new(t.0)))), - ), - TypeVariant::Uint64 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Uint64(Box::new(t.0)))), - ), - TypeVariant::Int64 => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Int64(Box::new(t.0)))), - ), - TypeVariant::TimePoint => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::TimePoint(Box::new(t.0)))), - ), - TypeVariant::Duration => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Duration(Box::new(t.0)))), - ), - TypeVariant::ExtensionPoint => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtensionPoint(Box::new(t.0)))), - ), - TypeVariant::CryptoKeyType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::CryptoKeyType(Box::new(t.0)))), - ), - TypeVariant::PublicKeyType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PublicKeyType(Box::new(t.0)))), - ), - TypeVariant::SignerKeyType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SignerKeyType(Box::new(t.0)))), - ), - TypeVariant::PublicKey => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PublicKey(Box::new(t.0)))), - ), - TypeVariant::SignerKey => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SignerKey(Box::new(t.0)))), - ), - TypeVariant::SignerKeyEd25519SignedPayload => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SignerKeyEd25519SignedPayload(Box::new(t.0)))), - ), - TypeVariant::Signature => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Signature(Box::new(t.0)))), - ), - TypeVariant::SignatureHint => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::SignatureHint(Box::new(t.0)))), - ), - TypeVariant::NodeId => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::NodeId(Box::new(t.0)))), - ), - TypeVariant::AccountId => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountId(Box::new(t.0)))), - ), - TypeVariant::ContractId => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractId(Box::new(t.0)))), - ), - TypeVariant::Curve25519Secret => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Curve25519Secret(Box::new(t.0)))), - ), - TypeVariant::Curve25519Public => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::Curve25519Public(Box::new(t.0)))), - ), - TypeVariant::HmacSha256Key => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HmacSha256Key(Box::new(t.0)))), - ), - TypeVariant::HmacSha256Mac => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::HmacSha256Mac(Box::new(t.0)))), - ), - TypeVariant::ShortHashSeed => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ShortHashSeed(Box::new(t.0)))), - ), - TypeVariant::BinaryFuseFilterType => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::BinaryFuseFilterType(Box::new(t.0)))), - ), - TypeVariant::SerializedBinaryFuseFilter => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SerializedBinaryFuseFilter(Box::new(t.0)))), - ), - TypeVariant::PoolId => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::PoolId(Box::new(t.0)))), - ), - TypeVariant::ClaimableBalanceIdType => Box::new( - ReadXdrIter::<_, Frame>::new( - &mut r.inner, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ClaimableBalanceIdType(Box::new(t.0)))), - ), - TypeVariant::ClaimableBalanceId => Box::new( - ReadXdrIter::<_, Frame>::new(&mut r.inner, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceId(Box::new(t.0)))), - ), - } - } - - #[cfg(feature = "base64")] - #[allow(clippy::too_many_lines)] - pub fn read_xdr_base64_iter( - v: TypeVariant, - r: &mut Limited, - ) -> Box> + '_> { - let dec = base64::read::DecoderReader::new( - SkipWhitespace::new(&mut r.inner), - &base64::engine::general_purpose::STANDARD, - ); - match v { - TypeVariant::Value => Box::new( - ReadXdrIter::<_, Value>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Value(Box::new(t)))), - ), - TypeVariant::ScpBallot => Box::new( - ReadXdrIter::<_, ScpBallot>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpBallot(Box::new(t)))), - ), - TypeVariant::ScpStatementType => Box::new( - ReadXdrIter::<_, ScpStatementType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatementType(Box::new(t)))), - ), - TypeVariant::ScpNomination => Box::new( - ReadXdrIter::<_, ScpNomination>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpNomination(Box::new(t)))), - ), - TypeVariant::ScpStatement => Box::new( - ReadXdrIter::<_, ScpStatement>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatement(Box::new(t)))), - ), - TypeVariant::ScpStatementPledges => Box::new( - ReadXdrIter::<_, ScpStatementPledges>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatementPledges(Box::new(t)))), - ), - TypeVariant::ScpStatementPrepare => Box::new( - ReadXdrIter::<_, ScpStatementPrepare>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatementPrepare(Box::new(t)))), - ), - TypeVariant::ScpStatementConfirm => Box::new( - ReadXdrIter::<_, ScpStatementConfirm>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatementConfirm(Box::new(t)))), - ), - TypeVariant::ScpStatementExternalize => Box::new( - ReadXdrIter::<_, ScpStatementExternalize>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpStatementExternalize(Box::new(t)))), - ), - TypeVariant::ScpEnvelope => Box::new( - ReadXdrIter::<_, ScpEnvelope>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpEnvelope(Box::new(t)))), - ), - TypeVariant::ScpQuorumSet => Box::new( - ReadXdrIter::<_, ScpQuorumSet>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpQuorumSet(Box::new(t)))), - ), - TypeVariant::EncodedLedgerKey => Box::new( - ReadXdrIter::<_, EncodedLedgerKey>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::EncodedLedgerKey(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractExecutionLanesV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractExecutionLanesV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingContractExecutionLanesV0(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractComputeV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractComputeV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingContractComputeV0(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractParallelComputeV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractParallelComputeV0>::new( - dec, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::ConfigSettingContractParallelComputeV0(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractLedgerCostV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractLedgerCostV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingContractLedgerCostV0(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractLedgerCostExtV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractLedgerCostExtV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingContractLedgerCostExtV0(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractHistoricalDataV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractHistoricalDataV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingContractHistoricalDataV0(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractEventsV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractEventsV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingContractEventsV0(Box::new(t)))), - ), - TypeVariant::ConfigSettingContractBandwidthV0 => Box::new( - ReadXdrIter::<_, ConfigSettingContractBandwidthV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingContractBandwidthV0(Box::new(t)))), - ), - TypeVariant::ContractCostType => Box::new( - ReadXdrIter::<_, ContractCostType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCostType(Box::new(t)))), - ), - TypeVariant::ContractCostParamEntry => Box::new( - ReadXdrIter::<_, ContractCostParamEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCostParamEntry(Box::new(t)))), - ), - TypeVariant::StateArchivalSettings => Box::new( - ReadXdrIter::<_, StateArchivalSettings>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::StateArchivalSettings(Box::new(t)))), - ), - TypeVariant::EvictionIterator => Box::new( - ReadXdrIter::<_, EvictionIterator>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::EvictionIterator(Box::new(t)))), - ), - TypeVariant::ConfigSettingScpTiming => Box::new( - ReadXdrIter::<_, ConfigSettingScpTiming>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingScpTiming(Box::new(t)))), - ), - TypeVariant::FrozenLedgerKeys => Box::new( - ReadXdrIter::<_, FrozenLedgerKeys>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::FrozenLedgerKeys(Box::new(t)))), - ), - TypeVariant::FrozenLedgerKeysDelta => Box::new( - ReadXdrIter::<_, FrozenLedgerKeysDelta>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::FrozenLedgerKeysDelta(Box::new(t)))), - ), - TypeVariant::FreezeBypassTxs => Box::new( - ReadXdrIter::<_, FreezeBypassTxs>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::FreezeBypassTxs(Box::new(t)))), - ), - TypeVariant::FreezeBypassTxsDelta => Box::new( - ReadXdrIter::<_, FreezeBypassTxsDelta>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::FreezeBypassTxsDelta(Box::new(t)))), - ), - TypeVariant::ContractCostParams => Box::new( - ReadXdrIter::<_, ContractCostParams>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCostParams(Box::new(t)))), - ), - TypeVariant::ConfigSettingId => Box::new( - ReadXdrIter::<_, ConfigSettingId>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingId(Box::new(t)))), - ), - TypeVariant::ConfigSettingEntry => Box::new( - ReadXdrIter::<_, ConfigSettingEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigSettingEntry(Box::new(t)))), - ), - TypeVariant::ScEnvMetaKind => Box::new( - ReadXdrIter::<_, ScEnvMetaKind>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScEnvMetaKind(Box::new(t)))), - ), - TypeVariant::ScEnvMetaEntry => Box::new( - ReadXdrIter::<_, ScEnvMetaEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScEnvMetaEntry(Box::new(t)))), - ), - TypeVariant::ScEnvMetaEntryInterfaceVersion => Box::new( - ReadXdrIter::<_, ScEnvMetaEntryInterfaceVersion>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScEnvMetaEntryInterfaceVersion(Box::new(t)))), - ), - TypeVariant::ScMetaV0 => Box::new( - ReadXdrIter::<_, ScMetaV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMetaV0(Box::new(t)))), - ), - TypeVariant::ScMetaKind => Box::new( - ReadXdrIter::<_, ScMetaKind>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMetaKind(Box::new(t)))), - ), - TypeVariant::ScMetaEntry => Box::new( - ReadXdrIter::<_, ScMetaEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMetaEntry(Box::new(t)))), - ), - TypeVariant::ScSpecType => Box::new( - ReadXdrIter::<_, ScSpecType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecType(Box::new(t)))), - ), - TypeVariant::ScSpecTypeOption => Box::new( - ReadXdrIter::<_, ScSpecTypeOption>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeOption(Box::new(t)))), - ), - TypeVariant::ScSpecTypeResult => Box::new( - ReadXdrIter::<_, ScSpecTypeResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeResult(Box::new(t)))), - ), - TypeVariant::ScSpecTypeVec => Box::new( - ReadXdrIter::<_, ScSpecTypeVec>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeVec(Box::new(t)))), - ), - TypeVariant::ScSpecTypeMap => Box::new( - ReadXdrIter::<_, ScSpecTypeMap>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeMap(Box::new(t)))), - ), - TypeVariant::ScSpecTypeTuple => Box::new( - ReadXdrIter::<_, ScSpecTypeTuple>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeTuple(Box::new(t)))), - ), - TypeVariant::ScSpecTypeBytesN => Box::new( - ReadXdrIter::<_, ScSpecTypeBytesN>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeBytesN(Box::new(t)))), - ), - TypeVariant::ScSpecTypeUdt => Box::new( - ReadXdrIter::<_, ScSpecTypeUdt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeUdt(Box::new(t)))), - ), - TypeVariant::ScSpecTypeDef => Box::new( - ReadXdrIter::<_, ScSpecTypeDef>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecTypeDef(Box::new(t)))), - ), - TypeVariant::ScSpecUdtStructFieldV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtStructFieldV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtStructFieldV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtStructV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtStructV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtStructV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtUnionCaseVoidV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtUnionCaseVoidV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtUnionCaseVoidV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtUnionCaseTupleV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtUnionCaseTupleV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtUnionCaseTupleV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtUnionCaseV0Kind => Box::new( - ReadXdrIter::<_, ScSpecUdtUnionCaseV0Kind>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtUnionCaseV0Kind(Box::new(t)))), - ), - TypeVariant::ScSpecUdtUnionCaseV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtUnionCaseV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtUnionCaseV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtUnionV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtUnionV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtUnionV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtEnumCaseV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtEnumCaseV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtEnumCaseV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtEnumV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtEnumV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtEnumV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtErrorEnumCaseV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtErrorEnumCaseV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtErrorEnumCaseV0(Box::new(t)))), - ), - TypeVariant::ScSpecUdtErrorEnumV0 => Box::new( - ReadXdrIter::<_, ScSpecUdtErrorEnumV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecUdtErrorEnumV0(Box::new(t)))), - ), - TypeVariant::ScSpecFunctionInputV0 => Box::new( - ReadXdrIter::<_, ScSpecFunctionInputV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecFunctionInputV0(Box::new(t)))), - ), - TypeVariant::ScSpecFunctionV0 => Box::new( - ReadXdrIter::<_, ScSpecFunctionV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecFunctionV0(Box::new(t)))), - ), - TypeVariant::ScSpecEventParamLocationV0 => Box::new( - ReadXdrIter::<_, ScSpecEventParamLocationV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEventParamLocationV0(Box::new(t)))), - ), - TypeVariant::ScSpecEventParamV0 => Box::new( - ReadXdrIter::<_, ScSpecEventParamV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEventParamV0(Box::new(t)))), - ), - TypeVariant::ScSpecEventDataFormat => Box::new( - ReadXdrIter::<_, ScSpecEventDataFormat>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEventDataFormat(Box::new(t)))), - ), - TypeVariant::ScSpecEventV0 => Box::new( - ReadXdrIter::<_, ScSpecEventV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEventV0(Box::new(t)))), - ), - TypeVariant::ScSpecEntryKind => Box::new( - ReadXdrIter::<_, ScSpecEntryKind>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEntryKind(Box::new(t)))), - ), - TypeVariant::ScSpecEntry => Box::new( - ReadXdrIter::<_, ScSpecEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSpecEntry(Box::new(t)))), - ), - TypeVariant::ScValType => Box::new( - ReadXdrIter::<_, ScValType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScValType(Box::new(t)))), - ), - TypeVariant::ScErrorType => Box::new( - ReadXdrIter::<_, ScErrorType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScErrorType(Box::new(t)))), - ), - TypeVariant::ScErrorCode => Box::new( - ReadXdrIter::<_, ScErrorCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScErrorCode(Box::new(t)))), - ), - TypeVariant::ScError => Box::new( - ReadXdrIter::<_, ScError>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScError(Box::new(t)))), - ), - TypeVariant::UInt128Parts => Box::new( - ReadXdrIter::<_, UInt128Parts>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::UInt128Parts(Box::new(t)))), - ), - TypeVariant::Int128Parts => Box::new( - ReadXdrIter::<_, Int128Parts>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Int128Parts(Box::new(t)))), - ), - TypeVariant::UInt256Parts => Box::new( - ReadXdrIter::<_, UInt256Parts>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::UInt256Parts(Box::new(t)))), - ), - TypeVariant::Int256Parts => Box::new( - ReadXdrIter::<_, Int256Parts>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Int256Parts(Box::new(t)))), - ), - TypeVariant::ContractExecutableType => Box::new( - ReadXdrIter::<_, ContractExecutableType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractExecutableType(Box::new(t)))), - ), - TypeVariant::ContractExecutable => Box::new( - ReadXdrIter::<_, ContractExecutable>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractExecutable(Box::new(t)))), - ), - TypeVariant::ScAddressType => Box::new( - ReadXdrIter::<_, ScAddressType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScAddressType(Box::new(t)))), - ), - TypeVariant::MuxedEd25519Account => Box::new( - ReadXdrIter::<_, MuxedEd25519Account>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::MuxedEd25519Account(Box::new(t)))), - ), - TypeVariant::ScAddress => Box::new( - ReadXdrIter::<_, ScAddress>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScAddress(Box::new(t)))), - ), - TypeVariant::ScVec => Box::new( - ReadXdrIter::<_, ScVec>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScVec(Box::new(t)))), - ), - TypeVariant::ScMap => Box::new( - ReadXdrIter::<_, ScMap>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMap(Box::new(t)))), - ), - TypeVariant::ScBytes => Box::new( - ReadXdrIter::<_, ScBytes>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScBytes(Box::new(t)))), - ), - TypeVariant::ScString => Box::new( - ReadXdrIter::<_, ScString>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScString(Box::new(t)))), - ), - TypeVariant::ScSymbol => Box::new( - ReadXdrIter::<_, ScSymbol>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScSymbol(Box::new(t)))), - ), - TypeVariant::ScNonceKey => Box::new( - ReadXdrIter::<_, ScNonceKey>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScNonceKey(Box::new(t)))), - ), - TypeVariant::ScContractInstance => Box::new( - ReadXdrIter::<_, ScContractInstance>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScContractInstance(Box::new(t)))), - ), - TypeVariant::ScVal => Box::new( - ReadXdrIter::<_, ScVal>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScVal(Box::new(t)))), - ), - TypeVariant::ScMapEntry => Box::new( - ReadXdrIter::<_, ScMapEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScMapEntry(Box::new(t)))), - ), - TypeVariant::LedgerCloseMetaBatch => Box::new( - ReadXdrIter::<_, LedgerCloseMetaBatch>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaBatch(Box::new(t)))), - ), - TypeVariant::StoredTransactionSet => Box::new( - ReadXdrIter::<_, StoredTransactionSet>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::StoredTransactionSet(Box::new(t)))), - ), - TypeVariant::StoredDebugTransactionSet => Box::new( - ReadXdrIter::<_, StoredDebugTransactionSet>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::StoredDebugTransactionSet(Box::new(t)))), - ), - TypeVariant::PersistedScpStateV0 => Box::new( - ReadXdrIter::<_, PersistedScpStateV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PersistedScpStateV0(Box::new(t)))), - ), - TypeVariant::PersistedScpStateV1 => Box::new( - ReadXdrIter::<_, PersistedScpStateV1>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PersistedScpStateV1(Box::new(t)))), - ), - TypeVariant::PersistedScpState => Box::new( - ReadXdrIter::<_, PersistedScpState>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PersistedScpState(Box::new(t)))), - ), - TypeVariant::Thresholds => Box::new( - ReadXdrIter::<_, Thresholds>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Thresholds(Box::new(t)))), - ), - TypeVariant::String32 => Box::new( - ReadXdrIter::<_, String32>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::String32(Box::new(t)))), - ), - TypeVariant::String64 => Box::new( - ReadXdrIter::<_, String64>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::String64(Box::new(t)))), - ), - TypeVariant::SequenceNumber => Box::new( - ReadXdrIter::<_, SequenceNumber>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SequenceNumber(Box::new(t)))), - ), - TypeVariant::DataValue => Box::new( - ReadXdrIter::<_, DataValue>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::DataValue(Box::new(t)))), - ), - TypeVariant::AssetCode4 => Box::new( - ReadXdrIter::<_, AssetCode4>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AssetCode4(Box::new(t)))), - ), - TypeVariant::AssetCode12 => Box::new( - ReadXdrIter::<_, AssetCode12>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AssetCode12(Box::new(t)))), - ), - TypeVariant::AssetType => Box::new( - ReadXdrIter::<_, AssetType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AssetType(Box::new(t)))), - ), - TypeVariant::AssetCode => Box::new( - ReadXdrIter::<_, AssetCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AssetCode(Box::new(t)))), - ), - TypeVariant::AlphaNum4 => Box::new( - ReadXdrIter::<_, AlphaNum4>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AlphaNum4(Box::new(t)))), - ), - TypeVariant::AlphaNum12 => Box::new( - ReadXdrIter::<_, AlphaNum12>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AlphaNum12(Box::new(t)))), - ), - TypeVariant::Asset => Box::new( - ReadXdrIter::<_, Asset>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Asset(Box::new(t)))), - ), - TypeVariant::Price => Box::new( - ReadXdrIter::<_, Price>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Price(Box::new(t)))), - ), - TypeVariant::Liabilities => Box::new( - ReadXdrIter::<_, Liabilities>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Liabilities(Box::new(t)))), - ), - TypeVariant::ThresholdIndexes => Box::new( - ReadXdrIter::<_, ThresholdIndexes>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ThresholdIndexes(Box::new(t)))), - ), - TypeVariant::LedgerEntryType => Box::new( - ReadXdrIter::<_, LedgerEntryType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryType(Box::new(t)))), - ), - TypeVariant::Signer => Box::new( - ReadXdrIter::<_, Signer>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Signer(Box::new(t)))), - ), - TypeVariant::AccountFlags => Box::new( - ReadXdrIter::<_, AccountFlags>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountFlags(Box::new(t)))), - ), - TypeVariant::SponsorshipDescriptor => Box::new( - ReadXdrIter::<_, SponsorshipDescriptor>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SponsorshipDescriptor(Box::new(t)))), - ), - TypeVariant::AccountEntryExtensionV3 => Box::new( - ReadXdrIter::<_, AccountEntryExtensionV3>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntryExtensionV3(Box::new(t)))), - ), - TypeVariant::AccountEntryExtensionV2 => Box::new( - ReadXdrIter::<_, AccountEntryExtensionV2>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntryExtensionV2(Box::new(t)))), - ), - TypeVariant::AccountEntryExtensionV2Ext => Box::new( - ReadXdrIter::<_, AccountEntryExtensionV2Ext>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntryExtensionV2Ext(Box::new(t)))), - ), - TypeVariant::AccountEntryExtensionV1 => Box::new( - ReadXdrIter::<_, AccountEntryExtensionV1>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntryExtensionV1(Box::new(t)))), - ), - TypeVariant::AccountEntryExtensionV1Ext => Box::new( - ReadXdrIter::<_, AccountEntryExtensionV1Ext>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntryExtensionV1Ext(Box::new(t)))), - ), - TypeVariant::AccountEntry => Box::new( - ReadXdrIter::<_, AccountEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntry(Box::new(t)))), - ), - TypeVariant::AccountEntryExt => Box::new( - ReadXdrIter::<_, AccountEntryExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountEntryExt(Box::new(t)))), - ), - TypeVariant::TrustLineFlags => Box::new( - ReadXdrIter::<_, TrustLineFlags>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineFlags(Box::new(t)))), - ), - TypeVariant::LiquidityPoolType => Box::new( - ReadXdrIter::<_, LiquidityPoolType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolType(Box::new(t)))), - ), - TypeVariant::TrustLineAsset => Box::new( - ReadXdrIter::<_, TrustLineAsset>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineAsset(Box::new(t)))), - ), - TypeVariant::TrustLineEntryExtensionV2 => Box::new( - ReadXdrIter::<_, TrustLineEntryExtensionV2>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntryExtensionV2(Box::new(t)))), - ), - TypeVariant::TrustLineEntryExtensionV2Ext => Box::new( - ReadXdrIter::<_, TrustLineEntryExtensionV2Ext>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntryExtensionV2Ext(Box::new(t)))), - ), - TypeVariant::TrustLineEntry => Box::new( - ReadXdrIter::<_, TrustLineEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntry(Box::new(t)))), - ), - TypeVariant::TrustLineEntryExt => Box::new( - ReadXdrIter::<_, TrustLineEntryExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntryExt(Box::new(t)))), - ), - TypeVariant::TrustLineEntryV1 => Box::new( - ReadXdrIter::<_, TrustLineEntryV1>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntryV1(Box::new(t)))), - ), - TypeVariant::TrustLineEntryV1Ext => Box::new( - ReadXdrIter::<_, TrustLineEntryV1Ext>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TrustLineEntryV1Ext(Box::new(t)))), - ), - TypeVariant::OfferEntryFlags => Box::new( - ReadXdrIter::<_, OfferEntryFlags>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::OfferEntryFlags(Box::new(t)))), - ), - TypeVariant::OfferEntry => Box::new( - ReadXdrIter::<_, OfferEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::OfferEntry(Box::new(t)))), - ), - TypeVariant::OfferEntryExt => Box::new( - ReadXdrIter::<_, OfferEntryExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::OfferEntryExt(Box::new(t)))), - ), - TypeVariant::DataEntry => Box::new( - ReadXdrIter::<_, DataEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::DataEntry(Box::new(t)))), - ), - TypeVariant::DataEntryExt => Box::new( - ReadXdrIter::<_, DataEntryExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::DataEntryExt(Box::new(t)))), - ), - TypeVariant::ClaimPredicateType => Box::new( - ReadXdrIter::<_, ClaimPredicateType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimPredicateType(Box::new(t)))), - ), - TypeVariant::ClaimPredicate => Box::new( - ReadXdrIter::<_, ClaimPredicate>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimPredicate(Box::new(t)))), - ), - TypeVariant::ClaimantType => Box::new( - ReadXdrIter::<_, ClaimantType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimantType(Box::new(t)))), - ), - TypeVariant::Claimant => Box::new( - ReadXdrIter::<_, Claimant>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Claimant(Box::new(t)))), - ), - TypeVariant::ClaimantV0 => Box::new( - ReadXdrIter::<_, ClaimantV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimantV0(Box::new(t)))), - ), - TypeVariant::ClaimableBalanceFlags => Box::new( - ReadXdrIter::<_, ClaimableBalanceFlags>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceFlags(Box::new(t)))), - ), - TypeVariant::ClaimableBalanceEntryExtensionV1 => Box::new( - ReadXdrIter::<_, ClaimableBalanceEntryExtensionV1>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceEntryExtensionV1(Box::new(t)))), - ), - TypeVariant::ClaimableBalanceEntryExtensionV1Ext => Box::new( - ReadXdrIter::<_, ClaimableBalanceEntryExtensionV1Ext>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceEntryExtensionV1Ext(Box::new(t)))), - ), - TypeVariant::ClaimableBalanceEntry => Box::new( - ReadXdrIter::<_, ClaimableBalanceEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceEntry(Box::new(t)))), - ), - TypeVariant::ClaimableBalanceEntryExt => Box::new( - ReadXdrIter::<_, ClaimableBalanceEntryExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceEntryExt(Box::new(t)))), - ), - TypeVariant::LiquidityPoolConstantProductParameters => Box::new( - ReadXdrIter::<_, LiquidityPoolConstantProductParameters>::new( - dec, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::LiquidityPoolConstantProductParameters(Box::new(t)))), - ), - TypeVariant::LiquidityPoolEntry => Box::new( - ReadXdrIter::<_, LiquidityPoolEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolEntry(Box::new(t)))), - ), - TypeVariant::LiquidityPoolEntryBody => Box::new( - ReadXdrIter::<_, LiquidityPoolEntryBody>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolEntryBody(Box::new(t)))), - ), - TypeVariant::LiquidityPoolEntryConstantProduct => Box::new( - ReadXdrIter::<_, LiquidityPoolEntryConstantProduct>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolEntryConstantProduct(Box::new(t)))), - ), - TypeVariant::ContractDataDurability => Box::new( - ReadXdrIter::<_, ContractDataDurability>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractDataDurability(Box::new(t)))), - ), - TypeVariant::ContractDataEntry => Box::new( - ReadXdrIter::<_, ContractDataEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractDataEntry(Box::new(t)))), - ), - TypeVariant::ContractCodeCostInputs => Box::new( - ReadXdrIter::<_, ContractCodeCostInputs>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCodeCostInputs(Box::new(t)))), - ), - TypeVariant::ContractCodeEntry => Box::new( - ReadXdrIter::<_, ContractCodeEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCodeEntry(Box::new(t)))), - ), - TypeVariant::ContractCodeEntryExt => Box::new( - ReadXdrIter::<_, ContractCodeEntryExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCodeEntryExt(Box::new(t)))), - ), - TypeVariant::ContractCodeEntryV1 => Box::new( - ReadXdrIter::<_, ContractCodeEntryV1>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractCodeEntryV1(Box::new(t)))), - ), - TypeVariant::TtlEntry => Box::new( - ReadXdrIter::<_, TtlEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TtlEntry(Box::new(t)))), - ), - TypeVariant::LedgerEntryExtensionV1 => Box::new( - ReadXdrIter::<_, LedgerEntryExtensionV1>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryExtensionV1(Box::new(t)))), - ), - TypeVariant::LedgerEntryExtensionV1Ext => Box::new( - ReadXdrIter::<_, LedgerEntryExtensionV1Ext>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryExtensionV1Ext(Box::new(t)))), - ), - TypeVariant::LedgerEntry => Box::new( - ReadXdrIter::<_, LedgerEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntry(Box::new(t)))), - ), - TypeVariant::LedgerEntryData => Box::new( - ReadXdrIter::<_, LedgerEntryData>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryData(Box::new(t)))), - ), - TypeVariant::LedgerEntryExt => Box::new( - ReadXdrIter::<_, LedgerEntryExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryExt(Box::new(t)))), - ), - TypeVariant::LedgerKey => Box::new( - ReadXdrIter::<_, LedgerKey>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKey(Box::new(t)))), - ), - TypeVariant::LedgerKeyAccount => Box::new( - ReadXdrIter::<_, LedgerKeyAccount>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyAccount(Box::new(t)))), - ), - TypeVariant::LedgerKeyTrustLine => Box::new( - ReadXdrIter::<_, LedgerKeyTrustLine>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyTrustLine(Box::new(t)))), - ), - TypeVariant::LedgerKeyOffer => Box::new( - ReadXdrIter::<_, LedgerKeyOffer>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyOffer(Box::new(t)))), - ), - TypeVariant::LedgerKeyData => Box::new( - ReadXdrIter::<_, LedgerKeyData>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyData(Box::new(t)))), - ), - TypeVariant::LedgerKeyClaimableBalance => Box::new( - ReadXdrIter::<_, LedgerKeyClaimableBalance>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyClaimableBalance(Box::new(t)))), - ), - TypeVariant::LedgerKeyLiquidityPool => Box::new( - ReadXdrIter::<_, LedgerKeyLiquidityPool>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyLiquidityPool(Box::new(t)))), - ), - TypeVariant::LedgerKeyContractData => Box::new( - ReadXdrIter::<_, LedgerKeyContractData>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyContractData(Box::new(t)))), - ), - TypeVariant::LedgerKeyContractCode => Box::new( - ReadXdrIter::<_, LedgerKeyContractCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyContractCode(Box::new(t)))), - ), - TypeVariant::LedgerKeyConfigSetting => Box::new( - ReadXdrIter::<_, LedgerKeyConfigSetting>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyConfigSetting(Box::new(t)))), - ), - TypeVariant::LedgerKeyTtl => Box::new( - ReadXdrIter::<_, LedgerKeyTtl>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerKeyTtl(Box::new(t)))), - ), - TypeVariant::EnvelopeType => Box::new( - ReadXdrIter::<_, EnvelopeType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::EnvelopeType(Box::new(t)))), - ), - TypeVariant::BucketListType => Box::new( - ReadXdrIter::<_, BucketListType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketListType(Box::new(t)))), - ), - TypeVariant::BucketEntryType => Box::new( - ReadXdrIter::<_, BucketEntryType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketEntryType(Box::new(t)))), - ), - TypeVariant::HotArchiveBucketEntryType => Box::new( - ReadXdrIter::<_, HotArchiveBucketEntryType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::HotArchiveBucketEntryType(Box::new(t)))), - ), - TypeVariant::BucketMetadata => Box::new( - ReadXdrIter::<_, BucketMetadata>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketMetadata(Box::new(t)))), - ), - TypeVariant::BucketMetadataExt => Box::new( - ReadXdrIter::<_, BucketMetadataExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketMetadataExt(Box::new(t)))), - ), - TypeVariant::BucketEntry => Box::new( - ReadXdrIter::<_, BucketEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::BucketEntry(Box::new(t)))), - ), - TypeVariant::HotArchiveBucketEntry => Box::new( - ReadXdrIter::<_, HotArchiveBucketEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::HotArchiveBucketEntry(Box::new(t)))), - ), - TypeVariant::UpgradeType => Box::new( - ReadXdrIter::<_, UpgradeType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::UpgradeType(Box::new(t)))), - ), - TypeVariant::StellarValueType => Box::new( - ReadXdrIter::<_, StellarValueType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::StellarValueType(Box::new(t)))), - ), - TypeVariant::LedgerCloseValueSignature => Box::new( - ReadXdrIter::<_, LedgerCloseValueSignature>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseValueSignature(Box::new(t)))), - ), - TypeVariant::StellarValue => Box::new( - ReadXdrIter::<_, StellarValue>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::StellarValue(Box::new(t)))), - ), - TypeVariant::StellarValueExt => Box::new( - ReadXdrIter::<_, StellarValueExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::StellarValueExt(Box::new(t)))), - ), - TypeVariant::LedgerHeaderFlags => Box::new( - ReadXdrIter::<_, LedgerHeaderFlags>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeaderFlags(Box::new(t)))), - ), - TypeVariant::LedgerHeaderExtensionV1 => Box::new( - ReadXdrIter::<_, LedgerHeaderExtensionV1>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeaderExtensionV1(Box::new(t)))), - ), - TypeVariant::LedgerHeaderExtensionV1Ext => Box::new( - ReadXdrIter::<_, LedgerHeaderExtensionV1Ext>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeaderExtensionV1Ext(Box::new(t)))), - ), - TypeVariant::LedgerHeader => Box::new( - ReadXdrIter::<_, LedgerHeader>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeader(Box::new(t)))), - ), - TypeVariant::LedgerHeaderExt => Box::new( - ReadXdrIter::<_, LedgerHeaderExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeaderExt(Box::new(t)))), - ), - TypeVariant::LedgerUpgradeType => Box::new( - ReadXdrIter::<_, LedgerUpgradeType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerUpgradeType(Box::new(t)))), - ), - TypeVariant::ConfigUpgradeSetKey => Box::new( - ReadXdrIter::<_, ConfigUpgradeSetKey>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigUpgradeSetKey(Box::new(t)))), - ), - TypeVariant::LedgerUpgrade => Box::new( - ReadXdrIter::<_, LedgerUpgrade>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerUpgrade(Box::new(t)))), - ), - TypeVariant::ConfigUpgradeSet => Box::new( - ReadXdrIter::<_, ConfigUpgradeSet>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ConfigUpgradeSet(Box::new(t)))), - ), - TypeVariant::TxSetComponentType => Box::new( - ReadXdrIter::<_, TxSetComponentType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TxSetComponentType(Box::new(t)))), - ), - TypeVariant::DependentTxCluster => Box::new( - ReadXdrIter::<_, DependentTxCluster>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::DependentTxCluster(Box::new(t)))), - ), - TypeVariant::ParallelTxExecutionStage => Box::new( - ReadXdrIter::<_, ParallelTxExecutionStage>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ParallelTxExecutionStage(Box::new(t)))), - ), - TypeVariant::ParallelTxsComponent => Box::new( - ReadXdrIter::<_, ParallelTxsComponent>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ParallelTxsComponent(Box::new(t)))), - ), - TypeVariant::TxSetComponent => Box::new( - ReadXdrIter::<_, TxSetComponent>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TxSetComponent(Box::new(t)))), - ), - TypeVariant::TxSetComponentTxsMaybeDiscountedFee => Box::new( - ReadXdrIter::<_, TxSetComponentTxsMaybeDiscountedFee>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TxSetComponentTxsMaybeDiscountedFee(Box::new(t)))), - ), - TypeVariant::TransactionPhase => Box::new( - ReadXdrIter::<_, TransactionPhase>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionPhase(Box::new(t)))), - ), - TypeVariant::TransactionSet => Box::new( - ReadXdrIter::<_, TransactionSet>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionSet(Box::new(t)))), - ), - TypeVariant::TransactionSetV1 => Box::new( - ReadXdrIter::<_, TransactionSetV1>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionSetV1(Box::new(t)))), - ), - TypeVariant::GeneralizedTransactionSet => Box::new( - ReadXdrIter::<_, GeneralizedTransactionSet>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::GeneralizedTransactionSet(Box::new(t)))), - ), - TypeVariant::TransactionResultPair => Box::new( - ReadXdrIter::<_, TransactionResultPair>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultPair(Box::new(t)))), - ), - TypeVariant::TransactionResultSet => Box::new( - ReadXdrIter::<_, TransactionResultSet>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultSet(Box::new(t)))), - ), - TypeVariant::TransactionHistoryEntry => Box::new( - ReadXdrIter::<_, TransactionHistoryEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionHistoryEntry(Box::new(t)))), - ), - TypeVariant::TransactionHistoryEntryExt => Box::new( - ReadXdrIter::<_, TransactionHistoryEntryExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionHistoryEntryExt(Box::new(t)))), - ), - TypeVariant::TransactionHistoryResultEntry => Box::new( - ReadXdrIter::<_, TransactionHistoryResultEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionHistoryResultEntry(Box::new(t)))), - ), - TypeVariant::TransactionHistoryResultEntryExt => Box::new( - ReadXdrIter::<_, TransactionHistoryResultEntryExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionHistoryResultEntryExt(Box::new(t)))), - ), - TypeVariant::LedgerHeaderHistoryEntry => Box::new( - ReadXdrIter::<_, LedgerHeaderHistoryEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeaderHistoryEntry(Box::new(t)))), - ), - TypeVariant::LedgerHeaderHistoryEntryExt => Box::new( - ReadXdrIter::<_, LedgerHeaderHistoryEntryExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerHeaderHistoryEntryExt(Box::new(t)))), - ), - TypeVariant::LedgerScpMessages => Box::new( - ReadXdrIter::<_, LedgerScpMessages>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerScpMessages(Box::new(t)))), - ), - TypeVariant::ScpHistoryEntryV0 => Box::new( - ReadXdrIter::<_, ScpHistoryEntryV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpHistoryEntryV0(Box::new(t)))), - ), - TypeVariant::ScpHistoryEntry => Box::new( - ReadXdrIter::<_, ScpHistoryEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ScpHistoryEntry(Box::new(t)))), - ), - TypeVariant::LedgerEntryChangeType => Box::new( - ReadXdrIter::<_, LedgerEntryChangeType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryChangeType(Box::new(t)))), - ), - TypeVariant::LedgerEntryChange => Box::new( - ReadXdrIter::<_, LedgerEntryChange>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryChange(Box::new(t)))), - ), - TypeVariant::LedgerEntryChanges => Box::new( - ReadXdrIter::<_, LedgerEntryChanges>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerEntryChanges(Box::new(t)))), - ), - TypeVariant::OperationMeta => Box::new( - ReadXdrIter::<_, OperationMeta>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationMeta(Box::new(t)))), - ), - TypeVariant::TransactionMetaV1 => Box::new( - ReadXdrIter::<_, TransactionMetaV1>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMetaV1(Box::new(t)))), - ), - TypeVariant::TransactionMetaV2 => Box::new( - ReadXdrIter::<_, TransactionMetaV2>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMetaV2(Box::new(t)))), - ), - TypeVariant::ContractEventType => Box::new( - ReadXdrIter::<_, ContractEventType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractEventType(Box::new(t)))), - ), - TypeVariant::ContractEvent => Box::new( - ReadXdrIter::<_, ContractEvent>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractEvent(Box::new(t)))), - ), - TypeVariant::ContractEventBody => Box::new( - ReadXdrIter::<_, ContractEventBody>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractEventBody(Box::new(t)))), - ), - TypeVariant::ContractEventV0 => Box::new( - ReadXdrIter::<_, ContractEventV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractEventV0(Box::new(t)))), - ), - TypeVariant::DiagnosticEvent => Box::new( - ReadXdrIter::<_, DiagnosticEvent>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::DiagnosticEvent(Box::new(t)))), - ), - TypeVariant::SorobanTransactionMetaExtV1 => Box::new( - ReadXdrIter::<_, SorobanTransactionMetaExtV1>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanTransactionMetaExtV1(Box::new(t)))), - ), - TypeVariant::SorobanTransactionMetaExt => Box::new( - ReadXdrIter::<_, SorobanTransactionMetaExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanTransactionMetaExt(Box::new(t)))), - ), - TypeVariant::SorobanTransactionMeta => Box::new( - ReadXdrIter::<_, SorobanTransactionMeta>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanTransactionMeta(Box::new(t)))), - ), - TypeVariant::TransactionMetaV3 => Box::new( - ReadXdrIter::<_, TransactionMetaV3>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMetaV3(Box::new(t)))), - ), - TypeVariant::OperationMetaV2 => Box::new( - ReadXdrIter::<_, OperationMetaV2>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationMetaV2(Box::new(t)))), - ), - TypeVariant::SorobanTransactionMetaV2 => Box::new( - ReadXdrIter::<_, SorobanTransactionMetaV2>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanTransactionMetaV2(Box::new(t)))), - ), - TypeVariant::TransactionEventStage => Box::new( - ReadXdrIter::<_, TransactionEventStage>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionEventStage(Box::new(t)))), - ), - TypeVariant::TransactionEvent => Box::new( - ReadXdrIter::<_, TransactionEvent>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionEvent(Box::new(t)))), - ), - TypeVariant::TransactionMetaV4 => Box::new( - ReadXdrIter::<_, TransactionMetaV4>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMetaV4(Box::new(t)))), - ), - TypeVariant::InvokeHostFunctionSuccessPreImage => Box::new( - ReadXdrIter::<_, InvokeHostFunctionSuccessPreImage>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::InvokeHostFunctionSuccessPreImage(Box::new(t)))), - ), - TypeVariant::TransactionMeta => Box::new( - ReadXdrIter::<_, TransactionMeta>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionMeta(Box::new(t)))), - ), - TypeVariant::TransactionResultMeta => Box::new( - ReadXdrIter::<_, TransactionResultMeta>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultMeta(Box::new(t)))), - ), - TypeVariant::TransactionResultMetaV1 => Box::new( - ReadXdrIter::<_, TransactionResultMetaV1>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultMetaV1(Box::new(t)))), - ), - TypeVariant::UpgradeEntryMeta => Box::new( - ReadXdrIter::<_, UpgradeEntryMeta>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::UpgradeEntryMeta(Box::new(t)))), - ), - TypeVariant::LedgerCloseMetaV0 => Box::new( - ReadXdrIter::<_, LedgerCloseMetaV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaV0(Box::new(t)))), - ), - TypeVariant::LedgerCloseMetaExtV1 => Box::new( - ReadXdrIter::<_, LedgerCloseMetaExtV1>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaExtV1(Box::new(t)))), - ), - TypeVariant::LedgerCloseMetaExt => Box::new( - ReadXdrIter::<_, LedgerCloseMetaExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaExt(Box::new(t)))), - ), - TypeVariant::LedgerCloseMetaV1 => Box::new( - ReadXdrIter::<_, LedgerCloseMetaV1>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaV1(Box::new(t)))), - ), - TypeVariant::LedgerCloseMetaV2 => Box::new( - ReadXdrIter::<_, LedgerCloseMetaV2>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMetaV2(Box::new(t)))), - ), - TypeVariant::LedgerCloseMeta => Box::new( - ReadXdrIter::<_, LedgerCloseMeta>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerCloseMeta(Box::new(t)))), - ), - TypeVariant::ErrorCode => Box::new( - ReadXdrIter::<_, ErrorCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ErrorCode(Box::new(t)))), - ), - TypeVariant::SError => Box::new( - ReadXdrIter::<_, SError>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SError(Box::new(t)))), - ), - TypeVariant::SendMore => Box::new( - ReadXdrIter::<_, SendMore>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SendMore(Box::new(t)))), - ), - TypeVariant::SendMoreExtended => Box::new( - ReadXdrIter::<_, SendMoreExtended>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SendMoreExtended(Box::new(t)))), - ), - TypeVariant::AuthCert => Box::new( - ReadXdrIter::<_, AuthCert>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AuthCert(Box::new(t)))), - ), - TypeVariant::Hello => Box::new( - ReadXdrIter::<_, Hello>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Hello(Box::new(t)))), - ), - TypeVariant::Auth => Box::new( - ReadXdrIter::<_, Auth>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Auth(Box::new(t)))), - ), - TypeVariant::IpAddrType => Box::new( - ReadXdrIter::<_, IpAddrType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::IpAddrType(Box::new(t)))), - ), - TypeVariant::PeerAddress => Box::new( - ReadXdrIter::<_, PeerAddress>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PeerAddress(Box::new(t)))), - ), - TypeVariant::PeerAddressIp => Box::new( - ReadXdrIter::<_, PeerAddressIp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PeerAddressIp(Box::new(t)))), - ), - TypeVariant::MessageType => Box::new( - ReadXdrIter::<_, MessageType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::MessageType(Box::new(t)))), - ), - TypeVariant::DontHave => Box::new( - ReadXdrIter::<_, DontHave>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::DontHave(Box::new(t)))), - ), - TypeVariant::SurveyMessageCommandType => Box::new( - ReadXdrIter::<_, SurveyMessageCommandType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SurveyMessageCommandType(Box::new(t)))), - ), - TypeVariant::SurveyMessageResponseType => Box::new( - ReadXdrIter::<_, SurveyMessageResponseType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SurveyMessageResponseType(Box::new(t)))), - ), - TypeVariant::TimeSlicedSurveyStartCollectingMessage => Box::new( - ReadXdrIter::<_, TimeSlicedSurveyStartCollectingMessage>::new( - dec, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::TimeSlicedSurveyStartCollectingMessage(Box::new(t)))), - ), - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage => Box::new( - ReadXdrIter::<_, SignedTimeSlicedSurveyStartCollectingMessage>::new( - dec, - r.limits.clone(), - ) - .map(|r| { - r.map(|t| Self::SignedTimeSlicedSurveyStartCollectingMessage(Box::new(t))) - }), - ), - TypeVariant::TimeSlicedSurveyStopCollectingMessage => Box::new( - ReadXdrIter::<_, TimeSlicedSurveyStopCollectingMessage>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TimeSlicedSurveyStopCollectingMessage(Box::new(t)))), - ), - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage => Box::new( - ReadXdrIter::<_, SignedTimeSlicedSurveyStopCollectingMessage>::new( - dec, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::SignedTimeSlicedSurveyStopCollectingMessage(Box::new(t)))), - ), - TypeVariant::SurveyRequestMessage => Box::new( - ReadXdrIter::<_, SurveyRequestMessage>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SurveyRequestMessage(Box::new(t)))), - ), - TypeVariant::TimeSlicedSurveyRequestMessage => Box::new( - ReadXdrIter::<_, TimeSlicedSurveyRequestMessage>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TimeSlicedSurveyRequestMessage(Box::new(t)))), - ), - TypeVariant::SignedTimeSlicedSurveyRequestMessage => Box::new( - ReadXdrIter::<_, SignedTimeSlicedSurveyRequestMessage>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SignedTimeSlicedSurveyRequestMessage(Box::new(t)))), - ), - TypeVariant::EncryptedBody => Box::new( - ReadXdrIter::<_, EncryptedBody>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::EncryptedBody(Box::new(t)))), - ), - TypeVariant::SurveyResponseMessage => Box::new( - ReadXdrIter::<_, SurveyResponseMessage>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SurveyResponseMessage(Box::new(t)))), - ), - TypeVariant::TimeSlicedSurveyResponseMessage => Box::new( - ReadXdrIter::<_, TimeSlicedSurveyResponseMessage>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TimeSlicedSurveyResponseMessage(Box::new(t)))), - ), - TypeVariant::SignedTimeSlicedSurveyResponseMessage => Box::new( - ReadXdrIter::<_, SignedTimeSlicedSurveyResponseMessage>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SignedTimeSlicedSurveyResponseMessage(Box::new(t)))), - ), - TypeVariant::PeerStats => Box::new( - ReadXdrIter::<_, PeerStats>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PeerStats(Box::new(t)))), - ), - TypeVariant::TimeSlicedNodeData => Box::new( - ReadXdrIter::<_, TimeSlicedNodeData>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TimeSlicedNodeData(Box::new(t)))), - ), - TypeVariant::TimeSlicedPeerData => Box::new( - ReadXdrIter::<_, TimeSlicedPeerData>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TimeSlicedPeerData(Box::new(t)))), - ), - TypeVariant::TimeSlicedPeerDataList => Box::new( - ReadXdrIter::<_, TimeSlicedPeerDataList>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TimeSlicedPeerDataList(Box::new(t)))), - ), - TypeVariant::TopologyResponseBodyV2 => Box::new( - ReadXdrIter::<_, TopologyResponseBodyV2>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TopologyResponseBodyV2(Box::new(t)))), - ), - TypeVariant::SurveyResponseBody => Box::new( - ReadXdrIter::<_, SurveyResponseBody>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SurveyResponseBody(Box::new(t)))), - ), - TypeVariant::TxAdvertVector => Box::new( - ReadXdrIter::<_, TxAdvertVector>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TxAdvertVector(Box::new(t)))), - ), - TypeVariant::FloodAdvert => Box::new( - ReadXdrIter::<_, FloodAdvert>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::FloodAdvert(Box::new(t)))), - ), - TypeVariant::TxDemandVector => Box::new( - ReadXdrIter::<_, TxDemandVector>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TxDemandVector(Box::new(t)))), - ), - TypeVariant::FloodDemand => Box::new( - ReadXdrIter::<_, FloodDemand>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::FloodDemand(Box::new(t)))), - ), - TypeVariant::StellarMessage => Box::new( - ReadXdrIter::<_, StellarMessage>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::StellarMessage(Box::new(t)))), - ), - TypeVariant::AuthenticatedMessage => Box::new( - ReadXdrIter::<_, AuthenticatedMessage>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AuthenticatedMessage(Box::new(t)))), - ), - TypeVariant::AuthenticatedMessageV0 => Box::new( - ReadXdrIter::<_, AuthenticatedMessageV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AuthenticatedMessageV0(Box::new(t)))), - ), - TypeVariant::LiquidityPoolParameters => Box::new( - ReadXdrIter::<_, LiquidityPoolParameters>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolParameters(Box::new(t)))), - ), - TypeVariant::MuxedAccount => Box::new( - ReadXdrIter::<_, MuxedAccount>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::MuxedAccount(Box::new(t)))), - ), - TypeVariant::MuxedAccountMed25519 => Box::new( - ReadXdrIter::<_, MuxedAccountMed25519>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::MuxedAccountMed25519(Box::new(t)))), - ), - TypeVariant::DecoratedSignature => Box::new( - ReadXdrIter::<_, DecoratedSignature>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::DecoratedSignature(Box::new(t)))), - ), - TypeVariant::OperationType => Box::new( - ReadXdrIter::<_, OperationType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationType(Box::new(t)))), - ), - TypeVariant::CreateAccountOp => Box::new( - ReadXdrIter::<_, CreateAccountOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateAccountOp(Box::new(t)))), - ), - TypeVariant::PaymentOp => Box::new( - ReadXdrIter::<_, PaymentOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PaymentOp(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictReceiveOp => Box::new( - ReadXdrIter::<_, PathPaymentStrictReceiveOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PathPaymentStrictReceiveOp(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictSendOp => Box::new( - ReadXdrIter::<_, PathPaymentStrictSendOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PathPaymentStrictSendOp(Box::new(t)))), - ), - TypeVariant::ManageSellOfferOp => Box::new( - ReadXdrIter::<_, ManageSellOfferOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageSellOfferOp(Box::new(t)))), - ), - TypeVariant::ManageBuyOfferOp => Box::new( - ReadXdrIter::<_, ManageBuyOfferOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageBuyOfferOp(Box::new(t)))), - ), - TypeVariant::CreatePassiveSellOfferOp => Box::new( - ReadXdrIter::<_, CreatePassiveSellOfferOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::CreatePassiveSellOfferOp(Box::new(t)))), - ), - TypeVariant::SetOptionsOp => Box::new( - ReadXdrIter::<_, SetOptionsOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SetOptionsOp(Box::new(t)))), - ), - TypeVariant::ChangeTrustAsset => Box::new( - ReadXdrIter::<_, ChangeTrustAsset>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ChangeTrustAsset(Box::new(t)))), - ), - TypeVariant::ChangeTrustOp => Box::new( - ReadXdrIter::<_, ChangeTrustOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ChangeTrustOp(Box::new(t)))), - ), - TypeVariant::AllowTrustOp => Box::new( - ReadXdrIter::<_, AllowTrustOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AllowTrustOp(Box::new(t)))), - ), - TypeVariant::ManageDataOp => Box::new( - ReadXdrIter::<_, ManageDataOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageDataOp(Box::new(t)))), - ), - TypeVariant::BumpSequenceOp => Box::new( - ReadXdrIter::<_, BumpSequenceOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::BumpSequenceOp(Box::new(t)))), - ), - TypeVariant::CreateClaimableBalanceOp => Box::new( - ReadXdrIter::<_, CreateClaimableBalanceOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateClaimableBalanceOp(Box::new(t)))), - ), - TypeVariant::ClaimClaimableBalanceOp => Box::new( - ReadXdrIter::<_, ClaimClaimableBalanceOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimClaimableBalanceOp(Box::new(t)))), - ), - TypeVariant::BeginSponsoringFutureReservesOp => Box::new( - ReadXdrIter::<_, BeginSponsoringFutureReservesOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::BeginSponsoringFutureReservesOp(Box::new(t)))), - ), - TypeVariant::RevokeSponsorshipType => Box::new( - ReadXdrIter::<_, RevokeSponsorshipType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::RevokeSponsorshipType(Box::new(t)))), - ), - TypeVariant::RevokeSponsorshipOp => Box::new( - ReadXdrIter::<_, RevokeSponsorshipOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::RevokeSponsorshipOp(Box::new(t)))), - ), - TypeVariant::RevokeSponsorshipOpSigner => Box::new( - ReadXdrIter::<_, RevokeSponsorshipOpSigner>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::RevokeSponsorshipOpSigner(Box::new(t)))), - ), - TypeVariant::ClawbackOp => Box::new( - ReadXdrIter::<_, ClawbackOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClawbackOp(Box::new(t)))), - ), - TypeVariant::ClawbackClaimableBalanceOp => Box::new( - ReadXdrIter::<_, ClawbackClaimableBalanceOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClawbackClaimableBalanceOp(Box::new(t)))), - ), - TypeVariant::SetTrustLineFlagsOp => Box::new( - ReadXdrIter::<_, SetTrustLineFlagsOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SetTrustLineFlagsOp(Box::new(t)))), - ), - TypeVariant::LiquidityPoolDepositOp => Box::new( - ReadXdrIter::<_, LiquidityPoolDepositOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolDepositOp(Box::new(t)))), - ), - TypeVariant::LiquidityPoolWithdrawOp => Box::new( - ReadXdrIter::<_, LiquidityPoolWithdrawOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolWithdrawOp(Box::new(t)))), - ), - TypeVariant::HostFunctionType => Box::new( - ReadXdrIter::<_, HostFunctionType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::HostFunctionType(Box::new(t)))), - ), - TypeVariant::ContractIdPreimageType => Box::new( - ReadXdrIter::<_, ContractIdPreimageType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractIdPreimageType(Box::new(t)))), - ), - TypeVariant::ContractIdPreimage => Box::new( - ReadXdrIter::<_, ContractIdPreimage>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractIdPreimage(Box::new(t)))), - ), - TypeVariant::ContractIdPreimageFromAddress => Box::new( - ReadXdrIter::<_, ContractIdPreimageFromAddress>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractIdPreimageFromAddress(Box::new(t)))), - ), - TypeVariant::CreateContractArgs => Box::new( - ReadXdrIter::<_, CreateContractArgs>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateContractArgs(Box::new(t)))), - ), - TypeVariant::CreateContractArgsV2 => Box::new( - ReadXdrIter::<_, CreateContractArgsV2>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateContractArgsV2(Box::new(t)))), - ), - TypeVariant::InvokeContractArgs => Box::new( - ReadXdrIter::<_, InvokeContractArgs>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::InvokeContractArgs(Box::new(t)))), - ), - TypeVariant::HostFunction => Box::new( - ReadXdrIter::<_, HostFunction>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::HostFunction(Box::new(t)))), - ), - TypeVariant::SorobanAuthorizedFunctionType => Box::new( - ReadXdrIter::<_, SorobanAuthorizedFunctionType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanAuthorizedFunctionType(Box::new(t)))), - ), - TypeVariant::SorobanAuthorizedFunction => Box::new( - ReadXdrIter::<_, SorobanAuthorizedFunction>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanAuthorizedFunction(Box::new(t)))), - ), - TypeVariant::SorobanAuthorizedInvocation => Box::new( - ReadXdrIter::<_, SorobanAuthorizedInvocation>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanAuthorizedInvocation(Box::new(t)))), - ), - TypeVariant::SorobanAddressCredentials => Box::new( - ReadXdrIter::<_, SorobanAddressCredentials>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanAddressCredentials(Box::new(t)))), - ), - TypeVariant::SorobanCredentialsType => Box::new( - ReadXdrIter::<_, SorobanCredentialsType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanCredentialsType(Box::new(t)))), - ), - TypeVariant::SorobanCredentials => Box::new( - ReadXdrIter::<_, SorobanCredentials>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanCredentials(Box::new(t)))), - ), - TypeVariant::SorobanAuthorizationEntry => Box::new( - ReadXdrIter::<_, SorobanAuthorizationEntry>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanAuthorizationEntry(Box::new(t)))), - ), - TypeVariant::SorobanAuthorizationEntries => Box::new( - ReadXdrIter::<_, SorobanAuthorizationEntries>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanAuthorizationEntries(Box::new(t)))), - ), - TypeVariant::InvokeHostFunctionOp => Box::new( - ReadXdrIter::<_, InvokeHostFunctionOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::InvokeHostFunctionOp(Box::new(t)))), - ), - TypeVariant::ExtendFootprintTtlOp => Box::new( - ReadXdrIter::<_, ExtendFootprintTtlOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtendFootprintTtlOp(Box::new(t)))), - ), - TypeVariant::RestoreFootprintOp => Box::new( - ReadXdrIter::<_, RestoreFootprintOp>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::RestoreFootprintOp(Box::new(t)))), - ), - TypeVariant::Operation => Box::new( - ReadXdrIter::<_, Operation>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Operation(Box::new(t)))), - ), - TypeVariant::OperationBody => Box::new( - ReadXdrIter::<_, OperationBody>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationBody(Box::new(t)))), - ), - TypeVariant::HashIdPreimage => Box::new( - ReadXdrIter::<_, HashIdPreimage>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::HashIdPreimage(Box::new(t)))), - ), - TypeVariant::HashIdPreimageOperationId => Box::new( - ReadXdrIter::<_, HashIdPreimageOperationId>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::HashIdPreimageOperationId(Box::new(t)))), - ), - TypeVariant::HashIdPreimageRevokeId => Box::new( - ReadXdrIter::<_, HashIdPreimageRevokeId>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::HashIdPreimageRevokeId(Box::new(t)))), - ), - TypeVariant::HashIdPreimageContractId => Box::new( - ReadXdrIter::<_, HashIdPreimageContractId>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::HashIdPreimageContractId(Box::new(t)))), - ), - TypeVariant::HashIdPreimageSorobanAuthorization => Box::new( - ReadXdrIter::<_, HashIdPreimageSorobanAuthorization>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::HashIdPreimageSorobanAuthorization(Box::new(t)))), - ), - TypeVariant::MemoType => Box::new( - ReadXdrIter::<_, MemoType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::MemoType(Box::new(t)))), - ), - TypeVariant::Memo => Box::new( - ReadXdrIter::<_, Memo>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Memo(Box::new(t)))), - ), - TypeVariant::TimeBounds => Box::new( - ReadXdrIter::<_, TimeBounds>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TimeBounds(Box::new(t)))), - ), - TypeVariant::LedgerBounds => Box::new( - ReadXdrIter::<_, LedgerBounds>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerBounds(Box::new(t)))), - ), - TypeVariant::PreconditionsV2 => Box::new( - ReadXdrIter::<_, PreconditionsV2>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PreconditionsV2(Box::new(t)))), - ), - TypeVariant::PreconditionType => Box::new( - ReadXdrIter::<_, PreconditionType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PreconditionType(Box::new(t)))), - ), - TypeVariant::Preconditions => Box::new( - ReadXdrIter::<_, Preconditions>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Preconditions(Box::new(t)))), - ), - TypeVariant::LedgerFootprint => Box::new( - ReadXdrIter::<_, LedgerFootprint>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LedgerFootprint(Box::new(t)))), - ), - TypeVariant::SorobanResources => Box::new( - ReadXdrIter::<_, SorobanResources>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanResources(Box::new(t)))), - ), - TypeVariant::SorobanResourcesExtV0 => Box::new( - ReadXdrIter::<_, SorobanResourcesExtV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanResourcesExtV0(Box::new(t)))), - ), - TypeVariant::SorobanTransactionData => Box::new( - ReadXdrIter::<_, SorobanTransactionData>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanTransactionData(Box::new(t)))), - ), - TypeVariant::SorobanTransactionDataExt => Box::new( - ReadXdrIter::<_, SorobanTransactionDataExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SorobanTransactionDataExt(Box::new(t)))), - ), - TypeVariant::TransactionV0 => Box::new( - ReadXdrIter::<_, TransactionV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionV0(Box::new(t)))), - ), - TypeVariant::TransactionV0Ext => Box::new( - ReadXdrIter::<_, TransactionV0Ext>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionV0Ext(Box::new(t)))), - ), - TypeVariant::TransactionV0Envelope => Box::new( - ReadXdrIter::<_, TransactionV0Envelope>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionV0Envelope(Box::new(t)))), - ), - TypeVariant::Transaction => Box::new( - ReadXdrIter::<_, Transaction>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Transaction(Box::new(t)))), - ), - TypeVariant::TransactionExt => Box::new( - ReadXdrIter::<_, TransactionExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionExt(Box::new(t)))), - ), - TypeVariant::TransactionV1Envelope => Box::new( - ReadXdrIter::<_, TransactionV1Envelope>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionV1Envelope(Box::new(t)))), - ), - TypeVariant::FeeBumpTransaction => Box::new( - ReadXdrIter::<_, FeeBumpTransaction>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::FeeBumpTransaction(Box::new(t)))), - ), - TypeVariant::FeeBumpTransactionInnerTx => Box::new( - ReadXdrIter::<_, FeeBumpTransactionInnerTx>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::FeeBumpTransactionInnerTx(Box::new(t)))), - ), - TypeVariant::FeeBumpTransactionExt => Box::new( - ReadXdrIter::<_, FeeBumpTransactionExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::FeeBumpTransactionExt(Box::new(t)))), - ), - TypeVariant::FeeBumpTransactionEnvelope => Box::new( - ReadXdrIter::<_, FeeBumpTransactionEnvelope>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::FeeBumpTransactionEnvelope(Box::new(t)))), - ), - TypeVariant::TransactionEnvelope => Box::new( - ReadXdrIter::<_, TransactionEnvelope>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionEnvelope(Box::new(t)))), - ), - TypeVariant::TransactionSignaturePayload => Box::new( - ReadXdrIter::<_, TransactionSignaturePayload>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionSignaturePayload(Box::new(t)))), - ), - TypeVariant::TransactionSignaturePayloadTaggedTransaction => Box::new( - ReadXdrIter::<_, TransactionSignaturePayloadTaggedTransaction>::new( - dec, - r.limits.clone(), - ) - .map(|r| { - r.map(|t| Self::TransactionSignaturePayloadTaggedTransaction(Box::new(t))) - }), - ), - TypeVariant::ClaimAtomType => Box::new( - ReadXdrIter::<_, ClaimAtomType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimAtomType(Box::new(t)))), - ), - TypeVariant::ClaimOfferAtomV0 => Box::new( - ReadXdrIter::<_, ClaimOfferAtomV0>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimOfferAtomV0(Box::new(t)))), - ), - TypeVariant::ClaimOfferAtom => Box::new( - ReadXdrIter::<_, ClaimOfferAtom>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimOfferAtom(Box::new(t)))), - ), - TypeVariant::ClaimLiquidityAtom => Box::new( - ReadXdrIter::<_, ClaimLiquidityAtom>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimLiquidityAtom(Box::new(t)))), - ), - TypeVariant::ClaimAtom => Box::new( - ReadXdrIter::<_, ClaimAtom>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimAtom(Box::new(t)))), - ), - TypeVariant::CreateAccountResultCode => Box::new( - ReadXdrIter::<_, CreateAccountResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateAccountResultCode(Box::new(t)))), - ), - TypeVariant::CreateAccountResult => Box::new( - ReadXdrIter::<_, CreateAccountResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateAccountResult(Box::new(t)))), - ), - TypeVariant::PaymentResultCode => Box::new( - ReadXdrIter::<_, PaymentResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PaymentResultCode(Box::new(t)))), - ), - TypeVariant::PaymentResult => Box::new( - ReadXdrIter::<_, PaymentResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PaymentResult(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictReceiveResultCode => Box::new( - ReadXdrIter::<_, PathPaymentStrictReceiveResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PathPaymentStrictReceiveResultCode(Box::new(t)))), - ), - TypeVariant::SimplePaymentResult => Box::new( - ReadXdrIter::<_, SimplePaymentResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SimplePaymentResult(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictReceiveResult => Box::new( - ReadXdrIter::<_, PathPaymentStrictReceiveResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PathPaymentStrictReceiveResult(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictReceiveResultSuccess => Box::new( - ReadXdrIter::<_, PathPaymentStrictReceiveResultSuccess>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PathPaymentStrictReceiveResultSuccess(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictSendResultCode => Box::new( - ReadXdrIter::<_, PathPaymentStrictSendResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PathPaymentStrictSendResultCode(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictSendResult => Box::new( - ReadXdrIter::<_, PathPaymentStrictSendResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PathPaymentStrictSendResult(Box::new(t)))), - ), - TypeVariant::PathPaymentStrictSendResultSuccess => Box::new( - ReadXdrIter::<_, PathPaymentStrictSendResultSuccess>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PathPaymentStrictSendResultSuccess(Box::new(t)))), - ), - TypeVariant::ManageSellOfferResultCode => Box::new( - ReadXdrIter::<_, ManageSellOfferResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageSellOfferResultCode(Box::new(t)))), - ), - TypeVariant::ManageOfferEffect => Box::new( - ReadXdrIter::<_, ManageOfferEffect>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageOfferEffect(Box::new(t)))), - ), - TypeVariant::ManageOfferSuccessResult => Box::new( - ReadXdrIter::<_, ManageOfferSuccessResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageOfferSuccessResult(Box::new(t)))), - ), - TypeVariant::ManageOfferSuccessResultOffer => Box::new( - ReadXdrIter::<_, ManageOfferSuccessResultOffer>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageOfferSuccessResultOffer(Box::new(t)))), - ), - TypeVariant::ManageSellOfferResult => Box::new( - ReadXdrIter::<_, ManageSellOfferResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageSellOfferResult(Box::new(t)))), - ), - TypeVariant::ManageBuyOfferResultCode => Box::new( - ReadXdrIter::<_, ManageBuyOfferResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageBuyOfferResultCode(Box::new(t)))), - ), - TypeVariant::ManageBuyOfferResult => Box::new( - ReadXdrIter::<_, ManageBuyOfferResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageBuyOfferResult(Box::new(t)))), - ), - TypeVariant::SetOptionsResultCode => Box::new( - ReadXdrIter::<_, SetOptionsResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SetOptionsResultCode(Box::new(t)))), - ), - TypeVariant::SetOptionsResult => Box::new( - ReadXdrIter::<_, SetOptionsResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SetOptionsResult(Box::new(t)))), - ), - TypeVariant::ChangeTrustResultCode => Box::new( - ReadXdrIter::<_, ChangeTrustResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ChangeTrustResultCode(Box::new(t)))), - ), - TypeVariant::ChangeTrustResult => Box::new( - ReadXdrIter::<_, ChangeTrustResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ChangeTrustResult(Box::new(t)))), - ), - TypeVariant::AllowTrustResultCode => Box::new( - ReadXdrIter::<_, AllowTrustResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AllowTrustResultCode(Box::new(t)))), - ), - TypeVariant::AllowTrustResult => Box::new( - ReadXdrIter::<_, AllowTrustResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AllowTrustResult(Box::new(t)))), - ), - TypeVariant::AccountMergeResultCode => Box::new( - ReadXdrIter::<_, AccountMergeResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountMergeResultCode(Box::new(t)))), - ), - TypeVariant::AccountMergeResult => Box::new( - ReadXdrIter::<_, AccountMergeResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountMergeResult(Box::new(t)))), - ), - TypeVariant::InflationResultCode => Box::new( - ReadXdrIter::<_, InflationResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::InflationResultCode(Box::new(t)))), - ), - TypeVariant::InflationPayout => Box::new( - ReadXdrIter::<_, InflationPayout>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::InflationPayout(Box::new(t)))), - ), - TypeVariant::InflationResult => Box::new( - ReadXdrIter::<_, InflationResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::InflationResult(Box::new(t)))), - ), - TypeVariant::ManageDataResultCode => Box::new( - ReadXdrIter::<_, ManageDataResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageDataResultCode(Box::new(t)))), - ), - TypeVariant::ManageDataResult => Box::new( - ReadXdrIter::<_, ManageDataResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ManageDataResult(Box::new(t)))), - ), - TypeVariant::BumpSequenceResultCode => Box::new( - ReadXdrIter::<_, BumpSequenceResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::BumpSequenceResultCode(Box::new(t)))), - ), - TypeVariant::BumpSequenceResult => Box::new( - ReadXdrIter::<_, BumpSequenceResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::BumpSequenceResult(Box::new(t)))), - ), - TypeVariant::CreateClaimableBalanceResultCode => Box::new( - ReadXdrIter::<_, CreateClaimableBalanceResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateClaimableBalanceResultCode(Box::new(t)))), - ), - TypeVariant::CreateClaimableBalanceResult => Box::new( - ReadXdrIter::<_, CreateClaimableBalanceResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::CreateClaimableBalanceResult(Box::new(t)))), - ), - TypeVariant::ClaimClaimableBalanceResultCode => Box::new( - ReadXdrIter::<_, ClaimClaimableBalanceResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimClaimableBalanceResultCode(Box::new(t)))), - ), - TypeVariant::ClaimClaimableBalanceResult => Box::new( - ReadXdrIter::<_, ClaimClaimableBalanceResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimClaimableBalanceResult(Box::new(t)))), - ), - TypeVariant::BeginSponsoringFutureReservesResultCode => Box::new( - ReadXdrIter::<_, BeginSponsoringFutureReservesResultCode>::new( - dec, - r.limits.clone(), - ) - .map(|r| r.map(|t| Self::BeginSponsoringFutureReservesResultCode(Box::new(t)))), - ), - TypeVariant::BeginSponsoringFutureReservesResult => Box::new( - ReadXdrIter::<_, BeginSponsoringFutureReservesResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::BeginSponsoringFutureReservesResult(Box::new(t)))), - ), - TypeVariant::EndSponsoringFutureReservesResultCode => Box::new( - ReadXdrIter::<_, EndSponsoringFutureReservesResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::EndSponsoringFutureReservesResultCode(Box::new(t)))), - ), - TypeVariant::EndSponsoringFutureReservesResult => Box::new( - ReadXdrIter::<_, EndSponsoringFutureReservesResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::EndSponsoringFutureReservesResult(Box::new(t)))), - ), - TypeVariant::RevokeSponsorshipResultCode => Box::new( - ReadXdrIter::<_, RevokeSponsorshipResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::RevokeSponsorshipResultCode(Box::new(t)))), - ), - TypeVariant::RevokeSponsorshipResult => Box::new( - ReadXdrIter::<_, RevokeSponsorshipResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::RevokeSponsorshipResult(Box::new(t)))), - ), - TypeVariant::ClawbackResultCode => Box::new( - ReadXdrIter::<_, ClawbackResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClawbackResultCode(Box::new(t)))), - ), - TypeVariant::ClawbackResult => Box::new( - ReadXdrIter::<_, ClawbackResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClawbackResult(Box::new(t)))), - ), - TypeVariant::ClawbackClaimableBalanceResultCode => Box::new( - ReadXdrIter::<_, ClawbackClaimableBalanceResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClawbackClaimableBalanceResultCode(Box::new(t)))), - ), - TypeVariant::ClawbackClaimableBalanceResult => Box::new( - ReadXdrIter::<_, ClawbackClaimableBalanceResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClawbackClaimableBalanceResult(Box::new(t)))), - ), - TypeVariant::SetTrustLineFlagsResultCode => Box::new( - ReadXdrIter::<_, SetTrustLineFlagsResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SetTrustLineFlagsResultCode(Box::new(t)))), - ), - TypeVariant::SetTrustLineFlagsResult => Box::new( - ReadXdrIter::<_, SetTrustLineFlagsResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SetTrustLineFlagsResult(Box::new(t)))), - ), - TypeVariant::LiquidityPoolDepositResultCode => Box::new( - ReadXdrIter::<_, LiquidityPoolDepositResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolDepositResultCode(Box::new(t)))), - ), - TypeVariant::LiquidityPoolDepositResult => Box::new( - ReadXdrIter::<_, LiquidityPoolDepositResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolDepositResult(Box::new(t)))), - ), - TypeVariant::LiquidityPoolWithdrawResultCode => Box::new( - ReadXdrIter::<_, LiquidityPoolWithdrawResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolWithdrawResultCode(Box::new(t)))), - ), - TypeVariant::LiquidityPoolWithdrawResult => Box::new( - ReadXdrIter::<_, LiquidityPoolWithdrawResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::LiquidityPoolWithdrawResult(Box::new(t)))), - ), - TypeVariant::InvokeHostFunctionResultCode => Box::new( - ReadXdrIter::<_, InvokeHostFunctionResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::InvokeHostFunctionResultCode(Box::new(t)))), - ), - TypeVariant::InvokeHostFunctionResult => Box::new( - ReadXdrIter::<_, InvokeHostFunctionResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::InvokeHostFunctionResult(Box::new(t)))), - ), - TypeVariant::ExtendFootprintTtlResultCode => Box::new( - ReadXdrIter::<_, ExtendFootprintTtlResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtendFootprintTtlResultCode(Box::new(t)))), - ), - TypeVariant::ExtendFootprintTtlResult => Box::new( - ReadXdrIter::<_, ExtendFootprintTtlResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtendFootprintTtlResult(Box::new(t)))), - ), - TypeVariant::RestoreFootprintResultCode => Box::new( - ReadXdrIter::<_, RestoreFootprintResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::RestoreFootprintResultCode(Box::new(t)))), - ), - TypeVariant::RestoreFootprintResult => Box::new( - ReadXdrIter::<_, RestoreFootprintResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::RestoreFootprintResult(Box::new(t)))), - ), - TypeVariant::OperationResultCode => Box::new( - ReadXdrIter::<_, OperationResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationResultCode(Box::new(t)))), - ), - TypeVariant::OperationResult => Box::new( - ReadXdrIter::<_, OperationResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationResult(Box::new(t)))), - ), - TypeVariant::OperationResultTr => Box::new( - ReadXdrIter::<_, OperationResultTr>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::OperationResultTr(Box::new(t)))), - ), - TypeVariant::TransactionResultCode => Box::new( - ReadXdrIter::<_, TransactionResultCode>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultCode(Box::new(t)))), - ), - TypeVariant::InnerTransactionResult => Box::new( - ReadXdrIter::<_, InnerTransactionResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::InnerTransactionResult(Box::new(t)))), - ), - TypeVariant::InnerTransactionResultResult => Box::new( - ReadXdrIter::<_, InnerTransactionResultResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::InnerTransactionResultResult(Box::new(t)))), - ), - TypeVariant::InnerTransactionResultExt => Box::new( - ReadXdrIter::<_, InnerTransactionResultExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::InnerTransactionResultExt(Box::new(t)))), - ), - TypeVariant::InnerTransactionResultPair => Box::new( - ReadXdrIter::<_, InnerTransactionResultPair>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::InnerTransactionResultPair(Box::new(t)))), - ), - TypeVariant::TransactionResult => Box::new( - ReadXdrIter::<_, TransactionResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResult(Box::new(t)))), - ), - TypeVariant::TransactionResultResult => Box::new( - ReadXdrIter::<_, TransactionResultResult>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultResult(Box::new(t)))), - ), - TypeVariant::TransactionResultExt => Box::new( - ReadXdrIter::<_, TransactionResultExt>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TransactionResultExt(Box::new(t)))), - ), - TypeVariant::Hash => Box::new( - ReadXdrIter::<_, Hash>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Hash(Box::new(t)))), - ), - TypeVariant::Uint256 => Box::new( - ReadXdrIter::<_, Uint256>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Uint256(Box::new(t)))), - ), - TypeVariant::Uint32 => Box::new( - ReadXdrIter::<_, Uint32>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Uint32(Box::new(t)))), - ), - TypeVariant::Int32 => Box::new( - ReadXdrIter::<_, Int32>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Int32(Box::new(t)))), - ), - TypeVariant::Uint64 => Box::new( - ReadXdrIter::<_, Uint64>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Uint64(Box::new(t)))), - ), - TypeVariant::Int64 => Box::new( - ReadXdrIter::<_, Int64>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Int64(Box::new(t)))), - ), - TypeVariant::TimePoint => Box::new( - ReadXdrIter::<_, TimePoint>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::TimePoint(Box::new(t)))), - ), - TypeVariant::Duration => Box::new( - ReadXdrIter::<_, Duration>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Duration(Box::new(t)))), - ), - TypeVariant::ExtensionPoint => Box::new( - ReadXdrIter::<_, ExtensionPoint>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ExtensionPoint(Box::new(t)))), - ), - TypeVariant::CryptoKeyType => Box::new( - ReadXdrIter::<_, CryptoKeyType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::CryptoKeyType(Box::new(t)))), - ), - TypeVariant::PublicKeyType => Box::new( - ReadXdrIter::<_, PublicKeyType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PublicKeyType(Box::new(t)))), - ), - TypeVariant::SignerKeyType => Box::new( - ReadXdrIter::<_, SignerKeyType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SignerKeyType(Box::new(t)))), - ), - TypeVariant::PublicKey => Box::new( - ReadXdrIter::<_, PublicKey>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PublicKey(Box::new(t)))), - ), - TypeVariant::SignerKey => Box::new( - ReadXdrIter::<_, SignerKey>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SignerKey(Box::new(t)))), - ), - TypeVariant::SignerKeyEd25519SignedPayload => Box::new( - ReadXdrIter::<_, SignerKeyEd25519SignedPayload>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SignerKeyEd25519SignedPayload(Box::new(t)))), - ), - TypeVariant::Signature => Box::new( - ReadXdrIter::<_, Signature>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Signature(Box::new(t)))), - ), - TypeVariant::SignatureHint => Box::new( - ReadXdrIter::<_, SignatureHint>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SignatureHint(Box::new(t)))), - ), - TypeVariant::NodeId => Box::new( - ReadXdrIter::<_, NodeId>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::NodeId(Box::new(t)))), - ), - TypeVariant::AccountId => Box::new( - ReadXdrIter::<_, AccountId>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::AccountId(Box::new(t)))), - ), - TypeVariant::ContractId => Box::new( - ReadXdrIter::<_, ContractId>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ContractId(Box::new(t)))), - ), - TypeVariant::Curve25519Secret => Box::new( - ReadXdrIter::<_, Curve25519Secret>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Curve25519Secret(Box::new(t)))), - ), - TypeVariant::Curve25519Public => Box::new( - ReadXdrIter::<_, Curve25519Public>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::Curve25519Public(Box::new(t)))), - ), - TypeVariant::HmacSha256Key => Box::new( - ReadXdrIter::<_, HmacSha256Key>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::HmacSha256Key(Box::new(t)))), - ), - TypeVariant::HmacSha256Mac => Box::new( - ReadXdrIter::<_, HmacSha256Mac>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::HmacSha256Mac(Box::new(t)))), - ), - TypeVariant::ShortHashSeed => Box::new( - ReadXdrIter::<_, ShortHashSeed>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ShortHashSeed(Box::new(t)))), - ), - TypeVariant::BinaryFuseFilterType => Box::new( - ReadXdrIter::<_, BinaryFuseFilterType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::BinaryFuseFilterType(Box::new(t)))), - ), - TypeVariant::SerializedBinaryFuseFilter => Box::new( - ReadXdrIter::<_, SerializedBinaryFuseFilter>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::SerializedBinaryFuseFilter(Box::new(t)))), - ), - TypeVariant::PoolId => Box::new( - ReadXdrIter::<_, PoolId>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::PoolId(Box::new(t)))), - ), - TypeVariant::ClaimableBalanceIdType => Box::new( - ReadXdrIter::<_, ClaimableBalanceIdType>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceIdType(Box::new(t)))), - ), - TypeVariant::ClaimableBalanceId => Box::new( - ReadXdrIter::<_, ClaimableBalanceId>::new(dec, r.limits.clone()) - .map(|r| r.map(|t| Self::ClaimableBalanceId(Box::new(t)))), - ), - } - } - - #[cfg(feature = "std")] - pub fn from_xdr>( - v: TypeVariant, - bytes: B, - limits: Limits, - ) -> Result { - let mut cursor = Limited::new(Cursor::new(bytes.as_ref()), limits); - let t = Self::read_xdr_to_end(v, &mut cursor)?; - Ok(t) - } - - #[cfg(feature = "base64")] - pub fn from_xdr_base64( - v: TypeVariant, - b64: impl AsRef<[u8]>, - limits: Limits, - ) -> Result { - let mut dec = Limited::new( - base64::read::DecoderReader::new( - SkipWhitespace::new(Cursor::new(b64)), - &base64::engine::general_purpose::STANDARD, - ), - limits, - ); - let t = Self::read_xdr_to_end(v, &mut dec)?; - Ok(t) - } - - #[cfg(all(feature = "std", feature = "serde_json"))] - #[deprecated(note = "use from_json")] - pub fn read_json(v: TypeVariant, r: impl Read) -> Result { - Self::from_json(v, r) - } - - #[cfg(all(feature = "std", feature = "serde_json"))] - #[allow(clippy::too_many_lines)] - pub fn from_json(v: TypeVariant, r: impl Read) -> Result { - match v { - TypeVariant::Value => Ok(Self::Value(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ScpBallot => Ok(Self::ScpBallot(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ScpStatementType => Ok(Self::ScpStatementType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScpNomination => { - Ok(Self::ScpNomination(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScpStatement => { - Ok(Self::ScpStatement(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScpStatementPledges => Ok(Self::ScpStatementPledges(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScpStatementPrepare => Ok(Self::ScpStatementPrepare(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScpStatementConfirm => Ok(Self::ScpStatementConfirm(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScpStatementExternalize => Ok(Self::ScpStatementExternalize(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScpEnvelope => { - Ok(Self::ScpEnvelope(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScpQuorumSet => { - Ok(Self::ScpQuorumSet(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::EncodedLedgerKey => Ok(Self::EncodedLedgerKey(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ConfigSettingContractExecutionLanesV0 => Ok( - Self::ConfigSettingContractExecutionLanesV0(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::ConfigSettingContractComputeV0 => Ok( - Self::ConfigSettingContractComputeV0(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::ConfigSettingContractParallelComputeV0 => Ok( - Self::ConfigSettingContractParallelComputeV0(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::ConfigSettingContractLedgerCostV0 => Ok( - Self::ConfigSettingContractLedgerCostV0(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::ConfigSettingContractLedgerCostExtV0 => Ok( - Self::ConfigSettingContractLedgerCostExtV0(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::ConfigSettingContractHistoricalDataV0 => Ok( - Self::ConfigSettingContractHistoricalDataV0(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::ConfigSettingContractEventsV0 => Ok(Self::ConfigSettingContractEventsV0( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::ConfigSettingContractBandwidthV0 => Ok( - Self::ConfigSettingContractBandwidthV0(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::ContractCostType => Ok(Self::ContractCostType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ContractCostParamEntry => Ok(Self::ContractCostParamEntry(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::StateArchivalSettings => Ok(Self::StateArchivalSettings(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::EvictionIterator => Ok(Self::EvictionIterator(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ConfigSettingScpTiming => Ok(Self::ConfigSettingScpTiming(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::FrozenLedgerKeys => Ok(Self::FrozenLedgerKeys(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::FrozenLedgerKeysDelta => Ok(Self::FrozenLedgerKeysDelta(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::FreezeBypassTxs => { - Ok(Self::FreezeBypassTxs(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::FreezeBypassTxsDelta => Ok(Self::FreezeBypassTxsDelta(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ContractCostParams => Ok(Self::ContractCostParams(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ConfigSettingId => { - Ok(Self::ConfigSettingId(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ConfigSettingEntry => Ok(Self::ConfigSettingEntry(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScEnvMetaKind => { - Ok(Self::ScEnvMetaKind(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScEnvMetaEntry => { - Ok(Self::ScEnvMetaEntry(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScEnvMetaEntryInterfaceVersion => Ok( - Self::ScEnvMetaEntryInterfaceVersion(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::ScMetaV0 => Ok(Self::ScMetaV0(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ScMetaKind => Ok(Self::ScMetaKind(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ScMetaEntry => { - Ok(Self::ScMetaEntry(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScSpecType => Ok(Self::ScSpecType(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ScSpecTypeOption => Ok(Self::ScSpecTypeOption(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecTypeResult => Ok(Self::ScSpecTypeResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecTypeVec => { - Ok(Self::ScSpecTypeVec(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScSpecTypeMap => { - Ok(Self::ScSpecTypeMap(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScSpecTypeTuple => { - Ok(Self::ScSpecTypeTuple(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScSpecTypeBytesN => Ok(Self::ScSpecTypeBytesN(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecTypeUdt => { - Ok(Self::ScSpecTypeUdt(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScSpecTypeDef => { - Ok(Self::ScSpecTypeDef(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScSpecUdtStructFieldV0 => Ok(Self::ScSpecUdtStructFieldV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecUdtStructV0 => Ok(Self::ScSpecUdtStructV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecUdtUnionCaseVoidV0 => Ok(Self::ScSpecUdtUnionCaseVoidV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecUdtUnionCaseTupleV0 => Ok(Self::ScSpecUdtUnionCaseTupleV0( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::ScSpecUdtUnionCaseV0Kind => Ok(Self::ScSpecUdtUnionCaseV0Kind(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecUdtUnionCaseV0 => Ok(Self::ScSpecUdtUnionCaseV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecUdtUnionV0 => Ok(Self::ScSpecUdtUnionV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecUdtEnumCaseV0 => Ok(Self::ScSpecUdtEnumCaseV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecUdtEnumV0 => { - Ok(Self::ScSpecUdtEnumV0(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScSpecUdtErrorEnumCaseV0 => Ok(Self::ScSpecUdtErrorEnumCaseV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecUdtErrorEnumV0 => Ok(Self::ScSpecUdtErrorEnumV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecFunctionInputV0 => Ok(Self::ScSpecFunctionInputV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecFunctionV0 => Ok(Self::ScSpecFunctionV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecEventParamLocationV0 => Ok(Self::ScSpecEventParamLocationV0( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::ScSpecEventParamV0 => Ok(Self::ScSpecEventParamV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecEventDataFormat => Ok(Self::ScSpecEventDataFormat(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScSpecEventV0 => { - Ok(Self::ScSpecEventV0(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScSpecEntryKind => { - Ok(Self::ScSpecEntryKind(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScSpecEntry => { - Ok(Self::ScSpecEntry(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScValType => Ok(Self::ScValType(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ScErrorType => { - Ok(Self::ScErrorType(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScErrorCode => { - Ok(Self::ScErrorCode(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ScError => Ok(Self::ScError(Box::new(serde_json::from_reader(r)?))), - TypeVariant::UInt128Parts => { - Ok(Self::UInt128Parts(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::Int128Parts => { - Ok(Self::Int128Parts(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::UInt256Parts => { - Ok(Self::UInt256Parts(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::Int256Parts => { - Ok(Self::Int256Parts(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ContractExecutableType => Ok(Self::ContractExecutableType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ContractExecutable => Ok(Self::ContractExecutable(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScAddressType => { - Ok(Self::ScAddressType(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::MuxedEd25519Account => Ok(Self::MuxedEd25519Account(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScAddress => Ok(Self::ScAddress(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ScVec => Ok(Self::ScVec(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ScMap => Ok(Self::ScMap(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ScBytes => Ok(Self::ScBytes(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ScString => Ok(Self::ScString(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ScSymbol => Ok(Self::ScSymbol(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ScNonceKey => Ok(Self::ScNonceKey(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ScContractInstance => Ok(Self::ScContractInstance(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScVal => Ok(Self::ScVal(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ScMapEntry => Ok(Self::ScMapEntry(Box::new(serde_json::from_reader(r)?))), - TypeVariant::LedgerCloseMetaBatch => Ok(Self::LedgerCloseMetaBatch(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::StoredTransactionSet => Ok(Self::StoredTransactionSet(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::StoredDebugTransactionSet => Ok(Self::StoredDebugTransactionSet( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::PersistedScpStateV0 => Ok(Self::PersistedScpStateV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::PersistedScpStateV1 => Ok(Self::PersistedScpStateV1(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::PersistedScpState => Ok(Self::PersistedScpState(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::Thresholds => Ok(Self::Thresholds(Box::new(serde_json::from_reader(r)?))), - TypeVariant::String32 => Ok(Self::String32(Box::new(serde_json::from_reader(r)?))), - TypeVariant::String64 => Ok(Self::String64(Box::new(serde_json::from_reader(r)?))), - TypeVariant::SequenceNumber => { - Ok(Self::SequenceNumber(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::DataValue => Ok(Self::DataValue(Box::new(serde_json::from_reader(r)?))), - TypeVariant::AssetCode4 => Ok(Self::AssetCode4(Box::new(serde_json::from_reader(r)?))), - TypeVariant::AssetCode12 => { - Ok(Self::AssetCode12(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::AssetType => Ok(Self::AssetType(Box::new(serde_json::from_reader(r)?))), - TypeVariant::AssetCode => Ok(Self::AssetCode(Box::new(serde_json::from_reader(r)?))), - TypeVariant::AlphaNum4 => Ok(Self::AlphaNum4(Box::new(serde_json::from_reader(r)?))), - TypeVariant::AlphaNum12 => Ok(Self::AlphaNum12(Box::new(serde_json::from_reader(r)?))), - TypeVariant::Asset => Ok(Self::Asset(Box::new(serde_json::from_reader(r)?))), - TypeVariant::Price => Ok(Self::Price(Box::new(serde_json::from_reader(r)?))), - TypeVariant::Liabilities => { - Ok(Self::Liabilities(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ThresholdIndexes => Ok(Self::ThresholdIndexes(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerEntryType => { - Ok(Self::LedgerEntryType(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::Signer => Ok(Self::Signer(Box::new(serde_json::from_reader(r)?))), - TypeVariant::AccountFlags => { - Ok(Self::AccountFlags(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::SponsorshipDescriptor => Ok(Self::SponsorshipDescriptor(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::AccountEntryExtensionV3 => Ok(Self::AccountEntryExtensionV3(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::AccountEntryExtensionV2 => Ok(Self::AccountEntryExtensionV2(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::AccountEntryExtensionV2Ext => Ok(Self::AccountEntryExtensionV2Ext( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::AccountEntryExtensionV1 => Ok(Self::AccountEntryExtensionV1(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::AccountEntryExtensionV1Ext => Ok(Self::AccountEntryExtensionV1Ext( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::AccountEntry => { - Ok(Self::AccountEntry(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::AccountEntryExt => { - Ok(Self::AccountEntryExt(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::TrustLineFlags => { - Ok(Self::TrustLineFlags(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::LiquidityPoolType => Ok(Self::LiquidityPoolType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TrustLineAsset => { - Ok(Self::TrustLineAsset(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::TrustLineEntryExtensionV2 => Ok(Self::TrustLineEntryExtensionV2( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::TrustLineEntryExtensionV2Ext => Ok(Self::TrustLineEntryExtensionV2Ext( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::TrustLineEntry => { - Ok(Self::TrustLineEntry(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::TrustLineEntryExt => Ok(Self::TrustLineEntryExt(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TrustLineEntryV1 => Ok(Self::TrustLineEntryV1(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TrustLineEntryV1Ext => Ok(Self::TrustLineEntryV1Ext(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::OfferEntryFlags => { - Ok(Self::OfferEntryFlags(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::OfferEntry => Ok(Self::OfferEntry(Box::new(serde_json::from_reader(r)?))), - TypeVariant::OfferEntryExt => { - Ok(Self::OfferEntryExt(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::DataEntry => Ok(Self::DataEntry(Box::new(serde_json::from_reader(r)?))), - TypeVariant::DataEntryExt => { - Ok(Self::DataEntryExt(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ClaimPredicateType => Ok(Self::ClaimPredicateType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ClaimPredicate => { - Ok(Self::ClaimPredicate(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ClaimantType => { - Ok(Self::ClaimantType(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::Claimant => Ok(Self::Claimant(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ClaimantV0 => Ok(Self::ClaimantV0(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ClaimableBalanceFlags => Ok(Self::ClaimableBalanceFlags(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ClaimableBalanceEntryExtensionV1 => Ok( - Self::ClaimableBalanceEntryExtensionV1(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::ClaimableBalanceEntryExtensionV1Ext => Ok( - Self::ClaimableBalanceEntryExtensionV1Ext(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::ClaimableBalanceEntry => Ok(Self::ClaimableBalanceEntry(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ClaimableBalanceEntryExt => Ok(Self::ClaimableBalanceEntryExt(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LiquidityPoolConstantProductParameters => Ok( - Self::LiquidityPoolConstantProductParameters(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::LiquidityPoolEntry => Ok(Self::LiquidityPoolEntry(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LiquidityPoolEntryBody => Ok(Self::LiquidityPoolEntryBody(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LiquidityPoolEntryConstantProduct => Ok( - Self::LiquidityPoolEntryConstantProduct(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::ContractDataDurability => Ok(Self::ContractDataDurability(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ContractDataEntry => Ok(Self::ContractDataEntry(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ContractCodeCostInputs => Ok(Self::ContractCodeCostInputs(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ContractCodeEntry => Ok(Self::ContractCodeEntry(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ContractCodeEntryExt => Ok(Self::ContractCodeEntryExt(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ContractCodeEntryV1 => Ok(Self::ContractCodeEntryV1(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TtlEntry => Ok(Self::TtlEntry(Box::new(serde_json::from_reader(r)?))), - TypeVariant::LedgerEntryExtensionV1 => Ok(Self::LedgerEntryExtensionV1(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerEntryExtensionV1Ext => Ok(Self::LedgerEntryExtensionV1Ext( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::LedgerEntry => { - Ok(Self::LedgerEntry(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::LedgerEntryData => { - Ok(Self::LedgerEntryData(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::LedgerEntryExt => { - Ok(Self::LedgerEntryExt(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::LedgerKey => Ok(Self::LedgerKey(Box::new(serde_json::from_reader(r)?))), - TypeVariant::LedgerKeyAccount => Ok(Self::LedgerKeyAccount(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerKeyTrustLine => Ok(Self::LedgerKeyTrustLine(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerKeyOffer => { - Ok(Self::LedgerKeyOffer(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::LedgerKeyData => { - Ok(Self::LedgerKeyData(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::LedgerKeyClaimableBalance => Ok(Self::LedgerKeyClaimableBalance( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::LedgerKeyLiquidityPool => Ok(Self::LedgerKeyLiquidityPool(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerKeyContractData => Ok(Self::LedgerKeyContractData(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerKeyContractCode => Ok(Self::LedgerKeyContractCode(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerKeyConfigSetting => Ok(Self::LedgerKeyConfigSetting(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerKeyTtl => { - Ok(Self::LedgerKeyTtl(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::EnvelopeType => { - Ok(Self::EnvelopeType(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::BucketListType => { - Ok(Self::BucketListType(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::BucketEntryType => { - Ok(Self::BucketEntryType(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::HotArchiveBucketEntryType => Ok(Self::HotArchiveBucketEntryType( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::BucketMetadata => { - Ok(Self::BucketMetadata(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::BucketMetadataExt => Ok(Self::BucketMetadataExt(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::BucketEntry => { - Ok(Self::BucketEntry(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::HotArchiveBucketEntry => Ok(Self::HotArchiveBucketEntry(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::UpgradeType => { - Ok(Self::UpgradeType(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::StellarValueType => Ok(Self::StellarValueType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerCloseValueSignature => Ok(Self::LedgerCloseValueSignature( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::StellarValue => { - Ok(Self::StellarValue(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::StellarValueExt => { - Ok(Self::StellarValueExt(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::LedgerHeaderFlags => Ok(Self::LedgerHeaderFlags(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerHeaderExtensionV1 => Ok(Self::LedgerHeaderExtensionV1(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerHeaderExtensionV1Ext => Ok(Self::LedgerHeaderExtensionV1Ext( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::LedgerHeader => { - Ok(Self::LedgerHeader(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::LedgerHeaderExt => { - Ok(Self::LedgerHeaderExt(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::LedgerUpgradeType => Ok(Self::LedgerUpgradeType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ConfigUpgradeSetKey => Ok(Self::ConfigUpgradeSetKey(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerUpgrade => { - Ok(Self::LedgerUpgrade(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ConfigUpgradeSet => Ok(Self::ConfigUpgradeSet(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TxSetComponentType => Ok(Self::TxSetComponentType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::DependentTxCluster => Ok(Self::DependentTxCluster(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ParallelTxExecutionStage => Ok(Self::ParallelTxExecutionStage(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ParallelTxsComponent => Ok(Self::ParallelTxsComponent(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TxSetComponent => { - Ok(Self::TxSetComponent(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::TxSetComponentTxsMaybeDiscountedFee => Ok( - Self::TxSetComponentTxsMaybeDiscountedFee(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::TransactionPhase => Ok(Self::TransactionPhase(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionSet => { - Ok(Self::TransactionSet(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::TransactionSetV1 => Ok(Self::TransactionSetV1(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::GeneralizedTransactionSet => Ok(Self::GeneralizedTransactionSet( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::TransactionResultPair => Ok(Self::TransactionResultPair(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionResultSet => Ok(Self::TransactionResultSet(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionHistoryEntry => Ok(Self::TransactionHistoryEntry(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionHistoryEntryExt => Ok(Self::TransactionHistoryEntryExt( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::TransactionHistoryResultEntry => Ok(Self::TransactionHistoryResultEntry( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::TransactionHistoryResultEntryExt => Ok( - Self::TransactionHistoryResultEntryExt(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::LedgerHeaderHistoryEntry => Ok(Self::LedgerHeaderHistoryEntry(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerHeaderHistoryEntryExt => Ok(Self::LedgerHeaderHistoryEntryExt( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::LedgerScpMessages => Ok(Self::LedgerScpMessages(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScpHistoryEntryV0 => Ok(Self::ScpHistoryEntryV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ScpHistoryEntry => { - Ok(Self::ScpHistoryEntry(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::LedgerEntryChangeType => Ok(Self::LedgerEntryChangeType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerEntryChange => Ok(Self::LedgerEntryChange(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerEntryChanges => Ok(Self::LedgerEntryChanges(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::OperationMeta => { - Ok(Self::OperationMeta(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::TransactionMetaV1 => Ok(Self::TransactionMetaV1(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionMetaV2 => Ok(Self::TransactionMetaV2(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ContractEventType => Ok(Self::ContractEventType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ContractEvent => { - Ok(Self::ContractEvent(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ContractEventBody => Ok(Self::ContractEventBody(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ContractEventV0 => { - Ok(Self::ContractEventV0(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::DiagnosticEvent => { - Ok(Self::DiagnosticEvent(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::SorobanTransactionMetaExtV1 => Ok(Self::SorobanTransactionMetaExtV1( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::SorobanTransactionMetaExt => Ok(Self::SorobanTransactionMetaExt( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::SorobanTransactionMeta => Ok(Self::SorobanTransactionMeta(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionMetaV3 => Ok(Self::TransactionMetaV3(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::OperationMetaV2 => { - Ok(Self::OperationMetaV2(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::SorobanTransactionMetaV2 => Ok(Self::SorobanTransactionMetaV2(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionEventStage => Ok(Self::TransactionEventStage(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionEvent => Ok(Self::TransactionEvent(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionMetaV4 => Ok(Self::TransactionMetaV4(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::InvokeHostFunctionSuccessPreImage => Ok( - Self::InvokeHostFunctionSuccessPreImage(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::TransactionMeta => { - Ok(Self::TransactionMeta(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::TransactionResultMeta => Ok(Self::TransactionResultMeta(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionResultMetaV1 => Ok(Self::TransactionResultMetaV1(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::UpgradeEntryMeta => Ok(Self::UpgradeEntryMeta(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerCloseMetaV0 => Ok(Self::LedgerCloseMetaV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerCloseMetaExtV1 => Ok(Self::LedgerCloseMetaExtV1(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerCloseMetaExt => Ok(Self::LedgerCloseMetaExt(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerCloseMetaV1 => Ok(Self::LedgerCloseMetaV1(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerCloseMetaV2 => Ok(Self::LedgerCloseMetaV2(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LedgerCloseMeta => { - Ok(Self::LedgerCloseMeta(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ErrorCode => Ok(Self::ErrorCode(Box::new(serde_json::from_reader(r)?))), - TypeVariant::SError => Ok(Self::SError(Box::new(serde_json::from_reader(r)?))), - TypeVariant::SendMore => Ok(Self::SendMore(Box::new(serde_json::from_reader(r)?))), - TypeVariant::SendMoreExtended => Ok(Self::SendMoreExtended(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::AuthCert => Ok(Self::AuthCert(Box::new(serde_json::from_reader(r)?))), - TypeVariant::Hello => Ok(Self::Hello(Box::new(serde_json::from_reader(r)?))), - TypeVariant::Auth => Ok(Self::Auth(Box::new(serde_json::from_reader(r)?))), - TypeVariant::IpAddrType => Ok(Self::IpAddrType(Box::new(serde_json::from_reader(r)?))), - TypeVariant::PeerAddress => { - Ok(Self::PeerAddress(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::PeerAddressIp => { - Ok(Self::PeerAddressIp(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::MessageType => { - Ok(Self::MessageType(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::DontHave => Ok(Self::DontHave(Box::new(serde_json::from_reader(r)?))), - TypeVariant::SurveyMessageCommandType => Ok(Self::SurveyMessageCommandType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::SurveyMessageResponseType => Ok(Self::SurveyMessageResponseType( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::TimeSlicedSurveyStartCollectingMessage => Ok( - Self::TimeSlicedSurveyStartCollectingMessage(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage => { - Ok(Self::SignedTimeSlicedSurveyStartCollectingMessage( - Box::new(serde_json::from_reader(r)?), - )) - } - TypeVariant::TimeSlicedSurveyStopCollectingMessage => Ok( - Self::TimeSlicedSurveyStopCollectingMessage(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage => { - Ok(Self::SignedTimeSlicedSurveyStopCollectingMessage(Box::new( - serde_json::from_reader(r)?, - ))) - } - TypeVariant::SurveyRequestMessage => Ok(Self::SurveyRequestMessage(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TimeSlicedSurveyRequestMessage => Ok( - Self::TimeSlicedSurveyRequestMessage(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::SignedTimeSlicedSurveyRequestMessage => Ok( - Self::SignedTimeSlicedSurveyRequestMessage(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::EncryptedBody => { - Ok(Self::EncryptedBody(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::SurveyResponseMessage => Ok(Self::SurveyResponseMessage(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TimeSlicedSurveyResponseMessage => Ok( - Self::TimeSlicedSurveyResponseMessage(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::SignedTimeSlicedSurveyResponseMessage => Ok( - Self::SignedTimeSlicedSurveyResponseMessage(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::PeerStats => Ok(Self::PeerStats(Box::new(serde_json::from_reader(r)?))), - TypeVariant::TimeSlicedNodeData => Ok(Self::TimeSlicedNodeData(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TimeSlicedPeerData => Ok(Self::TimeSlicedPeerData(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TimeSlicedPeerDataList => Ok(Self::TimeSlicedPeerDataList(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TopologyResponseBodyV2 => Ok(Self::TopologyResponseBodyV2(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::SurveyResponseBody => Ok(Self::SurveyResponseBody(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TxAdvertVector => { - Ok(Self::TxAdvertVector(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::FloodAdvert => { - Ok(Self::FloodAdvert(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::TxDemandVector => { - Ok(Self::TxDemandVector(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::FloodDemand => { - Ok(Self::FloodDemand(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::StellarMessage => { - Ok(Self::StellarMessage(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::AuthenticatedMessage => Ok(Self::AuthenticatedMessage(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::AuthenticatedMessageV0 => Ok(Self::AuthenticatedMessageV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LiquidityPoolParameters => Ok(Self::LiquidityPoolParameters(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::MuxedAccount => { - Ok(Self::MuxedAccount(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::MuxedAccountMed25519 => Ok(Self::MuxedAccountMed25519(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::DecoratedSignature => Ok(Self::DecoratedSignature(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::OperationType => { - Ok(Self::OperationType(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::CreateAccountOp => { - Ok(Self::CreateAccountOp(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::PaymentOp => Ok(Self::PaymentOp(Box::new(serde_json::from_reader(r)?))), - TypeVariant::PathPaymentStrictReceiveOp => Ok(Self::PathPaymentStrictReceiveOp( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::PathPaymentStrictSendOp => Ok(Self::PathPaymentStrictSendOp(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ManageSellOfferOp => Ok(Self::ManageSellOfferOp(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ManageBuyOfferOp => Ok(Self::ManageBuyOfferOp(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::CreatePassiveSellOfferOp => Ok(Self::CreatePassiveSellOfferOp(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::SetOptionsOp => { - Ok(Self::SetOptionsOp(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ChangeTrustAsset => Ok(Self::ChangeTrustAsset(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ChangeTrustOp => { - Ok(Self::ChangeTrustOp(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::AllowTrustOp => { - Ok(Self::AllowTrustOp(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ManageDataOp => { - Ok(Self::ManageDataOp(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::BumpSequenceOp => { - Ok(Self::BumpSequenceOp(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::CreateClaimableBalanceOp => Ok(Self::CreateClaimableBalanceOp(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ClaimClaimableBalanceOp => Ok(Self::ClaimClaimableBalanceOp(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::BeginSponsoringFutureReservesOp => Ok( - Self::BeginSponsoringFutureReservesOp(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::RevokeSponsorshipType => Ok(Self::RevokeSponsorshipType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::RevokeSponsorshipOp => Ok(Self::RevokeSponsorshipOp(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::RevokeSponsorshipOpSigner => Ok(Self::RevokeSponsorshipOpSigner( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::ClawbackOp => Ok(Self::ClawbackOp(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ClawbackClaimableBalanceOp => Ok(Self::ClawbackClaimableBalanceOp( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::SetTrustLineFlagsOp => Ok(Self::SetTrustLineFlagsOp(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LiquidityPoolDepositOp => Ok(Self::LiquidityPoolDepositOp(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LiquidityPoolWithdrawOp => Ok(Self::LiquidityPoolWithdrawOp(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::HostFunctionType => Ok(Self::HostFunctionType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ContractIdPreimageType => Ok(Self::ContractIdPreimageType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ContractIdPreimage => Ok(Self::ContractIdPreimage(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ContractIdPreimageFromAddress => Ok(Self::ContractIdPreimageFromAddress( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::CreateContractArgs => Ok(Self::CreateContractArgs(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::CreateContractArgsV2 => Ok(Self::CreateContractArgsV2(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::InvokeContractArgs => Ok(Self::InvokeContractArgs(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::HostFunction => { - Ok(Self::HostFunction(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::SorobanAuthorizedFunctionType => Ok(Self::SorobanAuthorizedFunctionType( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::SorobanAuthorizedFunction => Ok(Self::SorobanAuthorizedFunction( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::SorobanAuthorizedInvocation => Ok(Self::SorobanAuthorizedInvocation( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::SorobanAddressCredentials => Ok(Self::SorobanAddressCredentials( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::SorobanCredentialsType => Ok(Self::SorobanCredentialsType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::SorobanCredentials => Ok(Self::SorobanCredentials(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::SorobanAuthorizationEntry => Ok(Self::SorobanAuthorizationEntry( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::SorobanAuthorizationEntries => Ok(Self::SorobanAuthorizationEntries( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::InvokeHostFunctionOp => Ok(Self::InvokeHostFunctionOp(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ExtendFootprintTtlOp => Ok(Self::ExtendFootprintTtlOp(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::RestoreFootprintOp => Ok(Self::RestoreFootprintOp(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::Operation => Ok(Self::Operation(Box::new(serde_json::from_reader(r)?))), - TypeVariant::OperationBody => { - Ok(Self::OperationBody(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::HashIdPreimage => { - Ok(Self::HashIdPreimage(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::HashIdPreimageOperationId => Ok(Self::HashIdPreimageOperationId( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::HashIdPreimageRevokeId => Ok(Self::HashIdPreimageRevokeId(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::HashIdPreimageContractId => Ok(Self::HashIdPreimageContractId(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::HashIdPreimageSorobanAuthorization => Ok( - Self::HashIdPreimageSorobanAuthorization(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::MemoType => Ok(Self::MemoType(Box::new(serde_json::from_reader(r)?))), - TypeVariant::Memo => Ok(Self::Memo(Box::new(serde_json::from_reader(r)?))), - TypeVariant::TimeBounds => Ok(Self::TimeBounds(Box::new(serde_json::from_reader(r)?))), - TypeVariant::LedgerBounds => { - Ok(Self::LedgerBounds(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::PreconditionsV2 => { - Ok(Self::PreconditionsV2(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::PreconditionType => Ok(Self::PreconditionType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::Preconditions => { - Ok(Self::Preconditions(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::LedgerFootprint => { - Ok(Self::LedgerFootprint(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::SorobanResources => Ok(Self::SorobanResources(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::SorobanResourcesExtV0 => Ok(Self::SorobanResourcesExtV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::SorobanTransactionData => Ok(Self::SorobanTransactionData(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::SorobanTransactionDataExt => Ok(Self::SorobanTransactionDataExt( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::TransactionV0 => { - Ok(Self::TransactionV0(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::TransactionV0Ext => Ok(Self::TransactionV0Ext(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionV0Envelope => Ok(Self::TransactionV0Envelope(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::Transaction => { - Ok(Self::Transaction(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::TransactionExt => { - Ok(Self::TransactionExt(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::TransactionV1Envelope => Ok(Self::TransactionV1Envelope(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::FeeBumpTransaction => Ok(Self::FeeBumpTransaction(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::FeeBumpTransactionInnerTx => Ok(Self::FeeBumpTransactionInnerTx( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::FeeBumpTransactionExt => Ok(Self::FeeBumpTransactionExt(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::FeeBumpTransactionEnvelope => Ok(Self::FeeBumpTransactionEnvelope( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::TransactionEnvelope => Ok(Self::TransactionEnvelope(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionSignaturePayload => Ok(Self::TransactionSignaturePayload( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::TransactionSignaturePayloadTaggedTransaction => { - Ok(Self::TransactionSignaturePayloadTaggedTransaction( - Box::new(serde_json::from_reader(r)?), - )) - } - TypeVariant::ClaimAtomType => { - Ok(Self::ClaimAtomType(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ClaimOfferAtomV0 => Ok(Self::ClaimOfferAtomV0(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ClaimOfferAtom => { - Ok(Self::ClaimOfferAtom(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ClaimLiquidityAtom => Ok(Self::ClaimLiquidityAtom(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ClaimAtom => Ok(Self::ClaimAtom(Box::new(serde_json::from_reader(r)?))), - TypeVariant::CreateAccountResultCode => Ok(Self::CreateAccountResultCode(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::CreateAccountResult => Ok(Self::CreateAccountResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::PaymentResultCode => Ok(Self::PaymentResultCode(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::PaymentResult => { - Ok(Self::PaymentResult(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::PathPaymentStrictReceiveResultCode => Ok( - Self::PathPaymentStrictReceiveResultCode(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::SimplePaymentResult => Ok(Self::SimplePaymentResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::PathPaymentStrictReceiveResult => Ok( - Self::PathPaymentStrictReceiveResult(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::PathPaymentStrictReceiveResultSuccess => Ok( - Self::PathPaymentStrictReceiveResultSuccess(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::PathPaymentStrictSendResultCode => Ok( - Self::PathPaymentStrictSendResultCode(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::PathPaymentStrictSendResult => Ok(Self::PathPaymentStrictSendResult( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::PathPaymentStrictSendResultSuccess => Ok( - Self::PathPaymentStrictSendResultSuccess(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::ManageSellOfferResultCode => Ok(Self::ManageSellOfferResultCode( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::ManageOfferEffect => Ok(Self::ManageOfferEffect(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ManageOfferSuccessResult => Ok(Self::ManageOfferSuccessResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ManageOfferSuccessResultOffer => Ok(Self::ManageOfferSuccessResultOffer( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::ManageSellOfferResult => Ok(Self::ManageSellOfferResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ManageBuyOfferResultCode => Ok(Self::ManageBuyOfferResultCode(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ManageBuyOfferResult => Ok(Self::ManageBuyOfferResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::SetOptionsResultCode => Ok(Self::SetOptionsResultCode(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::SetOptionsResult => Ok(Self::SetOptionsResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ChangeTrustResultCode => Ok(Self::ChangeTrustResultCode(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ChangeTrustResult => Ok(Self::ChangeTrustResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::AllowTrustResultCode => Ok(Self::AllowTrustResultCode(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::AllowTrustResult => Ok(Self::AllowTrustResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::AccountMergeResultCode => Ok(Self::AccountMergeResultCode(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::AccountMergeResult => Ok(Self::AccountMergeResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::InflationResultCode => Ok(Self::InflationResultCode(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::InflationPayout => { - Ok(Self::InflationPayout(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::InflationResult => { - Ok(Self::InflationResult(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ManageDataResultCode => Ok(Self::ManageDataResultCode(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ManageDataResult => Ok(Self::ManageDataResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::BumpSequenceResultCode => Ok(Self::BumpSequenceResultCode(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::BumpSequenceResult => Ok(Self::BumpSequenceResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::CreateClaimableBalanceResultCode => Ok( - Self::CreateClaimableBalanceResultCode(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::CreateClaimableBalanceResult => Ok(Self::CreateClaimableBalanceResult( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::ClaimClaimableBalanceResultCode => Ok( - Self::ClaimClaimableBalanceResultCode(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::ClaimClaimableBalanceResult => Ok(Self::ClaimClaimableBalanceResult( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::BeginSponsoringFutureReservesResultCode => { - Ok(Self::BeginSponsoringFutureReservesResultCode(Box::new( - serde_json::from_reader(r)?, - ))) - } - TypeVariant::BeginSponsoringFutureReservesResult => Ok( - Self::BeginSponsoringFutureReservesResult(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::EndSponsoringFutureReservesResultCode => Ok( - Self::EndSponsoringFutureReservesResultCode(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::EndSponsoringFutureReservesResult => Ok( - Self::EndSponsoringFutureReservesResult(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::RevokeSponsorshipResultCode => Ok(Self::RevokeSponsorshipResultCode( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::RevokeSponsorshipResult => Ok(Self::RevokeSponsorshipResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ClawbackResultCode => Ok(Self::ClawbackResultCode(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ClawbackResult => { - Ok(Self::ClawbackResult(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ClawbackClaimableBalanceResultCode => Ok( - Self::ClawbackClaimableBalanceResultCode(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::ClawbackClaimableBalanceResult => Ok( - Self::ClawbackClaimableBalanceResult(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::SetTrustLineFlagsResultCode => Ok(Self::SetTrustLineFlagsResultCode( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::SetTrustLineFlagsResult => Ok(Self::SetTrustLineFlagsResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::LiquidityPoolDepositResultCode => Ok( - Self::LiquidityPoolDepositResultCode(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::LiquidityPoolDepositResult => Ok(Self::LiquidityPoolDepositResult( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::LiquidityPoolWithdrawResultCode => Ok( - Self::LiquidityPoolWithdrawResultCode(Box::new(serde_json::from_reader(r)?)), - ), - TypeVariant::LiquidityPoolWithdrawResult => Ok(Self::LiquidityPoolWithdrawResult( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::InvokeHostFunctionResultCode => Ok(Self::InvokeHostFunctionResultCode( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::InvokeHostFunctionResult => Ok(Self::InvokeHostFunctionResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ExtendFootprintTtlResultCode => Ok(Self::ExtendFootprintTtlResultCode( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::ExtendFootprintTtlResult => Ok(Self::ExtendFootprintTtlResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::RestoreFootprintResultCode => Ok(Self::RestoreFootprintResultCode( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::RestoreFootprintResult => Ok(Self::RestoreFootprintResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::OperationResultCode => Ok(Self::OperationResultCode(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::OperationResult => { - Ok(Self::OperationResult(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::OperationResultTr => Ok(Self::OperationResultTr(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionResultCode => Ok(Self::TransactionResultCode(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::InnerTransactionResult => Ok(Self::InnerTransactionResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::InnerTransactionResultResult => Ok(Self::InnerTransactionResultResult( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::InnerTransactionResultExt => Ok(Self::InnerTransactionResultExt( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::InnerTransactionResultPair => Ok(Self::InnerTransactionResultPair( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::TransactionResult => Ok(Self::TransactionResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionResultResult => Ok(Self::TransactionResultResult(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::TransactionResultExt => Ok(Self::TransactionResultExt(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::Hash => Ok(Self::Hash(Box::new(serde_json::from_reader(r)?))), - TypeVariant::Uint256 => Ok(Self::Uint256(Box::new(serde_json::from_reader(r)?))), - TypeVariant::Uint32 => Ok(Self::Uint32(Box::new(serde_json::from_reader(r)?))), - TypeVariant::Int32 => Ok(Self::Int32(Box::new(serde_json::from_reader(r)?))), - TypeVariant::Uint64 => Ok(Self::Uint64(Box::new(serde_json::from_reader(r)?))), - TypeVariant::Int64 => Ok(Self::Int64(Box::new(serde_json::from_reader(r)?))), - TypeVariant::TimePoint => Ok(Self::TimePoint(Box::new(serde_json::from_reader(r)?))), - TypeVariant::Duration => Ok(Self::Duration(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ExtensionPoint => { - Ok(Self::ExtensionPoint(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::CryptoKeyType => { - Ok(Self::CryptoKeyType(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::PublicKeyType => { - Ok(Self::PublicKeyType(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::SignerKeyType => { - Ok(Self::SignerKeyType(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::PublicKey => Ok(Self::PublicKey(Box::new(serde_json::from_reader(r)?))), - TypeVariant::SignerKey => Ok(Self::SignerKey(Box::new(serde_json::from_reader(r)?))), - TypeVariant::SignerKeyEd25519SignedPayload => Ok(Self::SignerKeyEd25519SignedPayload( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::Signature => Ok(Self::Signature(Box::new(serde_json::from_reader(r)?))), - TypeVariant::SignatureHint => { - Ok(Self::SignatureHint(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::NodeId => Ok(Self::NodeId(Box::new(serde_json::from_reader(r)?))), - TypeVariant::AccountId => Ok(Self::AccountId(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ContractId => Ok(Self::ContractId(Box::new(serde_json::from_reader(r)?))), - TypeVariant::Curve25519Secret => Ok(Self::Curve25519Secret(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::Curve25519Public => Ok(Self::Curve25519Public(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::HmacSha256Key => { - Ok(Self::HmacSha256Key(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::HmacSha256Mac => { - Ok(Self::HmacSha256Mac(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::ShortHashSeed => { - Ok(Self::ShortHashSeed(Box::new(serde_json::from_reader(r)?))) - } - TypeVariant::BinaryFuseFilterType => Ok(Self::BinaryFuseFilterType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::SerializedBinaryFuseFilter => Ok(Self::SerializedBinaryFuseFilter( - Box::new(serde_json::from_reader(r)?), - )), - TypeVariant::PoolId => Ok(Self::PoolId(Box::new(serde_json::from_reader(r)?))), - TypeVariant::ClaimableBalanceIdType => Ok(Self::ClaimableBalanceIdType(Box::new( - serde_json::from_reader(r)?, - ))), - TypeVariant::ClaimableBalanceId => Ok(Self::ClaimableBalanceId(Box::new( - serde_json::from_reader(r)?, - ))), - } - } - - #[cfg(all(feature = "std", feature = "serde_json"))] - #[allow(clippy::too_many_lines)] - pub fn deserialize_json<'r, R: serde_json::de::Read<'r>>( - v: TypeVariant, - r: &mut serde_json::de::Deserializer, - ) -> Result { - match v { - TypeVariant::Value => Ok(Self::Value(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::ScpBallot => Ok(Self::ScpBallot(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScpStatementType => Ok(Self::ScpStatementType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScpNomination => Ok(Self::ScpNomination(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScpStatement => Ok(Self::ScpStatement(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScpStatementPledges => Ok(Self::ScpStatementPledges(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScpStatementPrepare => Ok(Self::ScpStatementPrepare(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScpStatementConfirm => Ok(Self::ScpStatementConfirm(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScpStatementExternalize => Ok(Self::ScpStatementExternalize(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScpEnvelope => Ok(Self::ScpEnvelope(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScpQuorumSet => Ok(Self::ScpQuorumSet(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::EncodedLedgerKey => Ok(Self::EncodedLedgerKey(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ConfigSettingContractExecutionLanesV0 => { - Ok(Self::ConfigSettingContractExecutionLanesV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::ConfigSettingContractComputeV0 => { - Ok(Self::ConfigSettingContractComputeV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::ConfigSettingContractParallelComputeV0 => { - Ok(Self::ConfigSettingContractParallelComputeV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::ConfigSettingContractLedgerCostV0 => { - Ok(Self::ConfigSettingContractLedgerCostV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::ConfigSettingContractLedgerCostExtV0 => { - Ok(Self::ConfigSettingContractLedgerCostExtV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::ConfigSettingContractHistoricalDataV0 => { - Ok(Self::ConfigSettingContractHistoricalDataV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::ConfigSettingContractEventsV0 => Ok(Self::ConfigSettingContractEventsV0( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::ConfigSettingContractBandwidthV0 => { - Ok(Self::ConfigSettingContractBandwidthV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::ContractCostType => Ok(Self::ContractCostType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractCostParamEntry => Ok(Self::ContractCostParamEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::StateArchivalSettings => Ok(Self::StateArchivalSettings(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::EvictionIterator => Ok(Self::EvictionIterator(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ConfigSettingScpTiming => Ok(Self::ConfigSettingScpTiming(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::FrozenLedgerKeys => Ok(Self::FrozenLedgerKeys(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::FrozenLedgerKeysDelta => Ok(Self::FrozenLedgerKeysDelta(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::FreezeBypassTxs => Ok(Self::FreezeBypassTxs(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::FreezeBypassTxsDelta => Ok(Self::FreezeBypassTxsDelta(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractCostParams => Ok(Self::ContractCostParams(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ConfigSettingId => Ok(Self::ConfigSettingId(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ConfigSettingEntry => Ok(Self::ConfigSettingEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScEnvMetaKind => Ok(Self::ScEnvMetaKind(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScEnvMetaEntry => Ok(Self::ScEnvMetaEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScEnvMetaEntryInterfaceVersion => { - Ok(Self::ScEnvMetaEntryInterfaceVersion(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::ScMetaV0 => Ok(Self::ScMetaV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScMetaKind => Ok(Self::ScMetaKind(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScMetaEntry => Ok(Self::ScMetaEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecType => Ok(Self::ScSpecType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecTypeOption => Ok(Self::ScSpecTypeOption(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecTypeResult => Ok(Self::ScSpecTypeResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecTypeVec => Ok(Self::ScSpecTypeVec(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecTypeMap => Ok(Self::ScSpecTypeMap(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecTypeTuple => Ok(Self::ScSpecTypeTuple(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecTypeBytesN => Ok(Self::ScSpecTypeBytesN(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecTypeUdt => Ok(Self::ScSpecTypeUdt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecTypeDef => Ok(Self::ScSpecTypeDef(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecUdtStructFieldV0 => Ok(Self::ScSpecUdtStructFieldV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecUdtStructV0 => Ok(Self::ScSpecUdtStructV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecUdtUnionCaseVoidV0 => Ok(Self::ScSpecUdtUnionCaseVoidV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecUdtUnionCaseTupleV0 => Ok(Self::ScSpecUdtUnionCaseTupleV0( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::ScSpecUdtUnionCaseV0Kind => Ok(Self::ScSpecUdtUnionCaseV0Kind(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecUdtUnionCaseV0 => Ok(Self::ScSpecUdtUnionCaseV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecUdtUnionV0 => Ok(Self::ScSpecUdtUnionV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecUdtEnumCaseV0 => Ok(Self::ScSpecUdtEnumCaseV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecUdtEnumV0 => Ok(Self::ScSpecUdtEnumV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecUdtErrorEnumCaseV0 => Ok(Self::ScSpecUdtErrorEnumCaseV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecUdtErrorEnumV0 => Ok(Self::ScSpecUdtErrorEnumV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecFunctionInputV0 => Ok(Self::ScSpecFunctionInputV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecFunctionV0 => Ok(Self::ScSpecFunctionV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecEventParamLocationV0 => Ok(Self::ScSpecEventParamLocationV0( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::ScSpecEventParamV0 => Ok(Self::ScSpecEventParamV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecEventDataFormat => Ok(Self::ScSpecEventDataFormat(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecEventV0 => Ok(Self::ScSpecEventV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecEntryKind => Ok(Self::ScSpecEntryKind(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSpecEntry => Ok(Self::ScSpecEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScValType => Ok(Self::ScValType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScErrorType => Ok(Self::ScErrorType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScErrorCode => Ok(Self::ScErrorCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScError => Ok(Self::ScError(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::UInt128Parts => Ok(Self::UInt128Parts(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Int128Parts => Ok(Self::Int128Parts(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::UInt256Parts => Ok(Self::UInt256Parts(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Int256Parts => Ok(Self::Int256Parts(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractExecutableType => Ok(Self::ContractExecutableType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractExecutable => Ok(Self::ContractExecutable(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScAddressType => Ok(Self::ScAddressType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::MuxedEd25519Account => Ok(Self::MuxedEd25519Account(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScAddress => Ok(Self::ScAddress(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScVec => Ok(Self::ScVec(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::ScMap => Ok(Self::ScMap(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::ScBytes => Ok(Self::ScBytes(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScString => Ok(Self::ScString(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScSymbol => Ok(Self::ScSymbol(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScNonceKey => Ok(Self::ScNonceKey(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScContractInstance => Ok(Self::ScContractInstance(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScVal => Ok(Self::ScVal(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::ScMapEntry => Ok(Self::ScMapEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerCloseMetaBatch => Ok(Self::LedgerCloseMetaBatch(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::StoredTransactionSet => Ok(Self::StoredTransactionSet(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::StoredDebugTransactionSet => Ok(Self::StoredDebugTransactionSet( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::PersistedScpStateV0 => Ok(Self::PersistedScpStateV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::PersistedScpStateV1 => Ok(Self::PersistedScpStateV1(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::PersistedScpState => Ok(Self::PersistedScpState(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Thresholds => Ok(Self::Thresholds(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::String32 => Ok(Self::String32(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::String64 => Ok(Self::String64(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SequenceNumber => Ok(Self::SequenceNumber(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::DataValue => Ok(Self::DataValue(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AssetCode4 => Ok(Self::AssetCode4(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AssetCode12 => Ok(Self::AssetCode12(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AssetType => Ok(Self::AssetType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AssetCode => Ok(Self::AssetCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AlphaNum4 => Ok(Self::AlphaNum4(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AlphaNum12 => Ok(Self::AlphaNum12(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Asset => Ok(Self::Asset(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::Price => Ok(Self::Price(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::Liabilities => Ok(Self::Liabilities(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ThresholdIndexes => Ok(Self::ThresholdIndexes(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerEntryType => Ok(Self::LedgerEntryType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Signer => Ok(Self::Signer(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::AccountFlags => Ok(Self::AccountFlags(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SponsorshipDescriptor => Ok(Self::SponsorshipDescriptor(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AccountEntryExtensionV3 => Ok(Self::AccountEntryExtensionV3(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AccountEntryExtensionV2 => Ok(Self::AccountEntryExtensionV2(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AccountEntryExtensionV2Ext => Ok(Self::AccountEntryExtensionV2Ext( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::AccountEntryExtensionV1 => Ok(Self::AccountEntryExtensionV1(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AccountEntryExtensionV1Ext => Ok(Self::AccountEntryExtensionV1Ext( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::AccountEntry => Ok(Self::AccountEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AccountEntryExt => Ok(Self::AccountEntryExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TrustLineFlags => Ok(Self::TrustLineFlags(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LiquidityPoolType => Ok(Self::LiquidityPoolType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TrustLineAsset => Ok(Self::TrustLineAsset(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TrustLineEntryExtensionV2 => Ok(Self::TrustLineEntryExtensionV2( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::TrustLineEntryExtensionV2Ext => Ok(Self::TrustLineEntryExtensionV2Ext( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::TrustLineEntry => Ok(Self::TrustLineEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TrustLineEntryExt => Ok(Self::TrustLineEntryExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TrustLineEntryV1 => Ok(Self::TrustLineEntryV1(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TrustLineEntryV1Ext => Ok(Self::TrustLineEntryV1Ext(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::OfferEntryFlags => Ok(Self::OfferEntryFlags(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::OfferEntry => Ok(Self::OfferEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::OfferEntryExt => Ok(Self::OfferEntryExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::DataEntry => Ok(Self::DataEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::DataEntryExt => Ok(Self::DataEntryExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClaimPredicateType => Ok(Self::ClaimPredicateType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClaimPredicate => Ok(Self::ClaimPredicate(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClaimantType => Ok(Self::ClaimantType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Claimant => Ok(Self::Claimant(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClaimantV0 => Ok(Self::ClaimantV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClaimableBalanceFlags => Ok(Self::ClaimableBalanceFlags(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClaimableBalanceEntryExtensionV1 => { - Ok(Self::ClaimableBalanceEntryExtensionV1(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::ClaimableBalanceEntryExtensionV1Ext => { - Ok(Self::ClaimableBalanceEntryExtensionV1Ext(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::ClaimableBalanceEntry => Ok(Self::ClaimableBalanceEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClaimableBalanceEntryExt => Ok(Self::ClaimableBalanceEntryExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LiquidityPoolConstantProductParameters => { - Ok(Self::LiquidityPoolConstantProductParameters(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::LiquidityPoolEntry => Ok(Self::LiquidityPoolEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LiquidityPoolEntryBody => Ok(Self::LiquidityPoolEntryBody(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LiquidityPoolEntryConstantProduct => { - Ok(Self::LiquidityPoolEntryConstantProduct(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::ContractDataDurability => Ok(Self::ContractDataDurability(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractDataEntry => Ok(Self::ContractDataEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractCodeCostInputs => Ok(Self::ContractCodeCostInputs(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractCodeEntry => Ok(Self::ContractCodeEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractCodeEntryExt => Ok(Self::ContractCodeEntryExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractCodeEntryV1 => Ok(Self::ContractCodeEntryV1(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TtlEntry => Ok(Self::TtlEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerEntryExtensionV1 => Ok(Self::LedgerEntryExtensionV1(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerEntryExtensionV1Ext => Ok(Self::LedgerEntryExtensionV1Ext( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::LedgerEntry => Ok(Self::LedgerEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerEntryData => Ok(Self::LedgerEntryData(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerEntryExt => Ok(Self::LedgerEntryExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerKey => Ok(Self::LedgerKey(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerKeyAccount => Ok(Self::LedgerKeyAccount(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerKeyTrustLine => Ok(Self::LedgerKeyTrustLine(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerKeyOffer => Ok(Self::LedgerKeyOffer(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerKeyData => Ok(Self::LedgerKeyData(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerKeyClaimableBalance => Ok(Self::LedgerKeyClaimableBalance( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::LedgerKeyLiquidityPool => Ok(Self::LedgerKeyLiquidityPool(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerKeyContractData => Ok(Self::LedgerKeyContractData(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerKeyContractCode => Ok(Self::LedgerKeyContractCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerKeyConfigSetting => Ok(Self::LedgerKeyConfigSetting(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerKeyTtl => Ok(Self::LedgerKeyTtl(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::EnvelopeType => Ok(Self::EnvelopeType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::BucketListType => Ok(Self::BucketListType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::BucketEntryType => Ok(Self::BucketEntryType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::HotArchiveBucketEntryType => Ok(Self::HotArchiveBucketEntryType( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::BucketMetadata => Ok(Self::BucketMetadata(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::BucketMetadataExt => Ok(Self::BucketMetadataExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::BucketEntry => Ok(Self::BucketEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::HotArchiveBucketEntry => Ok(Self::HotArchiveBucketEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::UpgradeType => Ok(Self::UpgradeType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::StellarValueType => Ok(Self::StellarValueType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerCloseValueSignature => Ok(Self::LedgerCloseValueSignature( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::StellarValue => Ok(Self::StellarValue(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::StellarValueExt => Ok(Self::StellarValueExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerHeaderFlags => Ok(Self::LedgerHeaderFlags(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerHeaderExtensionV1 => Ok(Self::LedgerHeaderExtensionV1(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerHeaderExtensionV1Ext => Ok(Self::LedgerHeaderExtensionV1Ext( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::LedgerHeader => Ok(Self::LedgerHeader(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerHeaderExt => Ok(Self::LedgerHeaderExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerUpgradeType => Ok(Self::LedgerUpgradeType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ConfigUpgradeSetKey => Ok(Self::ConfigUpgradeSetKey(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerUpgrade => Ok(Self::LedgerUpgrade(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ConfigUpgradeSet => Ok(Self::ConfigUpgradeSet(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TxSetComponentType => Ok(Self::TxSetComponentType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::DependentTxCluster => Ok(Self::DependentTxCluster(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ParallelTxExecutionStage => Ok(Self::ParallelTxExecutionStage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ParallelTxsComponent => Ok(Self::ParallelTxsComponent(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TxSetComponent => Ok(Self::TxSetComponent(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TxSetComponentTxsMaybeDiscountedFee => { - Ok(Self::TxSetComponentTxsMaybeDiscountedFee(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::TransactionPhase => Ok(Self::TransactionPhase(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionSet => Ok(Self::TransactionSet(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionSetV1 => Ok(Self::TransactionSetV1(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::GeneralizedTransactionSet => Ok(Self::GeneralizedTransactionSet( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::TransactionResultPair => Ok(Self::TransactionResultPair(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionResultSet => Ok(Self::TransactionResultSet(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionHistoryEntry => Ok(Self::TransactionHistoryEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionHistoryEntryExt => Ok(Self::TransactionHistoryEntryExt( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::TransactionHistoryResultEntry => Ok(Self::TransactionHistoryResultEntry( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::TransactionHistoryResultEntryExt => { - Ok(Self::TransactionHistoryResultEntryExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::LedgerHeaderHistoryEntry => Ok(Self::LedgerHeaderHistoryEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerHeaderHistoryEntryExt => Ok(Self::LedgerHeaderHistoryEntryExt( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::LedgerScpMessages => Ok(Self::LedgerScpMessages(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScpHistoryEntryV0 => Ok(Self::ScpHistoryEntryV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ScpHistoryEntry => Ok(Self::ScpHistoryEntry(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerEntryChangeType => Ok(Self::LedgerEntryChangeType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerEntryChange => Ok(Self::LedgerEntryChange(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerEntryChanges => Ok(Self::LedgerEntryChanges(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::OperationMeta => Ok(Self::OperationMeta(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionMetaV1 => Ok(Self::TransactionMetaV1(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionMetaV2 => Ok(Self::TransactionMetaV2(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractEventType => Ok(Self::ContractEventType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractEvent => Ok(Self::ContractEvent(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractEventBody => Ok(Self::ContractEventBody(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractEventV0 => Ok(Self::ContractEventV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::DiagnosticEvent => Ok(Self::DiagnosticEvent(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SorobanTransactionMetaExtV1 => Ok(Self::SorobanTransactionMetaExtV1( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::SorobanTransactionMetaExt => Ok(Self::SorobanTransactionMetaExt( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::SorobanTransactionMeta => Ok(Self::SorobanTransactionMeta(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionMetaV3 => Ok(Self::TransactionMetaV3(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::OperationMetaV2 => Ok(Self::OperationMetaV2(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SorobanTransactionMetaV2 => Ok(Self::SorobanTransactionMetaV2(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionEventStage => Ok(Self::TransactionEventStage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionEvent => Ok(Self::TransactionEvent(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionMetaV4 => Ok(Self::TransactionMetaV4(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::InvokeHostFunctionSuccessPreImage => { - Ok(Self::InvokeHostFunctionSuccessPreImage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::TransactionMeta => Ok(Self::TransactionMeta(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionResultMeta => Ok(Self::TransactionResultMeta(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionResultMetaV1 => Ok(Self::TransactionResultMetaV1(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::UpgradeEntryMeta => Ok(Self::UpgradeEntryMeta(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerCloseMetaV0 => Ok(Self::LedgerCloseMetaV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerCloseMetaExtV1 => Ok(Self::LedgerCloseMetaExtV1(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerCloseMetaExt => Ok(Self::LedgerCloseMetaExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerCloseMetaV1 => Ok(Self::LedgerCloseMetaV1(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerCloseMetaV2 => Ok(Self::LedgerCloseMetaV2(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerCloseMeta => Ok(Self::LedgerCloseMeta(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ErrorCode => Ok(Self::ErrorCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SError => Ok(Self::SError(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::SendMore => Ok(Self::SendMore(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SendMoreExtended => Ok(Self::SendMoreExtended(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AuthCert => Ok(Self::AuthCert(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Hello => Ok(Self::Hello(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::Auth => Ok(Self::Auth(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::IpAddrType => Ok(Self::IpAddrType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::PeerAddress => Ok(Self::PeerAddress(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::PeerAddressIp => Ok(Self::PeerAddressIp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::MessageType => Ok(Self::MessageType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::DontHave => Ok(Self::DontHave(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SurveyMessageCommandType => Ok(Self::SurveyMessageCommandType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SurveyMessageResponseType => Ok(Self::SurveyMessageResponseType( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::TimeSlicedSurveyStartCollectingMessage => { - Ok(Self::TimeSlicedSurveyStartCollectingMessage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage => { - Ok(Self::SignedTimeSlicedSurveyStartCollectingMessage( - Box::new(serde::de::Deserialize::deserialize(r)?), - )) - } - TypeVariant::TimeSlicedSurveyStopCollectingMessage => { - Ok(Self::TimeSlicedSurveyStopCollectingMessage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage => { - Ok(Self::SignedTimeSlicedSurveyStopCollectingMessage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::SurveyRequestMessage => Ok(Self::SurveyRequestMessage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TimeSlicedSurveyRequestMessage => { - Ok(Self::TimeSlicedSurveyRequestMessage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::SignedTimeSlicedSurveyRequestMessage => { - Ok(Self::SignedTimeSlicedSurveyRequestMessage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::EncryptedBody => Ok(Self::EncryptedBody(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SurveyResponseMessage => Ok(Self::SurveyResponseMessage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TimeSlicedSurveyResponseMessage => { - Ok(Self::TimeSlicedSurveyResponseMessage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::SignedTimeSlicedSurveyResponseMessage => { - Ok(Self::SignedTimeSlicedSurveyResponseMessage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::PeerStats => Ok(Self::PeerStats(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TimeSlicedNodeData => Ok(Self::TimeSlicedNodeData(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TimeSlicedPeerData => Ok(Self::TimeSlicedPeerData(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TimeSlicedPeerDataList => Ok(Self::TimeSlicedPeerDataList(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TopologyResponseBodyV2 => Ok(Self::TopologyResponseBodyV2(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SurveyResponseBody => Ok(Self::SurveyResponseBody(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TxAdvertVector => Ok(Self::TxAdvertVector(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::FloodAdvert => Ok(Self::FloodAdvert(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TxDemandVector => Ok(Self::TxDemandVector(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::FloodDemand => Ok(Self::FloodDemand(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::StellarMessage => Ok(Self::StellarMessage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AuthenticatedMessage => Ok(Self::AuthenticatedMessage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AuthenticatedMessageV0 => Ok(Self::AuthenticatedMessageV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LiquidityPoolParameters => Ok(Self::LiquidityPoolParameters(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::MuxedAccount => Ok(Self::MuxedAccount(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::MuxedAccountMed25519 => Ok(Self::MuxedAccountMed25519(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::DecoratedSignature => Ok(Self::DecoratedSignature(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::OperationType => Ok(Self::OperationType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::CreateAccountOp => Ok(Self::CreateAccountOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::PaymentOp => Ok(Self::PaymentOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::PathPaymentStrictReceiveOp => Ok(Self::PathPaymentStrictReceiveOp( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::PathPaymentStrictSendOp => Ok(Self::PathPaymentStrictSendOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ManageSellOfferOp => Ok(Self::ManageSellOfferOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ManageBuyOfferOp => Ok(Self::ManageBuyOfferOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::CreatePassiveSellOfferOp => Ok(Self::CreatePassiveSellOfferOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SetOptionsOp => Ok(Self::SetOptionsOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ChangeTrustAsset => Ok(Self::ChangeTrustAsset(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ChangeTrustOp => Ok(Self::ChangeTrustOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AllowTrustOp => Ok(Self::AllowTrustOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ManageDataOp => Ok(Self::ManageDataOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::BumpSequenceOp => Ok(Self::BumpSequenceOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::CreateClaimableBalanceOp => Ok(Self::CreateClaimableBalanceOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClaimClaimableBalanceOp => Ok(Self::ClaimClaimableBalanceOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::BeginSponsoringFutureReservesOp => { - Ok(Self::BeginSponsoringFutureReservesOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::RevokeSponsorshipType => Ok(Self::RevokeSponsorshipType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::RevokeSponsorshipOp => Ok(Self::RevokeSponsorshipOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::RevokeSponsorshipOpSigner => Ok(Self::RevokeSponsorshipOpSigner( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::ClawbackOp => Ok(Self::ClawbackOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClawbackClaimableBalanceOp => Ok(Self::ClawbackClaimableBalanceOp( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::SetTrustLineFlagsOp => Ok(Self::SetTrustLineFlagsOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LiquidityPoolDepositOp => Ok(Self::LiquidityPoolDepositOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LiquidityPoolWithdrawOp => Ok(Self::LiquidityPoolWithdrawOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::HostFunctionType => Ok(Self::HostFunctionType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractIdPreimageType => Ok(Self::ContractIdPreimageType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractIdPreimage => Ok(Self::ContractIdPreimage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractIdPreimageFromAddress => Ok(Self::ContractIdPreimageFromAddress( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::CreateContractArgs => Ok(Self::CreateContractArgs(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::CreateContractArgsV2 => Ok(Self::CreateContractArgsV2(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::InvokeContractArgs => Ok(Self::InvokeContractArgs(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::HostFunction => Ok(Self::HostFunction(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SorobanAuthorizedFunctionType => Ok(Self::SorobanAuthorizedFunctionType( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::SorobanAuthorizedFunction => Ok(Self::SorobanAuthorizedFunction( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::SorobanAuthorizedInvocation => Ok(Self::SorobanAuthorizedInvocation( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::SorobanAddressCredentials => Ok(Self::SorobanAddressCredentials( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::SorobanCredentialsType => Ok(Self::SorobanCredentialsType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SorobanCredentials => Ok(Self::SorobanCredentials(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SorobanAuthorizationEntry => Ok(Self::SorobanAuthorizationEntry( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::SorobanAuthorizationEntries => Ok(Self::SorobanAuthorizationEntries( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::InvokeHostFunctionOp => Ok(Self::InvokeHostFunctionOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ExtendFootprintTtlOp => Ok(Self::ExtendFootprintTtlOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::RestoreFootprintOp => Ok(Self::RestoreFootprintOp(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Operation => Ok(Self::Operation(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::OperationBody => Ok(Self::OperationBody(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::HashIdPreimage => Ok(Self::HashIdPreimage(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::HashIdPreimageOperationId => Ok(Self::HashIdPreimageOperationId( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::HashIdPreimageRevokeId => Ok(Self::HashIdPreimageRevokeId(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::HashIdPreimageContractId => Ok(Self::HashIdPreimageContractId(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::HashIdPreimageSorobanAuthorization => { - Ok(Self::HashIdPreimageSorobanAuthorization(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::MemoType => Ok(Self::MemoType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Memo => Ok(Self::Memo(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::TimeBounds => Ok(Self::TimeBounds(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerBounds => Ok(Self::LedgerBounds(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::PreconditionsV2 => Ok(Self::PreconditionsV2(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::PreconditionType => Ok(Self::PreconditionType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Preconditions => Ok(Self::Preconditions(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LedgerFootprint => Ok(Self::LedgerFootprint(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SorobanResources => Ok(Self::SorobanResources(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SorobanResourcesExtV0 => Ok(Self::SorobanResourcesExtV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SorobanTransactionData => Ok(Self::SorobanTransactionData(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SorobanTransactionDataExt => Ok(Self::SorobanTransactionDataExt( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::TransactionV0 => Ok(Self::TransactionV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionV0Ext => Ok(Self::TransactionV0Ext(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionV0Envelope => Ok(Self::TransactionV0Envelope(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Transaction => Ok(Self::Transaction(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionExt => Ok(Self::TransactionExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionV1Envelope => Ok(Self::TransactionV1Envelope(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::FeeBumpTransaction => Ok(Self::FeeBumpTransaction(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::FeeBumpTransactionInnerTx => Ok(Self::FeeBumpTransactionInnerTx( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::FeeBumpTransactionExt => Ok(Self::FeeBumpTransactionExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::FeeBumpTransactionEnvelope => Ok(Self::FeeBumpTransactionEnvelope( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::TransactionEnvelope => Ok(Self::TransactionEnvelope(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionSignaturePayload => Ok(Self::TransactionSignaturePayload( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::TransactionSignaturePayloadTaggedTransaction => { - Ok(Self::TransactionSignaturePayloadTaggedTransaction( - Box::new(serde::de::Deserialize::deserialize(r)?), - )) - } - TypeVariant::ClaimAtomType => Ok(Self::ClaimAtomType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClaimOfferAtomV0 => Ok(Self::ClaimOfferAtomV0(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClaimOfferAtom => Ok(Self::ClaimOfferAtom(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClaimLiquidityAtom => Ok(Self::ClaimLiquidityAtom(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClaimAtom => Ok(Self::ClaimAtom(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::CreateAccountResultCode => Ok(Self::CreateAccountResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::CreateAccountResult => Ok(Self::CreateAccountResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::PaymentResultCode => Ok(Self::PaymentResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::PaymentResult => Ok(Self::PaymentResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::PathPaymentStrictReceiveResultCode => { - Ok(Self::PathPaymentStrictReceiveResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::SimplePaymentResult => Ok(Self::SimplePaymentResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::PathPaymentStrictReceiveResult => { - Ok(Self::PathPaymentStrictReceiveResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::PathPaymentStrictReceiveResultSuccess => { - Ok(Self::PathPaymentStrictReceiveResultSuccess(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::PathPaymentStrictSendResultCode => { - Ok(Self::PathPaymentStrictSendResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::PathPaymentStrictSendResult => Ok(Self::PathPaymentStrictSendResult( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::PathPaymentStrictSendResultSuccess => { - Ok(Self::PathPaymentStrictSendResultSuccess(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::ManageSellOfferResultCode => Ok(Self::ManageSellOfferResultCode( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::ManageOfferEffect => Ok(Self::ManageOfferEffect(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ManageOfferSuccessResult => Ok(Self::ManageOfferSuccessResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ManageOfferSuccessResultOffer => Ok(Self::ManageOfferSuccessResultOffer( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::ManageSellOfferResult => Ok(Self::ManageSellOfferResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ManageBuyOfferResultCode => Ok(Self::ManageBuyOfferResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ManageBuyOfferResult => Ok(Self::ManageBuyOfferResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SetOptionsResultCode => Ok(Self::SetOptionsResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SetOptionsResult => Ok(Self::SetOptionsResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ChangeTrustResultCode => Ok(Self::ChangeTrustResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ChangeTrustResult => Ok(Self::ChangeTrustResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AllowTrustResultCode => Ok(Self::AllowTrustResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AllowTrustResult => Ok(Self::AllowTrustResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AccountMergeResultCode => Ok(Self::AccountMergeResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::AccountMergeResult => Ok(Self::AccountMergeResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::InflationResultCode => Ok(Self::InflationResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::InflationPayout => Ok(Self::InflationPayout(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::InflationResult => Ok(Self::InflationResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ManageDataResultCode => Ok(Self::ManageDataResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ManageDataResult => Ok(Self::ManageDataResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::BumpSequenceResultCode => Ok(Self::BumpSequenceResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::BumpSequenceResult => Ok(Self::BumpSequenceResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::CreateClaimableBalanceResultCode => { - Ok(Self::CreateClaimableBalanceResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::CreateClaimableBalanceResult => Ok(Self::CreateClaimableBalanceResult( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::ClaimClaimableBalanceResultCode => { - Ok(Self::ClaimClaimableBalanceResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::ClaimClaimableBalanceResult => Ok(Self::ClaimClaimableBalanceResult( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::BeginSponsoringFutureReservesResultCode => { - Ok(Self::BeginSponsoringFutureReservesResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::BeginSponsoringFutureReservesResult => { - Ok(Self::BeginSponsoringFutureReservesResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::EndSponsoringFutureReservesResultCode => { - Ok(Self::EndSponsoringFutureReservesResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::EndSponsoringFutureReservesResult => { - Ok(Self::EndSponsoringFutureReservesResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::RevokeSponsorshipResultCode => Ok(Self::RevokeSponsorshipResultCode( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::RevokeSponsorshipResult => Ok(Self::RevokeSponsorshipResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClawbackResultCode => Ok(Self::ClawbackResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClawbackResult => Ok(Self::ClawbackResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClawbackClaimableBalanceResultCode => { - Ok(Self::ClawbackClaimableBalanceResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::ClawbackClaimableBalanceResult => { - Ok(Self::ClawbackClaimableBalanceResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::SetTrustLineFlagsResultCode => Ok(Self::SetTrustLineFlagsResultCode( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::SetTrustLineFlagsResult => Ok(Self::SetTrustLineFlagsResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::LiquidityPoolDepositResultCode => { - Ok(Self::LiquidityPoolDepositResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::LiquidityPoolDepositResult => Ok(Self::LiquidityPoolDepositResult( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::LiquidityPoolWithdrawResultCode => { - Ok(Self::LiquidityPoolWithdrawResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))) - } - TypeVariant::LiquidityPoolWithdrawResult => Ok(Self::LiquidityPoolWithdrawResult( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::InvokeHostFunctionResultCode => Ok(Self::InvokeHostFunctionResultCode( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::InvokeHostFunctionResult => Ok(Self::InvokeHostFunctionResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ExtendFootprintTtlResultCode => Ok(Self::ExtendFootprintTtlResultCode( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::ExtendFootprintTtlResult => Ok(Self::ExtendFootprintTtlResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::RestoreFootprintResultCode => Ok(Self::RestoreFootprintResultCode( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::RestoreFootprintResult => Ok(Self::RestoreFootprintResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::OperationResultCode => Ok(Self::OperationResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::OperationResult => Ok(Self::OperationResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::OperationResultTr => Ok(Self::OperationResultTr(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionResultCode => Ok(Self::TransactionResultCode(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::InnerTransactionResult => Ok(Self::InnerTransactionResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::InnerTransactionResultResult => Ok(Self::InnerTransactionResultResult( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::InnerTransactionResultExt => Ok(Self::InnerTransactionResultExt( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::InnerTransactionResultPair => Ok(Self::InnerTransactionResultPair( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::TransactionResult => Ok(Self::TransactionResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionResultResult => Ok(Self::TransactionResultResult(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::TransactionResultExt => Ok(Self::TransactionResultExt(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Hash => Ok(Self::Hash(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::Uint256 => Ok(Self::Uint256(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Uint32 => Ok(Self::Uint32(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::Int32 => Ok(Self::Int32(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::Uint64 => Ok(Self::Uint64(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::Int64 => Ok(Self::Int64(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::TimePoint => Ok(Self::TimePoint(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Duration => Ok(Self::Duration(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ExtensionPoint => Ok(Self::ExtensionPoint(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::CryptoKeyType => Ok(Self::CryptoKeyType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::PublicKeyType => Ok(Self::PublicKeyType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SignerKeyType => Ok(Self::SignerKeyType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::PublicKey => Ok(Self::PublicKey(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SignerKey => Ok(Self::SignerKey(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SignerKeyEd25519SignedPayload => Ok(Self::SignerKeyEd25519SignedPayload( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::Signature => Ok(Self::Signature(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SignatureHint => Ok(Self::SignatureHint(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::NodeId => Ok(Self::NodeId(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::AccountId => Ok(Self::AccountId(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ContractId => Ok(Self::ContractId(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Curve25519Secret => Ok(Self::Curve25519Secret(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::Curve25519Public => Ok(Self::Curve25519Public(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::HmacSha256Key => Ok(Self::HmacSha256Key(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::HmacSha256Mac => Ok(Self::HmacSha256Mac(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ShortHashSeed => Ok(Self::ShortHashSeed(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::BinaryFuseFilterType => Ok(Self::BinaryFuseFilterType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::SerializedBinaryFuseFilter => Ok(Self::SerializedBinaryFuseFilter( - Box::new(serde::de::Deserialize::deserialize(r)?), - )), - TypeVariant::PoolId => Ok(Self::PoolId(Box::new(serde::de::Deserialize::deserialize( - r, - )?))), - TypeVariant::ClaimableBalanceIdType => Ok(Self::ClaimableBalanceIdType(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - TypeVariant::ClaimableBalanceId => Ok(Self::ClaimableBalanceId(Box::new( - serde::de::Deserialize::deserialize(r)?, - ))), - } - } - - #[cfg(feature = "arbitrary")] - #[allow(clippy::too_many_lines)] - pub fn arbitrary(v: TypeVariant, u: &mut arbitrary::Unstructured<'_>) -> Result { - match v { - TypeVariant::Value => Ok(Self::Value(Box::new(Value::arbitrary(u)?))), - TypeVariant::ScpBallot => Ok(Self::ScpBallot(Box::new(ScpBallot::arbitrary(u)?))), - TypeVariant::ScpStatementType => Ok(Self::ScpStatementType(Box::new( - ScpStatementType::arbitrary(u)?, - ))), - TypeVariant::ScpNomination => { - Ok(Self::ScpNomination(Box::new(ScpNomination::arbitrary(u)?))) - } - TypeVariant::ScpStatement => { - Ok(Self::ScpStatement(Box::new(ScpStatement::arbitrary(u)?))) - } - TypeVariant::ScpStatementPledges => Ok(Self::ScpStatementPledges(Box::new( - ScpStatementPledges::arbitrary(u)?, - ))), - TypeVariant::ScpStatementPrepare => Ok(Self::ScpStatementPrepare(Box::new( - ScpStatementPrepare::arbitrary(u)?, - ))), - TypeVariant::ScpStatementConfirm => Ok(Self::ScpStatementConfirm(Box::new( - ScpStatementConfirm::arbitrary(u)?, - ))), - TypeVariant::ScpStatementExternalize => Ok(Self::ScpStatementExternalize(Box::new( - ScpStatementExternalize::arbitrary(u)?, - ))), - TypeVariant::ScpEnvelope => Ok(Self::ScpEnvelope(Box::new(ScpEnvelope::arbitrary(u)?))), - TypeVariant::ScpQuorumSet => { - Ok(Self::ScpQuorumSet(Box::new(ScpQuorumSet::arbitrary(u)?))) - } - TypeVariant::EncodedLedgerKey => Ok(Self::EncodedLedgerKey(Box::new( - EncodedLedgerKey::arbitrary(u)?, - ))), - TypeVariant::ConfigSettingContractExecutionLanesV0 => { - Ok(Self::ConfigSettingContractExecutionLanesV0(Box::new( - ConfigSettingContractExecutionLanesV0::arbitrary(u)?, - ))) - } - TypeVariant::ConfigSettingContractComputeV0 => { - Ok(Self::ConfigSettingContractComputeV0(Box::new( - ConfigSettingContractComputeV0::arbitrary(u)?, - ))) - } - TypeVariant::ConfigSettingContractParallelComputeV0 => { - Ok(Self::ConfigSettingContractParallelComputeV0(Box::new( - ConfigSettingContractParallelComputeV0::arbitrary(u)?, - ))) - } - TypeVariant::ConfigSettingContractLedgerCostV0 => { - Ok(Self::ConfigSettingContractLedgerCostV0(Box::new( - ConfigSettingContractLedgerCostV0::arbitrary(u)?, - ))) - } - TypeVariant::ConfigSettingContractLedgerCostExtV0 => { - Ok(Self::ConfigSettingContractLedgerCostExtV0(Box::new( - ConfigSettingContractLedgerCostExtV0::arbitrary(u)?, - ))) - } - TypeVariant::ConfigSettingContractHistoricalDataV0 => { - Ok(Self::ConfigSettingContractHistoricalDataV0(Box::new( - ConfigSettingContractHistoricalDataV0::arbitrary(u)?, - ))) - } - TypeVariant::ConfigSettingContractEventsV0 => Ok(Self::ConfigSettingContractEventsV0( - Box::new(ConfigSettingContractEventsV0::arbitrary(u)?), - )), - TypeVariant::ConfigSettingContractBandwidthV0 => { - Ok(Self::ConfigSettingContractBandwidthV0(Box::new( - ConfigSettingContractBandwidthV0::arbitrary(u)?, - ))) - } - TypeVariant::ContractCostType => Ok(Self::ContractCostType(Box::new( - ContractCostType::arbitrary(u)?, - ))), - TypeVariant::ContractCostParamEntry => Ok(Self::ContractCostParamEntry(Box::new( - ContractCostParamEntry::arbitrary(u)?, - ))), - TypeVariant::StateArchivalSettings => Ok(Self::StateArchivalSettings(Box::new( - StateArchivalSettings::arbitrary(u)?, - ))), - TypeVariant::EvictionIterator => Ok(Self::EvictionIterator(Box::new( - EvictionIterator::arbitrary(u)?, - ))), - TypeVariant::ConfigSettingScpTiming => Ok(Self::ConfigSettingScpTiming(Box::new( - ConfigSettingScpTiming::arbitrary(u)?, - ))), - TypeVariant::FrozenLedgerKeys => Ok(Self::FrozenLedgerKeys(Box::new( - FrozenLedgerKeys::arbitrary(u)?, - ))), - TypeVariant::FrozenLedgerKeysDelta => Ok(Self::FrozenLedgerKeysDelta(Box::new( - FrozenLedgerKeysDelta::arbitrary(u)?, - ))), - TypeVariant::FreezeBypassTxs => Ok(Self::FreezeBypassTxs(Box::new( - FreezeBypassTxs::arbitrary(u)?, - ))), - TypeVariant::FreezeBypassTxsDelta => Ok(Self::FreezeBypassTxsDelta(Box::new( - FreezeBypassTxsDelta::arbitrary(u)?, - ))), - TypeVariant::ContractCostParams => Ok(Self::ContractCostParams(Box::new( - ContractCostParams::arbitrary(u)?, - ))), - TypeVariant::ConfigSettingId => Ok(Self::ConfigSettingId(Box::new( - ConfigSettingId::arbitrary(u)?, - ))), - TypeVariant::ConfigSettingEntry => Ok(Self::ConfigSettingEntry(Box::new( - ConfigSettingEntry::arbitrary(u)?, - ))), - TypeVariant::ScEnvMetaKind => { - Ok(Self::ScEnvMetaKind(Box::new(ScEnvMetaKind::arbitrary(u)?))) - } - TypeVariant::ScEnvMetaEntry => Ok(Self::ScEnvMetaEntry(Box::new( - ScEnvMetaEntry::arbitrary(u)?, - ))), - TypeVariant::ScEnvMetaEntryInterfaceVersion => { - Ok(Self::ScEnvMetaEntryInterfaceVersion(Box::new( - ScEnvMetaEntryInterfaceVersion::arbitrary(u)?, - ))) - } - TypeVariant::ScMetaV0 => Ok(Self::ScMetaV0(Box::new(ScMetaV0::arbitrary(u)?))), - TypeVariant::ScMetaKind => Ok(Self::ScMetaKind(Box::new(ScMetaKind::arbitrary(u)?))), - TypeVariant::ScMetaEntry => Ok(Self::ScMetaEntry(Box::new(ScMetaEntry::arbitrary(u)?))), - TypeVariant::ScSpecType => Ok(Self::ScSpecType(Box::new(ScSpecType::arbitrary(u)?))), - TypeVariant::ScSpecTypeOption => Ok(Self::ScSpecTypeOption(Box::new( - ScSpecTypeOption::arbitrary(u)?, - ))), - TypeVariant::ScSpecTypeResult => Ok(Self::ScSpecTypeResult(Box::new( - ScSpecTypeResult::arbitrary(u)?, - ))), - TypeVariant::ScSpecTypeVec => { - Ok(Self::ScSpecTypeVec(Box::new(ScSpecTypeVec::arbitrary(u)?))) - } - TypeVariant::ScSpecTypeMap => { - Ok(Self::ScSpecTypeMap(Box::new(ScSpecTypeMap::arbitrary(u)?))) - } - TypeVariant::ScSpecTypeTuple => Ok(Self::ScSpecTypeTuple(Box::new( - ScSpecTypeTuple::arbitrary(u)?, - ))), - TypeVariant::ScSpecTypeBytesN => Ok(Self::ScSpecTypeBytesN(Box::new( - ScSpecTypeBytesN::arbitrary(u)?, - ))), - TypeVariant::ScSpecTypeUdt => { - Ok(Self::ScSpecTypeUdt(Box::new(ScSpecTypeUdt::arbitrary(u)?))) - } - TypeVariant::ScSpecTypeDef => { - Ok(Self::ScSpecTypeDef(Box::new(ScSpecTypeDef::arbitrary(u)?))) - } - TypeVariant::ScSpecUdtStructFieldV0 => Ok(Self::ScSpecUdtStructFieldV0(Box::new( - ScSpecUdtStructFieldV0::arbitrary(u)?, - ))), - TypeVariant::ScSpecUdtStructV0 => Ok(Self::ScSpecUdtStructV0(Box::new( - ScSpecUdtStructV0::arbitrary(u)?, - ))), - TypeVariant::ScSpecUdtUnionCaseVoidV0 => Ok(Self::ScSpecUdtUnionCaseVoidV0(Box::new( - ScSpecUdtUnionCaseVoidV0::arbitrary(u)?, - ))), - TypeVariant::ScSpecUdtUnionCaseTupleV0 => Ok(Self::ScSpecUdtUnionCaseTupleV0( - Box::new(ScSpecUdtUnionCaseTupleV0::arbitrary(u)?), - )), - TypeVariant::ScSpecUdtUnionCaseV0Kind => Ok(Self::ScSpecUdtUnionCaseV0Kind(Box::new( - ScSpecUdtUnionCaseV0Kind::arbitrary(u)?, - ))), - TypeVariant::ScSpecUdtUnionCaseV0 => Ok(Self::ScSpecUdtUnionCaseV0(Box::new( - ScSpecUdtUnionCaseV0::arbitrary(u)?, - ))), - TypeVariant::ScSpecUdtUnionV0 => Ok(Self::ScSpecUdtUnionV0(Box::new( - ScSpecUdtUnionV0::arbitrary(u)?, - ))), - TypeVariant::ScSpecUdtEnumCaseV0 => Ok(Self::ScSpecUdtEnumCaseV0(Box::new( - ScSpecUdtEnumCaseV0::arbitrary(u)?, - ))), - TypeVariant::ScSpecUdtEnumV0 => Ok(Self::ScSpecUdtEnumV0(Box::new( - ScSpecUdtEnumV0::arbitrary(u)?, - ))), - TypeVariant::ScSpecUdtErrorEnumCaseV0 => Ok(Self::ScSpecUdtErrorEnumCaseV0(Box::new( - ScSpecUdtErrorEnumCaseV0::arbitrary(u)?, - ))), - TypeVariant::ScSpecUdtErrorEnumV0 => Ok(Self::ScSpecUdtErrorEnumV0(Box::new( - ScSpecUdtErrorEnumV0::arbitrary(u)?, - ))), - TypeVariant::ScSpecFunctionInputV0 => Ok(Self::ScSpecFunctionInputV0(Box::new( - ScSpecFunctionInputV0::arbitrary(u)?, - ))), - TypeVariant::ScSpecFunctionV0 => Ok(Self::ScSpecFunctionV0(Box::new( - ScSpecFunctionV0::arbitrary(u)?, - ))), - TypeVariant::ScSpecEventParamLocationV0 => Ok(Self::ScSpecEventParamLocationV0( - Box::new(ScSpecEventParamLocationV0::arbitrary(u)?), - )), - TypeVariant::ScSpecEventParamV0 => Ok(Self::ScSpecEventParamV0(Box::new( - ScSpecEventParamV0::arbitrary(u)?, - ))), - TypeVariant::ScSpecEventDataFormat => Ok(Self::ScSpecEventDataFormat(Box::new( - ScSpecEventDataFormat::arbitrary(u)?, - ))), - TypeVariant::ScSpecEventV0 => { - Ok(Self::ScSpecEventV0(Box::new(ScSpecEventV0::arbitrary(u)?))) - } - TypeVariant::ScSpecEntryKind => Ok(Self::ScSpecEntryKind(Box::new( - ScSpecEntryKind::arbitrary(u)?, - ))), - TypeVariant::ScSpecEntry => Ok(Self::ScSpecEntry(Box::new(ScSpecEntry::arbitrary(u)?))), - TypeVariant::ScValType => Ok(Self::ScValType(Box::new(ScValType::arbitrary(u)?))), - TypeVariant::ScErrorType => Ok(Self::ScErrorType(Box::new(ScErrorType::arbitrary(u)?))), - TypeVariant::ScErrorCode => Ok(Self::ScErrorCode(Box::new(ScErrorCode::arbitrary(u)?))), - TypeVariant::ScError => Ok(Self::ScError(Box::new(ScError::arbitrary(u)?))), - TypeVariant::UInt128Parts => { - Ok(Self::UInt128Parts(Box::new(UInt128Parts::arbitrary(u)?))) - } - TypeVariant::Int128Parts => Ok(Self::Int128Parts(Box::new(Int128Parts::arbitrary(u)?))), - TypeVariant::UInt256Parts => { - Ok(Self::UInt256Parts(Box::new(UInt256Parts::arbitrary(u)?))) - } - TypeVariant::Int256Parts => Ok(Self::Int256Parts(Box::new(Int256Parts::arbitrary(u)?))), - TypeVariant::ContractExecutableType => Ok(Self::ContractExecutableType(Box::new( - ContractExecutableType::arbitrary(u)?, - ))), - TypeVariant::ContractExecutable => Ok(Self::ContractExecutable(Box::new( - ContractExecutable::arbitrary(u)?, - ))), - TypeVariant::ScAddressType => { - Ok(Self::ScAddressType(Box::new(ScAddressType::arbitrary(u)?))) - } - TypeVariant::MuxedEd25519Account => Ok(Self::MuxedEd25519Account(Box::new( - MuxedEd25519Account::arbitrary(u)?, - ))), - TypeVariant::ScAddress => Ok(Self::ScAddress(Box::new(ScAddress::arbitrary(u)?))), - TypeVariant::ScVec => Ok(Self::ScVec(Box::new(ScVec::arbitrary(u)?))), - TypeVariant::ScMap => Ok(Self::ScMap(Box::new(ScMap::arbitrary(u)?))), - TypeVariant::ScBytes => Ok(Self::ScBytes(Box::new(ScBytes::arbitrary(u)?))), - TypeVariant::ScString => Ok(Self::ScString(Box::new(ScString::arbitrary(u)?))), - TypeVariant::ScSymbol => Ok(Self::ScSymbol(Box::new(ScSymbol::arbitrary(u)?))), - TypeVariant::ScNonceKey => Ok(Self::ScNonceKey(Box::new(ScNonceKey::arbitrary(u)?))), - TypeVariant::ScContractInstance => Ok(Self::ScContractInstance(Box::new( - ScContractInstance::arbitrary(u)?, - ))), - TypeVariant::ScVal => Ok(Self::ScVal(Box::new(ScVal::arbitrary(u)?))), - TypeVariant::ScMapEntry => Ok(Self::ScMapEntry(Box::new(ScMapEntry::arbitrary(u)?))), - TypeVariant::LedgerCloseMetaBatch => Ok(Self::LedgerCloseMetaBatch(Box::new( - LedgerCloseMetaBatch::arbitrary(u)?, - ))), - TypeVariant::StoredTransactionSet => Ok(Self::StoredTransactionSet(Box::new( - StoredTransactionSet::arbitrary(u)?, - ))), - TypeVariant::StoredDebugTransactionSet => Ok(Self::StoredDebugTransactionSet( - Box::new(StoredDebugTransactionSet::arbitrary(u)?), - )), - TypeVariant::PersistedScpStateV0 => Ok(Self::PersistedScpStateV0(Box::new( - PersistedScpStateV0::arbitrary(u)?, - ))), - TypeVariant::PersistedScpStateV1 => Ok(Self::PersistedScpStateV1(Box::new( - PersistedScpStateV1::arbitrary(u)?, - ))), - TypeVariant::PersistedScpState => Ok(Self::PersistedScpState(Box::new( - PersistedScpState::arbitrary(u)?, - ))), - TypeVariant::Thresholds => Ok(Self::Thresholds(Box::new(Thresholds::arbitrary(u)?))), - TypeVariant::String32 => Ok(Self::String32(Box::new(String32::arbitrary(u)?))), - TypeVariant::String64 => Ok(Self::String64(Box::new(String64::arbitrary(u)?))), - TypeVariant::SequenceNumber => Ok(Self::SequenceNumber(Box::new( - SequenceNumber::arbitrary(u)?, - ))), - TypeVariant::DataValue => Ok(Self::DataValue(Box::new(DataValue::arbitrary(u)?))), - TypeVariant::AssetCode4 => Ok(Self::AssetCode4(Box::new(AssetCode4::arbitrary(u)?))), - TypeVariant::AssetCode12 => Ok(Self::AssetCode12(Box::new(AssetCode12::arbitrary(u)?))), - TypeVariant::AssetType => Ok(Self::AssetType(Box::new(AssetType::arbitrary(u)?))), - TypeVariant::AssetCode => Ok(Self::AssetCode(Box::new(AssetCode::arbitrary(u)?))), - TypeVariant::AlphaNum4 => Ok(Self::AlphaNum4(Box::new(AlphaNum4::arbitrary(u)?))), - TypeVariant::AlphaNum12 => Ok(Self::AlphaNum12(Box::new(AlphaNum12::arbitrary(u)?))), - TypeVariant::Asset => Ok(Self::Asset(Box::new(Asset::arbitrary(u)?))), - TypeVariant::Price => Ok(Self::Price(Box::new(Price::arbitrary(u)?))), - TypeVariant::Liabilities => Ok(Self::Liabilities(Box::new(Liabilities::arbitrary(u)?))), - TypeVariant::ThresholdIndexes => Ok(Self::ThresholdIndexes(Box::new( - ThresholdIndexes::arbitrary(u)?, - ))), - TypeVariant::LedgerEntryType => Ok(Self::LedgerEntryType(Box::new( - LedgerEntryType::arbitrary(u)?, - ))), - TypeVariant::Signer => Ok(Self::Signer(Box::new(Signer::arbitrary(u)?))), - TypeVariant::AccountFlags => { - Ok(Self::AccountFlags(Box::new(AccountFlags::arbitrary(u)?))) - } - TypeVariant::SponsorshipDescriptor => Ok(Self::SponsorshipDescriptor(Box::new( - SponsorshipDescriptor::arbitrary(u)?, - ))), - TypeVariant::AccountEntryExtensionV3 => Ok(Self::AccountEntryExtensionV3(Box::new( - AccountEntryExtensionV3::arbitrary(u)?, - ))), - TypeVariant::AccountEntryExtensionV2 => Ok(Self::AccountEntryExtensionV2(Box::new( - AccountEntryExtensionV2::arbitrary(u)?, - ))), - TypeVariant::AccountEntryExtensionV2Ext => Ok(Self::AccountEntryExtensionV2Ext( - Box::new(AccountEntryExtensionV2Ext::arbitrary(u)?), - )), - TypeVariant::AccountEntryExtensionV1 => Ok(Self::AccountEntryExtensionV1(Box::new( - AccountEntryExtensionV1::arbitrary(u)?, - ))), - TypeVariant::AccountEntryExtensionV1Ext => Ok(Self::AccountEntryExtensionV1Ext( - Box::new(AccountEntryExtensionV1Ext::arbitrary(u)?), - )), - TypeVariant::AccountEntry => { - Ok(Self::AccountEntry(Box::new(AccountEntry::arbitrary(u)?))) - } - TypeVariant::AccountEntryExt => Ok(Self::AccountEntryExt(Box::new( - AccountEntryExt::arbitrary(u)?, - ))), - TypeVariant::TrustLineFlags => Ok(Self::TrustLineFlags(Box::new( - TrustLineFlags::arbitrary(u)?, - ))), - TypeVariant::LiquidityPoolType => Ok(Self::LiquidityPoolType(Box::new( - LiquidityPoolType::arbitrary(u)?, - ))), - TypeVariant::TrustLineAsset => Ok(Self::TrustLineAsset(Box::new( - TrustLineAsset::arbitrary(u)?, - ))), - TypeVariant::TrustLineEntryExtensionV2 => Ok(Self::TrustLineEntryExtensionV2( - Box::new(TrustLineEntryExtensionV2::arbitrary(u)?), - )), - TypeVariant::TrustLineEntryExtensionV2Ext => Ok(Self::TrustLineEntryExtensionV2Ext( - Box::new(TrustLineEntryExtensionV2Ext::arbitrary(u)?), - )), - TypeVariant::TrustLineEntry => Ok(Self::TrustLineEntry(Box::new( - TrustLineEntry::arbitrary(u)?, - ))), - TypeVariant::TrustLineEntryExt => Ok(Self::TrustLineEntryExt(Box::new( - TrustLineEntryExt::arbitrary(u)?, - ))), - TypeVariant::TrustLineEntryV1 => Ok(Self::TrustLineEntryV1(Box::new( - TrustLineEntryV1::arbitrary(u)?, - ))), - TypeVariant::TrustLineEntryV1Ext => Ok(Self::TrustLineEntryV1Ext(Box::new( - TrustLineEntryV1Ext::arbitrary(u)?, - ))), - TypeVariant::OfferEntryFlags => Ok(Self::OfferEntryFlags(Box::new( - OfferEntryFlags::arbitrary(u)?, - ))), - TypeVariant::OfferEntry => Ok(Self::OfferEntry(Box::new(OfferEntry::arbitrary(u)?))), - TypeVariant::OfferEntryExt => { - Ok(Self::OfferEntryExt(Box::new(OfferEntryExt::arbitrary(u)?))) - } - TypeVariant::DataEntry => Ok(Self::DataEntry(Box::new(DataEntry::arbitrary(u)?))), - TypeVariant::DataEntryExt => { - Ok(Self::DataEntryExt(Box::new(DataEntryExt::arbitrary(u)?))) - } - TypeVariant::ClaimPredicateType => Ok(Self::ClaimPredicateType(Box::new( - ClaimPredicateType::arbitrary(u)?, - ))), - TypeVariant::ClaimPredicate => Ok(Self::ClaimPredicate(Box::new( - ClaimPredicate::arbitrary(u)?, - ))), - TypeVariant::ClaimantType => { - Ok(Self::ClaimantType(Box::new(ClaimantType::arbitrary(u)?))) - } - TypeVariant::Claimant => Ok(Self::Claimant(Box::new(Claimant::arbitrary(u)?))), - TypeVariant::ClaimantV0 => Ok(Self::ClaimantV0(Box::new(ClaimantV0::arbitrary(u)?))), - TypeVariant::ClaimableBalanceFlags => Ok(Self::ClaimableBalanceFlags(Box::new( - ClaimableBalanceFlags::arbitrary(u)?, - ))), - TypeVariant::ClaimableBalanceEntryExtensionV1 => { - Ok(Self::ClaimableBalanceEntryExtensionV1(Box::new( - ClaimableBalanceEntryExtensionV1::arbitrary(u)?, - ))) - } - TypeVariant::ClaimableBalanceEntryExtensionV1Ext => { - Ok(Self::ClaimableBalanceEntryExtensionV1Ext(Box::new( - ClaimableBalanceEntryExtensionV1Ext::arbitrary(u)?, - ))) - } - TypeVariant::ClaimableBalanceEntry => Ok(Self::ClaimableBalanceEntry(Box::new( - ClaimableBalanceEntry::arbitrary(u)?, - ))), - TypeVariant::ClaimableBalanceEntryExt => Ok(Self::ClaimableBalanceEntryExt(Box::new( - ClaimableBalanceEntryExt::arbitrary(u)?, - ))), - TypeVariant::LiquidityPoolConstantProductParameters => { - Ok(Self::LiquidityPoolConstantProductParameters(Box::new( - LiquidityPoolConstantProductParameters::arbitrary(u)?, - ))) - } - TypeVariant::LiquidityPoolEntry => Ok(Self::LiquidityPoolEntry(Box::new( - LiquidityPoolEntry::arbitrary(u)?, - ))), - TypeVariant::LiquidityPoolEntryBody => Ok(Self::LiquidityPoolEntryBody(Box::new( - LiquidityPoolEntryBody::arbitrary(u)?, - ))), - TypeVariant::LiquidityPoolEntryConstantProduct => { - Ok(Self::LiquidityPoolEntryConstantProduct(Box::new( - LiquidityPoolEntryConstantProduct::arbitrary(u)?, - ))) - } - TypeVariant::ContractDataDurability => Ok(Self::ContractDataDurability(Box::new( - ContractDataDurability::arbitrary(u)?, - ))), - TypeVariant::ContractDataEntry => Ok(Self::ContractDataEntry(Box::new( - ContractDataEntry::arbitrary(u)?, - ))), - TypeVariant::ContractCodeCostInputs => Ok(Self::ContractCodeCostInputs(Box::new( - ContractCodeCostInputs::arbitrary(u)?, - ))), - TypeVariant::ContractCodeEntry => Ok(Self::ContractCodeEntry(Box::new( - ContractCodeEntry::arbitrary(u)?, - ))), - TypeVariant::ContractCodeEntryExt => Ok(Self::ContractCodeEntryExt(Box::new( - ContractCodeEntryExt::arbitrary(u)?, - ))), - TypeVariant::ContractCodeEntryV1 => Ok(Self::ContractCodeEntryV1(Box::new( - ContractCodeEntryV1::arbitrary(u)?, - ))), - TypeVariant::TtlEntry => Ok(Self::TtlEntry(Box::new(TtlEntry::arbitrary(u)?))), - TypeVariant::LedgerEntryExtensionV1 => Ok(Self::LedgerEntryExtensionV1(Box::new( - LedgerEntryExtensionV1::arbitrary(u)?, - ))), - TypeVariant::LedgerEntryExtensionV1Ext => Ok(Self::LedgerEntryExtensionV1Ext( - Box::new(LedgerEntryExtensionV1Ext::arbitrary(u)?), - )), - TypeVariant::LedgerEntry => Ok(Self::LedgerEntry(Box::new(LedgerEntry::arbitrary(u)?))), - TypeVariant::LedgerEntryData => Ok(Self::LedgerEntryData(Box::new( - LedgerEntryData::arbitrary(u)?, - ))), - TypeVariant::LedgerEntryExt => Ok(Self::LedgerEntryExt(Box::new( - LedgerEntryExt::arbitrary(u)?, - ))), - TypeVariant::LedgerKey => Ok(Self::LedgerKey(Box::new(LedgerKey::arbitrary(u)?))), - TypeVariant::LedgerKeyAccount => Ok(Self::LedgerKeyAccount(Box::new( - LedgerKeyAccount::arbitrary(u)?, - ))), - TypeVariant::LedgerKeyTrustLine => Ok(Self::LedgerKeyTrustLine(Box::new( - LedgerKeyTrustLine::arbitrary(u)?, - ))), - TypeVariant::LedgerKeyOffer => Ok(Self::LedgerKeyOffer(Box::new( - LedgerKeyOffer::arbitrary(u)?, - ))), - TypeVariant::LedgerKeyData => { - Ok(Self::LedgerKeyData(Box::new(LedgerKeyData::arbitrary(u)?))) - } - TypeVariant::LedgerKeyClaimableBalance => Ok(Self::LedgerKeyClaimableBalance( - Box::new(LedgerKeyClaimableBalance::arbitrary(u)?), - )), - TypeVariant::LedgerKeyLiquidityPool => Ok(Self::LedgerKeyLiquidityPool(Box::new( - LedgerKeyLiquidityPool::arbitrary(u)?, - ))), - TypeVariant::LedgerKeyContractData => Ok(Self::LedgerKeyContractData(Box::new( - LedgerKeyContractData::arbitrary(u)?, - ))), - TypeVariant::LedgerKeyContractCode => Ok(Self::LedgerKeyContractCode(Box::new( - LedgerKeyContractCode::arbitrary(u)?, - ))), - TypeVariant::LedgerKeyConfigSetting => Ok(Self::LedgerKeyConfigSetting(Box::new( - LedgerKeyConfigSetting::arbitrary(u)?, - ))), - TypeVariant::LedgerKeyTtl => { - Ok(Self::LedgerKeyTtl(Box::new(LedgerKeyTtl::arbitrary(u)?))) - } - TypeVariant::EnvelopeType => { - Ok(Self::EnvelopeType(Box::new(EnvelopeType::arbitrary(u)?))) - } - TypeVariant::BucketListType => Ok(Self::BucketListType(Box::new( - BucketListType::arbitrary(u)?, - ))), - TypeVariant::BucketEntryType => Ok(Self::BucketEntryType(Box::new( - BucketEntryType::arbitrary(u)?, - ))), - TypeVariant::HotArchiveBucketEntryType => Ok(Self::HotArchiveBucketEntryType( - Box::new(HotArchiveBucketEntryType::arbitrary(u)?), - )), - TypeVariant::BucketMetadata => Ok(Self::BucketMetadata(Box::new( - BucketMetadata::arbitrary(u)?, - ))), - TypeVariant::BucketMetadataExt => Ok(Self::BucketMetadataExt(Box::new( - BucketMetadataExt::arbitrary(u)?, - ))), - TypeVariant::BucketEntry => Ok(Self::BucketEntry(Box::new(BucketEntry::arbitrary(u)?))), - TypeVariant::HotArchiveBucketEntry => Ok(Self::HotArchiveBucketEntry(Box::new( - HotArchiveBucketEntry::arbitrary(u)?, - ))), - TypeVariant::UpgradeType => Ok(Self::UpgradeType(Box::new(UpgradeType::arbitrary(u)?))), - TypeVariant::StellarValueType => Ok(Self::StellarValueType(Box::new( - StellarValueType::arbitrary(u)?, - ))), - TypeVariant::LedgerCloseValueSignature => Ok(Self::LedgerCloseValueSignature( - Box::new(LedgerCloseValueSignature::arbitrary(u)?), - )), - TypeVariant::StellarValue => { - Ok(Self::StellarValue(Box::new(StellarValue::arbitrary(u)?))) - } - TypeVariant::StellarValueExt => Ok(Self::StellarValueExt(Box::new( - StellarValueExt::arbitrary(u)?, - ))), - TypeVariant::LedgerHeaderFlags => Ok(Self::LedgerHeaderFlags(Box::new( - LedgerHeaderFlags::arbitrary(u)?, - ))), - TypeVariant::LedgerHeaderExtensionV1 => Ok(Self::LedgerHeaderExtensionV1(Box::new( - LedgerHeaderExtensionV1::arbitrary(u)?, - ))), - TypeVariant::LedgerHeaderExtensionV1Ext => Ok(Self::LedgerHeaderExtensionV1Ext( - Box::new(LedgerHeaderExtensionV1Ext::arbitrary(u)?), - )), - TypeVariant::LedgerHeader => { - Ok(Self::LedgerHeader(Box::new(LedgerHeader::arbitrary(u)?))) - } - TypeVariant::LedgerHeaderExt => Ok(Self::LedgerHeaderExt(Box::new( - LedgerHeaderExt::arbitrary(u)?, - ))), - TypeVariant::LedgerUpgradeType => Ok(Self::LedgerUpgradeType(Box::new( - LedgerUpgradeType::arbitrary(u)?, - ))), - TypeVariant::ConfigUpgradeSetKey => Ok(Self::ConfigUpgradeSetKey(Box::new( - ConfigUpgradeSetKey::arbitrary(u)?, - ))), - TypeVariant::LedgerUpgrade => { - Ok(Self::LedgerUpgrade(Box::new(LedgerUpgrade::arbitrary(u)?))) - } - TypeVariant::ConfigUpgradeSet => Ok(Self::ConfigUpgradeSet(Box::new( - ConfigUpgradeSet::arbitrary(u)?, - ))), - TypeVariant::TxSetComponentType => Ok(Self::TxSetComponentType(Box::new( - TxSetComponentType::arbitrary(u)?, - ))), - TypeVariant::DependentTxCluster => Ok(Self::DependentTxCluster(Box::new( - DependentTxCluster::arbitrary(u)?, - ))), - TypeVariant::ParallelTxExecutionStage => Ok(Self::ParallelTxExecutionStage(Box::new( - ParallelTxExecutionStage::arbitrary(u)?, - ))), - TypeVariant::ParallelTxsComponent => Ok(Self::ParallelTxsComponent(Box::new( - ParallelTxsComponent::arbitrary(u)?, - ))), - TypeVariant::TxSetComponent => Ok(Self::TxSetComponent(Box::new( - TxSetComponent::arbitrary(u)?, - ))), - TypeVariant::TxSetComponentTxsMaybeDiscountedFee => { - Ok(Self::TxSetComponentTxsMaybeDiscountedFee(Box::new( - TxSetComponentTxsMaybeDiscountedFee::arbitrary(u)?, - ))) - } - TypeVariant::TransactionPhase => Ok(Self::TransactionPhase(Box::new( - TransactionPhase::arbitrary(u)?, - ))), - TypeVariant::TransactionSet => Ok(Self::TransactionSet(Box::new( - TransactionSet::arbitrary(u)?, - ))), - TypeVariant::TransactionSetV1 => Ok(Self::TransactionSetV1(Box::new( - TransactionSetV1::arbitrary(u)?, - ))), - TypeVariant::GeneralizedTransactionSet => Ok(Self::GeneralizedTransactionSet( - Box::new(GeneralizedTransactionSet::arbitrary(u)?), - )), - TypeVariant::TransactionResultPair => Ok(Self::TransactionResultPair(Box::new( - TransactionResultPair::arbitrary(u)?, - ))), - TypeVariant::TransactionResultSet => Ok(Self::TransactionResultSet(Box::new( - TransactionResultSet::arbitrary(u)?, - ))), - TypeVariant::TransactionHistoryEntry => Ok(Self::TransactionHistoryEntry(Box::new( - TransactionHistoryEntry::arbitrary(u)?, - ))), - TypeVariant::TransactionHistoryEntryExt => Ok(Self::TransactionHistoryEntryExt( - Box::new(TransactionHistoryEntryExt::arbitrary(u)?), - )), - TypeVariant::TransactionHistoryResultEntry => Ok(Self::TransactionHistoryResultEntry( - Box::new(TransactionHistoryResultEntry::arbitrary(u)?), - )), - TypeVariant::TransactionHistoryResultEntryExt => { - Ok(Self::TransactionHistoryResultEntryExt(Box::new( - TransactionHistoryResultEntryExt::arbitrary(u)?, - ))) - } - TypeVariant::LedgerHeaderHistoryEntry => Ok(Self::LedgerHeaderHistoryEntry(Box::new( - LedgerHeaderHistoryEntry::arbitrary(u)?, - ))), - TypeVariant::LedgerHeaderHistoryEntryExt => Ok(Self::LedgerHeaderHistoryEntryExt( - Box::new(LedgerHeaderHistoryEntryExt::arbitrary(u)?), - )), - TypeVariant::LedgerScpMessages => Ok(Self::LedgerScpMessages(Box::new( - LedgerScpMessages::arbitrary(u)?, - ))), - TypeVariant::ScpHistoryEntryV0 => Ok(Self::ScpHistoryEntryV0(Box::new( - ScpHistoryEntryV0::arbitrary(u)?, - ))), - TypeVariant::ScpHistoryEntry => Ok(Self::ScpHistoryEntry(Box::new( - ScpHistoryEntry::arbitrary(u)?, - ))), - TypeVariant::LedgerEntryChangeType => Ok(Self::LedgerEntryChangeType(Box::new( - LedgerEntryChangeType::arbitrary(u)?, - ))), - TypeVariant::LedgerEntryChange => Ok(Self::LedgerEntryChange(Box::new( - LedgerEntryChange::arbitrary(u)?, - ))), - TypeVariant::LedgerEntryChanges => Ok(Self::LedgerEntryChanges(Box::new( - LedgerEntryChanges::arbitrary(u)?, - ))), - TypeVariant::OperationMeta => { - Ok(Self::OperationMeta(Box::new(OperationMeta::arbitrary(u)?))) - } - TypeVariant::TransactionMetaV1 => Ok(Self::TransactionMetaV1(Box::new( - TransactionMetaV1::arbitrary(u)?, - ))), - TypeVariant::TransactionMetaV2 => Ok(Self::TransactionMetaV2(Box::new( - TransactionMetaV2::arbitrary(u)?, - ))), - TypeVariant::ContractEventType => Ok(Self::ContractEventType(Box::new( - ContractEventType::arbitrary(u)?, - ))), - TypeVariant::ContractEvent => { - Ok(Self::ContractEvent(Box::new(ContractEvent::arbitrary(u)?))) - } - TypeVariant::ContractEventBody => Ok(Self::ContractEventBody(Box::new( - ContractEventBody::arbitrary(u)?, - ))), - TypeVariant::ContractEventV0 => Ok(Self::ContractEventV0(Box::new( - ContractEventV0::arbitrary(u)?, - ))), - TypeVariant::DiagnosticEvent => Ok(Self::DiagnosticEvent(Box::new( - DiagnosticEvent::arbitrary(u)?, - ))), - TypeVariant::SorobanTransactionMetaExtV1 => Ok(Self::SorobanTransactionMetaExtV1( - Box::new(SorobanTransactionMetaExtV1::arbitrary(u)?), - )), - TypeVariant::SorobanTransactionMetaExt => Ok(Self::SorobanTransactionMetaExt( - Box::new(SorobanTransactionMetaExt::arbitrary(u)?), - )), - TypeVariant::SorobanTransactionMeta => Ok(Self::SorobanTransactionMeta(Box::new( - SorobanTransactionMeta::arbitrary(u)?, - ))), - TypeVariant::TransactionMetaV3 => Ok(Self::TransactionMetaV3(Box::new( - TransactionMetaV3::arbitrary(u)?, - ))), - TypeVariant::OperationMetaV2 => Ok(Self::OperationMetaV2(Box::new( - OperationMetaV2::arbitrary(u)?, - ))), - TypeVariant::SorobanTransactionMetaV2 => Ok(Self::SorobanTransactionMetaV2(Box::new( - SorobanTransactionMetaV2::arbitrary(u)?, - ))), - TypeVariant::TransactionEventStage => Ok(Self::TransactionEventStage(Box::new( - TransactionEventStage::arbitrary(u)?, - ))), - TypeVariant::TransactionEvent => Ok(Self::TransactionEvent(Box::new( - TransactionEvent::arbitrary(u)?, - ))), - TypeVariant::TransactionMetaV4 => Ok(Self::TransactionMetaV4(Box::new( - TransactionMetaV4::arbitrary(u)?, - ))), - TypeVariant::InvokeHostFunctionSuccessPreImage => { - Ok(Self::InvokeHostFunctionSuccessPreImage(Box::new( - InvokeHostFunctionSuccessPreImage::arbitrary(u)?, - ))) - } - TypeVariant::TransactionMeta => Ok(Self::TransactionMeta(Box::new( - TransactionMeta::arbitrary(u)?, - ))), - TypeVariant::TransactionResultMeta => Ok(Self::TransactionResultMeta(Box::new( - TransactionResultMeta::arbitrary(u)?, - ))), - TypeVariant::TransactionResultMetaV1 => Ok(Self::TransactionResultMetaV1(Box::new( - TransactionResultMetaV1::arbitrary(u)?, - ))), - TypeVariant::UpgradeEntryMeta => Ok(Self::UpgradeEntryMeta(Box::new( - UpgradeEntryMeta::arbitrary(u)?, - ))), - TypeVariant::LedgerCloseMetaV0 => Ok(Self::LedgerCloseMetaV0(Box::new( - LedgerCloseMetaV0::arbitrary(u)?, - ))), - TypeVariant::LedgerCloseMetaExtV1 => Ok(Self::LedgerCloseMetaExtV1(Box::new( - LedgerCloseMetaExtV1::arbitrary(u)?, - ))), - TypeVariant::LedgerCloseMetaExt => Ok(Self::LedgerCloseMetaExt(Box::new( - LedgerCloseMetaExt::arbitrary(u)?, - ))), - TypeVariant::LedgerCloseMetaV1 => Ok(Self::LedgerCloseMetaV1(Box::new( - LedgerCloseMetaV1::arbitrary(u)?, - ))), - TypeVariant::LedgerCloseMetaV2 => Ok(Self::LedgerCloseMetaV2(Box::new( - LedgerCloseMetaV2::arbitrary(u)?, - ))), - TypeVariant::LedgerCloseMeta => Ok(Self::LedgerCloseMeta(Box::new( - LedgerCloseMeta::arbitrary(u)?, - ))), - TypeVariant::ErrorCode => Ok(Self::ErrorCode(Box::new(ErrorCode::arbitrary(u)?))), - TypeVariant::SError => Ok(Self::SError(Box::new(SError::arbitrary(u)?))), - TypeVariant::SendMore => Ok(Self::SendMore(Box::new(SendMore::arbitrary(u)?))), - TypeVariant::SendMoreExtended => Ok(Self::SendMoreExtended(Box::new( - SendMoreExtended::arbitrary(u)?, - ))), - TypeVariant::AuthCert => Ok(Self::AuthCert(Box::new(AuthCert::arbitrary(u)?))), - TypeVariant::Hello => Ok(Self::Hello(Box::new(Hello::arbitrary(u)?))), - TypeVariant::Auth => Ok(Self::Auth(Box::new(Auth::arbitrary(u)?))), - TypeVariant::IpAddrType => Ok(Self::IpAddrType(Box::new(IpAddrType::arbitrary(u)?))), - TypeVariant::PeerAddress => Ok(Self::PeerAddress(Box::new(PeerAddress::arbitrary(u)?))), - TypeVariant::PeerAddressIp => { - Ok(Self::PeerAddressIp(Box::new(PeerAddressIp::arbitrary(u)?))) - } - TypeVariant::MessageType => Ok(Self::MessageType(Box::new(MessageType::arbitrary(u)?))), - TypeVariant::DontHave => Ok(Self::DontHave(Box::new(DontHave::arbitrary(u)?))), - TypeVariant::SurveyMessageCommandType => Ok(Self::SurveyMessageCommandType(Box::new( - SurveyMessageCommandType::arbitrary(u)?, - ))), - TypeVariant::SurveyMessageResponseType => Ok(Self::SurveyMessageResponseType( - Box::new(SurveyMessageResponseType::arbitrary(u)?), - )), - TypeVariant::TimeSlicedSurveyStartCollectingMessage => { - Ok(Self::TimeSlicedSurveyStartCollectingMessage(Box::new( - TimeSlicedSurveyStartCollectingMessage::arbitrary(u)?, - ))) - } - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage => { - Ok(Self::SignedTimeSlicedSurveyStartCollectingMessage( - Box::new(SignedTimeSlicedSurveyStartCollectingMessage::arbitrary(u)?), - )) - } - TypeVariant::TimeSlicedSurveyStopCollectingMessage => { - Ok(Self::TimeSlicedSurveyStopCollectingMessage(Box::new( - TimeSlicedSurveyStopCollectingMessage::arbitrary(u)?, - ))) - } - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage => { - Ok(Self::SignedTimeSlicedSurveyStopCollectingMessage(Box::new( - SignedTimeSlicedSurveyStopCollectingMessage::arbitrary(u)?, - ))) - } - TypeVariant::SurveyRequestMessage => Ok(Self::SurveyRequestMessage(Box::new( - SurveyRequestMessage::arbitrary(u)?, - ))), - TypeVariant::TimeSlicedSurveyRequestMessage => { - Ok(Self::TimeSlicedSurveyRequestMessage(Box::new( - TimeSlicedSurveyRequestMessage::arbitrary(u)?, - ))) - } - TypeVariant::SignedTimeSlicedSurveyRequestMessage => { - Ok(Self::SignedTimeSlicedSurveyRequestMessage(Box::new( - SignedTimeSlicedSurveyRequestMessage::arbitrary(u)?, - ))) - } - TypeVariant::EncryptedBody => { - Ok(Self::EncryptedBody(Box::new(EncryptedBody::arbitrary(u)?))) - } - TypeVariant::SurveyResponseMessage => Ok(Self::SurveyResponseMessage(Box::new( - SurveyResponseMessage::arbitrary(u)?, - ))), - TypeVariant::TimeSlicedSurveyResponseMessage => { - Ok(Self::TimeSlicedSurveyResponseMessage(Box::new( - TimeSlicedSurveyResponseMessage::arbitrary(u)?, - ))) - } - TypeVariant::SignedTimeSlicedSurveyResponseMessage => { - Ok(Self::SignedTimeSlicedSurveyResponseMessage(Box::new( - SignedTimeSlicedSurveyResponseMessage::arbitrary(u)?, - ))) - } - TypeVariant::PeerStats => Ok(Self::PeerStats(Box::new(PeerStats::arbitrary(u)?))), - TypeVariant::TimeSlicedNodeData => Ok(Self::TimeSlicedNodeData(Box::new( - TimeSlicedNodeData::arbitrary(u)?, - ))), - TypeVariant::TimeSlicedPeerData => Ok(Self::TimeSlicedPeerData(Box::new( - TimeSlicedPeerData::arbitrary(u)?, - ))), - TypeVariant::TimeSlicedPeerDataList => Ok(Self::TimeSlicedPeerDataList(Box::new( - TimeSlicedPeerDataList::arbitrary(u)?, - ))), - TypeVariant::TopologyResponseBodyV2 => Ok(Self::TopologyResponseBodyV2(Box::new( - TopologyResponseBodyV2::arbitrary(u)?, - ))), - TypeVariant::SurveyResponseBody => Ok(Self::SurveyResponseBody(Box::new( - SurveyResponseBody::arbitrary(u)?, - ))), - TypeVariant::TxAdvertVector => Ok(Self::TxAdvertVector(Box::new( - TxAdvertVector::arbitrary(u)?, - ))), - TypeVariant::FloodAdvert => Ok(Self::FloodAdvert(Box::new(FloodAdvert::arbitrary(u)?))), - TypeVariant::TxDemandVector => Ok(Self::TxDemandVector(Box::new( - TxDemandVector::arbitrary(u)?, - ))), - TypeVariant::FloodDemand => Ok(Self::FloodDemand(Box::new(FloodDemand::arbitrary(u)?))), - TypeVariant::StellarMessage => Ok(Self::StellarMessage(Box::new( - StellarMessage::arbitrary(u)?, - ))), - TypeVariant::AuthenticatedMessage => Ok(Self::AuthenticatedMessage(Box::new( - AuthenticatedMessage::arbitrary(u)?, - ))), - TypeVariant::AuthenticatedMessageV0 => Ok(Self::AuthenticatedMessageV0(Box::new( - AuthenticatedMessageV0::arbitrary(u)?, - ))), - TypeVariant::LiquidityPoolParameters => Ok(Self::LiquidityPoolParameters(Box::new( - LiquidityPoolParameters::arbitrary(u)?, - ))), - TypeVariant::MuxedAccount => { - Ok(Self::MuxedAccount(Box::new(MuxedAccount::arbitrary(u)?))) - } - TypeVariant::MuxedAccountMed25519 => Ok(Self::MuxedAccountMed25519(Box::new( - MuxedAccountMed25519::arbitrary(u)?, - ))), - TypeVariant::DecoratedSignature => Ok(Self::DecoratedSignature(Box::new( - DecoratedSignature::arbitrary(u)?, - ))), - TypeVariant::OperationType => { - Ok(Self::OperationType(Box::new(OperationType::arbitrary(u)?))) - } - TypeVariant::CreateAccountOp => Ok(Self::CreateAccountOp(Box::new( - CreateAccountOp::arbitrary(u)?, - ))), - TypeVariant::PaymentOp => Ok(Self::PaymentOp(Box::new(PaymentOp::arbitrary(u)?))), - TypeVariant::PathPaymentStrictReceiveOp => Ok(Self::PathPaymentStrictReceiveOp( - Box::new(PathPaymentStrictReceiveOp::arbitrary(u)?), - )), - TypeVariant::PathPaymentStrictSendOp => Ok(Self::PathPaymentStrictSendOp(Box::new( - PathPaymentStrictSendOp::arbitrary(u)?, - ))), - TypeVariant::ManageSellOfferOp => Ok(Self::ManageSellOfferOp(Box::new( - ManageSellOfferOp::arbitrary(u)?, - ))), - TypeVariant::ManageBuyOfferOp => Ok(Self::ManageBuyOfferOp(Box::new( - ManageBuyOfferOp::arbitrary(u)?, - ))), - TypeVariant::CreatePassiveSellOfferOp => Ok(Self::CreatePassiveSellOfferOp(Box::new( - CreatePassiveSellOfferOp::arbitrary(u)?, - ))), - TypeVariant::SetOptionsOp => { - Ok(Self::SetOptionsOp(Box::new(SetOptionsOp::arbitrary(u)?))) - } - TypeVariant::ChangeTrustAsset => Ok(Self::ChangeTrustAsset(Box::new( - ChangeTrustAsset::arbitrary(u)?, - ))), - TypeVariant::ChangeTrustOp => { - Ok(Self::ChangeTrustOp(Box::new(ChangeTrustOp::arbitrary(u)?))) - } - TypeVariant::AllowTrustOp => { - Ok(Self::AllowTrustOp(Box::new(AllowTrustOp::arbitrary(u)?))) - } - TypeVariant::ManageDataOp => { - Ok(Self::ManageDataOp(Box::new(ManageDataOp::arbitrary(u)?))) - } - TypeVariant::BumpSequenceOp => Ok(Self::BumpSequenceOp(Box::new( - BumpSequenceOp::arbitrary(u)?, - ))), - TypeVariant::CreateClaimableBalanceOp => Ok(Self::CreateClaimableBalanceOp(Box::new( - CreateClaimableBalanceOp::arbitrary(u)?, - ))), - TypeVariant::ClaimClaimableBalanceOp => Ok(Self::ClaimClaimableBalanceOp(Box::new( - ClaimClaimableBalanceOp::arbitrary(u)?, - ))), - TypeVariant::BeginSponsoringFutureReservesOp => { - Ok(Self::BeginSponsoringFutureReservesOp(Box::new( - BeginSponsoringFutureReservesOp::arbitrary(u)?, - ))) - } - TypeVariant::RevokeSponsorshipType => Ok(Self::RevokeSponsorshipType(Box::new( - RevokeSponsorshipType::arbitrary(u)?, - ))), - TypeVariant::RevokeSponsorshipOp => Ok(Self::RevokeSponsorshipOp(Box::new( - RevokeSponsorshipOp::arbitrary(u)?, - ))), - TypeVariant::RevokeSponsorshipOpSigner => Ok(Self::RevokeSponsorshipOpSigner( - Box::new(RevokeSponsorshipOpSigner::arbitrary(u)?), - )), - TypeVariant::ClawbackOp => Ok(Self::ClawbackOp(Box::new(ClawbackOp::arbitrary(u)?))), - TypeVariant::ClawbackClaimableBalanceOp => Ok(Self::ClawbackClaimableBalanceOp( - Box::new(ClawbackClaimableBalanceOp::arbitrary(u)?), - )), - TypeVariant::SetTrustLineFlagsOp => Ok(Self::SetTrustLineFlagsOp(Box::new( - SetTrustLineFlagsOp::arbitrary(u)?, - ))), - TypeVariant::LiquidityPoolDepositOp => Ok(Self::LiquidityPoolDepositOp(Box::new( - LiquidityPoolDepositOp::arbitrary(u)?, - ))), - TypeVariant::LiquidityPoolWithdrawOp => Ok(Self::LiquidityPoolWithdrawOp(Box::new( - LiquidityPoolWithdrawOp::arbitrary(u)?, - ))), - TypeVariant::HostFunctionType => Ok(Self::HostFunctionType(Box::new( - HostFunctionType::arbitrary(u)?, - ))), - TypeVariant::ContractIdPreimageType => Ok(Self::ContractIdPreimageType(Box::new( - ContractIdPreimageType::arbitrary(u)?, - ))), - TypeVariant::ContractIdPreimage => Ok(Self::ContractIdPreimage(Box::new( - ContractIdPreimage::arbitrary(u)?, - ))), - TypeVariant::ContractIdPreimageFromAddress => Ok(Self::ContractIdPreimageFromAddress( - Box::new(ContractIdPreimageFromAddress::arbitrary(u)?), - )), - TypeVariant::CreateContractArgs => Ok(Self::CreateContractArgs(Box::new( - CreateContractArgs::arbitrary(u)?, - ))), - TypeVariant::CreateContractArgsV2 => Ok(Self::CreateContractArgsV2(Box::new( - CreateContractArgsV2::arbitrary(u)?, - ))), - TypeVariant::InvokeContractArgs => Ok(Self::InvokeContractArgs(Box::new( - InvokeContractArgs::arbitrary(u)?, - ))), - TypeVariant::HostFunction => { - Ok(Self::HostFunction(Box::new(HostFunction::arbitrary(u)?))) - } - TypeVariant::SorobanAuthorizedFunctionType => Ok(Self::SorobanAuthorizedFunctionType( - Box::new(SorobanAuthorizedFunctionType::arbitrary(u)?), - )), - TypeVariant::SorobanAuthorizedFunction => Ok(Self::SorobanAuthorizedFunction( - Box::new(SorobanAuthorizedFunction::arbitrary(u)?), - )), - TypeVariant::SorobanAuthorizedInvocation => Ok(Self::SorobanAuthorizedInvocation( - Box::new(SorobanAuthorizedInvocation::arbitrary(u)?), - )), - TypeVariant::SorobanAddressCredentials => Ok(Self::SorobanAddressCredentials( - Box::new(SorobanAddressCredentials::arbitrary(u)?), - )), - TypeVariant::SorobanCredentialsType => Ok(Self::SorobanCredentialsType(Box::new( - SorobanCredentialsType::arbitrary(u)?, - ))), - TypeVariant::SorobanCredentials => Ok(Self::SorobanCredentials(Box::new( - SorobanCredentials::arbitrary(u)?, - ))), - TypeVariant::SorobanAuthorizationEntry => Ok(Self::SorobanAuthorizationEntry( - Box::new(SorobanAuthorizationEntry::arbitrary(u)?), - )), - TypeVariant::SorobanAuthorizationEntries => Ok(Self::SorobanAuthorizationEntries( - Box::new(SorobanAuthorizationEntries::arbitrary(u)?), - )), - TypeVariant::InvokeHostFunctionOp => Ok(Self::InvokeHostFunctionOp(Box::new( - InvokeHostFunctionOp::arbitrary(u)?, - ))), - TypeVariant::ExtendFootprintTtlOp => Ok(Self::ExtendFootprintTtlOp(Box::new( - ExtendFootprintTtlOp::arbitrary(u)?, - ))), - TypeVariant::RestoreFootprintOp => Ok(Self::RestoreFootprintOp(Box::new( - RestoreFootprintOp::arbitrary(u)?, - ))), - TypeVariant::Operation => Ok(Self::Operation(Box::new(Operation::arbitrary(u)?))), - TypeVariant::OperationBody => { - Ok(Self::OperationBody(Box::new(OperationBody::arbitrary(u)?))) - } - TypeVariant::HashIdPreimage => Ok(Self::HashIdPreimage(Box::new( - HashIdPreimage::arbitrary(u)?, - ))), - TypeVariant::HashIdPreimageOperationId => Ok(Self::HashIdPreimageOperationId( - Box::new(HashIdPreimageOperationId::arbitrary(u)?), - )), - TypeVariant::HashIdPreimageRevokeId => Ok(Self::HashIdPreimageRevokeId(Box::new( - HashIdPreimageRevokeId::arbitrary(u)?, - ))), - TypeVariant::HashIdPreimageContractId => Ok(Self::HashIdPreimageContractId(Box::new( - HashIdPreimageContractId::arbitrary(u)?, - ))), - TypeVariant::HashIdPreimageSorobanAuthorization => { - Ok(Self::HashIdPreimageSorobanAuthorization(Box::new( - HashIdPreimageSorobanAuthorization::arbitrary(u)?, - ))) - } - TypeVariant::MemoType => Ok(Self::MemoType(Box::new(MemoType::arbitrary(u)?))), - TypeVariant::Memo => Ok(Self::Memo(Box::new(Memo::arbitrary(u)?))), - TypeVariant::TimeBounds => Ok(Self::TimeBounds(Box::new(TimeBounds::arbitrary(u)?))), - TypeVariant::LedgerBounds => { - Ok(Self::LedgerBounds(Box::new(LedgerBounds::arbitrary(u)?))) - } - TypeVariant::PreconditionsV2 => Ok(Self::PreconditionsV2(Box::new( - PreconditionsV2::arbitrary(u)?, - ))), - TypeVariant::PreconditionType => Ok(Self::PreconditionType(Box::new( - PreconditionType::arbitrary(u)?, - ))), - TypeVariant::Preconditions => { - Ok(Self::Preconditions(Box::new(Preconditions::arbitrary(u)?))) - } - TypeVariant::LedgerFootprint => Ok(Self::LedgerFootprint(Box::new( - LedgerFootprint::arbitrary(u)?, - ))), - TypeVariant::SorobanResources => Ok(Self::SorobanResources(Box::new( - SorobanResources::arbitrary(u)?, - ))), - TypeVariant::SorobanResourcesExtV0 => Ok(Self::SorobanResourcesExtV0(Box::new( - SorobanResourcesExtV0::arbitrary(u)?, - ))), - TypeVariant::SorobanTransactionData => Ok(Self::SorobanTransactionData(Box::new( - SorobanTransactionData::arbitrary(u)?, - ))), - TypeVariant::SorobanTransactionDataExt => Ok(Self::SorobanTransactionDataExt( - Box::new(SorobanTransactionDataExt::arbitrary(u)?), - )), - TypeVariant::TransactionV0 => { - Ok(Self::TransactionV0(Box::new(TransactionV0::arbitrary(u)?))) - } - TypeVariant::TransactionV0Ext => Ok(Self::TransactionV0Ext(Box::new( - TransactionV0Ext::arbitrary(u)?, - ))), - TypeVariant::TransactionV0Envelope => Ok(Self::TransactionV0Envelope(Box::new( - TransactionV0Envelope::arbitrary(u)?, - ))), - TypeVariant::Transaction => Ok(Self::Transaction(Box::new(Transaction::arbitrary(u)?))), - TypeVariant::TransactionExt => Ok(Self::TransactionExt(Box::new( - TransactionExt::arbitrary(u)?, - ))), - TypeVariant::TransactionV1Envelope => Ok(Self::TransactionV1Envelope(Box::new( - TransactionV1Envelope::arbitrary(u)?, - ))), - TypeVariant::FeeBumpTransaction => Ok(Self::FeeBumpTransaction(Box::new( - FeeBumpTransaction::arbitrary(u)?, - ))), - TypeVariant::FeeBumpTransactionInnerTx => Ok(Self::FeeBumpTransactionInnerTx( - Box::new(FeeBumpTransactionInnerTx::arbitrary(u)?), - )), - TypeVariant::FeeBumpTransactionExt => Ok(Self::FeeBumpTransactionExt(Box::new( - FeeBumpTransactionExt::arbitrary(u)?, - ))), - TypeVariant::FeeBumpTransactionEnvelope => Ok(Self::FeeBumpTransactionEnvelope( - Box::new(FeeBumpTransactionEnvelope::arbitrary(u)?), - )), - TypeVariant::TransactionEnvelope => Ok(Self::TransactionEnvelope(Box::new( - TransactionEnvelope::arbitrary(u)?, - ))), - TypeVariant::TransactionSignaturePayload => Ok(Self::TransactionSignaturePayload( - Box::new(TransactionSignaturePayload::arbitrary(u)?), - )), - TypeVariant::TransactionSignaturePayloadTaggedTransaction => { - Ok(Self::TransactionSignaturePayloadTaggedTransaction( - Box::new(TransactionSignaturePayloadTaggedTransaction::arbitrary(u)?), - )) - } - TypeVariant::ClaimAtomType => { - Ok(Self::ClaimAtomType(Box::new(ClaimAtomType::arbitrary(u)?))) - } - TypeVariant::ClaimOfferAtomV0 => Ok(Self::ClaimOfferAtomV0(Box::new( - ClaimOfferAtomV0::arbitrary(u)?, - ))), - TypeVariant::ClaimOfferAtom => Ok(Self::ClaimOfferAtom(Box::new( - ClaimOfferAtom::arbitrary(u)?, - ))), - TypeVariant::ClaimLiquidityAtom => Ok(Self::ClaimLiquidityAtom(Box::new( - ClaimLiquidityAtom::arbitrary(u)?, - ))), - TypeVariant::ClaimAtom => Ok(Self::ClaimAtom(Box::new(ClaimAtom::arbitrary(u)?))), - TypeVariant::CreateAccountResultCode => Ok(Self::CreateAccountResultCode(Box::new( - CreateAccountResultCode::arbitrary(u)?, - ))), - TypeVariant::CreateAccountResult => Ok(Self::CreateAccountResult(Box::new( - CreateAccountResult::arbitrary(u)?, - ))), - TypeVariant::PaymentResultCode => Ok(Self::PaymentResultCode(Box::new( - PaymentResultCode::arbitrary(u)?, - ))), - TypeVariant::PaymentResult => { - Ok(Self::PaymentResult(Box::new(PaymentResult::arbitrary(u)?))) - } - TypeVariant::PathPaymentStrictReceiveResultCode => { - Ok(Self::PathPaymentStrictReceiveResultCode(Box::new( - PathPaymentStrictReceiveResultCode::arbitrary(u)?, - ))) - } - TypeVariant::SimplePaymentResult => Ok(Self::SimplePaymentResult(Box::new( - SimplePaymentResult::arbitrary(u)?, - ))), - TypeVariant::PathPaymentStrictReceiveResult => { - Ok(Self::PathPaymentStrictReceiveResult(Box::new( - PathPaymentStrictReceiveResult::arbitrary(u)?, - ))) - } - TypeVariant::PathPaymentStrictReceiveResultSuccess => { - Ok(Self::PathPaymentStrictReceiveResultSuccess(Box::new( - PathPaymentStrictReceiveResultSuccess::arbitrary(u)?, - ))) - } - TypeVariant::PathPaymentStrictSendResultCode => { - Ok(Self::PathPaymentStrictSendResultCode(Box::new( - PathPaymentStrictSendResultCode::arbitrary(u)?, - ))) - } - TypeVariant::PathPaymentStrictSendResult => Ok(Self::PathPaymentStrictSendResult( - Box::new(PathPaymentStrictSendResult::arbitrary(u)?), - )), - TypeVariant::PathPaymentStrictSendResultSuccess => { - Ok(Self::PathPaymentStrictSendResultSuccess(Box::new( - PathPaymentStrictSendResultSuccess::arbitrary(u)?, - ))) - } - TypeVariant::ManageSellOfferResultCode => Ok(Self::ManageSellOfferResultCode( - Box::new(ManageSellOfferResultCode::arbitrary(u)?), - )), - TypeVariant::ManageOfferEffect => Ok(Self::ManageOfferEffect(Box::new( - ManageOfferEffect::arbitrary(u)?, - ))), - TypeVariant::ManageOfferSuccessResult => Ok(Self::ManageOfferSuccessResult(Box::new( - ManageOfferSuccessResult::arbitrary(u)?, - ))), - TypeVariant::ManageOfferSuccessResultOffer => Ok(Self::ManageOfferSuccessResultOffer( - Box::new(ManageOfferSuccessResultOffer::arbitrary(u)?), - )), - TypeVariant::ManageSellOfferResult => Ok(Self::ManageSellOfferResult(Box::new( - ManageSellOfferResult::arbitrary(u)?, - ))), - TypeVariant::ManageBuyOfferResultCode => Ok(Self::ManageBuyOfferResultCode(Box::new( - ManageBuyOfferResultCode::arbitrary(u)?, - ))), - TypeVariant::ManageBuyOfferResult => Ok(Self::ManageBuyOfferResult(Box::new( - ManageBuyOfferResult::arbitrary(u)?, - ))), - TypeVariant::SetOptionsResultCode => Ok(Self::SetOptionsResultCode(Box::new( - SetOptionsResultCode::arbitrary(u)?, - ))), - TypeVariant::SetOptionsResult => Ok(Self::SetOptionsResult(Box::new( - SetOptionsResult::arbitrary(u)?, - ))), - TypeVariant::ChangeTrustResultCode => Ok(Self::ChangeTrustResultCode(Box::new( - ChangeTrustResultCode::arbitrary(u)?, - ))), - TypeVariant::ChangeTrustResult => Ok(Self::ChangeTrustResult(Box::new( - ChangeTrustResult::arbitrary(u)?, - ))), - TypeVariant::AllowTrustResultCode => Ok(Self::AllowTrustResultCode(Box::new( - AllowTrustResultCode::arbitrary(u)?, - ))), - TypeVariant::AllowTrustResult => Ok(Self::AllowTrustResult(Box::new( - AllowTrustResult::arbitrary(u)?, - ))), - TypeVariant::AccountMergeResultCode => Ok(Self::AccountMergeResultCode(Box::new( - AccountMergeResultCode::arbitrary(u)?, - ))), - TypeVariant::AccountMergeResult => Ok(Self::AccountMergeResult(Box::new( - AccountMergeResult::arbitrary(u)?, - ))), - TypeVariant::InflationResultCode => Ok(Self::InflationResultCode(Box::new( - InflationResultCode::arbitrary(u)?, - ))), - TypeVariant::InflationPayout => Ok(Self::InflationPayout(Box::new( - InflationPayout::arbitrary(u)?, - ))), - TypeVariant::InflationResult => Ok(Self::InflationResult(Box::new( - InflationResult::arbitrary(u)?, - ))), - TypeVariant::ManageDataResultCode => Ok(Self::ManageDataResultCode(Box::new( - ManageDataResultCode::arbitrary(u)?, - ))), - TypeVariant::ManageDataResult => Ok(Self::ManageDataResult(Box::new( - ManageDataResult::arbitrary(u)?, - ))), - TypeVariant::BumpSequenceResultCode => Ok(Self::BumpSequenceResultCode(Box::new( - BumpSequenceResultCode::arbitrary(u)?, - ))), - TypeVariant::BumpSequenceResult => Ok(Self::BumpSequenceResult(Box::new( - BumpSequenceResult::arbitrary(u)?, - ))), - TypeVariant::CreateClaimableBalanceResultCode => { - Ok(Self::CreateClaimableBalanceResultCode(Box::new( - CreateClaimableBalanceResultCode::arbitrary(u)?, - ))) - } - TypeVariant::CreateClaimableBalanceResult => Ok(Self::CreateClaimableBalanceResult( - Box::new(CreateClaimableBalanceResult::arbitrary(u)?), - )), - TypeVariant::ClaimClaimableBalanceResultCode => { - Ok(Self::ClaimClaimableBalanceResultCode(Box::new( - ClaimClaimableBalanceResultCode::arbitrary(u)?, - ))) - } - TypeVariant::ClaimClaimableBalanceResult => Ok(Self::ClaimClaimableBalanceResult( - Box::new(ClaimClaimableBalanceResult::arbitrary(u)?), - )), - TypeVariant::BeginSponsoringFutureReservesResultCode => { - Ok(Self::BeginSponsoringFutureReservesResultCode(Box::new( - BeginSponsoringFutureReservesResultCode::arbitrary(u)?, - ))) - } - TypeVariant::BeginSponsoringFutureReservesResult => { - Ok(Self::BeginSponsoringFutureReservesResult(Box::new( - BeginSponsoringFutureReservesResult::arbitrary(u)?, - ))) - } - TypeVariant::EndSponsoringFutureReservesResultCode => { - Ok(Self::EndSponsoringFutureReservesResultCode(Box::new( - EndSponsoringFutureReservesResultCode::arbitrary(u)?, - ))) - } - TypeVariant::EndSponsoringFutureReservesResult => { - Ok(Self::EndSponsoringFutureReservesResult(Box::new( - EndSponsoringFutureReservesResult::arbitrary(u)?, - ))) - } - TypeVariant::RevokeSponsorshipResultCode => Ok(Self::RevokeSponsorshipResultCode( - Box::new(RevokeSponsorshipResultCode::arbitrary(u)?), - )), - TypeVariant::RevokeSponsorshipResult => Ok(Self::RevokeSponsorshipResult(Box::new( - RevokeSponsorshipResult::arbitrary(u)?, - ))), - TypeVariant::ClawbackResultCode => Ok(Self::ClawbackResultCode(Box::new( - ClawbackResultCode::arbitrary(u)?, - ))), - TypeVariant::ClawbackResult => Ok(Self::ClawbackResult(Box::new( - ClawbackResult::arbitrary(u)?, - ))), - TypeVariant::ClawbackClaimableBalanceResultCode => { - Ok(Self::ClawbackClaimableBalanceResultCode(Box::new( - ClawbackClaimableBalanceResultCode::arbitrary(u)?, - ))) - } - TypeVariant::ClawbackClaimableBalanceResult => { - Ok(Self::ClawbackClaimableBalanceResult(Box::new( - ClawbackClaimableBalanceResult::arbitrary(u)?, - ))) - } - TypeVariant::SetTrustLineFlagsResultCode => Ok(Self::SetTrustLineFlagsResultCode( - Box::new(SetTrustLineFlagsResultCode::arbitrary(u)?), - )), - TypeVariant::SetTrustLineFlagsResult => Ok(Self::SetTrustLineFlagsResult(Box::new( - SetTrustLineFlagsResult::arbitrary(u)?, - ))), - TypeVariant::LiquidityPoolDepositResultCode => { - Ok(Self::LiquidityPoolDepositResultCode(Box::new( - LiquidityPoolDepositResultCode::arbitrary(u)?, - ))) - } - TypeVariant::LiquidityPoolDepositResult => Ok(Self::LiquidityPoolDepositResult( - Box::new(LiquidityPoolDepositResult::arbitrary(u)?), - )), - TypeVariant::LiquidityPoolWithdrawResultCode => { - Ok(Self::LiquidityPoolWithdrawResultCode(Box::new( - LiquidityPoolWithdrawResultCode::arbitrary(u)?, - ))) - } - TypeVariant::LiquidityPoolWithdrawResult => Ok(Self::LiquidityPoolWithdrawResult( - Box::new(LiquidityPoolWithdrawResult::arbitrary(u)?), - )), - TypeVariant::InvokeHostFunctionResultCode => Ok(Self::InvokeHostFunctionResultCode( - Box::new(InvokeHostFunctionResultCode::arbitrary(u)?), - )), - TypeVariant::InvokeHostFunctionResult => Ok(Self::InvokeHostFunctionResult(Box::new( - InvokeHostFunctionResult::arbitrary(u)?, - ))), - TypeVariant::ExtendFootprintTtlResultCode => Ok(Self::ExtendFootprintTtlResultCode( - Box::new(ExtendFootprintTtlResultCode::arbitrary(u)?), - )), - TypeVariant::ExtendFootprintTtlResult => Ok(Self::ExtendFootprintTtlResult(Box::new( - ExtendFootprintTtlResult::arbitrary(u)?, - ))), - TypeVariant::RestoreFootprintResultCode => Ok(Self::RestoreFootprintResultCode( - Box::new(RestoreFootprintResultCode::arbitrary(u)?), - )), - TypeVariant::RestoreFootprintResult => Ok(Self::RestoreFootprintResult(Box::new( - RestoreFootprintResult::arbitrary(u)?, - ))), - TypeVariant::OperationResultCode => Ok(Self::OperationResultCode(Box::new( - OperationResultCode::arbitrary(u)?, - ))), - TypeVariant::OperationResult => Ok(Self::OperationResult(Box::new( - OperationResult::arbitrary(u)?, - ))), - TypeVariant::OperationResultTr => Ok(Self::OperationResultTr(Box::new( - OperationResultTr::arbitrary(u)?, - ))), - TypeVariant::TransactionResultCode => Ok(Self::TransactionResultCode(Box::new( - TransactionResultCode::arbitrary(u)?, - ))), - TypeVariant::InnerTransactionResult => Ok(Self::InnerTransactionResult(Box::new( - InnerTransactionResult::arbitrary(u)?, - ))), - TypeVariant::InnerTransactionResultResult => Ok(Self::InnerTransactionResultResult( - Box::new(InnerTransactionResultResult::arbitrary(u)?), - )), - TypeVariant::InnerTransactionResultExt => Ok(Self::InnerTransactionResultExt( - Box::new(InnerTransactionResultExt::arbitrary(u)?), - )), - TypeVariant::InnerTransactionResultPair => Ok(Self::InnerTransactionResultPair( - Box::new(InnerTransactionResultPair::arbitrary(u)?), - )), - TypeVariant::TransactionResult => Ok(Self::TransactionResult(Box::new( - TransactionResult::arbitrary(u)?, - ))), - TypeVariant::TransactionResultResult => Ok(Self::TransactionResultResult(Box::new( - TransactionResultResult::arbitrary(u)?, - ))), - TypeVariant::TransactionResultExt => Ok(Self::TransactionResultExt(Box::new( - TransactionResultExt::arbitrary(u)?, - ))), - TypeVariant::Hash => Ok(Self::Hash(Box::new(Hash::arbitrary(u)?))), - TypeVariant::Uint256 => Ok(Self::Uint256(Box::new(Uint256::arbitrary(u)?))), - TypeVariant::Uint32 => Ok(Self::Uint32(Box::new(Uint32::arbitrary(u)?))), - TypeVariant::Int32 => Ok(Self::Int32(Box::new(Int32::arbitrary(u)?))), - TypeVariant::Uint64 => Ok(Self::Uint64(Box::new(Uint64::arbitrary(u)?))), - TypeVariant::Int64 => Ok(Self::Int64(Box::new(Int64::arbitrary(u)?))), - TypeVariant::TimePoint => Ok(Self::TimePoint(Box::new(TimePoint::arbitrary(u)?))), - TypeVariant::Duration => Ok(Self::Duration(Box::new(Duration::arbitrary(u)?))), - TypeVariant::ExtensionPoint => Ok(Self::ExtensionPoint(Box::new( - ExtensionPoint::arbitrary(u)?, - ))), - TypeVariant::CryptoKeyType => { - Ok(Self::CryptoKeyType(Box::new(CryptoKeyType::arbitrary(u)?))) - } - TypeVariant::PublicKeyType => { - Ok(Self::PublicKeyType(Box::new(PublicKeyType::arbitrary(u)?))) - } - TypeVariant::SignerKeyType => { - Ok(Self::SignerKeyType(Box::new(SignerKeyType::arbitrary(u)?))) - } - TypeVariant::PublicKey => Ok(Self::PublicKey(Box::new(PublicKey::arbitrary(u)?))), - TypeVariant::SignerKey => Ok(Self::SignerKey(Box::new(SignerKey::arbitrary(u)?))), - TypeVariant::SignerKeyEd25519SignedPayload => Ok(Self::SignerKeyEd25519SignedPayload( - Box::new(SignerKeyEd25519SignedPayload::arbitrary(u)?), - )), - TypeVariant::Signature => Ok(Self::Signature(Box::new(Signature::arbitrary(u)?))), - TypeVariant::SignatureHint => { - Ok(Self::SignatureHint(Box::new(SignatureHint::arbitrary(u)?))) - } - TypeVariant::NodeId => Ok(Self::NodeId(Box::new(NodeId::arbitrary(u)?))), - TypeVariant::AccountId => Ok(Self::AccountId(Box::new(AccountId::arbitrary(u)?))), - TypeVariant::ContractId => Ok(Self::ContractId(Box::new(ContractId::arbitrary(u)?))), - TypeVariant::Curve25519Secret => Ok(Self::Curve25519Secret(Box::new( - Curve25519Secret::arbitrary(u)?, - ))), - TypeVariant::Curve25519Public => Ok(Self::Curve25519Public(Box::new( - Curve25519Public::arbitrary(u)?, - ))), - TypeVariant::HmacSha256Key => { - Ok(Self::HmacSha256Key(Box::new(HmacSha256Key::arbitrary(u)?))) - } - TypeVariant::HmacSha256Mac => { - Ok(Self::HmacSha256Mac(Box::new(HmacSha256Mac::arbitrary(u)?))) - } - TypeVariant::ShortHashSeed => { - Ok(Self::ShortHashSeed(Box::new(ShortHashSeed::arbitrary(u)?))) - } - TypeVariant::BinaryFuseFilterType => Ok(Self::BinaryFuseFilterType(Box::new( - BinaryFuseFilterType::arbitrary(u)?, - ))), - TypeVariant::SerializedBinaryFuseFilter => Ok(Self::SerializedBinaryFuseFilter( - Box::new(SerializedBinaryFuseFilter::arbitrary(u)?), - )), - TypeVariant::PoolId => Ok(Self::PoolId(Box::new(PoolId::arbitrary(u)?))), - TypeVariant::ClaimableBalanceIdType => Ok(Self::ClaimableBalanceIdType(Box::new( - ClaimableBalanceIdType::arbitrary(u)?, - ))), - TypeVariant::ClaimableBalanceId => Ok(Self::ClaimableBalanceId(Box::new( - ClaimableBalanceId::arbitrary(u)?, - ))), - } - } - - #[cfg(feature = "alloc")] - #[must_use] - #[allow(clippy::too_many_lines)] - pub fn default(v: TypeVariant) -> Self { - match v { - TypeVariant::Value => Self::Value(Box::default()), - TypeVariant::ScpBallot => Self::ScpBallot(Box::default()), - TypeVariant::ScpStatementType => Self::ScpStatementType(Box::default()), - TypeVariant::ScpNomination => Self::ScpNomination(Box::default()), - TypeVariant::ScpStatement => Self::ScpStatement(Box::default()), - TypeVariant::ScpStatementPledges => Self::ScpStatementPledges(Box::default()), - TypeVariant::ScpStatementPrepare => Self::ScpStatementPrepare(Box::default()), - TypeVariant::ScpStatementConfirm => Self::ScpStatementConfirm(Box::default()), - TypeVariant::ScpStatementExternalize => Self::ScpStatementExternalize(Box::default()), - TypeVariant::ScpEnvelope => Self::ScpEnvelope(Box::default()), - TypeVariant::ScpQuorumSet => Self::ScpQuorumSet(Box::default()), - TypeVariant::EncodedLedgerKey => Self::EncodedLedgerKey(Box::default()), - TypeVariant::ConfigSettingContractExecutionLanesV0 => { - Self::ConfigSettingContractExecutionLanesV0(Box::default()) - } - TypeVariant::ConfigSettingContractComputeV0 => { - Self::ConfigSettingContractComputeV0(Box::default()) - } - TypeVariant::ConfigSettingContractParallelComputeV0 => { - Self::ConfigSettingContractParallelComputeV0(Box::default()) - } - TypeVariant::ConfigSettingContractLedgerCostV0 => { - Self::ConfigSettingContractLedgerCostV0(Box::default()) - } - TypeVariant::ConfigSettingContractLedgerCostExtV0 => { - Self::ConfigSettingContractLedgerCostExtV0(Box::default()) - } - TypeVariant::ConfigSettingContractHistoricalDataV0 => { - Self::ConfigSettingContractHistoricalDataV0(Box::default()) - } - TypeVariant::ConfigSettingContractEventsV0 => { - Self::ConfigSettingContractEventsV0(Box::default()) - } - TypeVariant::ConfigSettingContractBandwidthV0 => { - Self::ConfigSettingContractBandwidthV0(Box::default()) - } - TypeVariant::ContractCostType => Self::ContractCostType(Box::default()), - TypeVariant::ContractCostParamEntry => Self::ContractCostParamEntry(Box::default()), - TypeVariant::StateArchivalSettings => Self::StateArchivalSettings(Box::default()), - TypeVariant::EvictionIterator => Self::EvictionIterator(Box::default()), - TypeVariant::ConfigSettingScpTiming => Self::ConfigSettingScpTiming(Box::default()), - TypeVariant::FrozenLedgerKeys => Self::FrozenLedgerKeys(Box::default()), - TypeVariant::FrozenLedgerKeysDelta => Self::FrozenLedgerKeysDelta(Box::default()), - TypeVariant::FreezeBypassTxs => Self::FreezeBypassTxs(Box::default()), - TypeVariant::FreezeBypassTxsDelta => Self::FreezeBypassTxsDelta(Box::default()), - TypeVariant::ContractCostParams => Self::ContractCostParams(Box::default()), - TypeVariant::ConfigSettingId => Self::ConfigSettingId(Box::default()), - TypeVariant::ConfigSettingEntry => Self::ConfigSettingEntry(Box::default()), - TypeVariant::ScEnvMetaKind => Self::ScEnvMetaKind(Box::default()), - TypeVariant::ScEnvMetaEntry => Self::ScEnvMetaEntry(Box::default()), - TypeVariant::ScEnvMetaEntryInterfaceVersion => { - Self::ScEnvMetaEntryInterfaceVersion(Box::default()) - } - TypeVariant::ScMetaV0 => Self::ScMetaV0(Box::default()), - TypeVariant::ScMetaKind => Self::ScMetaKind(Box::default()), - TypeVariant::ScMetaEntry => Self::ScMetaEntry(Box::default()), - TypeVariant::ScSpecType => Self::ScSpecType(Box::default()), - TypeVariant::ScSpecTypeOption => Self::ScSpecTypeOption(Box::default()), - TypeVariant::ScSpecTypeResult => Self::ScSpecTypeResult(Box::default()), - TypeVariant::ScSpecTypeVec => Self::ScSpecTypeVec(Box::default()), - TypeVariant::ScSpecTypeMap => Self::ScSpecTypeMap(Box::default()), - TypeVariant::ScSpecTypeTuple => Self::ScSpecTypeTuple(Box::default()), - TypeVariant::ScSpecTypeBytesN => Self::ScSpecTypeBytesN(Box::default()), - TypeVariant::ScSpecTypeUdt => Self::ScSpecTypeUdt(Box::default()), - TypeVariant::ScSpecTypeDef => Self::ScSpecTypeDef(Box::default()), - TypeVariant::ScSpecUdtStructFieldV0 => Self::ScSpecUdtStructFieldV0(Box::default()), - TypeVariant::ScSpecUdtStructV0 => Self::ScSpecUdtStructV0(Box::default()), - TypeVariant::ScSpecUdtUnionCaseVoidV0 => Self::ScSpecUdtUnionCaseVoidV0(Box::default()), - TypeVariant::ScSpecUdtUnionCaseTupleV0 => { - Self::ScSpecUdtUnionCaseTupleV0(Box::default()) - } - TypeVariant::ScSpecUdtUnionCaseV0Kind => Self::ScSpecUdtUnionCaseV0Kind(Box::default()), - TypeVariant::ScSpecUdtUnionCaseV0 => Self::ScSpecUdtUnionCaseV0(Box::default()), - TypeVariant::ScSpecUdtUnionV0 => Self::ScSpecUdtUnionV0(Box::default()), - TypeVariant::ScSpecUdtEnumCaseV0 => Self::ScSpecUdtEnumCaseV0(Box::default()), - TypeVariant::ScSpecUdtEnumV0 => Self::ScSpecUdtEnumV0(Box::default()), - TypeVariant::ScSpecUdtErrorEnumCaseV0 => Self::ScSpecUdtErrorEnumCaseV0(Box::default()), - TypeVariant::ScSpecUdtErrorEnumV0 => Self::ScSpecUdtErrorEnumV0(Box::default()), - TypeVariant::ScSpecFunctionInputV0 => Self::ScSpecFunctionInputV0(Box::default()), - TypeVariant::ScSpecFunctionV0 => Self::ScSpecFunctionV0(Box::default()), - TypeVariant::ScSpecEventParamLocationV0 => { - Self::ScSpecEventParamLocationV0(Box::default()) - } - TypeVariant::ScSpecEventParamV0 => Self::ScSpecEventParamV0(Box::default()), - TypeVariant::ScSpecEventDataFormat => Self::ScSpecEventDataFormat(Box::default()), - TypeVariant::ScSpecEventV0 => Self::ScSpecEventV0(Box::default()), - TypeVariant::ScSpecEntryKind => Self::ScSpecEntryKind(Box::default()), - TypeVariant::ScSpecEntry => Self::ScSpecEntry(Box::default()), - TypeVariant::ScValType => Self::ScValType(Box::default()), - TypeVariant::ScErrorType => Self::ScErrorType(Box::default()), - TypeVariant::ScErrorCode => Self::ScErrorCode(Box::default()), - TypeVariant::ScError => Self::ScError(Box::default()), - TypeVariant::UInt128Parts => Self::UInt128Parts(Box::default()), - TypeVariant::Int128Parts => Self::Int128Parts(Box::default()), - TypeVariant::UInt256Parts => Self::UInt256Parts(Box::default()), - TypeVariant::Int256Parts => Self::Int256Parts(Box::default()), - TypeVariant::ContractExecutableType => Self::ContractExecutableType(Box::default()), - TypeVariant::ContractExecutable => Self::ContractExecutable(Box::default()), - TypeVariant::ScAddressType => Self::ScAddressType(Box::default()), - TypeVariant::MuxedEd25519Account => Self::MuxedEd25519Account(Box::default()), - TypeVariant::ScAddress => Self::ScAddress(Box::default()), - TypeVariant::ScVec => Self::ScVec(Box::default()), - TypeVariant::ScMap => Self::ScMap(Box::default()), - TypeVariant::ScBytes => Self::ScBytes(Box::default()), - TypeVariant::ScString => Self::ScString(Box::default()), - TypeVariant::ScSymbol => Self::ScSymbol(Box::default()), - TypeVariant::ScNonceKey => Self::ScNonceKey(Box::default()), - TypeVariant::ScContractInstance => Self::ScContractInstance(Box::default()), - TypeVariant::ScVal => Self::ScVal(Box::default()), - TypeVariant::ScMapEntry => Self::ScMapEntry(Box::default()), - TypeVariant::LedgerCloseMetaBatch => Self::LedgerCloseMetaBatch(Box::default()), - TypeVariant::StoredTransactionSet => Self::StoredTransactionSet(Box::default()), - TypeVariant::StoredDebugTransactionSet => { - Self::StoredDebugTransactionSet(Box::default()) - } - TypeVariant::PersistedScpStateV0 => Self::PersistedScpStateV0(Box::default()), - TypeVariant::PersistedScpStateV1 => Self::PersistedScpStateV1(Box::default()), - TypeVariant::PersistedScpState => Self::PersistedScpState(Box::default()), - TypeVariant::Thresholds => Self::Thresholds(Box::default()), - TypeVariant::String32 => Self::String32(Box::default()), - TypeVariant::String64 => Self::String64(Box::default()), - TypeVariant::SequenceNumber => Self::SequenceNumber(Box::default()), - TypeVariant::DataValue => Self::DataValue(Box::default()), - TypeVariant::AssetCode4 => Self::AssetCode4(Box::default()), - TypeVariant::AssetCode12 => Self::AssetCode12(Box::default()), - TypeVariant::AssetType => Self::AssetType(Box::default()), - TypeVariant::AssetCode => Self::AssetCode(Box::default()), - TypeVariant::AlphaNum4 => Self::AlphaNum4(Box::default()), - TypeVariant::AlphaNum12 => Self::AlphaNum12(Box::default()), - TypeVariant::Asset => Self::Asset(Box::default()), - TypeVariant::Price => Self::Price(Box::default()), - TypeVariant::Liabilities => Self::Liabilities(Box::default()), - TypeVariant::ThresholdIndexes => Self::ThresholdIndexes(Box::default()), - TypeVariant::LedgerEntryType => Self::LedgerEntryType(Box::default()), - TypeVariant::Signer => Self::Signer(Box::default()), - TypeVariant::AccountFlags => Self::AccountFlags(Box::default()), - TypeVariant::SponsorshipDescriptor => Self::SponsorshipDescriptor(Box::default()), - TypeVariant::AccountEntryExtensionV3 => Self::AccountEntryExtensionV3(Box::default()), - TypeVariant::AccountEntryExtensionV2 => Self::AccountEntryExtensionV2(Box::default()), - TypeVariant::AccountEntryExtensionV2Ext => { - Self::AccountEntryExtensionV2Ext(Box::default()) - } - TypeVariant::AccountEntryExtensionV1 => Self::AccountEntryExtensionV1(Box::default()), - TypeVariant::AccountEntryExtensionV1Ext => { - Self::AccountEntryExtensionV1Ext(Box::default()) - } - TypeVariant::AccountEntry => Self::AccountEntry(Box::default()), - TypeVariant::AccountEntryExt => Self::AccountEntryExt(Box::default()), - TypeVariant::TrustLineFlags => Self::TrustLineFlags(Box::default()), - TypeVariant::LiquidityPoolType => Self::LiquidityPoolType(Box::default()), - TypeVariant::TrustLineAsset => Self::TrustLineAsset(Box::default()), - TypeVariant::TrustLineEntryExtensionV2 => { - Self::TrustLineEntryExtensionV2(Box::default()) - } - TypeVariant::TrustLineEntryExtensionV2Ext => { - Self::TrustLineEntryExtensionV2Ext(Box::default()) - } - TypeVariant::TrustLineEntry => Self::TrustLineEntry(Box::default()), - TypeVariant::TrustLineEntryExt => Self::TrustLineEntryExt(Box::default()), - TypeVariant::TrustLineEntryV1 => Self::TrustLineEntryV1(Box::default()), - TypeVariant::TrustLineEntryV1Ext => Self::TrustLineEntryV1Ext(Box::default()), - TypeVariant::OfferEntryFlags => Self::OfferEntryFlags(Box::default()), - TypeVariant::OfferEntry => Self::OfferEntry(Box::default()), - TypeVariant::OfferEntryExt => Self::OfferEntryExt(Box::default()), - TypeVariant::DataEntry => Self::DataEntry(Box::default()), - TypeVariant::DataEntryExt => Self::DataEntryExt(Box::default()), - TypeVariant::ClaimPredicateType => Self::ClaimPredicateType(Box::default()), - TypeVariant::ClaimPredicate => Self::ClaimPredicate(Box::default()), - TypeVariant::ClaimantType => Self::ClaimantType(Box::default()), - TypeVariant::Claimant => Self::Claimant(Box::default()), - TypeVariant::ClaimantV0 => Self::ClaimantV0(Box::default()), - TypeVariant::ClaimableBalanceFlags => Self::ClaimableBalanceFlags(Box::default()), - TypeVariant::ClaimableBalanceEntryExtensionV1 => { - Self::ClaimableBalanceEntryExtensionV1(Box::default()) - } - TypeVariant::ClaimableBalanceEntryExtensionV1Ext => { - Self::ClaimableBalanceEntryExtensionV1Ext(Box::default()) - } - TypeVariant::ClaimableBalanceEntry => Self::ClaimableBalanceEntry(Box::default()), - TypeVariant::ClaimableBalanceEntryExt => Self::ClaimableBalanceEntryExt(Box::default()), - TypeVariant::LiquidityPoolConstantProductParameters => { - Self::LiquidityPoolConstantProductParameters(Box::default()) - } - TypeVariant::LiquidityPoolEntry => Self::LiquidityPoolEntry(Box::default()), - TypeVariant::LiquidityPoolEntryBody => Self::LiquidityPoolEntryBody(Box::default()), - TypeVariant::LiquidityPoolEntryConstantProduct => { - Self::LiquidityPoolEntryConstantProduct(Box::default()) - } - TypeVariant::ContractDataDurability => Self::ContractDataDurability(Box::default()), - TypeVariant::ContractDataEntry => Self::ContractDataEntry(Box::default()), - TypeVariant::ContractCodeCostInputs => Self::ContractCodeCostInputs(Box::default()), - TypeVariant::ContractCodeEntry => Self::ContractCodeEntry(Box::default()), - TypeVariant::ContractCodeEntryExt => Self::ContractCodeEntryExt(Box::default()), - TypeVariant::ContractCodeEntryV1 => Self::ContractCodeEntryV1(Box::default()), - TypeVariant::TtlEntry => Self::TtlEntry(Box::default()), - TypeVariant::LedgerEntryExtensionV1 => Self::LedgerEntryExtensionV1(Box::default()), - TypeVariant::LedgerEntryExtensionV1Ext => { - Self::LedgerEntryExtensionV1Ext(Box::default()) - } - TypeVariant::LedgerEntry => Self::LedgerEntry(Box::default()), - TypeVariant::LedgerEntryData => Self::LedgerEntryData(Box::default()), - TypeVariant::LedgerEntryExt => Self::LedgerEntryExt(Box::default()), - TypeVariant::LedgerKey => Self::LedgerKey(Box::default()), - TypeVariant::LedgerKeyAccount => Self::LedgerKeyAccount(Box::default()), - TypeVariant::LedgerKeyTrustLine => Self::LedgerKeyTrustLine(Box::default()), - TypeVariant::LedgerKeyOffer => Self::LedgerKeyOffer(Box::default()), - TypeVariant::LedgerKeyData => Self::LedgerKeyData(Box::default()), - TypeVariant::LedgerKeyClaimableBalance => { - Self::LedgerKeyClaimableBalance(Box::default()) - } - TypeVariant::LedgerKeyLiquidityPool => Self::LedgerKeyLiquidityPool(Box::default()), - TypeVariant::LedgerKeyContractData => Self::LedgerKeyContractData(Box::default()), - TypeVariant::LedgerKeyContractCode => Self::LedgerKeyContractCode(Box::default()), - TypeVariant::LedgerKeyConfigSetting => Self::LedgerKeyConfigSetting(Box::default()), - TypeVariant::LedgerKeyTtl => Self::LedgerKeyTtl(Box::default()), - TypeVariant::EnvelopeType => Self::EnvelopeType(Box::default()), - TypeVariant::BucketListType => Self::BucketListType(Box::default()), - TypeVariant::BucketEntryType => Self::BucketEntryType(Box::default()), - TypeVariant::HotArchiveBucketEntryType => { - Self::HotArchiveBucketEntryType(Box::default()) - } - TypeVariant::BucketMetadata => Self::BucketMetadata(Box::default()), - TypeVariant::BucketMetadataExt => Self::BucketMetadataExt(Box::default()), - TypeVariant::BucketEntry => Self::BucketEntry(Box::default()), - TypeVariant::HotArchiveBucketEntry => Self::HotArchiveBucketEntry(Box::default()), - TypeVariant::UpgradeType => Self::UpgradeType(Box::default()), - TypeVariant::StellarValueType => Self::StellarValueType(Box::default()), - TypeVariant::LedgerCloseValueSignature => { - Self::LedgerCloseValueSignature(Box::default()) - } - TypeVariant::StellarValue => Self::StellarValue(Box::default()), - TypeVariant::StellarValueExt => Self::StellarValueExt(Box::default()), - TypeVariant::LedgerHeaderFlags => Self::LedgerHeaderFlags(Box::default()), - TypeVariant::LedgerHeaderExtensionV1 => Self::LedgerHeaderExtensionV1(Box::default()), - TypeVariant::LedgerHeaderExtensionV1Ext => { - Self::LedgerHeaderExtensionV1Ext(Box::default()) - } - TypeVariant::LedgerHeader => Self::LedgerHeader(Box::default()), - TypeVariant::LedgerHeaderExt => Self::LedgerHeaderExt(Box::default()), - TypeVariant::LedgerUpgradeType => Self::LedgerUpgradeType(Box::default()), - TypeVariant::ConfigUpgradeSetKey => Self::ConfigUpgradeSetKey(Box::default()), - TypeVariant::LedgerUpgrade => Self::LedgerUpgrade(Box::default()), - TypeVariant::ConfigUpgradeSet => Self::ConfigUpgradeSet(Box::default()), - TypeVariant::TxSetComponentType => Self::TxSetComponentType(Box::default()), - TypeVariant::DependentTxCluster => Self::DependentTxCluster(Box::default()), - TypeVariant::ParallelTxExecutionStage => Self::ParallelTxExecutionStage(Box::default()), - TypeVariant::ParallelTxsComponent => Self::ParallelTxsComponent(Box::default()), - TypeVariant::TxSetComponent => Self::TxSetComponent(Box::default()), - TypeVariant::TxSetComponentTxsMaybeDiscountedFee => { - Self::TxSetComponentTxsMaybeDiscountedFee(Box::default()) - } - TypeVariant::TransactionPhase => Self::TransactionPhase(Box::default()), - TypeVariant::TransactionSet => Self::TransactionSet(Box::default()), - TypeVariant::TransactionSetV1 => Self::TransactionSetV1(Box::default()), - TypeVariant::GeneralizedTransactionSet => { - Self::GeneralizedTransactionSet(Box::default()) - } - TypeVariant::TransactionResultPair => Self::TransactionResultPair(Box::default()), - TypeVariant::TransactionResultSet => Self::TransactionResultSet(Box::default()), - TypeVariant::TransactionHistoryEntry => Self::TransactionHistoryEntry(Box::default()), - TypeVariant::TransactionHistoryEntryExt => { - Self::TransactionHistoryEntryExt(Box::default()) - } - TypeVariant::TransactionHistoryResultEntry => { - Self::TransactionHistoryResultEntry(Box::default()) - } - TypeVariant::TransactionHistoryResultEntryExt => { - Self::TransactionHistoryResultEntryExt(Box::default()) - } - TypeVariant::LedgerHeaderHistoryEntry => Self::LedgerHeaderHistoryEntry(Box::default()), - TypeVariant::LedgerHeaderHistoryEntryExt => { - Self::LedgerHeaderHistoryEntryExt(Box::default()) - } - TypeVariant::LedgerScpMessages => Self::LedgerScpMessages(Box::default()), - TypeVariant::ScpHistoryEntryV0 => Self::ScpHistoryEntryV0(Box::default()), - TypeVariant::ScpHistoryEntry => Self::ScpHistoryEntry(Box::default()), - TypeVariant::LedgerEntryChangeType => Self::LedgerEntryChangeType(Box::default()), - TypeVariant::LedgerEntryChange => Self::LedgerEntryChange(Box::default()), - TypeVariant::LedgerEntryChanges => Self::LedgerEntryChanges(Box::default()), - TypeVariant::OperationMeta => Self::OperationMeta(Box::default()), - TypeVariant::TransactionMetaV1 => Self::TransactionMetaV1(Box::default()), - TypeVariant::TransactionMetaV2 => Self::TransactionMetaV2(Box::default()), - TypeVariant::ContractEventType => Self::ContractEventType(Box::default()), - TypeVariant::ContractEvent => Self::ContractEvent(Box::default()), - TypeVariant::ContractEventBody => Self::ContractEventBody(Box::default()), - TypeVariant::ContractEventV0 => Self::ContractEventV0(Box::default()), - TypeVariant::DiagnosticEvent => Self::DiagnosticEvent(Box::default()), - TypeVariant::SorobanTransactionMetaExtV1 => { - Self::SorobanTransactionMetaExtV1(Box::default()) - } - TypeVariant::SorobanTransactionMetaExt => { - Self::SorobanTransactionMetaExt(Box::default()) - } - TypeVariant::SorobanTransactionMeta => Self::SorobanTransactionMeta(Box::default()), - TypeVariant::TransactionMetaV3 => Self::TransactionMetaV3(Box::default()), - TypeVariant::OperationMetaV2 => Self::OperationMetaV2(Box::default()), - TypeVariant::SorobanTransactionMetaV2 => Self::SorobanTransactionMetaV2(Box::default()), - TypeVariant::TransactionEventStage => Self::TransactionEventStage(Box::default()), - TypeVariant::TransactionEvent => Self::TransactionEvent(Box::default()), - TypeVariant::TransactionMetaV4 => Self::TransactionMetaV4(Box::default()), - TypeVariant::InvokeHostFunctionSuccessPreImage => { - Self::InvokeHostFunctionSuccessPreImage(Box::default()) - } - TypeVariant::TransactionMeta => Self::TransactionMeta(Box::default()), - TypeVariant::TransactionResultMeta => Self::TransactionResultMeta(Box::default()), - TypeVariant::TransactionResultMetaV1 => Self::TransactionResultMetaV1(Box::default()), - TypeVariant::UpgradeEntryMeta => Self::UpgradeEntryMeta(Box::default()), - TypeVariant::LedgerCloseMetaV0 => Self::LedgerCloseMetaV0(Box::default()), - TypeVariant::LedgerCloseMetaExtV1 => Self::LedgerCloseMetaExtV1(Box::default()), - TypeVariant::LedgerCloseMetaExt => Self::LedgerCloseMetaExt(Box::default()), - TypeVariant::LedgerCloseMetaV1 => Self::LedgerCloseMetaV1(Box::default()), - TypeVariant::LedgerCloseMetaV2 => Self::LedgerCloseMetaV2(Box::default()), - TypeVariant::LedgerCloseMeta => Self::LedgerCloseMeta(Box::default()), - TypeVariant::ErrorCode => Self::ErrorCode(Box::default()), - TypeVariant::SError => Self::SError(Box::default()), - TypeVariant::SendMore => Self::SendMore(Box::default()), - TypeVariant::SendMoreExtended => Self::SendMoreExtended(Box::default()), - TypeVariant::AuthCert => Self::AuthCert(Box::default()), - TypeVariant::Hello => Self::Hello(Box::default()), - TypeVariant::Auth => Self::Auth(Box::default()), - TypeVariant::IpAddrType => Self::IpAddrType(Box::default()), - TypeVariant::PeerAddress => Self::PeerAddress(Box::default()), - TypeVariant::PeerAddressIp => Self::PeerAddressIp(Box::default()), - TypeVariant::MessageType => Self::MessageType(Box::default()), - TypeVariant::DontHave => Self::DontHave(Box::default()), - TypeVariant::SurveyMessageCommandType => Self::SurveyMessageCommandType(Box::default()), - TypeVariant::SurveyMessageResponseType => { - Self::SurveyMessageResponseType(Box::default()) - } - TypeVariant::TimeSlicedSurveyStartCollectingMessage => { - Self::TimeSlicedSurveyStartCollectingMessage(Box::default()) - } - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage => { - Self::SignedTimeSlicedSurveyStartCollectingMessage(Box::default()) - } - TypeVariant::TimeSlicedSurveyStopCollectingMessage => { - Self::TimeSlicedSurveyStopCollectingMessage(Box::default()) - } - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage => { - Self::SignedTimeSlicedSurveyStopCollectingMessage(Box::default()) - } - TypeVariant::SurveyRequestMessage => Self::SurveyRequestMessage(Box::default()), - TypeVariant::TimeSlicedSurveyRequestMessage => { - Self::TimeSlicedSurveyRequestMessage(Box::default()) - } - TypeVariant::SignedTimeSlicedSurveyRequestMessage => { - Self::SignedTimeSlicedSurveyRequestMessage(Box::default()) - } - TypeVariant::EncryptedBody => Self::EncryptedBody(Box::default()), - TypeVariant::SurveyResponseMessage => Self::SurveyResponseMessage(Box::default()), - TypeVariant::TimeSlicedSurveyResponseMessage => { - Self::TimeSlicedSurveyResponseMessage(Box::default()) - } - TypeVariant::SignedTimeSlicedSurveyResponseMessage => { - Self::SignedTimeSlicedSurveyResponseMessage(Box::default()) - } - TypeVariant::PeerStats => Self::PeerStats(Box::default()), - TypeVariant::TimeSlicedNodeData => Self::TimeSlicedNodeData(Box::default()), - TypeVariant::TimeSlicedPeerData => Self::TimeSlicedPeerData(Box::default()), - TypeVariant::TimeSlicedPeerDataList => Self::TimeSlicedPeerDataList(Box::default()), - TypeVariant::TopologyResponseBodyV2 => Self::TopologyResponseBodyV2(Box::default()), - TypeVariant::SurveyResponseBody => Self::SurveyResponseBody(Box::default()), - TypeVariant::TxAdvertVector => Self::TxAdvertVector(Box::default()), - TypeVariant::FloodAdvert => Self::FloodAdvert(Box::default()), - TypeVariant::TxDemandVector => Self::TxDemandVector(Box::default()), - TypeVariant::FloodDemand => Self::FloodDemand(Box::default()), - TypeVariant::StellarMessage => Self::StellarMessage(Box::default()), - TypeVariant::AuthenticatedMessage => Self::AuthenticatedMessage(Box::default()), - TypeVariant::AuthenticatedMessageV0 => Self::AuthenticatedMessageV0(Box::default()), - TypeVariant::LiquidityPoolParameters => Self::LiquidityPoolParameters(Box::default()), - TypeVariant::MuxedAccount => Self::MuxedAccount(Box::default()), - TypeVariant::MuxedAccountMed25519 => Self::MuxedAccountMed25519(Box::default()), - TypeVariant::DecoratedSignature => Self::DecoratedSignature(Box::default()), - TypeVariant::OperationType => Self::OperationType(Box::default()), - TypeVariant::CreateAccountOp => Self::CreateAccountOp(Box::default()), - TypeVariant::PaymentOp => Self::PaymentOp(Box::default()), - TypeVariant::PathPaymentStrictReceiveOp => { - Self::PathPaymentStrictReceiveOp(Box::default()) - } - TypeVariant::PathPaymentStrictSendOp => Self::PathPaymentStrictSendOp(Box::default()), - TypeVariant::ManageSellOfferOp => Self::ManageSellOfferOp(Box::default()), - TypeVariant::ManageBuyOfferOp => Self::ManageBuyOfferOp(Box::default()), - TypeVariant::CreatePassiveSellOfferOp => Self::CreatePassiveSellOfferOp(Box::default()), - TypeVariant::SetOptionsOp => Self::SetOptionsOp(Box::default()), - TypeVariant::ChangeTrustAsset => Self::ChangeTrustAsset(Box::default()), - TypeVariant::ChangeTrustOp => Self::ChangeTrustOp(Box::default()), - TypeVariant::AllowTrustOp => Self::AllowTrustOp(Box::default()), - TypeVariant::ManageDataOp => Self::ManageDataOp(Box::default()), - TypeVariant::BumpSequenceOp => Self::BumpSequenceOp(Box::default()), - TypeVariant::CreateClaimableBalanceOp => Self::CreateClaimableBalanceOp(Box::default()), - TypeVariant::ClaimClaimableBalanceOp => Self::ClaimClaimableBalanceOp(Box::default()), - TypeVariant::BeginSponsoringFutureReservesOp => { - Self::BeginSponsoringFutureReservesOp(Box::default()) - } - TypeVariant::RevokeSponsorshipType => Self::RevokeSponsorshipType(Box::default()), - TypeVariant::RevokeSponsorshipOp => Self::RevokeSponsorshipOp(Box::default()), - TypeVariant::RevokeSponsorshipOpSigner => { - Self::RevokeSponsorshipOpSigner(Box::default()) - } - TypeVariant::ClawbackOp => Self::ClawbackOp(Box::default()), - TypeVariant::ClawbackClaimableBalanceOp => { - Self::ClawbackClaimableBalanceOp(Box::default()) - } - TypeVariant::SetTrustLineFlagsOp => Self::SetTrustLineFlagsOp(Box::default()), - TypeVariant::LiquidityPoolDepositOp => Self::LiquidityPoolDepositOp(Box::default()), - TypeVariant::LiquidityPoolWithdrawOp => Self::LiquidityPoolWithdrawOp(Box::default()), - TypeVariant::HostFunctionType => Self::HostFunctionType(Box::default()), - TypeVariant::ContractIdPreimageType => Self::ContractIdPreimageType(Box::default()), - TypeVariant::ContractIdPreimage => Self::ContractIdPreimage(Box::default()), - TypeVariant::ContractIdPreimageFromAddress => { - Self::ContractIdPreimageFromAddress(Box::default()) - } - TypeVariant::CreateContractArgs => Self::CreateContractArgs(Box::default()), - TypeVariant::CreateContractArgsV2 => Self::CreateContractArgsV2(Box::default()), - TypeVariant::InvokeContractArgs => Self::InvokeContractArgs(Box::default()), - TypeVariant::HostFunction => Self::HostFunction(Box::default()), - TypeVariant::SorobanAuthorizedFunctionType => { - Self::SorobanAuthorizedFunctionType(Box::default()) - } - TypeVariant::SorobanAuthorizedFunction => { - Self::SorobanAuthorizedFunction(Box::default()) - } - TypeVariant::SorobanAuthorizedInvocation => { - Self::SorobanAuthorizedInvocation(Box::default()) - } - TypeVariant::SorobanAddressCredentials => { - Self::SorobanAddressCredentials(Box::default()) - } - TypeVariant::SorobanCredentialsType => Self::SorobanCredentialsType(Box::default()), - TypeVariant::SorobanCredentials => Self::SorobanCredentials(Box::default()), - TypeVariant::SorobanAuthorizationEntry => { - Self::SorobanAuthorizationEntry(Box::default()) - } - TypeVariant::SorobanAuthorizationEntries => { - Self::SorobanAuthorizationEntries(Box::default()) - } - TypeVariant::InvokeHostFunctionOp => Self::InvokeHostFunctionOp(Box::default()), - TypeVariant::ExtendFootprintTtlOp => Self::ExtendFootprintTtlOp(Box::default()), - TypeVariant::RestoreFootprintOp => Self::RestoreFootprintOp(Box::default()), - TypeVariant::Operation => Self::Operation(Box::default()), - TypeVariant::OperationBody => Self::OperationBody(Box::default()), - TypeVariant::HashIdPreimage => Self::HashIdPreimage(Box::default()), - TypeVariant::HashIdPreimageOperationId => { - Self::HashIdPreimageOperationId(Box::default()) - } - TypeVariant::HashIdPreimageRevokeId => Self::HashIdPreimageRevokeId(Box::default()), - TypeVariant::HashIdPreimageContractId => Self::HashIdPreimageContractId(Box::default()), - TypeVariant::HashIdPreimageSorobanAuthorization => { - Self::HashIdPreimageSorobanAuthorization(Box::default()) - } - TypeVariant::MemoType => Self::MemoType(Box::default()), - TypeVariant::Memo => Self::Memo(Box::default()), - TypeVariant::TimeBounds => Self::TimeBounds(Box::default()), - TypeVariant::LedgerBounds => Self::LedgerBounds(Box::default()), - TypeVariant::PreconditionsV2 => Self::PreconditionsV2(Box::default()), - TypeVariant::PreconditionType => Self::PreconditionType(Box::default()), - TypeVariant::Preconditions => Self::Preconditions(Box::default()), - TypeVariant::LedgerFootprint => Self::LedgerFootprint(Box::default()), - TypeVariant::SorobanResources => Self::SorobanResources(Box::default()), - TypeVariant::SorobanResourcesExtV0 => Self::SorobanResourcesExtV0(Box::default()), - TypeVariant::SorobanTransactionData => Self::SorobanTransactionData(Box::default()), - TypeVariant::SorobanTransactionDataExt => { - Self::SorobanTransactionDataExt(Box::default()) - } - TypeVariant::TransactionV0 => Self::TransactionV0(Box::default()), - TypeVariant::TransactionV0Ext => Self::TransactionV0Ext(Box::default()), - TypeVariant::TransactionV0Envelope => Self::TransactionV0Envelope(Box::default()), - TypeVariant::Transaction => Self::Transaction(Box::default()), - TypeVariant::TransactionExt => Self::TransactionExt(Box::default()), - TypeVariant::TransactionV1Envelope => Self::TransactionV1Envelope(Box::default()), - TypeVariant::FeeBumpTransaction => Self::FeeBumpTransaction(Box::default()), - TypeVariant::FeeBumpTransactionInnerTx => { - Self::FeeBumpTransactionInnerTx(Box::default()) - } - TypeVariant::FeeBumpTransactionExt => Self::FeeBumpTransactionExt(Box::default()), - TypeVariant::FeeBumpTransactionEnvelope => { - Self::FeeBumpTransactionEnvelope(Box::default()) - } - TypeVariant::TransactionEnvelope => Self::TransactionEnvelope(Box::default()), - TypeVariant::TransactionSignaturePayload => { - Self::TransactionSignaturePayload(Box::default()) - } - TypeVariant::TransactionSignaturePayloadTaggedTransaction => { - Self::TransactionSignaturePayloadTaggedTransaction(Box::default()) - } - TypeVariant::ClaimAtomType => Self::ClaimAtomType(Box::default()), - TypeVariant::ClaimOfferAtomV0 => Self::ClaimOfferAtomV0(Box::default()), - TypeVariant::ClaimOfferAtom => Self::ClaimOfferAtom(Box::default()), - TypeVariant::ClaimLiquidityAtom => Self::ClaimLiquidityAtom(Box::default()), - TypeVariant::ClaimAtom => Self::ClaimAtom(Box::default()), - TypeVariant::CreateAccountResultCode => Self::CreateAccountResultCode(Box::default()), - TypeVariant::CreateAccountResult => Self::CreateAccountResult(Box::default()), - TypeVariant::PaymentResultCode => Self::PaymentResultCode(Box::default()), - TypeVariant::PaymentResult => Self::PaymentResult(Box::default()), - TypeVariant::PathPaymentStrictReceiveResultCode => { - Self::PathPaymentStrictReceiveResultCode(Box::default()) - } - TypeVariant::SimplePaymentResult => Self::SimplePaymentResult(Box::default()), - TypeVariant::PathPaymentStrictReceiveResult => { - Self::PathPaymentStrictReceiveResult(Box::default()) - } - TypeVariant::PathPaymentStrictReceiveResultSuccess => { - Self::PathPaymentStrictReceiveResultSuccess(Box::default()) - } - TypeVariant::PathPaymentStrictSendResultCode => { - Self::PathPaymentStrictSendResultCode(Box::default()) - } - TypeVariant::PathPaymentStrictSendResult => { - Self::PathPaymentStrictSendResult(Box::default()) - } - TypeVariant::PathPaymentStrictSendResultSuccess => { - Self::PathPaymentStrictSendResultSuccess(Box::default()) - } - TypeVariant::ManageSellOfferResultCode => { - Self::ManageSellOfferResultCode(Box::default()) - } - TypeVariant::ManageOfferEffect => Self::ManageOfferEffect(Box::default()), - TypeVariant::ManageOfferSuccessResult => Self::ManageOfferSuccessResult(Box::default()), - TypeVariant::ManageOfferSuccessResultOffer => { - Self::ManageOfferSuccessResultOffer(Box::default()) - } - TypeVariant::ManageSellOfferResult => Self::ManageSellOfferResult(Box::default()), - TypeVariant::ManageBuyOfferResultCode => Self::ManageBuyOfferResultCode(Box::default()), - TypeVariant::ManageBuyOfferResult => Self::ManageBuyOfferResult(Box::default()), - TypeVariant::SetOptionsResultCode => Self::SetOptionsResultCode(Box::default()), - TypeVariant::SetOptionsResult => Self::SetOptionsResult(Box::default()), - TypeVariant::ChangeTrustResultCode => Self::ChangeTrustResultCode(Box::default()), - TypeVariant::ChangeTrustResult => Self::ChangeTrustResult(Box::default()), - TypeVariant::AllowTrustResultCode => Self::AllowTrustResultCode(Box::default()), - TypeVariant::AllowTrustResult => Self::AllowTrustResult(Box::default()), - TypeVariant::AccountMergeResultCode => Self::AccountMergeResultCode(Box::default()), - TypeVariant::AccountMergeResult => Self::AccountMergeResult(Box::default()), - TypeVariant::InflationResultCode => Self::InflationResultCode(Box::default()), - TypeVariant::InflationPayout => Self::InflationPayout(Box::default()), - TypeVariant::InflationResult => Self::InflationResult(Box::default()), - TypeVariant::ManageDataResultCode => Self::ManageDataResultCode(Box::default()), - TypeVariant::ManageDataResult => Self::ManageDataResult(Box::default()), - TypeVariant::BumpSequenceResultCode => Self::BumpSequenceResultCode(Box::default()), - TypeVariant::BumpSequenceResult => Self::BumpSequenceResult(Box::default()), - TypeVariant::CreateClaimableBalanceResultCode => { - Self::CreateClaimableBalanceResultCode(Box::default()) - } - TypeVariant::CreateClaimableBalanceResult => { - Self::CreateClaimableBalanceResult(Box::default()) - } - TypeVariant::ClaimClaimableBalanceResultCode => { - Self::ClaimClaimableBalanceResultCode(Box::default()) - } - TypeVariant::ClaimClaimableBalanceResult => { - Self::ClaimClaimableBalanceResult(Box::default()) - } - TypeVariant::BeginSponsoringFutureReservesResultCode => { - Self::BeginSponsoringFutureReservesResultCode(Box::default()) - } - TypeVariant::BeginSponsoringFutureReservesResult => { - Self::BeginSponsoringFutureReservesResult(Box::default()) - } - TypeVariant::EndSponsoringFutureReservesResultCode => { - Self::EndSponsoringFutureReservesResultCode(Box::default()) - } - TypeVariant::EndSponsoringFutureReservesResult => { - Self::EndSponsoringFutureReservesResult(Box::default()) - } - TypeVariant::RevokeSponsorshipResultCode => { - Self::RevokeSponsorshipResultCode(Box::default()) - } - TypeVariant::RevokeSponsorshipResult => Self::RevokeSponsorshipResult(Box::default()), - TypeVariant::ClawbackResultCode => Self::ClawbackResultCode(Box::default()), - TypeVariant::ClawbackResult => Self::ClawbackResult(Box::default()), - TypeVariant::ClawbackClaimableBalanceResultCode => { - Self::ClawbackClaimableBalanceResultCode(Box::default()) - } - TypeVariant::ClawbackClaimableBalanceResult => { - Self::ClawbackClaimableBalanceResult(Box::default()) - } - TypeVariant::SetTrustLineFlagsResultCode => { - Self::SetTrustLineFlagsResultCode(Box::default()) - } - TypeVariant::SetTrustLineFlagsResult => Self::SetTrustLineFlagsResult(Box::default()), - TypeVariant::LiquidityPoolDepositResultCode => { - Self::LiquidityPoolDepositResultCode(Box::default()) - } - TypeVariant::LiquidityPoolDepositResult => { - Self::LiquidityPoolDepositResult(Box::default()) - } - TypeVariant::LiquidityPoolWithdrawResultCode => { - Self::LiquidityPoolWithdrawResultCode(Box::default()) - } - TypeVariant::LiquidityPoolWithdrawResult => { - Self::LiquidityPoolWithdrawResult(Box::default()) - } - TypeVariant::InvokeHostFunctionResultCode => { - Self::InvokeHostFunctionResultCode(Box::default()) - } - TypeVariant::InvokeHostFunctionResult => Self::InvokeHostFunctionResult(Box::default()), - TypeVariant::ExtendFootprintTtlResultCode => { - Self::ExtendFootprintTtlResultCode(Box::default()) - } - TypeVariant::ExtendFootprintTtlResult => Self::ExtendFootprintTtlResult(Box::default()), - TypeVariant::RestoreFootprintResultCode => { - Self::RestoreFootprintResultCode(Box::default()) - } - TypeVariant::RestoreFootprintResult => Self::RestoreFootprintResult(Box::default()), - TypeVariant::OperationResultCode => Self::OperationResultCode(Box::default()), - TypeVariant::OperationResult => Self::OperationResult(Box::default()), - TypeVariant::OperationResultTr => Self::OperationResultTr(Box::default()), - TypeVariant::TransactionResultCode => Self::TransactionResultCode(Box::default()), - TypeVariant::InnerTransactionResult => Self::InnerTransactionResult(Box::default()), - TypeVariant::InnerTransactionResultResult => { - Self::InnerTransactionResultResult(Box::default()) - } - TypeVariant::InnerTransactionResultExt => { - Self::InnerTransactionResultExt(Box::default()) - } - TypeVariant::InnerTransactionResultPair => { - Self::InnerTransactionResultPair(Box::default()) - } - TypeVariant::TransactionResult => Self::TransactionResult(Box::default()), - TypeVariant::TransactionResultResult => Self::TransactionResultResult(Box::default()), - TypeVariant::TransactionResultExt => Self::TransactionResultExt(Box::default()), - TypeVariant::Hash => Self::Hash(Box::default()), - TypeVariant::Uint256 => Self::Uint256(Box::default()), - TypeVariant::Uint32 => Self::Uint32(Box::default()), - TypeVariant::Int32 => Self::Int32(Box::default()), - TypeVariant::Uint64 => Self::Uint64(Box::default()), - TypeVariant::Int64 => Self::Int64(Box::default()), - TypeVariant::TimePoint => Self::TimePoint(Box::default()), - TypeVariant::Duration => Self::Duration(Box::default()), - TypeVariant::ExtensionPoint => Self::ExtensionPoint(Box::default()), - TypeVariant::CryptoKeyType => Self::CryptoKeyType(Box::default()), - TypeVariant::PublicKeyType => Self::PublicKeyType(Box::default()), - TypeVariant::SignerKeyType => Self::SignerKeyType(Box::default()), - TypeVariant::PublicKey => Self::PublicKey(Box::default()), - TypeVariant::SignerKey => Self::SignerKey(Box::default()), - TypeVariant::SignerKeyEd25519SignedPayload => { - Self::SignerKeyEd25519SignedPayload(Box::default()) - } - TypeVariant::Signature => Self::Signature(Box::default()), - TypeVariant::SignatureHint => Self::SignatureHint(Box::default()), - TypeVariant::NodeId => Self::NodeId(Box::default()), - TypeVariant::AccountId => Self::AccountId(Box::default()), - TypeVariant::ContractId => Self::ContractId(Box::default()), - TypeVariant::Curve25519Secret => Self::Curve25519Secret(Box::default()), - TypeVariant::Curve25519Public => Self::Curve25519Public(Box::default()), - TypeVariant::HmacSha256Key => Self::HmacSha256Key(Box::default()), - TypeVariant::HmacSha256Mac => Self::HmacSha256Mac(Box::default()), - TypeVariant::ShortHashSeed => Self::ShortHashSeed(Box::default()), - TypeVariant::BinaryFuseFilterType => Self::BinaryFuseFilterType(Box::default()), - TypeVariant::SerializedBinaryFuseFilter => { - Self::SerializedBinaryFuseFilter(Box::default()) - } - TypeVariant::PoolId => Self::PoolId(Box::default()), - TypeVariant::ClaimableBalanceIdType => Self::ClaimableBalanceIdType(Box::default()), - TypeVariant::ClaimableBalanceId => Self::ClaimableBalanceId(Box::default()), - } - } - - #[cfg(feature = "alloc")] - #[must_use] - #[allow(clippy::too_many_lines)] - pub fn value(&self) -> &dyn core::any::Any { - #[allow(clippy::match_same_arms)] - match self { - Self::Value(ref v) => v.as_ref(), - Self::ScpBallot(ref v) => v.as_ref(), - Self::ScpStatementType(ref v) => v.as_ref(), - Self::ScpNomination(ref v) => v.as_ref(), - Self::ScpStatement(ref v) => v.as_ref(), - Self::ScpStatementPledges(ref v) => v.as_ref(), - Self::ScpStatementPrepare(ref v) => v.as_ref(), - Self::ScpStatementConfirm(ref v) => v.as_ref(), - Self::ScpStatementExternalize(ref v) => v.as_ref(), - Self::ScpEnvelope(ref v) => v.as_ref(), - Self::ScpQuorumSet(ref v) => v.as_ref(), - Self::EncodedLedgerKey(ref v) => v.as_ref(), - Self::ConfigSettingContractExecutionLanesV0(ref v) => v.as_ref(), - Self::ConfigSettingContractComputeV0(ref v) => v.as_ref(), - Self::ConfigSettingContractParallelComputeV0(ref v) => v.as_ref(), - Self::ConfigSettingContractLedgerCostV0(ref v) => v.as_ref(), - Self::ConfigSettingContractLedgerCostExtV0(ref v) => v.as_ref(), - Self::ConfigSettingContractHistoricalDataV0(ref v) => v.as_ref(), - Self::ConfigSettingContractEventsV0(ref v) => v.as_ref(), - Self::ConfigSettingContractBandwidthV0(ref v) => v.as_ref(), - Self::ContractCostType(ref v) => v.as_ref(), - Self::ContractCostParamEntry(ref v) => v.as_ref(), - Self::StateArchivalSettings(ref v) => v.as_ref(), - Self::EvictionIterator(ref v) => v.as_ref(), - Self::ConfigSettingScpTiming(ref v) => v.as_ref(), - Self::FrozenLedgerKeys(ref v) => v.as_ref(), - Self::FrozenLedgerKeysDelta(ref v) => v.as_ref(), - Self::FreezeBypassTxs(ref v) => v.as_ref(), - Self::FreezeBypassTxsDelta(ref v) => v.as_ref(), - Self::ContractCostParams(ref v) => v.as_ref(), - Self::ConfigSettingId(ref v) => v.as_ref(), - Self::ConfigSettingEntry(ref v) => v.as_ref(), - Self::ScEnvMetaKind(ref v) => v.as_ref(), - Self::ScEnvMetaEntry(ref v) => v.as_ref(), - Self::ScEnvMetaEntryInterfaceVersion(ref v) => v.as_ref(), - Self::ScMetaV0(ref v) => v.as_ref(), - Self::ScMetaKind(ref v) => v.as_ref(), - Self::ScMetaEntry(ref v) => v.as_ref(), - Self::ScSpecType(ref v) => v.as_ref(), - Self::ScSpecTypeOption(ref v) => v.as_ref(), - Self::ScSpecTypeResult(ref v) => v.as_ref(), - Self::ScSpecTypeVec(ref v) => v.as_ref(), - Self::ScSpecTypeMap(ref v) => v.as_ref(), - Self::ScSpecTypeTuple(ref v) => v.as_ref(), - Self::ScSpecTypeBytesN(ref v) => v.as_ref(), - Self::ScSpecTypeUdt(ref v) => v.as_ref(), - Self::ScSpecTypeDef(ref v) => v.as_ref(), - Self::ScSpecUdtStructFieldV0(ref v) => v.as_ref(), - Self::ScSpecUdtStructV0(ref v) => v.as_ref(), - Self::ScSpecUdtUnionCaseVoidV0(ref v) => v.as_ref(), - Self::ScSpecUdtUnionCaseTupleV0(ref v) => v.as_ref(), - Self::ScSpecUdtUnionCaseV0Kind(ref v) => v.as_ref(), - Self::ScSpecUdtUnionCaseV0(ref v) => v.as_ref(), - Self::ScSpecUdtUnionV0(ref v) => v.as_ref(), - Self::ScSpecUdtEnumCaseV0(ref v) => v.as_ref(), - Self::ScSpecUdtEnumV0(ref v) => v.as_ref(), - Self::ScSpecUdtErrorEnumCaseV0(ref v) => v.as_ref(), - Self::ScSpecUdtErrorEnumV0(ref v) => v.as_ref(), - Self::ScSpecFunctionInputV0(ref v) => v.as_ref(), - Self::ScSpecFunctionV0(ref v) => v.as_ref(), - Self::ScSpecEventParamLocationV0(ref v) => v.as_ref(), - Self::ScSpecEventParamV0(ref v) => v.as_ref(), - Self::ScSpecEventDataFormat(ref v) => v.as_ref(), - Self::ScSpecEventV0(ref v) => v.as_ref(), - Self::ScSpecEntryKind(ref v) => v.as_ref(), - Self::ScSpecEntry(ref v) => v.as_ref(), - Self::ScValType(ref v) => v.as_ref(), - Self::ScErrorType(ref v) => v.as_ref(), - Self::ScErrorCode(ref v) => v.as_ref(), - Self::ScError(ref v) => v.as_ref(), - Self::UInt128Parts(ref v) => v.as_ref(), - Self::Int128Parts(ref v) => v.as_ref(), - Self::UInt256Parts(ref v) => v.as_ref(), - Self::Int256Parts(ref v) => v.as_ref(), - Self::ContractExecutableType(ref v) => v.as_ref(), - Self::ContractExecutable(ref v) => v.as_ref(), - Self::ScAddressType(ref v) => v.as_ref(), - Self::MuxedEd25519Account(ref v) => v.as_ref(), - Self::ScAddress(ref v) => v.as_ref(), - Self::ScVec(ref v) => v.as_ref(), - Self::ScMap(ref v) => v.as_ref(), - Self::ScBytes(ref v) => v.as_ref(), - Self::ScString(ref v) => v.as_ref(), - Self::ScSymbol(ref v) => v.as_ref(), - Self::ScNonceKey(ref v) => v.as_ref(), - Self::ScContractInstance(ref v) => v.as_ref(), - Self::ScVal(ref v) => v.as_ref(), - Self::ScMapEntry(ref v) => v.as_ref(), - Self::LedgerCloseMetaBatch(ref v) => v.as_ref(), - Self::StoredTransactionSet(ref v) => v.as_ref(), - Self::StoredDebugTransactionSet(ref v) => v.as_ref(), - Self::PersistedScpStateV0(ref v) => v.as_ref(), - Self::PersistedScpStateV1(ref v) => v.as_ref(), - Self::PersistedScpState(ref v) => v.as_ref(), - Self::Thresholds(ref v) => v.as_ref(), - Self::String32(ref v) => v.as_ref(), - Self::String64(ref v) => v.as_ref(), - Self::SequenceNumber(ref v) => v.as_ref(), - Self::DataValue(ref v) => v.as_ref(), - Self::AssetCode4(ref v) => v.as_ref(), - Self::AssetCode12(ref v) => v.as_ref(), - Self::AssetType(ref v) => v.as_ref(), - Self::AssetCode(ref v) => v.as_ref(), - Self::AlphaNum4(ref v) => v.as_ref(), - Self::AlphaNum12(ref v) => v.as_ref(), - Self::Asset(ref v) => v.as_ref(), - Self::Price(ref v) => v.as_ref(), - Self::Liabilities(ref v) => v.as_ref(), - Self::ThresholdIndexes(ref v) => v.as_ref(), - Self::LedgerEntryType(ref v) => v.as_ref(), - Self::Signer(ref v) => v.as_ref(), - Self::AccountFlags(ref v) => v.as_ref(), - Self::SponsorshipDescriptor(ref v) => v.as_ref(), - Self::AccountEntryExtensionV3(ref v) => v.as_ref(), - Self::AccountEntryExtensionV2(ref v) => v.as_ref(), - Self::AccountEntryExtensionV2Ext(ref v) => v.as_ref(), - Self::AccountEntryExtensionV1(ref v) => v.as_ref(), - Self::AccountEntryExtensionV1Ext(ref v) => v.as_ref(), - Self::AccountEntry(ref v) => v.as_ref(), - Self::AccountEntryExt(ref v) => v.as_ref(), - Self::TrustLineFlags(ref v) => v.as_ref(), - Self::LiquidityPoolType(ref v) => v.as_ref(), - Self::TrustLineAsset(ref v) => v.as_ref(), - Self::TrustLineEntryExtensionV2(ref v) => v.as_ref(), - Self::TrustLineEntryExtensionV2Ext(ref v) => v.as_ref(), - Self::TrustLineEntry(ref v) => v.as_ref(), - Self::TrustLineEntryExt(ref v) => v.as_ref(), - Self::TrustLineEntryV1(ref v) => v.as_ref(), - Self::TrustLineEntryV1Ext(ref v) => v.as_ref(), - Self::OfferEntryFlags(ref v) => v.as_ref(), - Self::OfferEntry(ref v) => v.as_ref(), - Self::OfferEntryExt(ref v) => v.as_ref(), - Self::DataEntry(ref v) => v.as_ref(), - Self::DataEntryExt(ref v) => v.as_ref(), - Self::ClaimPredicateType(ref v) => v.as_ref(), - Self::ClaimPredicate(ref v) => v.as_ref(), - Self::ClaimantType(ref v) => v.as_ref(), - Self::Claimant(ref v) => v.as_ref(), - Self::ClaimantV0(ref v) => v.as_ref(), - Self::ClaimableBalanceFlags(ref v) => v.as_ref(), - Self::ClaimableBalanceEntryExtensionV1(ref v) => v.as_ref(), - Self::ClaimableBalanceEntryExtensionV1Ext(ref v) => v.as_ref(), - Self::ClaimableBalanceEntry(ref v) => v.as_ref(), - Self::ClaimableBalanceEntryExt(ref v) => v.as_ref(), - Self::LiquidityPoolConstantProductParameters(ref v) => v.as_ref(), - Self::LiquidityPoolEntry(ref v) => v.as_ref(), - Self::LiquidityPoolEntryBody(ref v) => v.as_ref(), - Self::LiquidityPoolEntryConstantProduct(ref v) => v.as_ref(), - Self::ContractDataDurability(ref v) => v.as_ref(), - Self::ContractDataEntry(ref v) => v.as_ref(), - Self::ContractCodeCostInputs(ref v) => v.as_ref(), - Self::ContractCodeEntry(ref v) => v.as_ref(), - Self::ContractCodeEntryExt(ref v) => v.as_ref(), - Self::ContractCodeEntryV1(ref v) => v.as_ref(), - Self::TtlEntry(ref v) => v.as_ref(), - Self::LedgerEntryExtensionV1(ref v) => v.as_ref(), - Self::LedgerEntryExtensionV1Ext(ref v) => v.as_ref(), - Self::LedgerEntry(ref v) => v.as_ref(), - Self::LedgerEntryData(ref v) => v.as_ref(), - Self::LedgerEntryExt(ref v) => v.as_ref(), - Self::LedgerKey(ref v) => v.as_ref(), - Self::LedgerKeyAccount(ref v) => v.as_ref(), - Self::LedgerKeyTrustLine(ref v) => v.as_ref(), - Self::LedgerKeyOffer(ref v) => v.as_ref(), - Self::LedgerKeyData(ref v) => v.as_ref(), - Self::LedgerKeyClaimableBalance(ref v) => v.as_ref(), - Self::LedgerKeyLiquidityPool(ref v) => v.as_ref(), - Self::LedgerKeyContractData(ref v) => v.as_ref(), - Self::LedgerKeyContractCode(ref v) => v.as_ref(), - Self::LedgerKeyConfigSetting(ref v) => v.as_ref(), - Self::LedgerKeyTtl(ref v) => v.as_ref(), - Self::EnvelopeType(ref v) => v.as_ref(), - Self::BucketListType(ref v) => v.as_ref(), - Self::BucketEntryType(ref v) => v.as_ref(), - Self::HotArchiveBucketEntryType(ref v) => v.as_ref(), - Self::BucketMetadata(ref v) => v.as_ref(), - Self::BucketMetadataExt(ref v) => v.as_ref(), - Self::BucketEntry(ref v) => v.as_ref(), - Self::HotArchiveBucketEntry(ref v) => v.as_ref(), - Self::UpgradeType(ref v) => v.as_ref(), - Self::StellarValueType(ref v) => v.as_ref(), - Self::LedgerCloseValueSignature(ref v) => v.as_ref(), - Self::StellarValue(ref v) => v.as_ref(), - Self::StellarValueExt(ref v) => v.as_ref(), - Self::LedgerHeaderFlags(ref v) => v.as_ref(), - Self::LedgerHeaderExtensionV1(ref v) => v.as_ref(), - Self::LedgerHeaderExtensionV1Ext(ref v) => v.as_ref(), - Self::LedgerHeader(ref v) => v.as_ref(), - Self::LedgerHeaderExt(ref v) => v.as_ref(), - Self::LedgerUpgradeType(ref v) => v.as_ref(), - Self::ConfigUpgradeSetKey(ref v) => v.as_ref(), - Self::LedgerUpgrade(ref v) => v.as_ref(), - Self::ConfigUpgradeSet(ref v) => v.as_ref(), - Self::TxSetComponentType(ref v) => v.as_ref(), - Self::DependentTxCluster(ref v) => v.as_ref(), - Self::ParallelTxExecutionStage(ref v) => v.as_ref(), - Self::ParallelTxsComponent(ref v) => v.as_ref(), - Self::TxSetComponent(ref v) => v.as_ref(), - Self::TxSetComponentTxsMaybeDiscountedFee(ref v) => v.as_ref(), - Self::TransactionPhase(ref v) => v.as_ref(), - Self::TransactionSet(ref v) => v.as_ref(), - Self::TransactionSetV1(ref v) => v.as_ref(), - Self::GeneralizedTransactionSet(ref v) => v.as_ref(), - Self::TransactionResultPair(ref v) => v.as_ref(), - Self::TransactionResultSet(ref v) => v.as_ref(), - Self::TransactionHistoryEntry(ref v) => v.as_ref(), - Self::TransactionHistoryEntryExt(ref v) => v.as_ref(), - Self::TransactionHistoryResultEntry(ref v) => v.as_ref(), - Self::TransactionHistoryResultEntryExt(ref v) => v.as_ref(), - Self::LedgerHeaderHistoryEntry(ref v) => v.as_ref(), - Self::LedgerHeaderHistoryEntryExt(ref v) => v.as_ref(), - Self::LedgerScpMessages(ref v) => v.as_ref(), - Self::ScpHistoryEntryV0(ref v) => v.as_ref(), - Self::ScpHistoryEntry(ref v) => v.as_ref(), - Self::LedgerEntryChangeType(ref v) => v.as_ref(), - Self::LedgerEntryChange(ref v) => v.as_ref(), - Self::LedgerEntryChanges(ref v) => v.as_ref(), - Self::OperationMeta(ref v) => v.as_ref(), - Self::TransactionMetaV1(ref v) => v.as_ref(), - Self::TransactionMetaV2(ref v) => v.as_ref(), - Self::ContractEventType(ref v) => v.as_ref(), - Self::ContractEvent(ref v) => v.as_ref(), - Self::ContractEventBody(ref v) => v.as_ref(), - Self::ContractEventV0(ref v) => v.as_ref(), - Self::DiagnosticEvent(ref v) => v.as_ref(), - Self::SorobanTransactionMetaExtV1(ref v) => v.as_ref(), - Self::SorobanTransactionMetaExt(ref v) => v.as_ref(), - Self::SorobanTransactionMeta(ref v) => v.as_ref(), - Self::TransactionMetaV3(ref v) => v.as_ref(), - Self::OperationMetaV2(ref v) => v.as_ref(), - Self::SorobanTransactionMetaV2(ref v) => v.as_ref(), - Self::TransactionEventStage(ref v) => v.as_ref(), - Self::TransactionEvent(ref v) => v.as_ref(), - Self::TransactionMetaV4(ref v) => v.as_ref(), - Self::InvokeHostFunctionSuccessPreImage(ref v) => v.as_ref(), - Self::TransactionMeta(ref v) => v.as_ref(), - Self::TransactionResultMeta(ref v) => v.as_ref(), - Self::TransactionResultMetaV1(ref v) => v.as_ref(), - Self::UpgradeEntryMeta(ref v) => v.as_ref(), - Self::LedgerCloseMetaV0(ref v) => v.as_ref(), - Self::LedgerCloseMetaExtV1(ref v) => v.as_ref(), - Self::LedgerCloseMetaExt(ref v) => v.as_ref(), - Self::LedgerCloseMetaV1(ref v) => v.as_ref(), - Self::LedgerCloseMetaV2(ref v) => v.as_ref(), - Self::LedgerCloseMeta(ref v) => v.as_ref(), - Self::ErrorCode(ref v) => v.as_ref(), - Self::SError(ref v) => v.as_ref(), - Self::SendMore(ref v) => v.as_ref(), - Self::SendMoreExtended(ref v) => v.as_ref(), - Self::AuthCert(ref v) => v.as_ref(), - Self::Hello(ref v) => v.as_ref(), - Self::Auth(ref v) => v.as_ref(), - Self::IpAddrType(ref v) => v.as_ref(), - Self::PeerAddress(ref v) => v.as_ref(), - Self::PeerAddressIp(ref v) => v.as_ref(), - Self::MessageType(ref v) => v.as_ref(), - Self::DontHave(ref v) => v.as_ref(), - Self::SurveyMessageCommandType(ref v) => v.as_ref(), - Self::SurveyMessageResponseType(ref v) => v.as_ref(), - Self::TimeSlicedSurveyStartCollectingMessage(ref v) => v.as_ref(), - Self::SignedTimeSlicedSurveyStartCollectingMessage(ref v) => v.as_ref(), - Self::TimeSlicedSurveyStopCollectingMessage(ref v) => v.as_ref(), - Self::SignedTimeSlicedSurveyStopCollectingMessage(ref v) => v.as_ref(), - Self::SurveyRequestMessage(ref v) => v.as_ref(), - Self::TimeSlicedSurveyRequestMessage(ref v) => v.as_ref(), - Self::SignedTimeSlicedSurveyRequestMessage(ref v) => v.as_ref(), - Self::EncryptedBody(ref v) => v.as_ref(), - Self::SurveyResponseMessage(ref v) => v.as_ref(), - Self::TimeSlicedSurveyResponseMessage(ref v) => v.as_ref(), - Self::SignedTimeSlicedSurveyResponseMessage(ref v) => v.as_ref(), - Self::PeerStats(ref v) => v.as_ref(), - Self::TimeSlicedNodeData(ref v) => v.as_ref(), - Self::TimeSlicedPeerData(ref v) => v.as_ref(), - Self::TimeSlicedPeerDataList(ref v) => v.as_ref(), - Self::TopologyResponseBodyV2(ref v) => v.as_ref(), - Self::SurveyResponseBody(ref v) => v.as_ref(), - Self::TxAdvertVector(ref v) => v.as_ref(), - Self::FloodAdvert(ref v) => v.as_ref(), - Self::TxDemandVector(ref v) => v.as_ref(), - Self::FloodDemand(ref v) => v.as_ref(), - Self::StellarMessage(ref v) => v.as_ref(), - Self::AuthenticatedMessage(ref v) => v.as_ref(), - Self::AuthenticatedMessageV0(ref v) => v.as_ref(), - Self::LiquidityPoolParameters(ref v) => v.as_ref(), - Self::MuxedAccount(ref v) => v.as_ref(), - Self::MuxedAccountMed25519(ref v) => v.as_ref(), - Self::DecoratedSignature(ref v) => v.as_ref(), - Self::OperationType(ref v) => v.as_ref(), - Self::CreateAccountOp(ref v) => v.as_ref(), - Self::PaymentOp(ref v) => v.as_ref(), - Self::PathPaymentStrictReceiveOp(ref v) => v.as_ref(), - Self::PathPaymentStrictSendOp(ref v) => v.as_ref(), - Self::ManageSellOfferOp(ref v) => v.as_ref(), - Self::ManageBuyOfferOp(ref v) => v.as_ref(), - Self::CreatePassiveSellOfferOp(ref v) => v.as_ref(), - Self::SetOptionsOp(ref v) => v.as_ref(), - Self::ChangeTrustAsset(ref v) => v.as_ref(), - Self::ChangeTrustOp(ref v) => v.as_ref(), - Self::AllowTrustOp(ref v) => v.as_ref(), - Self::ManageDataOp(ref v) => v.as_ref(), - Self::BumpSequenceOp(ref v) => v.as_ref(), - Self::CreateClaimableBalanceOp(ref v) => v.as_ref(), - Self::ClaimClaimableBalanceOp(ref v) => v.as_ref(), - Self::BeginSponsoringFutureReservesOp(ref v) => v.as_ref(), - Self::RevokeSponsorshipType(ref v) => v.as_ref(), - Self::RevokeSponsorshipOp(ref v) => v.as_ref(), - Self::RevokeSponsorshipOpSigner(ref v) => v.as_ref(), - Self::ClawbackOp(ref v) => v.as_ref(), - Self::ClawbackClaimableBalanceOp(ref v) => v.as_ref(), - Self::SetTrustLineFlagsOp(ref v) => v.as_ref(), - Self::LiquidityPoolDepositOp(ref v) => v.as_ref(), - Self::LiquidityPoolWithdrawOp(ref v) => v.as_ref(), - Self::HostFunctionType(ref v) => v.as_ref(), - Self::ContractIdPreimageType(ref v) => v.as_ref(), - Self::ContractIdPreimage(ref v) => v.as_ref(), - Self::ContractIdPreimageFromAddress(ref v) => v.as_ref(), - Self::CreateContractArgs(ref v) => v.as_ref(), - Self::CreateContractArgsV2(ref v) => v.as_ref(), - Self::InvokeContractArgs(ref v) => v.as_ref(), - Self::HostFunction(ref v) => v.as_ref(), - Self::SorobanAuthorizedFunctionType(ref v) => v.as_ref(), - Self::SorobanAuthorizedFunction(ref v) => v.as_ref(), - Self::SorobanAuthorizedInvocation(ref v) => v.as_ref(), - Self::SorobanAddressCredentials(ref v) => v.as_ref(), - Self::SorobanCredentialsType(ref v) => v.as_ref(), - Self::SorobanCredentials(ref v) => v.as_ref(), - Self::SorobanAuthorizationEntry(ref v) => v.as_ref(), - Self::SorobanAuthorizationEntries(ref v) => v.as_ref(), - Self::InvokeHostFunctionOp(ref v) => v.as_ref(), - Self::ExtendFootprintTtlOp(ref v) => v.as_ref(), - Self::RestoreFootprintOp(ref v) => v.as_ref(), - Self::Operation(ref v) => v.as_ref(), - Self::OperationBody(ref v) => v.as_ref(), - Self::HashIdPreimage(ref v) => v.as_ref(), - Self::HashIdPreimageOperationId(ref v) => v.as_ref(), - Self::HashIdPreimageRevokeId(ref v) => v.as_ref(), - Self::HashIdPreimageContractId(ref v) => v.as_ref(), - Self::HashIdPreimageSorobanAuthorization(ref v) => v.as_ref(), - Self::MemoType(ref v) => v.as_ref(), - Self::Memo(ref v) => v.as_ref(), - Self::TimeBounds(ref v) => v.as_ref(), - Self::LedgerBounds(ref v) => v.as_ref(), - Self::PreconditionsV2(ref v) => v.as_ref(), - Self::PreconditionType(ref v) => v.as_ref(), - Self::Preconditions(ref v) => v.as_ref(), - Self::LedgerFootprint(ref v) => v.as_ref(), - Self::SorobanResources(ref v) => v.as_ref(), - Self::SorobanResourcesExtV0(ref v) => v.as_ref(), - Self::SorobanTransactionData(ref v) => v.as_ref(), - Self::SorobanTransactionDataExt(ref v) => v.as_ref(), - Self::TransactionV0(ref v) => v.as_ref(), - Self::TransactionV0Ext(ref v) => v.as_ref(), - Self::TransactionV0Envelope(ref v) => v.as_ref(), - Self::Transaction(ref v) => v.as_ref(), - Self::TransactionExt(ref v) => v.as_ref(), - Self::TransactionV1Envelope(ref v) => v.as_ref(), - Self::FeeBumpTransaction(ref v) => v.as_ref(), - Self::FeeBumpTransactionInnerTx(ref v) => v.as_ref(), - Self::FeeBumpTransactionExt(ref v) => v.as_ref(), - Self::FeeBumpTransactionEnvelope(ref v) => v.as_ref(), - Self::TransactionEnvelope(ref v) => v.as_ref(), - Self::TransactionSignaturePayload(ref v) => v.as_ref(), - Self::TransactionSignaturePayloadTaggedTransaction(ref v) => v.as_ref(), - Self::ClaimAtomType(ref v) => v.as_ref(), - Self::ClaimOfferAtomV0(ref v) => v.as_ref(), - Self::ClaimOfferAtom(ref v) => v.as_ref(), - Self::ClaimLiquidityAtom(ref v) => v.as_ref(), - Self::ClaimAtom(ref v) => v.as_ref(), - Self::CreateAccountResultCode(ref v) => v.as_ref(), - Self::CreateAccountResult(ref v) => v.as_ref(), - Self::PaymentResultCode(ref v) => v.as_ref(), - Self::PaymentResult(ref v) => v.as_ref(), - Self::PathPaymentStrictReceiveResultCode(ref v) => v.as_ref(), - Self::SimplePaymentResult(ref v) => v.as_ref(), - Self::PathPaymentStrictReceiveResult(ref v) => v.as_ref(), - Self::PathPaymentStrictReceiveResultSuccess(ref v) => v.as_ref(), - Self::PathPaymentStrictSendResultCode(ref v) => v.as_ref(), - Self::PathPaymentStrictSendResult(ref v) => v.as_ref(), - Self::PathPaymentStrictSendResultSuccess(ref v) => v.as_ref(), - Self::ManageSellOfferResultCode(ref v) => v.as_ref(), - Self::ManageOfferEffect(ref v) => v.as_ref(), - Self::ManageOfferSuccessResult(ref v) => v.as_ref(), - Self::ManageOfferSuccessResultOffer(ref v) => v.as_ref(), - Self::ManageSellOfferResult(ref v) => v.as_ref(), - Self::ManageBuyOfferResultCode(ref v) => v.as_ref(), - Self::ManageBuyOfferResult(ref v) => v.as_ref(), - Self::SetOptionsResultCode(ref v) => v.as_ref(), - Self::SetOptionsResult(ref v) => v.as_ref(), - Self::ChangeTrustResultCode(ref v) => v.as_ref(), - Self::ChangeTrustResult(ref v) => v.as_ref(), - Self::AllowTrustResultCode(ref v) => v.as_ref(), - Self::AllowTrustResult(ref v) => v.as_ref(), - Self::AccountMergeResultCode(ref v) => v.as_ref(), - Self::AccountMergeResult(ref v) => v.as_ref(), - Self::InflationResultCode(ref v) => v.as_ref(), - Self::InflationPayout(ref v) => v.as_ref(), - Self::InflationResult(ref v) => v.as_ref(), - Self::ManageDataResultCode(ref v) => v.as_ref(), - Self::ManageDataResult(ref v) => v.as_ref(), - Self::BumpSequenceResultCode(ref v) => v.as_ref(), - Self::BumpSequenceResult(ref v) => v.as_ref(), - Self::CreateClaimableBalanceResultCode(ref v) => v.as_ref(), - Self::CreateClaimableBalanceResult(ref v) => v.as_ref(), - Self::ClaimClaimableBalanceResultCode(ref v) => v.as_ref(), - Self::ClaimClaimableBalanceResult(ref v) => v.as_ref(), - Self::BeginSponsoringFutureReservesResultCode(ref v) => v.as_ref(), - Self::BeginSponsoringFutureReservesResult(ref v) => v.as_ref(), - Self::EndSponsoringFutureReservesResultCode(ref v) => v.as_ref(), - Self::EndSponsoringFutureReservesResult(ref v) => v.as_ref(), - Self::RevokeSponsorshipResultCode(ref v) => v.as_ref(), - Self::RevokeSponsorshipResult(ref v) => v.as_ref(), - Self::ClawbackResultCode(ref v) => v.as_ref(), - Self::ClawbackResult(ref v) => v.as_ref(), - Self::ClawbackClaimableBalanceResultCode(ref v) => v.as_ref(), - Self::ClawbackClaimableBalanceResult(ref v) => v.as_ref(), - Self::SetTrustLineFlagsResultCode(ref v) => v.as_ref(), - Self::SetTrustLineFlagsResult(ref v) => v.as_ref(), - Self::LiquidityPoolDepositResultCode(ref v) => v.as_ref(), - Self::LiquidityPoolDepositResult(ref v) => v.as_ref(), - Self::LiquidityPoolWithdrawResultCode(ref v) => v.as_ref(), - Self::LiquidityPoolWithdrawResult(ref v) => v.as_ref(), - Self::InvokeHostFunctionResultCode(ref v) => v.as_ref(), - Self::InvokeHostFunctionResult(ref v) => v.as_ref(), - Self::ExtendFootprintTtlResultCode(ref v) => v.as_ref(), - Self::ExtendFootprintTtlResult(ref v) => v.as_ref(), - Self::RestoreFootprintResultCode(ref v) => v.as_ref(), - Self::RestoreFootprintResult(ref v) => v.as_ref(), - Self::OperationResultCode(ref v) => v.as_ref(), - Self::OperationResult(ref v) => v.as_ref(), - Self::OperationResultTr(ref v) => v.as_ref(), - Self::TransactionResultCode(ref v) => v.as_ref(), - Self::InnerTransactionResult(ref v) => v.as_ref(), - Self::InnerTransactionResultResult(ref v) => v.as_ref(), - Self::InnerTransactionResultExt(ref v) => v.as_ref(), - Self::InnerTransactionResultPair(ref v) => v.as_ref(), - Self::TransactionResult(ref v) => v.as_ref(), - Self::TransactionResultResult(ref v) => v.as_ref(), - Self::TransactionResultExt(ref v) => v.as_ref(), - Self::Hash(ref v) => v.as_ref(), - Self::Uint256(ref v) => v.as_ref(), - Self::Uint32(ref v) => v.as_ref(), - Self::Int32(ref v) => v.as_ref(), - Self::Uint64(ref v) => v.as_ref(), - Self::Int64(ref v) => v.as_ref(), - Self::TimePoint(ref v) => v.as_ref(), - Self::Duration(ref v) => v.as_ref(), - Self::ExtensionPoint(ref v) => v.as_ref(), - Self::CryptoKeyType(ref v) => v.as_ref(), - Self::PublicKeyType(ref v) => v.as_ref(), - Self::SignerKeyType(ref v) => v.as_ref(), - Self::PublicKey(ref v) => v.as_ref(), - Self::SignerKey(ref v) => v.as_ref(), - Self::SignerKeyEd25519SignedPayload(ref v) => v.as_ref(), - Self::Signature(ref v) => v.as_ref(), - Self::SignatureHint(ref v) => v.as_ref(), - Self::NodeId(ref v) => v.as_ref(), - Self::AccountId(ref v) => v.as_ref(), - Self::ContractId(ref v) => v.as_ref(), - Self::Curve25519Secret(ref v) => v.as_ref(), - Self::Curve25519Public(ref v) => v.as_ref(), - Self::HmacSha256Key(ref v) => v.as_ref(), - Self::HmacSha256Mac(ref v) => v.as_ref(), - Self::ShortHashSeed(ref v) => v.as_ref(), - Self::BinaryFuseFilterType(ref v) => v.as_ref(), - Self::SerializedBinaryFuseFilter(ref v) => v.as_ref(), - Self::PoolId(ref v) => v.as_ref(), - Self::ClaimableBalanceIdType(ref v) => v.as_ref(), - Self::ClaimableBalanceId(ref v) => v.as_ref(), - } - } - - #[must_use] - #[allow(clippy::too_many_lines)] - pub const fn name(&self) -> &'static str { - match self { - Self::Value(_) => "Value", - Self::ScpBallot(_) => "ScpBallot", - Self::ScpStatementType(_) => "ScpStatementType", - Self::ScpNomination(_) => "ScpNomination", - Self::ScpStatement(_) => "ScpStatement", - Self::ScpStatementPledges(_) => "ScpStatementPledges", - Self::ScpStatementPrepare(_) => "ScpStatementPrepare", - Self::ScpStatementConfirm(_) => "ScpStatementConfirm", - Self::ScpStatementExternalize(_) => "ScpStatementExternalize", - Self::ScpEnvelope(_) => "ScpEnvelope", - Self::ScpQuorumSet(_) => "ScpQuorumSet", - Self::EncodedLedgerKey(_) => "EncodedLedgerKey", - Self::ConfigSettingContractExecutionLanesV0(_) => { - "ConfigSettingContractExecutionLanesV0" - } - Self::ConfigSettingContractComputeV0(_) => "ConfigSettingContractComputeV0", - Self::ConfigSettingContractParallelComputeV0(_) => { - "ConfigSettingContractParallelComputeV0" - } - Self::ConfigSettingContractLedgerCostV0(_) => "ConfigSettingContractLedgerCostV0", - Self::ConfigSettingContractLedgerCostExtV0(_) => "ConfigSettingContractLedgerCostExtV0", - Self::ConfigSettingContractHistoricalDataV0(_) => { - "ConfigSettingContractHistoricalDataV0" - } - Self::ConfigSettingContractEventsV0(_) => "ConfigSettingContractEventsV0", - Self::ConfigSettingContractBandwidthV0(_) => "ConfigSettingContractBandwidthV0", - Self::ContractCostType(_) => "ContractCostType", - Self::ContractCostParamEntry(_) => "ContractCostParamEntry", - Self::StateArchivalSettings(_) => "StateArchivalSettings", - Self::EvictionIterator(_) => "EvictionIterator", - Self::ConfigSettingScpTiming(_) => "ConfigSettingScpTiming", - Self::FrozenLedgerKeys(_) => "FrozenLedgerKeys", - Self::FrozenLedgerKeysDelta(_) => "FrozenLedgerKeysDelta", - Self::FreezeBypassTxs(_) => "FreezeBypassTxs", - Self::FreezeBypassTxsDelta(_) => "FreezeBypassTxsDelta", - Self::ContractCostParams(_) => "ContractCostParams", - Self::ConfigSettingId(_) => "ConfigSettingId", - Self::ConfigSettingEntry(_) => "ConfigSettingEntry", - Self::ScEnvMetaKind(_) => "ScEnvMetaKind", - Self::ScEnvMetaEntry(_) => "ScEnvMetaEntry", - Self::ScEnvMetaEntryInterfaceVersion(_) => "ScEnvMetaEntryInterfaceVersion", - Self::ScMetaV0(_) => "ScMetaV0", - Self::ScMetaKind(_) => "ScMetaKind", - Self::ScMetaEntry(_) => "ScMetaEntry", - Self::ScSpecType(_) => "ScSpecType", - Self::ScSpecTypeOption(_) => "ScSpecTypeOption", - Self::ScSpecTypeResult(_) => "ScSpecTypeResult", - Self::ScSpecTypeVec(_) => "ScSpecTypeVec", - Self::ScSpecTypeMap(_) => "ScSpecTypeMap", - Self::ScSpecTypeTuple(_) => "ScSpecTypeTuple", - Self::ScSpecTypeBytesN(_) => "ScSpecTypeBytesN", - Self::ScSpecTypeUdt(_) => "ScSpecTypeUdt", - Self::ScSpecTypeDef(_) => "ScSpecTypeDef", - Self::ScSpecUdtStructFieldV0(_) => "ScSpecUdtStructFieldV0", - Self::ScSpecUdtStructV0(_) => "ScSpecUdtStructV0", - Self::ScSpecUdtUnionCaseVoidV0(_) => "ScSpecUdtUnionCaseVoidV0", - Self::ScSpecUdtUnionCaseTupleV0(_) => "ScSpecUdtUnionCaseTupleV0", - Self::ScSpecUdtUnionCaseV0Kind(_) => "ScSpecUdtUnionCaseV0Kind", - Self::ScSpecUdtUnionCaseV0(_) => "ScSpecUdtUnionCaseV0", - Self::ScSpecUdtUnionV0(_) => "ScSpecUdtUnionV0", - Self::ScSpecUdtEnumCaseV0(_) => "ScSpecUdtEnumCaseV0", - Self::ScSpecUdtEnumV0(_) => "ScSpecUdtEnumV0", - Self::ScSpecUdtErrorEnumCaseV0(_) => "ScSpecUdtErrorEnumCaseV0", - Self::ScSpecUdtErrorEnumV0(_) => "ScSpecUdtErrorEnumV0", - Self::ScSpecFunctionInputV0(_) => "ScSpecFunctionInputV0", - Self::ScSpecFunctionV0(_) => "ScSpecFunctionV0", - Self::ScSpecEventParamLocationV0(_) => "ScSpecEventParamLocationV0", - Self::ScSpecEventParamV0(_) => "ScSpecEventParamV0", - Self::ScSpecEventDataFormat(_) => "ScSpecEventDataFormat", - Self::ScSpecEventV0(_) => "ScSpecEventV0", - Self::ScSpecEntryKind(_) => "ScSpecEntryKind", - Self::ScSpecEntry(_) => "ScSpecEntry", - Self::ScValType(_) => "ScValType", - Self::ScErrorType(_) => "ScErrorType", - Self::ScErrorCode(_) => "ScErrorCode", - Self::ScError(_) => "ScError", - Self::UInt128Parts(_) => "UInt128Parts", - Self::Int128Parts(_) => "Int128Parts", - Self::UInt256Parts(_) => "UInt256Parts", - Self::Int256Parts(_) => "Int256Parts", - Self::ContractExecutableType(_) => "ContractExecutableType", - Self::ContractExecutable(_) => "ContractExecutable", - Self::ScAddressType(_) => "ScAddressType", - Self::MuxedEd25519Account(_) => "MuxedEd25519Account", - Self::ScAddress(_) => "ScAddress", - Self::ScVec(_) => "ScVec", - Self::ScMap(_) => "ScMap", - Self::ScBytes(_) => "ScBytes", - Self::ScString(_) => "ScString", - Self::ScSymbol(_) => "ScSymbol", - Self::ScNonceKey(_) => "ScNonceKey", - Self::ScContractInstance(_) => "ScContractInstance", - Self::ScVal(_) => "ScVal", - Self::ScMapEntry(_) => "ScMapEntry", - Self::LedgerCloseMetaBatch(_) => "LedgerCloseMetaBatch", - Self::StoredTransactionSet(_) => "StoredTransactionSet", - Self::StoredDebugTransactionSet(_) => "StoredDebugTransactionSet", - Self::PersistedScpStateV0(_) => "PersistedScpStateV0", - Self::PersistedScpStateV1(_) => "PersistedScpStateV1", - Self::PersistedScpState(_) => "PersistedScpState", - Self::Thresholds(_) => "Thresholds", - Self::String32(_) => "String32", - Self::String64(_) => "String64", - Self::SequenceNumber(_) => "SequenceNumber", - Self::DataValue(_) => "DataValue", - Self::AssetCode4(_) => "AssetCode4", - Self::AssetCode12(_) => "AssetCode12", - Self::AssetType(_) => "AssetType", - Self::AssetCode(_) => "AssetCode", - Self::AlphaNum4(_) => "AlphaNum4", - Self::AlphaNum12(_) => "AlphaNum12", - Self::Asset(_) => "Asset", - Self::Price(_) => "Price", - Self::Liabilities(_) => "Liabilities", - Self::ThresholdIndexes(_) => "ThresholdIndexes", - Self::LedgerEntryType(_) => "LedgerEntryType", - Self::Signer(_) => "Signer", - Self::AccountFlags(_) => "AccountFlags", - Self::SponsorshipDescriptor(_) => "SponsorshipDescriptor", - Self::AccountEntryExtensionV3(_) => "AccountEntryExtensionV3", - Self::AccountEntryExtensionV2(_) => "AccountEntryExtensionV2", - Self::AccountEntryExtensionV2Ext(_) => "AccountEntryExtensionV2Ext", - Self::AccountEntryExtensionV1(_) => "AccountEntryExtensionV1", - Self::AccountEntryExtensionV1Ext(_) => "AccountEntryExtensionV1Ext", - Self::AccountEntry(_) => "AccountEntry", - Self::AccountEntryExt(_) => "AccountEntryExt", - Self::TrustLineFlags(_) => "TrustLineFlags", - Self::LiquidityPoolType(_) => "LiquidityPoolType", - Self::TrustLineAsset(_) => "TrustLineAsset", - Self::TrustLineEntryExtensionV2(_) => "TrustLineEntryExtensionV2", - Self::TrustLineEntryExtensionV2Ext(_) => "TrustLineEntryExtensionV2Ext", - Self::TrustLineEntry(_) => "TrustLineEntry", - Self::TrustLineEntryExt(_) => "TrustLineEntryExt", - Self::TrustLineEntryV1(_) => "TrustLineEntryV1", - Self::TrustLineEntryV1Ext(_) => "TrustLineEntryV1Ext", - Self::OfferEntryFlags(_) => "OfferEntryFlags", - Self::OfferEntry(_) => "OfferEntry", - Self::OfferEntryExt(_) => "OfferEntryExt", - Self::DataEntry(_) => "DataEntry", - Self::DataEntryExt(_) => "DataEntryExt", - Self::ClaimPredicateType(_) => "ClaimPredicateType", - Self::ClaimPredicate(_) => "ClaimPredicate", - Self::ClaimantType(_) => "ClaimantType", - Self::Claimant(_) => "Claimant", - Self::ClaimantV0(_) => "ClaimantV0", - Self::ClaimableBalanceFlags(_) => "ClaimableBalanceFlags", - Self::ClaimableBalanceEntryExtensionV1(_) => "ClaimableBalanceEntryExtensionV1", - Self::ClaimableBalanceEntryExtensionV1Ext(_) => "ClaimableBalanceEntryExtensionV1Ext", - Self::ClaimableBalanceEntry(_) => "ClaimableBalanceEntry", - Self::ClaimableBalanceEntryExt(_) => "ClaimableBalanceEntryExt", - Self::LiquidityPoolConstantProductParameters(_) => { - "LiquidityPoolConstantProductParameters" - } - Self::LiquidityPoolEntry(_) => "LiquidityPoolEntry", - Self::LiquidityPoolEntryBody(_) => "LiquidityPoolEntryBody", - Self::LiquidityPoolEntryConstantProduct(_) => "LiquidityPoolEntryConstantProduct", - Self::ContractDataDurability(_) => "ContractDataDurability", - Self::ContractDataEntry(_) => "ContractDataEntry", - Self::ContractCodeCostInputs(_) => "ContractCodeCostInputs", - Self::ContractCodeEntry(_) => "ContractCodeEntry", - Self::ContractCodeEntryExt(_) => "ContractCodeEntryExt", - Self::ContractCodeEntryV1(_) => "ContractCodeEntryV1", - Self::TtlEntry(_) => "TtlEntry", - Self::LedgerEntryExtensionV1(_) => "LedgerEntryExtensionV1", - Self::LedgerEntryExtensionV1Ext(_) => "LedgerEntryExtensionV1Ext", - Self::LedgerEntry(_) => "LedgerEntry", - Self::LedgerEntryData(_) => "LedgerEntryData", - Self::LedgerEntryExt(_) => "LedgerEntryExt", - Self::LedgerKey(_) => "LedgerKey", - Self::LedgerKeyAccount(_) => "LedgerKeyAccount", - Self::LedgerKeyTrustLine(_) => "LedgerKeyTrustLine", - Self::LedgerKeyOffer(_) => "LedgerKeyOffer", - Self::LedgerKeyData(_) => "LedgerKeyData", - Self::LedgerKeyClaimableBalance(_) => "LedgerKeyClaimableBalance", - Self::LedgerKeyLiquidityPool(_) => "LedgerKeyLiquidityPool", - Self::LedgerKeyContractData(_) => "LedgerKeyContractData", - Self::LedgerKeyContractCode(_) => "LedgerKeyContractCode", - Self::LedgerKeyConfigSetting(_) => "LedgerKeyConfigSetting", - Self::LedgerKeyTtl(_) => "LedgerKeyTtl", - Self::EnvelopeType(_) => "EnvelopeType", - Self::BucketListType(_) => "BucketListType", - Self::BucketEntryType(_) => "BucketEntryType", - Self::HotArchiveBucketEntryType(_) => "HotArchiveBucketEntryType", - Self::BucketMetadata(_) => "BucketMetadata", - Self::BucketMetadataExt(_) => "BucketMetadataExt", - Self::BucketEntry(_) => "BucketEntry", - Self::HotArchiveBucketEntry(_) => "HotArchiveBucketEntry", - Self::UpgradeType(_) => "UpgradeType", - Self::StellarValueType(_) => "StellarValueType", - Self::LedgerCloseValueSignature(_) => "LedgerCloseValueSignature", - Self::StellarValue(_) => "StellarValue", - Self::StellarValueExt(_) => "StellarValueExt", - Self::LedgerHeaderFlags(_) => "LedgerHeaderFlags", - Self::LedgerHeaderExtensionV1(_) => "LedgerHeaderExtensionV1", - Self::LedgerHeaderExtensionV1Ext(_) => "LedgerHeaderExtensionV1Ext", - Self::LedgerHeader(_) => "LedgerHeader", - Self::LedgerHeaderExt(_) => "LedgerHeaderExt", - Self::LedgerUpgradeType(_) => "LedgerUpgradeType", - Self::ConfigUpgradeSetKey(_) => "ConfigUpgradeSetKey", - Self::LedgerUpgrade(_) => "LedgerUpgrade", - Self::ConfigUpgradeSet(_) => "ConfigUpgradeSet", - Self::TxSetComponentType(_) => "TxSetComponentType", - Self::DependentTxCluster(_) => "DependentTxCluster", - Self::ParallelTxExecutionStage(_) => "ParallelTxExecutionStage", - Self::ParallelTxsComponent(_) => "ParallelTxsComponent", - Self::TxSetComponent(_) => "TxSetComponent", - Self::TxSetComponentTxsMaybeDiscountedFee(_) => "TxSetComponentTxsMaybeDiscountedFee", - Self::TransactionPhase(_) => "TransactionPhase", - Self::TransactionSet(_) => "TransactionSet", - Self::TransactionSetV1(_) => "TransactionSetV1", - Self::GeneralizedTransactionSet(_) => "GeneralizedTransactionSet", - Self::TransactionResultPair(_) => "TransactionResultPair", - Self::TransactionResultSet(_) => "TransactionResultSet", - Self::TransactionHistoryEntry(_) => "TransactionHistoryEntry", - Self::TransactionHistoryEntryExt(_) => "TransactionHistoryEntryExt", - Self::TransactionHistoryResultEntry(_) => "TransactionHistoryResultEntry", - Self::TransactionHistoryResultEntryExt(_) => "TransactionHistoryResultEntryExt", - Self::LedgerHeaderHistoryEntry(_) => "LedgerHeaderHistoryEntry", - Self::LedgerHeaderHistoryEntryExt(_) => "LedgerHeaderHistoryEntryExt", - Self::LedgerScpMessages(_) => "LedgerScpMessages", - Self::ScpHistoryEntryV0(_) => "ScpHistoryEntryV0", - Self::ScpHistoryEntry(_) => "ScpHistoryEntry", - Self::LedgerEntryChangeType(_) => "LedgerEntryChangeType", - Self::LedgerEntryChange(_) => "LedgerEntryChange", - Self::LedgerEntryChanges(_) => "LedgerEntryChanges", - Self::OperationMeta(_) => "OperationMeta", - Self::TransactionMetaV1(_) => "TransactionMetaV1", - Self::TransactionMetaV2(_) => "TransactionMetaV2", - Self::ContractEventType(_) => "ContractEventType", - Self::ContractEvent(_) => "ContractEvent", - Self::ContractEventBody(_) => "ContractEventBody", - Self::ContractEventV0(_) => "ContractEventV0", - Self::DiagnosticEvent(_) => "DiagnosticEvent", - Self::SorobanTransactionMetaExtV1(_) => "SorobanTransactionMetaExtV1", - Self::SorobanTransactionMetaExt(_) => "SorobanTransactionMetaExt", - Self::SorobanTransactionMeta(_) => "SorobanTransactionMeta", - Self::TransactionMetaV3(_) => "TransactionMetaV3", - Self::OperationMetaV2(_) => "OperationMetaV2", - Self::SorobanTransactionMetaV2(_) => "SorobanTransactionMetaV2", - Self::TransactionEventStage(_) => "TransactionEventStage", - Self::TransactionEvent(_) => "TransactionEvent", - Self::TransactionMetaV4(_) => "TransactionMetaV4", - Self::InvokeHostFunctionSuccessPreImage(_) => "InvokeHostFunctionSuccessPreImage", - Self::TransactionMeta(_) => "TransactionMeta", - Self::TransactionResultMeta(_) => "TransactionResultMeta", - Self::TransactionResultMetaV1(_) => "TransactionResultMetaV1", - Self::UpgradeEntryMeta(_) => "UpgradeEntryMeta", - Self::LedgerCloseMetaV0(_) => "LedgerCloseMetaV0", - Self::LedgerCloseMetaExtV1(_) => "LedgerCloseMetaExtV1", - Self::LedgerCloseMetaExt(_) => "LedgerCloseMetaExt", - Self::LedgerCloseMetaV1(_) => "LedgerCloseMetaV1", - Self::LedgerCloseMetaV2(_) => "LedgerCloseMetaV2", - Self::LedgerCloseMeta(_) => "LedgerCloseMeta", - Self::ErrorCode(_) => "ErrorCode", - Self::SError(_) => "SError", - Self::SendMore(_) => "SendMore", - Self::SendMoreExtended(_) => "SendMoreExtended", - Self::AuthCert(_) => "AuthCert", - Self::Hello(_) => "Hello", - Self::Auth(_) => "Auth", - Self::IpAddrType(_) => "IpAddrType", - Self::PeerAddress(_) => "PeerAddress", - Self::PeerAddressIp(_) => "PeerAddressIp", - Self::MessageType(_) => "MessageType", - Self::DontHave(_) => "DontHave", - Self::SurveyMessageCommandType(_) => "SurveyMessageCommandType", - Self::SurveyMessageResponseType(_) => "SurveyMessageResponseType", - Self::TimeSlicedSurveyStartCollectingMessage(_) => { - "TimeSlicedSurveyStartCollectingMessage" - } - Self::SignedTimeSlicedSurveyStartCollectingMessage(_) => { - "SignedTimeSlicedSurveyStartCollectingMessage" - } - Self::TimeSlicedSurveyStopCollectingMessage(_) => { - "TimeSlicedSurveyStopCollectingMessage" - } - Self::SignedTimeSlicedSurveyStopCollectingMessage(_) => { - "SignedTimeSlicedSurveyStopCollectingMessage" - } - Self::SurveyRequestMessage(_) => "SurveyRequestMessage", - Self::TimeSlicedSurveyRequestMessage(_) => "TimeSlicedSurveyRequestMessage", - Self::SignedTimeSlicedSurveyRequestMessage(_) => "SignedTimeSlicedSurveyRequestMessage", - Self::EncryptedBody(_) => "EncryptedBody", - Self::SurveyResponseMessage(_) => "SurveyResponseMessage", - Self::TimeSlicedSurveyResponseMessage(_) => "TimeSlicedSurveyResponseMessage", - Self::SignedTimeSlicedSurveyResponseMessage(_) => { - "SignedTimeSlicedSurveyResponseMessage" - } - Self::PeerStats(_) => "PeerStats", - Self::TimeSlicedNodeData(_) => "TimeSlicedNodeData", - Self::TimeSlicedPeerData(_) => "TimeSlicedPeerData", - Self::TimeSlicedPeerDataList(_) => "TimeSlicedPeerDataList", - Self::TopologyResponseBodyV2(_) => "TopologyResponseBodyV2", - Self::SurveyResponseBody(_) => "SurveyResponseBody", - Self::TxAdvertVector(_) => "TxAdvertVector", - Self::FloodAdvert(_) => "FloodAdvert", - Self::TxDemandVector(_) => "TxDemandVector", - Self::FloodDemand(_) => "FloodDemand", - Self::StellarMessage(_) => "StellarMessage", - Self::AuthenticatedMessage(_) => "AuthenticatedMessage", - Self::AuthenticatedMessageV0(_) => "AuthenticatedMessageV0", - Self::LiquidityPoolParameters(_) => "LiquidityPoolParameters", - Self::MuxedAccount(_) => "MuxedAccount", - Self::MuxedAccountMed25519(_) => "MuxedAccountMed25519", - Self::DecoratedSignature(_) => "DecoratedSignature", - Self::OperationType(_) => "OperationType", - Self::CreateAccountOp(_) => "CreateAccountOp", - Self::PaymentOp(_) => "PaymentOp", - Self::PathPaymentStrictReceiveOp(_) => "PathPaymentStrictReceiveOp", - Self::PathPaymentStrictSendOp(_) => "PathPaymentStrictSendOp", - Self::ManageSellOfferOp(_) => "ManageSellOfferOp", - Self::ManageBuyOfferOp(_) => "ManageBuyOfferOp", - Self::CreatePassiveSellOfferOp(_) => "CreatePassiveSellOfferOp", - Self::SetOptionsOp(_) => "SetOptionsOp", - Self::ChangeTrustAsset(_) => "ChangeTrustAsset", - Self::ChangeTrustOp(_) => "ChangeTrustOp", - Self::AllowTrustOp(_) => "AllowTrustOp", - Self::ManageDataOp(_) => "ManageDataOp", - Self::BumpSequenceOp(_) => "BumpSequenceOp", - Self::CreateClaimableBalanceOp(_) => "CreateClaimableBalanceOp", - Self::ClaimClaimableBalanceOp(_) => "ClaimClaimableBalanceOp", - Self::BeginSponsoringFutureReservesOp(_) => "BeginSponsoringFutureReservesOp", - Self::RevokeSponsorshipType(_) => "RevokeSponsorshipType", - Self::RevokeSponsorshipOp(_) => "RevokeSponsorshipOp", - Self::RevokeSponsorshipOpSigner(_) => "RevokeSponsorshipOpSigner", - Self::ClawbackOp(_) => "ClawbackOp", - Self::ClawbackClaimableBalanceOp(_) => "ClawbackClaimableBalanceOp", - Self::SetTrustLineFlagsOp(_) => "SetTrustLineFlagsOp", - Self::LiquidityPoolDepositOp(_) => "LiquidityPoolDepositOp", - Self::LiquidityPoolWithdrawOp(_) => "LiquidityPoolWithdrawOp", - Self::HostFunctionType(_) => "HostFunctionType", - Self::ContractIdPreimageType(_) => "ContractIdPreimageType", - Self::ContractIdPreimage(_) => "ContractIdPreimage", - Self::ContractIdPreimageFromAddress(_) => "ContractIdPreimageFromAddress", - Self::CreateContractArgs(_) => "CreateContractArgs", - Self::CreateContractArgsV2(_) => "CreateContractArgsV2", - Self::InvokeContractArgs(_) => "InvokeContractArgs", - Self::HostFunction(_) => "HostFunction", - Self::SorobanAuthorizedFunctionType(_) => "SorobanAuthorizedFunctionType", - Self::SorobanAuthorizedFunction(_) => "SorobanAuthorizedFunction", - Self::SorobanAuthorizedInvocation(_) => "SorobanAuthorizedInvocation", - Self::SorobanAddressCredentials(_) => "SorobanAddressCredentials", - Self::SorobanCredentialsType(_) => "SorobanCredentialsType", - Self::SorobanCredentials(_) => "SorobanCredentials", - Self::SorobanAuthorizationEntry(_) => "SorobanAuthorizationEntry", - Self::SorobanAuthorizationEntries(_) => "SorobanAuthorizationEntries", - Self::InvokeHostFunctionOp(_) => "InvokeHostFunctionOp", - Self::ExtendFootprintTtlOp(_) => "ExtendFootprintTtlOp", - Self::RestoreFootprintOp(_) => "RestoreFootprintOp", - Self::Operation(_) => "Operation", - Self::OperationBody(_) => "OperationBody", - Self::HashIdPreimage(_) => "HashIdPreimage", - Self::HashIdPreimageOperationId(_) => "HashIdPreimageOperationId", - Self::HashIdPreimageRevokeId(_) => "HashIdPreimageRevokeId", - Self::HashIdPreimageContractId(_) => "HashIdPreimageContractId", - Self::HashIdPreimageSorobanAuthorization(_) => "HashIdPreimageSorobanAuthorization", - Self::MemoType(_) => "MemoType", - Self::Memo(_) => "Memo", - Self::TimeBounds(_) => "TimeBounds", - Self::LedgerBounds(_) => "LedgerBounds", - Self::PreconditionsV2(_) => "PreconditionsV2", - Self::PreconditionType(_) => "PreconditionType", - Self::Preconditions(_) => "Preconditions", - Self::LedgerFootprint(_) => "LedgerFootprint", - Self::SorobanResources(_) => "SorobanResources", - Self::SorobanResourcesExtV0(_) => "SorobanResourcesExtV0", - Self::SorobanTransactionData(_) => "SorobanTransactionData", - Self::SorobanTransactionDataExt(_) => "SorobanTransactionDataExt", - Self::TransactionV0(_) => "TransactionV0", - Self::TransactionV0Ext(_) => "TransactionV0Ext", - Self::TransactionV0Envelope(_) => "TransactionV0Envelope", - Self::Transaction(_) => "Transaction", - Self::TransactionExt(_) => "TransactionExt", - Self::TransactionV1Envelope(_) => "TransactionV1Envelope", - Self::FeeBumpTransaction(_) => "FeeBumpTransaction", - Self::FeeBumpTransactionInnerTx(_) => "FeeBumpTransactionInnerTx", - Self::FeeBumpTransactionExt(_) => "FeeBumpTransactionExt", - Self::FeeBumpTransactionEnvelope(_) => "FeeBumpTransactionEnvelope", - Self::TransactionEnvelope(_) => "TransactionEnvelope", - Self::TransactionSignaturePayload(_) => "TransactionSignaturePayload", - Self::TransactionSignaturePayloadTaggedTransaction(_) => { - "TransactionSignaturePayloadTaggedTransaction" - } - Self::ClaimAtomType(_) => "ClaimAtomType", - Self::ClaimOfferAtomV0(_) => "ClaimOfferAtomV0", - Self::ClaimOfferAtom(_) => "ClaimOfferAtom", - Self::ClaimLiquidityAtom(_) => "ClaimLiquidityAtom", - Self::ClaimAtom(_) => "ClaimAtom", - Self::CreateAccountResultCode(_) => "CreateAccountResultCode", - Self::CreateAccountResult(_) => "CreateAccountResult", - Self::PaymentResultCode(_) => "PaymentResultCode", - Self::PaymentResult(_) => "PaymentResult", - Self::PathPaymentStrictReceiveResultCode(_) => "PathPaymentStrictReceiveResultCode", - Self::SimplePaymentResult(_) => "SimplePaymentResult", - Self::PathPaymentStrictReceiveResult(_) => "PathPaymentStrictReceiveResult", - Self::PathPaymentStrictReceiveResultSuccess(_) => { - "PathPaymentStrictReceiveResultSuccess" - } - Self::PathPaymentStrictSendResultCode(_) => "PathPaymentStrictSendResultCode", - Self::PathPaymentStrictSendResult(_) => "PathPaymentStrictSendResult", - Self::PathPaymentStrictSendResultSuccess(_) => "PathPaymentStrictSendResultSuccess", - Self::ManageSellOfferResultCode(_) => "ManageSellOfferResultCode", - Self::ManageOfferEffect(_) => "ManageOfferEffect", - Self::ManageOfferSuccessResult(_) => "ManageOfferSuccessResult", - Self::ManageOfferSuccessResultOffer(_) => "ManageOfferSuccessResultOffer", - Self::ManageSellOfferResult(_) => "ManageSellOfferResult", - Self::ManageBuyOfferResultCode(_) => "ManageBuyOfferResultCode", - Self::ManageBuyOfferResult(_) => "ManageBuyOfferResult", - Self::SetOptionsResultCode(_) => "SetOptionsResultCode", - Self::SetOptionsResult(_) => "SetOptionsResult", - Self::ChangeTrustResultCode(_) => "ChangeTrustResultCode", - Self::ChangeTrustResult(_) => "ChangeTrustResult", - Self::AllowTrustResultCode(_) => "AllowTrustResultCode", - Self::AllowTrustResult(_) => "AllowTrustResult", - Self::AccountMergeResultCode(_) => "AccountMergeResultCode", - Self::AccountMergeResult(_) => "AccountMergeResult", - Self::InflationResultCode(_) => "InflationResultCode", - Self::InflationPayout(_) => "InflationPayout", - Self::InflationResult(_) => "InflationResult", - Self::ManageDataResultCode(_) => "ManageDataResultCode", - Self::ManageDataResult(_) => "ManageDataResult", - Self::BumpSequenceResultCode(_) => "BumpSequenceResultCode", - Self::BumpSequenceResult(_) => "BumpSequenceResult", - Self::CreateClaimableBalanceResultCode(_) => "CreateClaimableBalanceResultCode", - Self::CreateClaimableBalanceResult(_) => "CreateClaimableBalanceResult", - Self::ClaimClaimableBalanceResultCode(_) => "ClaimClaimableBalanceResultCode", - Self::ClaimClaimableBalanceResult(_) => "ClaimClaimableBalanceResult", - Self::BeginSponsoringFutureReservesResultCode(_) => { - "BeginSponsoringFutureReservesResultCode" - } - Self::BeginSponsoringFutureReservesResult(_) => "BeginSponsoringFutureReservesResult", - Self::EndSponsoringFutureReservesResultCode(_) => { - "EndSponsoringFutureReservesResultCode" - } - Self::EndSponsoringFutureReservesResult(_) => "EndSponsoringFutureReservesResult", - Self::RevokeSponsorshipResultCode(_) => "RevokeSponsorshipResultCode", - Self::RevokeSponsorshipResult(_) => "RevokeSponsorshipResult", - Self::ClawbackResultCode(_) => "ClawbackResultCode", - Self::ClawbackResult(_) => "ClawbackResult", - Self::ClawbackClaimableBalanceResultCode(_) => "ClawbackClaimableBalanceResultCode", - Self::ClawbackClaimableBalanceResult(_) => "ClawbackClaimableBalanceResult", - Self::SetTrustLineFlagsResultCode(_) => "SetTrustLineFlagsResultCode", - Self::SetTrustLineFlagsResult(_) => "SetTrustLineFlagsResult", - Self::LiquidityPoolDepositResultCode(_) => "LiquidityPoolDepositResultCode", - Self::LiquidityPoolDepositResult(_) => "LiquidityPoolDepositResult", - Self::LiquidityPoolWithdrawResultCode(_) => "LiquidityPoolWithdrawResultCode", - Self::LiquidityPoolWithdrawResult(_) => "LiquidityPoolWithdrawResult", - Self::InvokeHostFunctionResultCode(_) => "InvokeHostFunctionResultCode", - Self::InvokeHostFunctionResult(_) => "InvokeHostFunctionResult", - Self::ExtendFootprintTtlResultCode(_) => "ExtendFootprintTtlResultCode", - Self::ExtendFootprintTtlResult(_) => "ExtendFootprintTtlResult", - Self::RestoreFootprintResultCode(_) => "RestoreFootprintResultCode", - Self::RestoreFootprintResult(_) => "RestoreFootprintResult", - Self::OperationResultCode(_) => "OperationResultCode", - Self::OperationResult(_) => "OperationResult", - Self::OperationResultTr(_) => "OperationResultTr", - Self::TransactionResultCode(_) => "TransactionResultCode", - Self::InnerTransactionResult(_) => "InnerTransactionResult", - Self::InnerTransactionResultResult(_) => "InnerTransactionResultResult", - Self::InnerTransactionResultExt(_) => "InnerTransactionResultExt", - Self::InnerTransactionResultPair(_) => "InnerTransactionResultPair", - Self::TransactionResult(_) => "TransactionResult", - Self::TransactionResultResult(_) => "TransactionResultResult", - Self::TransactionResultExt(_) => "TransactionResultExt", - Self::Hash(_) => "Hash", - Self::Uint256(_) => "Uint256", - Self::Uint32(_) => "Uint32", - Self::Int32(_) => "Int32", - Self::Uint64(_) => "Uint64", - Self::Int64(_) => "Int64", - Self::TimePoint(_) => "TimePoint", - Self::Duration(_) => "Duration", - Self::ExtensionPoint(_) => "ExtensionPoint", - Self::CryptoKeyType(_) => "CryptoKeyType", - Self::PublicKeyType(_) => "PublicKeyType", - Self::SignerKeyType(_) => "SignerKeyType", - Self::PublicKey(_) => "PublicKey", - Self::SignerKey(_) => "SignerKey", - Self::SignerKeyEd25519SignedPayload(_) => "SignerKeyEd25519SignedPayload", - Self::Signature(_) => "Signature", - Self::SignatureHint(_) => "SignatureHint", - Self::NodeId(_) => "NodeId", - Self::AccountId(_) => "AccountId", - Self::ContractId(_) => "ContractId", - Self::Curve25519Secret(_) => "Curve25519Secret", - Self::Curve25519Public(_) => "Curve25519Public", - Self::HmacSha256Key(_) => "HmacSha256Key", - Self::HmacSha256Mac(_) => "HmacSha256Mac", - Self::ShortHashSeed(_) => "ShortHashSeed", - Self::BinaryFuseFilterType(_) => "BinaryFuseFilterType", - Self::SerializedBinaryFuseFilter(_) => "SerializedBinaryFuseFilter", - Self::PoolId(_) => "PoolId", - Self::ClaimableBalanceIdType(_) => "ClaimableBalanceIdType", - Self::ClaimableBalanceId(_) => "ClaimableBalanceId", - } - } - - #[must_use] - #[allow(clippy::too_many_lines)] - pub const fn variants() -> [TypeVariant; Self::_VARIANTS.len()] { - Self::VARIANTS - } - - #[must_use] - #[allow(clippy::too_many_lines)] - pub const fn variant(&self) -> TypeVariant { - match self { - Self::Value(_) => TypeVariant::Value, - Self::ScpBallot(_) => TypeVariant::ScpBallot, - Self::ScpStatementType(_) => TypeVariant::ScpStatementType, - Self::ScpNomination(_) => TypeVariant::ScpNomination, - Self::ScpStatement(_) => TypeVariant::ScpStatement, - Self::ScpStatementPledges(_) => TypeVariant::ScpStatementPledges, - Self::ScpStatementPrepare(_) => TypeVariant::ScpStatementPrepare, - Self::ScpStatementConfirm(_) => TypeVariant::ScpStatementConfirm, - Self::ScpStatementExternalize(_) => TypeVariant::ScpStatementExternalize, - Self::ScpEnvelope(_) => TypeVariant::ScpEnvelope, - Self::ScpQuorumSet(_) => TypeVariant::ScpQuorumSet, - Self::EncodedLedgerKey(_) => TypeVariant::EncodedLedgerKey, - Self::ConfigSettingContractExecutionLanesV0(_) => { - TypeVariant::ConfigSettingContractExecutionLanesV0 - } - Self::ConfigSettingContractComputeV0(_) => TypeVariant::ConfigSettingContractComputeV0, - Self::ConfigSettingContractParallelComputeV0(_) => { - TypeVariant::ConfigSettingContractParallelComputeV0 - } - Self::ConfigSettingContractLedgerCostV0(_) => { - TypeVariant::ConfigSettingContractLedgerCostV0 - } - Self::ConfigSettingContractLedgerCostExtV0(_) => { - TypeVariant::ConfigSettingContractLedgerCostExtV0 - } - Self::ConfigSettingContractHistoricalDataV0(_) => { - TypeVariant::ConfigSettingContractHistoricalDataV0 - } - Self::ConfigSettingContractEventsV0(_) => TypeVariant::ConfigSettingContractEventsV0, - Self::ConfigSettingContractBandwidthV0(_) => { - TypeVariant::ConfigSettingContractBandwidthV0 - } - Self::ContractCostType(_) => TypeVariant::ContractCostType, - Self::ContractCostParamEntry(_) => TypeVariant::ContractCostParamEntry, - Self::StateArchivalSettings(_) => TypeVariant::StateArchivalSettings, - Self::EvictionIterator(_) => TypeVariant::EvictionIterator, - Self::ConfigSettingScpTiming(_) => TypeVariant::ConfigSettingScpTiming, - Self::FrozenLedgerKeys(_) => TypeVariant::FrozenLedgerKeys, - Self::FrozenLedgerKeysDelta(_) => TypeVariant::FrozenLedgerKeysDelta, - Self::FreezeBypassTxs(_) => TypeVariant::FreezeBypassTxs, - Self::FreezeBypassTxsDelta(_) => TypeVariant::FreezeBypassTxsDelta, - Self::ContractCostParams(_) => TypeVariant::ContractCostParams, - Self::ConfigSettingId(_) => TypeVariant::ConfigSettingId, - Self::ConfigSettingEntry(_) => TypeVariant::ConfigSettingEntry, - Self::ScEnvMetaKind(_) => TypeVariant::ScEnvMetaKind, - Self::ScEnvMetaEntry(_) => TypeVariant::ScEnvMetaEntry, - Self::ScEnvMetaEntryInterfaceVersion(_) => TypeVariant::ScEnvMetaEntryInterfaceVersion, - Self::ScMetaV0(_) => TypeVariant::ScMetaV0, - Self::ScMetaKind(_) => TypeVariant::ScMetaKind, - Self::ScMetaEntry(_) => TypeVariant::ScMetaEntry, - Self::ScSpecType(_) => TypeVariant::ScSpecType, - Self::ScSpecTypeOption(_) => TypeVariant::ScSpecTypeOption, - Self::ScSpecTypeResult(_) => TypeVariant::ScSpecTypeResult, - Self::ScSpecTypeVec(_) => TypeVariant::ScSpecTypeVec, - Self::ScSpecTypeMap(_) => TypeVariant::ScSpecTypeMap, - Self::ScSpecTypeTuple(_) => TypeVariant::ScSpecTypeTuple, - Self::ScSpecTypeBytesN(_) => TypeVariant::ScSpecTypeBytesN, - Self::ScSpecTypeUdt(_) => TypeVariant::ScSpecTypeUdt, - Self::ScSpecTypeDef(_) => TypeVariant::ScSpecTypeDef, - Self::ScSpecUdtStructFieldV0(_) => TypeVariant::ScSpecUdtStructFieldV0, - Self::ScSpecUdtStructV0(_) => TypeVariant::ScSpecUdtStructV0, - Self::ScSpecUdtUnionCaseVoidV0(_) => TypeVariant::ScSpecUdtUnionCaseVoidV0, - Self::ScSpecUdtUnionCaseTupleV0(_) => TypeVariant::ScSpecUdtUnionCaseTupleV0, - Self::ScSpecUdtUnionCaseV0Kind(_) => TypeVariant::ScSpecUdtUnionCaseV0Kind, - Self::ScSpecUdtUnionCaseV0(_) => TypeVariant::ScSpecUdtUnionCaseV0, - Self::ScSpecUdtUnionV0(_) => TypeVariant::ScSpecUdtUnionV0, - Self::ScSpecUdtEnumCaseV0(_) => TypeVariant::ScSpecUdtEnumCaseV0, - Self::ScSpecUdtEnumV0(_) => TypeVariant::ScSpecUdtEnumV0, - Self::ScSpecUdtErrorEnumCaseV0(_) => TypeVariant::ScSpecUdtErrorEnumCaseV0, - Self::ScSpecUdtErrorEnumV0(_) => TypeVariant::ScSpecUdtErrorEnumV0, - Self::ScSpecFunctionInputV0(_) => TypeVariant::ScSpecFunctionInputV0, - Self::ScSpecFunctionV0(_) => TypeVariant::ScSpecFunctionV0, - Self::ScSpecEventParamLocationV0(_) => TypeVariant::ScSpecEventParamLocationV0, - Self::ScSpecEventParamV0(_) => TypeVariant::ScSpecEventParamV0, - Self::ScSpecEventDataFormat(_) => TypeVariant::ScSpecEventDataFormat, - Self::ScSpecEventV0(_) => TypeVariant::ScSpecEventV0, - Self::ScSpecEntryKind(_) => TypeVariant::ScSpecEntryKind, - Self::ScSpecEntry(_) => TypeVariant::ScSpecEntry, - Self::ScValType(_) => TypeVariant::ScValType, - Self::ScErrorType(_) => TypeVariant::ScErrorType, - Self::ScErrorCode(_) => TypeVariant::ScErrorCode, - Self::ScError(_) => TypeVariant::ScError, - Self::UInt128Parts(_) => TypeVariant::UInt128Parts, - Self::Int128Parts(_) => TypeVariant::Int128Parts, - Self::UInt256Parts(_) => TypeVariant::UInt256Parts, - Self::Int256Parts(_) => TypeVariant::Int256Parts, - Self::ContractExecutableType(_) => TypeVariant::ContractExecutableType, - Self::ContractExecutable(_) => TypeVariant::ContractExecutable, - Self::ScAddressType(_) => TypeVariant::ScAddressType, - Self::MuxedEd25519Account(_) => TypeVariant::MuxedEd25519Account, - Self::ScAddress(_) => TypeVariant::ScAddress, - Self::ScVec(_) => TypeVariant::ScVec, - Self::ScMap(_) => TypeVariant::ScMap, - Self::ScBytes(_) => TypeVariant::ScBytes, - Self::ScString(_) => TypeVariant::ScString, - Self::ScSymbol(_) => TypeVariant::ScSymbol, - Self::ScNonceKey(_) => TypeVariant::ScNonceKey, - Self::ScContractInstance(_) => TypeVariant::ScContractInstance, - Self::ScVal(_) => TypeVariant::ScVal, - Self::ScMapEntry(_) => TypeVariant::ScMapEntry, - Self::LedgerCloseMetaBatch(_) => TypeVariant::LedgerCloseMetaBatch, - Self::StoredTransactionSet(_) => TypeVariant::StoredTransactionSet, - Self::StoredDebugTransactionSet(_) => TypeVariant::StoredDebugTransactionSet, - Self::PersistedScpStateV0(_) => TypeVariant::PersistedScpStateV0, - Self::PersistedScpStateV1(_) => TypeVariant::PersistedScpStateV1, - Self::PersistedScpState(_) => TypeVariant::PersistedScpState, - Self::Thresholds(_) => TypeVariant::Thresholds, - Self::String32(_) => TypeVariant::String32, - Self::String64(_) => TypeVariant::String64, - Self::SequenceNumber(_) => TypeVariant::SequenceNumber, - Self::DataValue(_) => TypeVariant::DataValue, - Self::AssetCode4(_) => TypeVariant::AssetCode4, - Self::AssetCode12(_) => TypeVariant::AssetCode12, - Self::AssetType(_) => TypeVariant::AssetType, - Self::AssetCode(_) => TypeVariant::AssetCode, - Self::AlphaNum4(_) => TypeVariant::AlphaNum4, - Self::AlphaNum12(_) => TypeVariant::AlphaNum12, - Self::Asset(_) => TypeVariant::Asset, - Self::Price(_) => TypeVariant::Price, - Self::Liabilities(_) => TypeVariant::Liabilities, - Self::ThresholdIndexes(_) => TypeVariant::ThresholdIndexes, - Self::LedgerEntryType(_) => TypeVariant::LedgerEntryType, - Self::Signer(_) => TypeVariant::Signer, - Self::AccountFlags(_) => TypeVariant::AccountFlags, - Self::SponsorshipDescriptor(_) => TypeVariant::SponsorshipDescriptor, - Self::AccountEntryExtensionV3(_) => TypeVariant::AccountEntryExtensionV3, - Self::AccountEntryExtensionV2(_) => TypeVariant::AccountEntryExtensionV2, - Self::AccountEntryExtensionV2Ext(_) => TypeVariant::AccountEntryExtensionV2Ext, - Self::AccountEntryExtensionV1(_) => TypeVariant::AccountEntryExtensionV1, - Self::AccountEntryExtensionV1Ext(_) => TypeVariant::AccountEntryExtensionV1Ext, - Self::AccountEntry(_) => TypeVariant::AccountEntry, - Self::AccountEntryExt(_) => TypeVariant::AccountEntryExt, - Self::TrustLineFlags(_) => TypeVariant::TrustLineFlags, - Self::LiquidityPoolType(_) => TypeVariant::LiquidityPoolType, - Self::TrustLineAsset(_) => TypeVariant::TrustLineAsset, - Self::TrustLineEntryExtensionV2(_) => TypeVariant::TrustLineEntryExtensionV2, - Self::TrustLineEntryExtensionV2Ext(_) => TypeVariant::TrustLineEntryExtensionV2Ext, - Self::TrustLineEntry(_) => TypeVariant::TrustLineEntry, - Self::TrustLineEntryExt(_) => TypeVariant::TrustLineEntryExt, - Self::TrustLineEntryV1(_) => TypeVariant::TrustLineEntryV1, - Self::TrustLineEntryV1Ext(_) => TypeVariant::TrustLineEntryV1Ext, - Self::OfferEntryFlags(_) => TypeVariant::OfferEntryFlags, - Self::OfferEntry(_) => TypeVariant::OfferEntry, - Self::OfferEntryExt(_) => TypeVariant::OfferEntryExt, - Self::DataEntry(_) => TypeVariant::DataEntry, - Self::DataEntryExt(_) => TypeVariant::DataEntryExt, - Self::ClaimPredicateType(_) => TypeVariant::ClaimPredicateType, - Self::ClaimPredicate(_) => TypeVariant::ClaimPredicate, - Self::ClaimantType(_) => TypeVariant::ClaimantType, - Self::Claimant(_) => TypeVariant::Claimant, - Self::ClaimantV0(_) => TypeVariant::ClaimantV0, - Self::ClaimableBalanceFlags(_) => TypeVariant::ClaimableBalanceFlags, - Self::ClaimableBalanceEntryExtensionV1(_) => { - TypeVariant::ClaimableBalanceEntryExtensionV1 - } - Self::ClaimableBalanceEntryExtensionV1Ext(_) => { - TypeVariant::ClaimableBalanceEntryExtensionV1Ext - } - Self::ClaimableBalanceEntry(_) => TypeVariant::ClaimableBalanceEntry, - Self::ClaimableBalanceEntryExt(_) => TypeVariant::ClaimableBalanceEntryExt, - Self::LiquidityPoolConstantProductParameters(_) => { - TypeVariant::LiquidityPoolConstantProductParameters - } - Self::LiquidityPoolEntry(_) => TypeVariant::LiquidityPoolEntry, - Self::LiquidityPoolEntryBody(_) => TypeVariant::LiquidityPoolEntryBody, - Self::LiquidityPoolEntryConstantProduct(_) => { - TypeVariant::LiquidityPoolEntryConstantProduct - } - Self::ContractDataDurability(_) => TypeVariant::ContractDataDurability, - Self::ContractDataEntry(_) => TypeVariant::ContractDataEntry, - Self::ContractCodeCostInputs(_) => TypeVariant::ContractCodeCostInputs, - Self::ContractCodeEntry(_) => TypeVariant::ContractCodeEntry, - Self::ContractCodeEntryExt(_) => TypeVariant::ContractCodeEntryExt, - Self::ContractCodeEntryV1(_) => TypeVariant::ContractCodeEntryV1, - Self::TtlEntry(_) => TypeVariant::TtlEntry, - Self::LedgerEntryExtensionV1(_) => TypeVariant::LedgerEntryExtensionV1, - Self::LedgerEntryExtensionV1Ext(_) => TypeVariant::LedgerEntryExtensionV1Ext, - Self::LedgerEntry(_) => TypeVariant::LedgerEntry, - Self::LedgerEntryData(_) => TypeVariant::LedgerEntryData, - Self::LedgerEntryExt(_) => TypeVariant::LedgerEntryExt, - Self::LedgerKey(_) => TypeVariant::LedgerKey, - Self::LedgerKeyAccount(_) => TypeVariant::LedgerKeyAccount, - Self::LedgerKeyTrustLine(_) => TypeVariant::LedgerKeyTrustLine, - Self::LedgerKeyOffer(_) => TypeVariant::LedgerKeyOffer, - Self::LedgerKeyData(_) => TypeVariant::LedgerKeyData, - Self::LedgerKeyClaimableBalance(_) => TypeVariant::LedgerKeyClaimableBalance, - Self::LedgerKeyLiquidityPool(_) => TypeVariant::LedgerKeyLiquidityPool, - Self::LedgerKeyContractData(_) => TypeVariant::LedgerKeyContractData, - Self::LedgerKeyContractCode(_) => TypeVariant::LedgerKeyContractCode, - Self::LedgerKeyConfigSetting(_) => TypeVariant::LedgerKeyConfigSetting, - Self::LedgerKeyTtl(_) => TypeVariant::LedgerKeyTtl, - Self::EnvelopeType(_) => TypeVariant::EnvelopeType, - Self::BucketListType(_) => TypeVariant::BucketListType, - Self::BucketEntryType(_) => TypeVariant::BucketEntryType, - Self::HotArchiveBucketEntryType(_) => TypeVariant::HotArchiveBucketEntryType, - Self::BucketMetadata(_) => TypeVariant::BucketMetadata, - Self::BucketMetadataExt(_) => TypeVariant::BucketMetadataExt, - Self::BucketEntry(_) => TypeVariant::BucketEntry, - Self::HotArchiveBucketEntry(_) => TypeVariant::HotArchiveBucketEntry, - Self::UpgradeType(_) => TypeVariant::UpgradeType, - Self::StellarValueType(_) => TypeVariant::StellarValueType, - Self::LedgerCloseValueSignature(_) => TypeVariant::LedgerCloseValueSignature, - Self::StellarValue(_) => TypeVariant::StellarValue, - Self::StellarValueExt(_) => TypeVariant::StellarValueExt, - Self::LedgerHeaderFlags(_) => TypeVariant::LedgerHeaderFlags, - Self::LedgerHeaderExtensionV1(_) => TypeVariant::LedgerHeaderExtensionV1, - Self::LedgerHeaderExtensionV1Ext(_) => TypeVariant::LedgerHeaderExtensionV1Ext, - Self::LedgerHeader(_) => TypeVariant::LedgerHeader, - Self::LedgerHeaderExt(_) => TypeVariant::LedgerHeaderExt, - Self::LedgerUpgradeType(_) => TypeVariant::LedgerUpgradeType, - Self::ConfigUpgradeSetKey(_) => TypeVariant::ConfigUpgradeSetKey, - Self::LedgerUpgrade(_) => TypeVariant::LedgerUpgrade, - Self::ConfigUpgradeSet(_) => TypeVariant::ConfigUpgradeSet, - Self::TxSetComponentType(_) => TypeVariant::TxSetComponentType, - Self::DependentTxCluster(_) => TypeVariant::DependentTxCluster, - Self::ParallelTxExecutionStage(_) => TypeVariant::ParallelTxExecutionStage, - Self::ParallelTxsComponent(_) => TypeVariant::ParallelTxsComponent, - Self::TxSetComponent(_) => TypeVariant::TxSetComponent, - Self::TxSetComponentTxsMaybeDiscountedFee(_) => { - TypeVariant::TxSetComponentTxsMaybeDiscountedFee - } - Self::TransactionPhase(_) => TypeVariant::TransactionPhase, - Self::TransactionSet(_) => TypeVariant::TransactionSet, - Self::TransactionSetV1(_) => TypeVariant::TransactionSetV1, - Self::GeneralizedTransactionSet(_) => TypeVariant::GeneralizedTransactionSet, - Self::TransactionResultPair(_) => TypeVariant::TransactionResultPair, - Self::TransactionResultSet(_) => TypeVariant::TransactionResultSet, - Self::TransactionHistoryEntry(_) => TypeVariant::TransactionHistoryEntry, - Self::TransactionHistoryEntryExt(_) => TypeVariant::TransactionHistoryEntryExt, - Self::TransactionHistoryResultEntry(_) => TypeVariant::TransactionHistoryResultEntry, - Self::TransactionHistoryResultEntryExt(_) => { - TypeVariant::TransactionHistoryResultEntryExt - } - Self::LedgerHeaderHistoryEntry(_) => TypeVariant::LedgerHeaderHistoryEntry, - Self::LedgerHeaderHistoryEntryExt(_) => TypeVariant::LedgerHeaderHistoryEntryExt, - Self::LedgerScpMessages(_) => TypeVariant::LedgerScpMessages, - Self::ScpHistoryEntryV0(_) => TypeVariant::ScpHistoryEntryV0, - Self::ScpHistoryEntry(_) => TypeVariant::ScpHistoryEntry, - Self::LedgerEntryChangeType(_) => TypeVariant::LedgerEntryChangeType, - Self::LedgerEntryChange(_) => TypeVariant::LedgerEntryChange, - Self::LedgerEntryChanges(_) => TypeVariant::LedgerEntryChanges, - Self::OperationMeta(_) => TypeVariant::OperationMeta, - Self::TransactionMetaV1(_) => TypeVariant::TransactionMetaV1, - Self::TransactionMetaV2(_) => TypeVariant::TransactionMetaV2, - Self::ContractEventType(_) => TypeVariant::ContractEventType, - Self::ContractEvent(_) => TypeVariant::ContractEvent, - Self::ContractEventBody(_) => TypeVariant::ContractEventBody, - Self::ContractEventV0(_) => TypeVariant::ContractEventV0, - Self::DiagnosticEvent(_) => TypeVariant::DiagnosticEvent, - Self::SorobanTransactionMetaExtV1(_) => TypeVariant::SorobanTransactionMetaExtV1, - Self::SorobanTransactionMetaExt(_) => TypeVariant::SorobanTransactionMetaExt, - Self::SorobanTransactionMeta(_) => TypeVariant::SorobanTransactionMeta, - Self::TransactionMetaV3(_) => TypeVariant::TransactionMetaV3, - Self::OperationMetaV2(_) => TypeVariant::OperationMetaV2, - Self::SorobanTransactionMetaV2(_) => TypeVariant::SorobanTransactionMetaV2, - Self::TransactionEventStage(_) => TypeVariant::TransactionEventStage, - Self::TransactionEvent(_) => TypeVariant::TransactionEvent, - Self::TransactionMetaV4(_) => TypeVariant::TransactionMetaV4, - Self::InvokeHostFunctionSuccessPreImage(_) => { - TypeVariant::InvokeHostFunctionSuccessPreImage - } - Self::TransactionMeta(_) => TypeVariant::TransactionMeta, - Self::TransactionResultMeta(_) => TypeVariant::TransactionResultMeta, - Self::TransactionResultMetaV1(_) => TypeVariant::TransactionResultMetaV1, - Self::UpgradeEntryMeta(_) => TypeVariant::UpgradeEntryMeta, - Self::LedgerCloseMetaV0(_) => TypeVariant::LedgerCloseMetaV0, - Self::LedgerCloseMetaExtV1(_) => TypeVariant::LedgerCloseMetaExtV1, - Self::LedgerCloseMetaExt(_) => TypeVariant::LedgerCloseMetaExt, - Self::LedgerCloseMetaV1(_) => TypeVariant::LedgerCloseMetaV1, - Self::LedgerCloseMetaV2(_) => TypeVariant::LedgerCloseMetaV2, - Self::LedgerCloseMeta(_) => TypeVariant::LedgerCloseMeta, - Self::ErrorCode(_) => TypeVariant::ErrorCode, - Self::SError(_) => TypeVariant::SError, - Self::SendMore(_) => TypeVariant::SendMore, - Self::SendMoreExtended(_) => TypeVariant::SendMoreExtended, - Self::AuthCert(_) => TypeVariant::AuthCert, - Self::Hello(_) => TypeVariant::Hello, - Self::Auth(_) => TypeVariant::Auth, - Self::IpAddrType(_) => TypeVariant::IpAddrType, - Self::PeerAddress(_) => TypeVariant::PeerAddress, - Self::PeerAddressIp(_) => TypeVariant::PeerAddressIp, - Self::MessageType(_) => TypeVariant::MessageType, - Self::DontHave(_) => TypeVariant::DontHave, - Self::SurveyMessageCommandType(_) => TypeVariant::SurveyMessageCommandType, - Self::SurveyMessageResponseType(_) => TypeVariant::SurveyMessageResponseType, - Self::TimeSlicedSurveyStartCollectingMessage(_) => { - TypeVariant::TimeSlicedSurveyStartCollectingMessage - } - Self::SignedTimeSlicedSurveyStartCollectingMessage(_) => { - TypeVariant::SignedTimeSlicedSurveyStartCollectingMessage - } - Self::TimeSlicedSurveyStopCollectingMessage(_) => { - TypeVariant::TimeSlicedSurveyStopCollectingMessage - } - Self::SignedTimeSlicedSurveyStopCollectingMessage(_) => { - TypeVariant::SignedTimeSlicedSurveyStopCollectingMessage - } - Self::SurveyRequestMessage(_) => TypeVariant::SurveyRequestMessage, - Self::TimeSlicedSurveyRequestMessage(_) => TypeVariant::TimeSlicedSurveyRequestMessage, - Self::SignedTimeSlicedSurveyRequestMessage(_) => { - TypeVariant::SignedTimeSlicedSurveyRequestMessage - } - Self::EncryptedBody(_) => TypeVariant::EncryptedBody, - Self::SurveyResponseMessage(_) => TypeVariant::SurveyResponseMessage, - Self::TimeSlicedSurveyResponseMessage(_) => { - TypeVariant::TimeSlicedSurveyResponseMessage - } - Self::SignedTimeSlicedSurveyResponseMessage(_) => { - TypeVariant::SignedTimeSlicedSurveyResponseMessage - } - Self::PeerStats(_) => TypeVariant::PeerStats, - Self::TimeSlicedNodeData(_) => TypeVariant::TimeSlicedNodeData, - Self::TimeSlicedPeerData(_) => TypeVariant::TimeSlicedPeerData, - Self::TimeSlicedPeerDataList(_) => TypeVariant::TimeSlicedPeerDataList, - Self::TopologyResponseBodyV2(_) => TypeVariant::TopologyResponseBodyV2, - Self::SurveyResponseBody(_) => TypeVariant::SurveyResponseBody, - Self::TxAdvertVector(_) => TypeVariant::TxAdvertVector, - Self::FloodAdvert(_) => TypeVariant::FloodAdvert, - Self::TxDemandVector(_) => TypeVariant::TxDemandVector, - Self::FloodDemand(_) => TypeVariant::FloodDemand, - Self::StellarMessage(_) => TypeVariant::StellarMessage, - Self::AuthenticatedMessage(_) => TypeVariant::AuthenticatedMessage, - Self::AuthenticatedMessageV0(_) => TypeVariant::AuthenticatedMessageV0, - Self::LiquidityPoolParameters(_) => TypeVariant::LiquidityPoolParameters, - Self::MuxedAccount(_) => TypeVariant::MuxedAccount, - Self::MuxedAccountMed25519(_) => TypeVariant::MuxedAccountMed25519, - Self::DecoratedSignature(_) => TypeVariant::DecoratedSignature, - Self::OperationType(_) => TypeVariant::OperationType, - Self::CreateAccountOp(_) => TypeVariant::CreateAccountOp, - Self::PaymentOp(_) => TypeVariant::PaymentOp, - Self::PathPaymentStrictReceiveOp(_) => TypeVariant::PathPaymentStrictReceiveOp, - Self::PathPaymentStrictSendOp(_) => TypeVariant::PathPaymentStrictSendOp, - Self::ManageSellOfferOp(_) => TypeVariant::ManageSellOfferOp, - Self::ManageBuyOfferOp(_) => TypeVariant::ManageBuyOfferOp, - Self::CreatePassiveSellOfferOp(_) => TypeVariant::CreatePassiveSellOfferOp, - Self::SetOptionsOp(_) => TypeVariant::SetOptionsOp, - Self::ChangeTrustAsset(_) => TypeVariant::ChangeTrustAsset, - Self::ChangeTrustOp(_) => TypeVariant::ChangeTrustOp, - Self::AllowTrustOp(_) => TypeVariant::AllowTrustOp, - Self::ManageDataOp(_) => TypeVariant::ManageDataOp, - Self::BumpSequenceOp(_) => TypeVariant::BumpSequenceOp, - Self::CreateClaimableBalanceOp(_) => TypeVariant::CreateClaimableBalanceOp, - Self::ClaimClaimableBalanceOp(_) => TypeVariant::ClaimClaimableBalanceOp, - Self::BeginSponsoringFutureReservesOp(_) => { - TypeVariant::BeginSponsoringFutureReservesOp - } - Self::RevokeSponsorshipType(_) => TypeVariant::RevokeSponsorshipType, - Self::RevokeSponsorshipOp(_) => TypeVariant::RevokeSponsorshipOp, - Self::RevokeSponsorshipOpSigner(_) => TypeVariant::RevokeSponsorshipOpSigner, - Self::ClawbackOp(_) => TypeVariant::ClawbackOp, - Self::ClawbackClaimableBalanceOp(_) => TypeVariant::ClawbackClaimableBalanceOp, - Self::SetTrustLineFlagsOp(_) => TypeVariant::SetTrustLineFlagsOp, - Self::LiquidityPoolDepositOp(_) => TypeVariant::LiquidityPoolDepositOp, - Self::LiquidityPoolWithdrawOp(_) => TypeVariant::LiquidityPoolWithdrawOp, - Self::HostFunctionType(_) => TypeVariant::HostFunctionType, - Self::ContractIdPreimageType(_) => TypeVariant::ContractIdPreimageType, - Self::ContractIdPreimage(_) => TypeVariant::ContractIdPreimage, - Self::ContractIdPreimageFromAddress(_) => TypeVariant::ContractIdPreimageFromAddress, - Self::CreateContractArgs(_) => TypeVariant::CreateContractArgs, - Self::CreateContractArgsV2(_) => TypeVariant::CreateContractArgsV2, - Self::InvokeContractArgs(_) => TypeVariant::InvokeContractArgs, - Self::HostFunction(_) => TypeVariant::HostFunction, - Self::SorobanAuthorizedFunctionType(_) => TypeVariant::SorobanAuthorizedFunctionType, - Self::SorobanAuthorizedFunction(_) => TypeVariant::SorobanAuthorizedFunction, - Self::SorobanAuthorizedInvocation(_) => TypeVariant::SorobanAuthorizedInvocation, - Self::SorobanAddressCredentials(_) => TypeVariant::SorobanAddressCredentials, - Self::SorobanCredentialsType(_) => TypeVariant::SorobanCredentialsType, - Self::SorobanCredentials(_) => TypeVariant::SorobanCredentials, - Self::SorobanAuthorizationEntry(_) => TypeVariant::SorobanAuthorizationEntry, - Self::SorobanAuthorizationEntries(_) => TypeVariant::SorobanAuthorizationEntries, - Self::InvokeHostFunctionOp(_) => TypeVariant::InvokeHostFunctionOp, - Self::ExtendFootprintTtlOp(_) => TypeVariant::ExtendFootprintTtlOp, - Self::RestoreFootprintOp(_) => TypeVariant::RestoreFootprintOp, - Self::Operation(_) => TypeVariant::Operation, - Self::OperationBody(_) => TypeVariant::OperationBody, - Self::HashIdPreimage(_) => TypeVariant::HashIdPreimage, - Self::HashIdPreimageOperationId(_) => TypeVariant::HashIdPreimageOperationId, - Self::HashIdPreimageRevokeId(_) => TypeVariant::HashIdPreimageRevokeId, - Self::HashIdPreimageContractId(_) => TypeVariant::HashIdPreimageContractId, - Self::HashIdPreimageSorobanAuthorization(_) => { - TypeVariant::HashIdPreimageSorobanAuthorization - } - Self::MemoType(_) => TypeVariant::MemoType, - Self::Memo(_) => TypeVariant::Memo, - Self::TimeBounds(_) => TypeVariant::TimeBounds, - Self::LedgerBounds(_) => TypeVariant::LedgerBounds, - Self::PreconditionsV2(_) => TypeVariant::PreconditionsV2, - Self::PreconditionType(_) => TypeVariant::PreconditionType, - Self::Preconditions(_) => TypeVariant::Preconditions, - Self::LedgerFootprint(_) => TypeVariant::LedgerFootprint, - Self::SorobanResources(_) => TypeVariant::SorobanResources, - Self::SorobanResourcesExtV0(_) => TypeVariant::SorobanResourcesExtV0, - Self::SorobanTransactionData(_) => TypeVariant::SorobanTransactionData, - Self::SorobanTransactionDataExt(_) => TypeVariant::SorobanTransactionDataExt, - Self::TransactionV0(_) => TypeVariant::TransactionV0, - Self::TransactionV0Ext(_) => TypeVariant::TransactionV0Ext, - Self::TransactionV0Envelope(_) => TypeVariant::TransactionV0Envelope, - Self::Transaction(_) => TypeVariant::Transaction, - Self::TransactionExt(_) => TypeVariant::TransactionExt, - Self::TransactionV1Envelope(_) => TypeVariant::TransactionV1Envelope, - Self::FeeBumpTransaction(_) => TypeVariant::FeeBumpTransaction, - Self::FeeBumpTransactionInnerTx(_) => TypeVariant::FeeBumpTransactionInnerTx, - Self::FeeBumpTransactionExt(_) => TypeVariant::FeeBumpTransactionExt, - Self::FeeBumpTransactionEnvelope(_) => TypeVariant::FeeBumpTransactionEnvelope, - Self::TransactionEnvelope(_) => TypeVariant::TransactionEnvelope, - Self::TransactionSignaturePayload(_) => TypeVariant::TransactionSignaturePayload, - Self::TransactionSignaturePayloadTaggedTransaction(_) => { - TypeVariant::TransactionSignaturePayloadTaggedTransaction - } - Self::ClaimAtomType(_) => TypeVariant::ClaimAtomType, - Self::ClaimOfferAtomV0(_) => TypeVariant::ClaimOfferAtomV0, - Self::ClaimOfferAtom(_) => TypeVariant::ClaimOfferAtom, - Self::ClaimLiquidityAtom(_) => TypeVariant::ClaimLiquidityAtom, - Self::ClaimAtom(_) => TypeVariant::ClaimAtom, - Self::CreateAccountResultCode(_) => TypeVariant::CreateAccountResultCode, - Self::CreateAccountResult(_) => TypeVariant::CreateAccountResult, - Self::PaymentResultCode(_) => TypeVariant::PaymentResultCode, - Self::PaymentResult(_) => TypeVariant::PaymentResult, - Self::PathPaymentStrictReceiveResultCode(_) => { - TypeVariant::PathPaymentStrictReceiveResultCode - } - Self::SimplePaymentResult(_) => TypeVariant::SimplePaymentResult, - Self::PathPaymentStrictReceiveResult(_) => TypeVariant::PathPaymentStrictReceiveResult, - Self::PathPaymentStrictReceiveResultSuccess(_) => { - TypeVariant::PathPaymentStrictReceiveResultSuccess - } - Self::PathPaymentStrictSendResultCode(_) => { - TypeVariant::PathPaymentStrictSendResultCode - } - Self::PathPaymentStrictSendResult(_) => TypeVariant::PathPaymentStrictSendResult, - Self::PathPaymentStrictSendResultSuccess(_) => { - TypeVariant::PathPaymentStrictSendResultSuccess - } - Self::ManageSellOfferResultCode(_) => TypeVariant::ManageSellOfferResultCode, - Self::ManageOfferEffect(_) => TypeVariant::ManageOfferEffect, - Self::ManageOfferSuccessResult(_) => TypeVariant::ManageOfferSuccessResult, - Self::ManageOfferSuccessResultOffer(_) => TypeVariant::ManageOfferSuccessResultOffer, - Self::ManageSellOfferResult(_) => TypeVariant::ManageSellOfferResult, - Self::ManageBuyOfferResultCode(_) => TypeVariant::ManageBuyOfferResultCode, - Self::ManageBuyOfferResult(_) => TypeVariant::ManageBuyOfferResult, - Self::SetOptionsResultCode(_) => TypeVariant::SetOptionsResultCode, - Self::SetOptionsResult(_) => TypeVariant::SetOptionsResult, - Self::ChangeTrustResultCode(_) => TypeVariant::ChangeTrustResultCode, - Self::ChangeTrustResult(_) => TypeVariant::ChangeTrustResult, - Self::AllowTrustResultCode(_) => TypeVariant::AllowTrustResultCode, - Self::AllowTrustResult(_) => TypeVariant::AllowTrustResult, - Self::AccountMergeResultCode(_) => TypeVariant::AccountMergeResultCode, - Self::AccountMergeResult(_) => TypeVariant::AccountMergeResult, - Self::InflationResultCode(_) => TypeVariant::InflationResultCode, - Self::InflationPayout(_) => TypeVariant::InflationPayout, - Self::InflationResult(_) => TypeVariant::InflationResult, - Self::ManageDataResultCode(_) => TypeVariant::ManageDataResultCode, - Self::ManageDataResult(_) => TypeVariant::ManageDataResult, - Self::BumpSequenceResultCode(_) => TypeVariant::BumpSequenceResultCode, - Self::BumpSequenceResult(_) => TypeVariant::BumpSequenceResult, - Self::CreateClaimableBalanceResultCode(_) => { - TypeVariant::CreateClaimableBalanceResultCode - } - Self::CreateClaimableBalanceResult(_) => TypeVariant::CreateClaimableBalanceResult, - Self::ClaimClaimableBalanceResultCode(_) => { - TypeVariant::ClaimClaimableBalanceResultCode - } - Self::ClaimClaimableBalanceResult(_) => TypeVariant::ClaimClaimableBalanceResult, - Self::BeginSponsoringFutureReservesResultCode(_) => { - TypeVariant::BeginSponsoringFutureReservesResultCode - } - Self::BeginSponsoringFutureReservesResult(_) => { - TypeVariant::BeginSponsoringFutureReservesResult - } - Self::EndSponsoringFutureReservesResultCode(_) => { - TypeVariant::EndSponsoringFutureReservesResultCode - } - Self::EndSponsoringFutureReservesResult(_) => { - TypeVariant::EndSponsoringFutureReservesResult - } - Self::RevokeSponsorshipResultCode(_) => TypeVariant::RevokeSponsorshipResultCode, - Self::RevokeSponsorshipResult(_) => TypeVariant::RevokeSponsorshipResult, - Self::ClawbackResultCode(_) => TypeVariant::ClawbackResultCode, - Self::ClawbackResult(_) => TypeVariant::ClawbackResult, - Self::ClawbackClaimableBalanceResultCode(_) => { - TypeVariant::ClawbackClaimableBalanceResultCode - } - Self::ClawbackClaimableBalanceResult(_) => TypeVariant::ClawbackClaimableBalanceResult, - Self::SetTrustLineFlagsResultCode(_) => TypeVariant::SetTrustLineFlagsResultCode, - Self::SetTrustLineFlagsResult(_) => TypeVariant::SetTrustLineFlagsResult, - Self::LiquidityPoolDepositResultCode(_) => TypeVariant::LiquidityPoolDepositResultCode, - Self::LiquidityPoolDepositResult(_) => TypeVariant::LiquidityPoolDepositResult, - Self::LiquidityPoolWithdrawResultCode(_) => { - TypeVariant::LiquidityPoolWithdrawResultCode - } - Self::LiquidityPoolWithdrawResult(_) => TypeVariant::LiquidityPoolWithdrawResult, - Self::InvokeHostFunctionResultCode(_) => TypeVariant::InvokeHostFunctionResultCode, - Self::InvokeHostFunctionResult(_) => TypeVariant::InvokeHostFunctionResult, - Self::ExtendFootprintTtlResultCode(_) => TypeVariant::ExtendFootprintTtlResultCode, - Self::ExtendFootprintTtlResult(_) => TypeVariant::ExtendFootprintTtlResult, - Self::RestoreFootprintResultCode(_) => TypeVariant::RestoreFootprintResultCode, - Self::RestoreFootprintResult(_) => TypeVariant::RestoreFootprintResult, - Self::OperationResultCode(_) => TypeVariant::OperationResultCode, - Self::OperationResult(_) => TypeVariant::OperationResult, - Self::OperationResultTr(_) => TypeVariant::OperationResultTr, - Self::TransactionResultCode(_) => TypeVariant::TransactionResultCode, - Self::InnerTransactionResult(_) => TypeVariant::InnerTransactionResult, - Self::InnerTransactionResultResult(_) => TypeVariant::InnerTransactionResultResult, - Self::InnerTransactionResultExt(_) => TypeVariant::InnerTransactionResultExt, - Self::InnerTransactionResultPair(_) => TypeVariant::InnerTransactionResultPair, - Self::TransactionResult(_) => TypeVariant::TransactionResult, - Self::TransactionResultResult(_) => TypeVariant::TransactionResultResult, - Self::TransactionResultExt(_) => TypeVariant::TransactionResultExt, - Self::Hash(_) => TypeVariant::Hash, - Self::Uint256(_) => TypeVariant::Uint256, - Self::Uint32(_) => TypeVariant::Uint32, - Self::Int32(_) => TypeVariant::Int32, - Self::Uint64(_) => TypeVariant::Uint64, - Self::Int64(_) => TypeVariant::Int64, - Self::TimePoint(_) => TypeVariant::TimePoint, - Self::Duration(_) => TypeVariant::Duration, - Self::ExtensionPoint(_) => TypeVariant::ExtensionPoint, - Self::CryptoKeyType(_) => TypeVariant::CryptoKeyType, - Self::PublicKeyType(_) => TypeVariant::PublicKeyType, - Self::SignerKeyType(_) => TypeVariant::SignerKeyType, - Self::PublicKey(_) => TypeVariant::PublicKey, - Self::SignerKey(_) => TypeVariant::SignerKey, - Self::SignerKeyEd25519SignedPayload(_) => TypeVariant::SignerKeyEd25519SignedPayload, - Self::Signature(_) => TypeVariant::Signature, - Self::SignatureHint(_) => TypeVariant::SignatureHint, - Self::NodeId(_) => TypeVariant::NodeId, - Self::AccountId(_) => TypeVariant::AccountId, - Self::ContractId(_) => TypeVariant::ContractId, - Self::Curve25519Secret(_) => TypeVariant::Curve25519Secret, - Self::Curve25519Public(_) => TypeVariant::Curve25519Public, - Self::HmacSha256Key(_) => TypeVariant::HmacSha256Key, - Self::HmacSha256Mac(_) => TypeVariant::HmacSha256Mac, - Self::ShortHashSeed(_) => TypeVariant::ShortHashSeed, - Self::BinaryFuseFilterType(_) => TypeVariant::BinaryFuseFilterType, - Self::SerializedBinaryFuseFilter(_) => TypeVariant::SerializedBinaryFuseFilter, - Self::PoolId(_) => TypeVariant::PoolId, - Self::ClaimableBalanceIdType(_) => TypeVariant::ClaimableBalanceIdType, - Self::ClaimableBalanceId(_) => TypeVariant::ClaimableBalanceId, - } - } -} - -impl Name for Type { - #[must_use] - fn name(&self) -> &'static str { - Self::name(self) - } -} - -impl Variants for Type { - fn variants() -> slice::Iter<'static, TypeVariant> { - Self::VARIANTS.iter() - } -} - -impl WriteXdr for Type { - #[cfg(feature = "std")] - #[allow(clippy::too_many_lines)] - fn write_xdr(&self, w: &mut Limited) -> Result<(), Error> { - match self { - Self::Value(v) => v.write_xdr(w), - Self::ScpBallot(v) => v.write_xdr(w), - Self::ScpStatementType(v) => v.write_xdr(w), - Self::ScpNomination(v) => v.write_xdr(w), - Self::ScpStatement(v) => v.write_xdr(w), - Self::ScpStatementPledges(v) => v.write_xdr(w), - Self::ScpStatementPrepare(v) => v.write_xdr(w), - Self::ScpStatementConfirm(v) => v.write_xdr(w), - Self::ScpStatementExternalize(v) => v.write_xdr(w), - Self::ScpEnvelope(v) => v.write_xdr(w), - Self::ScpQuorumSet(v) => v.write_xdr(w), - Self::EncodedLedgerKey(v) => v.write_xdr(w), - Self::ConfigSettingContractExecutionLanesV0(v) => v.write_xdr(w), - Self::ConfigSettingContractComputeV0(v) => v.write_xdr(w), - Self::ConfigSettingContractParallelComputeV0(v) => v.write_xdr(w), - Self::ConfigSettingContractLedgerCostV0(v) => v.write_xdr(w), - Self::ConfigSettingContractLedgerCostExtV0(v) => v.write_xdr(w), - Self::ConfigSettingContractHistoricalDataV0(v) => v.write_xdr(w), - Self::ConfigSettingContractEventsV0(v) => v.write_xdr(w), - Self::ConfigSettingContractBandwidthV0(v) => v.write_xdr(w), - Self::ContractCostType(v) => v.write_xdr(w), - Self::ContractCostParamEntry(v) => v.write_xdr(w), - Self::StateArchivalSettings(v) => v.write_xdr(w), - Self::EvictionIterator(v) => v.write_xdr(w), - Self::ConfigSettingScpTiming(v) => v.write_xdr(w), - Self::FrozenLedgerKeys(v) => v.write_xdr(w), - Self::FrozenLedgerKeysDelta(v) => v.write_xdr(w), - Self::FreezeBypassTxs(v) => v.write_xdr(w), - Self::FreezeBypassTxsDelta(v) => v.write_xdr(w), - Self::ContractCostParams(v) => v.write_xdr(w), - Self::ConfigSettingId(v) => v.write_xdr(w), - Self::ConfigSettingEntry(v) => v.write_xdr(w), - Self::ScEnvMetaKind(v) => v.write_xdr(w), - Self::ScEnvMetaEntry(v) => v.write_xdr(w), - Self::ScEnvMetaEntryInterfaceVersion(v) => v.write_xdr(w), - Self::ScMetaV0(v) => v.write_xdr(w), - Self::ScMetaKind(v) => v.write_xdr(w), - Self::ScMetaEntry(v) => v.write_xdr(w), - Self::ScSpecType(v) => v.write_xdr(w), - Self::ScSpecTypeOption(v) => v.write_xdr(w), - Self::ScSpecTypeResult(v) => v.write_xdr(w), - Self::ScSpecTypeVec(v) => v.write_xdr(w), - Self::ScSpecTypeMap(v) => v.write_xdr(w), - Self::ScSpecTypeTuple(v) => v.write_xdr(w), - Self::ScSpecTypeBytesN(v) => v.write_xdr(w), - Self::ScSpecTypeUdt(v) => v.write_xdr(w), - Self::ScSpecTypeDef(v) => v.write_xdr(w), - Self::ScSpecUdtStructFieldV0(v) => v.write_xdr(w), - Self::ScSpecUdtStructV0(v) => v.write_xdr(w), - Self::ScSpecUdtUnionCaseVoidV0(v) => v.write_xdr(w), - Self::ScSpecUdtUnionCaseTupleV0(v) => v.write_xdr(w), - Self::ScSpecUdtUnionCaseV0Kind(v) => v.write_xdr(w), - Self::ScSpecUdtUnionCaseV0(v) => v.write_xdr(w), - Self::ScSpecUdtUnionV0(v) => v.write_xdr(w), - Self::ScSpecUdtEnumCaseV0(v) => v.write_xdr(w), - Self::ScSpecUdtEnumV0(v) => v.write_xdr(w), - Self::ScSpecUdtErrorEnumCaseV0(v) => v.write_xdr(w), - Self::ScSpecUdtErrorEnumV0(v) => v.write_xdr(w), - Self::ScSpecFunctionInputV0(v) => v.write_xdr(w), - Self::ScSpecFunctionV0(v) => v.write_xdr(w), - Self::ScSpecEventParamLocationV0(v) => v.write_xdr(w), - Self::ScSpecEventParamV0(v) => v.write_xdr(w), - Self::ScSpecEventDataFormat(v) => v.write_xdr(w), - Self::ScSpecEventV0(v) => v.write_xdr(w), - Self::ScSpecEntryKind(v) => v.write_xdr(w), - Self::ScSpecEntry(v) => v.write_xdr(w), - Self::ScValType(v) => v.write_xdr(w), - Self::ScErrorType(v) => v.write_xdr(w), - Self::ScErrorCode(v) => v.write_xdr(w), - Self::ScError(v) => v.write_xdr(w), - Self::UInt128Parts(v) => v.write_xdr(w), - Self::Int128Parts(v) => v.write_xdr(w), - Self::UInt256Parts(v) => v.write_xdr(w), - Self::Int256Parts(v) => v.write_xdr(w), - Self::ContractExecutableType(v) => v.write_xdr(w), - Self::ContractExecutable(v) => v.write_xdr(w), - Self::ScAddressType(v) => v.write_xdr(w), - Self::MuxedEd25519Account(v) => v.write_xdr(w), - Self::ScAddress(v) => v.write_xdr(w), - Self::ScVec(v) => v.write_xdr(w), - Self::ScMap(v) => v.write_xdr(w), - Self::ScBytes(v) => v.write_xdr(w), - Self::ScString(v) => v.write_xdr(w), - Self::ScSymbol(v) => v.write_xdr(w), - Self::ScNonceKey(v) => v.write_xdr(w), - Self::ScContractInstance(v) => v.write_xdr(w), - Self::ScVal(v) => v.write_xdr(w), - Self::ScMapEntry(v) => v.write_xdr(w), - Self::LedgerCloseMetaBatch(v) => v.write_xdr(w), - Self::StoredTransactionSet(v) => v.write_xdr(w), - Self::StoredDebugTransactionSet(v) => v.write_xdr(w), - Self::PersistedScpStateV0(v) => v.write_xdr(w), - Self::PersistedScpStateV1(v) => v.write_xdr(w), - Self::PersistedScpState(v) => v.write_xdr(w), - Self::Thresholds(v) => v.write_xdr(w), - Self::String32(v) => v.write_xdr(w), - Self::String64(v) => v.write_xdr(w), - Self::SequenceNumber(v) => v.write_xdr(w), - Self::DataValue(v) => v.write_xdr(w), - Self::AssetCode4(v) => v.write_xdr(w), - Self::AssetCode12(v) => v.write_xdr(w), - Self::AssetType(v) => v.write_xdr(w), - Self::AssetCode(v) => v.write_xdr(w), - Self::AlphaNum4(v) => v.write_xdr(w), - Self::AlphaNum12(v) => v.write_xdr(w), - Self::Asset(v) => v.write_xdr(w), - Self::Price(v) => v.write_xdr(w), - Self::Liabilities(v) => v.write_xdr(w), - Self::ThresholdIndexes(v) => v.write_xdr(w), - Self::LedgerEntryType(v) => v.write_xdr(w), - Self::Signer(v) => v.write_xdr(w), - Self::AccountFlags(v) => v.write_xdr(w), - Self::SponsorshipDescriptor(v) => v.write_xdr(w), - Self::AccountEntryExtensionV3(v) => v.write_xdr(w), - Self::AccountEntryExtensionV2(v) => v.write_xdr(w), - Self::AccountEntryExtensionV2Ext(v) => v.write_xdr(w), - Self::AccountEntryExtensionV1(v) => v.write_xdr(w), - Self::AccountEntryExtensionV1Ext(v) => v.write_xdr(w), - Self::AccountEntry(v) => v.write_xdr(w), - Self::AccountEntryExt(v) => v.write_xdr(w), - Self::TrustLineFlags(v) => v.write_xdr(w), - Self::LiquidityPoolType(v) => v.write_xdr(w), - Self::TrustLineAsset(v) => v.write_xdr(w), - Self::TrustLineEntryExtensionV2(v) => v.write_xdr(w), - Self::TrustLineEntryExtensionV2Ext(v) => v.write_xdr(w), - Self::TrustLineEntry(v) => v.write_xdr(w), - Self::TrustLineEntryExt(v) => v.write_xdr(w), - Self::TrustLineEntryV1(v) => v.write_xdr(w), - Self::TrustLineEntryV1Ext(v) => v.write_xdr(w), - Self::OfferEntryFlags(v) => v.write_xdr(w), - Self::OfferEntry(v) => v.write_xdr(w), - Self::OfferEntryExt(v) => v.write_xdr(w), - Self::DataEntry(v) => v.write_xdr(w), - Self::DataEntryExt(v) => v.write_xdr(w), - Self::ClaimPredicateType(v) => v.write_xdr(w), - Self::ClaimPredicate(v) => v.write_xdr(w), - Self::ClaimantType(v) => v.write_xdr(w), - Self::Claimant(v) => v.write_xdr(w), - Self::ClaimantV0(v) => v.write_xdr(w), - Self::ClaimableBalanceFlags(v) => v.write_xdr(w), - Self::ClaimableBalanceEntryExtensionV1(v) => v.write_xdr(w), - Self::ClaimableBalanceEntryExtensionV1Ext(v) => v.write_xdr(w), - Self::ClaimableBalanceEntry(v) => v.write_xdr(w), - Self::ClaimableBalanceEntryExt(v) => v.write_xdr(w), - Self::LiquidityPoolConstantProductParameters(v) => v.write_xdr(w), - Self::LiquidityPoolEntry(v) => v.write_xdr(w), - Self::LiquidityPoolEntryBody(v) => v.write_xdr(w), - Self::LiquidityPoolEntryConstantProduct(v) => v.write_xdr(w), - Self::ContractDataDurability(v) => v.write_xdr(w), - Self::ContractDataEntry(v) => v.write_xdr(w), - Self::ContractCodeCostInputs(v) => v.write_xdr(w), - Self::ContractCodeEntry(v) => v.write_xdr(w), - Self::ContractCodeEntryExt(v) => v.write_xdr(w), - Self::ContractCodeEntryV1(v) => v.write_xdr(w), - Self::TtlEntry(v) => v.write_xdr(w), - Self::LedgerEntryExtensionV1(v) => v.write_xdr(w), - Self::LedgerEntryExtensionV1Ext(v) => v.write_xdr(w), - Self::LedgerEntry(v) => v.write_xdr(w), - Self::LedgerEntryData(v) => v.write_xdr(w), - Self::LedgerEntryExt(v) => v.write_xdr(w), - Self::LedgerKey(v) => v.write_xdr(w), - Self::LedgerKeyAccount(v) => v.write_xdr(w), - Self::LedgerKeyTrustLine(v) => v.write_xdr(w), - Self::LedgerKeyOffer(v) => v.write_xdr(w), - Self::LedgerKeyData(v) => v.write_xdr(w), - Self::LedgerKeyClaimableBalance(v) => v.write_xdr(w), - Self::LedgerKeyLiquidityPool(v) => v.write_xdr(w), - Self::LedgerKeyContractData(v) => v.write_xdr(w), - Self::LedgerKeyContractCode(v) => v.write_xdr(w), - Self::LedgerKeyConfigSetting(v) => v.write_xdr(w), - Self::LedgerKeyTtl(v) => v.write_xdr(w), - Self::EnvelopeType(v) => v.write_xdr(w), - Self::BucketListType(v) => v.write_xdr(w), - Self::BucketEntryType(v) => v.write_xdr(w), - Self::HotArchiveBucketEntryType(v) => v.write_xdr(w), - Self::BucketMetadata(v) => v.write_xdr(w), - Self::BucketMetadataExt(v) => v.write_xdr(w), - Self::BucketEntry(v) => v.write_xdr(w), - Self::HotArchiveBucketEntry(v) => v.write_xdr(w), - Self::UpgradeType(v) => v.write_xdr(w), - Self::StellarValueType(v) => v.write_xdr(w), - Self::LedgerCloseValueSignature(v) => v.write_xdr(w), - Self::StellarValue(v) => v.write_xdr(w), - Self::StellarValueExt(v) => v.write_xdr(w), - Self::LedgerHeaderFlags(v) => v.write_xdr(w), - Self::LedgerHeaderExtensionV1(v) => v.write_xdr(w), - Self::LedgerHeaderExtensionV1Ext(v) => v.write_xdr(w), - Self::LedgerHeader(v) => v.write_xdr(w), - Self::LedgerHeaderExt(v) => v.write_xdr(w), - Self::LedgerUpgradeType(v) => v.write_xdr(w), - Self::ConfigUpgradeSetKey(v) => v.write_xdr(w), - Self::LedgerUpgrade(v) => v.write_xdr(w), - Self::ConfigUpgradeSet(v) => v.write_xdr(w), - Self::TxSetComponentType(v) => v.write_xdr(w), - Self::DependentTxCluster(v) => v.write_xdr(w), - Self::ParallelTxExecutionStage(v) => v.write_xdr(w), - Self::ParallelTxsComponent(v) => v.write_xdr(w), - Self::TxSetComponent(v) => v.write_xdr(w), - Self::TxSetComponentTxsMaybeDiscountedFee(v) => v.write_xdr(w), - Self::TransactionPhase(v) => v.write_xdr(w), - Self::TransactionSet(v) => v.write_xdr(w), - Self::TransactionSetV1(v) => v.write_xdr(w), - Self::GeneralizedTransactionSet(v) => v.write_xdr(w), - Self::TransactionResultPair(v) => v.write_xdr(w), - Self::TransactionResultSet(v) => v.write_xdr(w), - Self::TransactionHistoryEntry(v) => v.write_xdr(w), - Self::TransactionHistoryEntryExt(v) => v.write_xdr(w), - Self::TransactionHistoryResultEntry(v) => v.write_xdr(w), - Self::TransactionHistoryResultEntryExt(v) => v.write_xdr(w), - Self::LedgerHeaderHistoryEntry(v) => v.write_xdr(w), - Self::LedgerHeaderHistoryEntryExt(v) => v.write_xdr(w), - Self::LedgerScpMessages(v) => v.write_xdr(w), - Self::ScpHistoryEntryV0(v) => v.write_xdr(w), - Self::ScpHistoryEntry(v) => v.write_xdr(w), - Self::LedgerEntryChangeType(v) => v.write_xdr(w), - Self::LedgerEntryChange(v) => v.write_xdr(w), - Self::LedgerEntryChanges(v) => v.write_xdr(w), - Self::OperationMeta(v) => v.write_xdr(w), - Self::TransactionMetaV1(v) => v.write_xdr(w), - Self::TransactionMetaV2(v) => v.write_xdr(w), - Self::ContractEventType(v) => v.write_xdr(w), - Self::ContractEvent(v) => v.write_xdr(w), - Self::ContractEventBody(v) => v.write_xdr(w), - Self::ContractEventV0(v) => v.write_xdr(w), - Self::DiagnosticEvent(v) => v.write_xdr(w), - Self::SorobanTransactionMetaExtV1(v) => v.write_xdr(w), - Self::SorobanTransactionMetaExt(v) => v.write_xdr(w), - Self::SorobanTransactionMeta(v) => v.write_xdr(w), - Self::TransactionMetaV3(v) => v.write_xdr(w), - Self::OperationMetaV2(v) => v.write_xdr(w), - Self::SorobanTransactionMetaV2(v) => v.write_xdr(w), - Self::TransactionEventStage(v) => v.write_xdr(w), - Self::TransactionEvent(v) => v.write_xdr(w), - Self::TransactionMetaV4(v) => v.write_xdr(w), - Self::InvokeHostFunctionSuccessPreImage(v) => v.write_xdr(w), - Self::TransactionMeta(v) => v.write_xdr(w), - Self::TransactionResultMeta(v) => v.write_xdr(w), - Self::TransactionResultMetaV1(v) => v.write_xdr(w), - Self::UpgradeEntryMeta(v) => v.write_xdr(w), - Self::LedgerCloseMetaV0(v) => v.write_xdr(w), - Self::LedgerCloseMetaExtV1(v) => v.write_xdr(w), - Self::LedgerCloseMetaExt(v) => v.write_xdr(w), - Self::LedgerCloseMetaV1(v) => v.write_xdr(w), - Self::LedgerCloseMetaV2(v) => v.write_xdr(w), - Self::LedgerCloseMeta(v) => v.write_xdr(w), - Self::ErrorCode(v) => v.write_xdr(w), - Self::SError(v) => v.write_xdr(w), - Self::SendMore(v) => v.write_xdr(w), - Self::SendMoreExtended(v) => v.write_xdr(w), - Self::AuthCert(v) => v.write_xdr(w), - Self::Hello(v) => v.write_xdr(w), - Self::Auth(v) => v.write_xdr(w), - Self::IpAddrType(v) => v.write_xdr(w), - Self::PeerAddress(v) => v.write_xdr(w), - Self::PeerAddressIp(v) => v.write_xdr(w), - Self::MessageType(v) => v.write_xdr(w), - Self::DontHave(v) => v.write_xdr(w), - Self::SurveyMessageCommandType(v) => v.write_xdr(w), - Self::SurveyMessageResponseType(v) => v.write_xdr(w), - Self::TimeSlicedSurveyStartCollectingMessage(v) => v.write_xdr(w), - Self::SignedTimeSlicedSurveyStartCollectingMessage(v) => v.write_xdr(w), - Self::TimeSlicedSurveyStopCollectingMessage(v) => v.write_xdr(w), - Self::SignedTimeSlicedSurveyStopCollectingMessage(v) => v.write_xdr(w), - Self::SurveyRequestMessage(v) => v.write_xdr(w), - Self::TimeSlicedSurveyRequestMessage(v) => v.write_xdr(w), - Self::SignedTimeSlicedSurveyRequestMessage(v) => v.write_xdr(w), - Self::EncryptedBody(v) => v.write_xdr(w), - Self::SurveyResponseMessage(v) => v.write_xdr(w), - Self::TimeSlicedSurveyResponseMessage(v) => v.write_xdr(w), - Self::SignedTimeSlicedSurveyResponseMessage(v) => v.write_xdr(w), - Self::PeerStats(v) => v.write_xdr(w), - Self::TimeSlicedNodeData(v) => v.write_xdr(w), - Self::TimeSlicedPeerData(v) => v.write_xdr(w), - Self::TimeSlicedPeerDataList(v) => v.write_xdr(w), - Self::TopologyResponseBodyV2(v) => v.write_xdr(w), - Self::SurveyResponseBody(v) => v.write_xdr(w), - Self::TxAdvertVector(v) => v.write_xdr(w), - Self::FloodAdvert(v) => v.write_xdr(w), - Self::TxDemandVector(v) => v.write_xdr(w), - Self::FloodDemand(v) => v.write_xdr(w), - Self::StellarMessage(v) => v.write_xdr(w), - Self::AuthenticatedMessage(v) => v.write_xdr(w), - Self::AuthenticatedMessageV0(v) => v.write_xdr(w), - Self::LiquidityPoolParameters(v) => v.write_xdr(w), - Self::MuxedAccount(v) => v.write_xdr(w), - Self::MuxedAccountMed25519(v) => v.write_xdr(w), - Self::DecoratedSignature(v) => v.write_xdr(w), - Self::OperationType(v) => v.write_xdr(w), - Self::CreateAccountOp(v) => v.write_xdr(w), - Self::PaymentOp(v) => v.write_xdr(w), - Self::PathPaymentStrictReceiveOp(v) => v.write_xdr(w), - Self::PathPaymentStrictSendOp(v) => v.write_xdr(w), - Self::ManageSellOfferOp(v) => v.write_xdr(w), - Self::ManageBuyOfferOp(v) => v.write_xdr(w), - Self::CreatePassiveSellOfferOp(v) => v.write_xdr(w), - Self::SetOptionsOp(v) => v.write_xdr(w), - Self::ChangeTrustAsset(v) => v.write_xdr(w), - Self::ChangeTrustOp(v) => v.write_xdr(w), - Self::AllowTrustOp(v) => v.write_xdr(w), - Self::ManageDataOp(v) => v.write_xdr(w), - Self::BumpSequenceOp(v) => v.write_xdr(w), - Self::CreateClaimableBalanceOp(v) => v.write_xdr(w), - Self::ClaimClaimableBalanceOp(v) => v.write_xdr(w), - Self::BeginSponsoringFutureReservesOp(v) => v.write_xdr(w), - Self::RevokeSponsorshipType(v) => v.write_xdr(w), - Self::RevokeSponsorshipOp(v) => v.write_xdr(w), - Self::RevokeSponsorshipOpSigner(v) => v.write_xdr(w), - Self::ClawbackOp(v) => v.write_xdr(w), - Self::ClawbackClaimableBalanceOp(v) => v.write_xdr(w), - Self::SetTrustLineFlagsOp(v) => v.write_xdr(w), - Self::LiquidityPoolDepositOp(v) => v.write_xdr(w), - Self::LiquidityPoolWithdrawOp(v) => v.write_xdr(w), - Self::HostFunctionType(v) => v.write_xdr(w), - Self::ContractIdPreimageType(v) => v.write_xdr(w), - Self::ContractIdPreimage(v) => v.write_xdr(w), - Self::ContractIdPreimageFromAddress(v) => v.write_xdr(w), - Self::CreateContractArgs(v) => v.write_xdr(w), - Self::CreateContractArgsV2(v) => v.write_xdr(w), - Self::InvokeContractArgs(v) => v.write_xdr(w), - Self::HostFunction(v) => v.write_xdr(w), - Self::SorobanAuthorizedFunctionType(v) => v.write_xdr(w), - Self::SorobanAuthorizedFunction(v) => v.write_xdr(w), - Self::SorobanAuthorizedInvocation(v) => v.write_xdr(w), - Self::SorobanAddressCredentials(v) => v.write_xdr(w), - Self::SorobanCredentialsType(v) => v.write_xdr(w), - Self::SorobanCredentials(v) => v.write_xdr(w), - Self::SorobanAuthorizationEntry(v) => v.write_xdr(w), - Self::SorobanAuthorizationEntries(v) => v.write_xdr(w), - Self::InvokeHostFunctionOp(v) => v.write_xdr(w), - Self::ExtendFootprintTtlOp(v) => v.write_xdr(w), - Self::RestoreFootprintOp(v) => v.write_xdr(w), - Self::Operation(v) => v.write_xdr(w), - Self::OperationBody(v) => v.write_xdr(w), - Self::HashIdPreimage(v) => v.write_xdr(w), - Self::HashIdPreimageOperationId(v) => v.write_xdr(w), - Self::HashIdPreimageRevokeId(v) => v.write_xdr(w), - Self::HashIdPreimageContractId(v) => v.write_xdr(w), - Self::HashIdPreimageSorobanAuthorization(v) => v.write_xdr(w), - Self::MemoType(v) => v.write_xdr(w), - Self::Memo(v) => v.write_xdr(w), - Self::TimeBounds(v) => v.write_xdr(w), - Self::LedgerBounds(v) => v.write_xdr(w), - Self::PreconditionsV2(v) => v.write_xdr(w), - Self::PreconditionType(v) => v.write_xdr(w), - Self::Preconditions(v) => v.write_xdr(w), - Self::LedgerFootprint(v) => v.write_xdr(w), - Self::SorobanResources(v) => v.write_xdr(w), - Self::SorobanResourcesExtV0(v) => v.write_xdr(w), - Self::SorobanTransactionData(v) => v.write_xdr(w), - Self::SorobanTransactionDataExt(v) => v.write_xdr(w), - Self::TransactionV0(v) => v.write_xdr(w), - Self::TransactionV0Ext(v) => v.write_xdr(w), - Self::TransactionV0Envelope(v) => v.write_xdr(w), - Self::Transaction(v) => v.write_xdr(w), - Self::TransactionExt(v) => v.write_xdr(w), - Self::TransactionV1Envelope(v) => v.write_xdr(w), - Self::FeeBumpTransaction(v) => v.write_xdr(w), - Self::FeeBumpTransactionInnerTx(v) => v.write_xdr(w), - Self::FeeBumpTransactionExt(v) => v.write_xdr(w), - Self::FeeBumpTransactionEnvelope(v) => v.write_xdr(w), - Self::TransactionEnvelope(v) => v.write_xdr(w), - Self::TransactionSignaturePayload(v) => v.write_xdr(w), - Self::TransactionSignaturePayloadTaggedTransaction(v) => v.write_xdr(w), - Self::ClaimAtomType(v) => v.write_xdr(w), - Self::ClaimOfferAtomV0(v) => v.write_xdr(w), - Self::ClaimOfferAtom(v) => v.write_xdr(w), - Self::ClaimLiquidityAtom(v) => v.write_xdr(w), - Self::ClaimAtom(v) => v.write_xdr(w), - Self::CreateAccountResultCode(v) => v.write_xdr(w), - Self::CreateAccountResult(v) => v.write_xdr(w), - Self::PaymentResultCode(v) => v.write_xdr(w), - Self::PaymentResult(v) => v.write_xdr(w), - Self::PathPaymentStrictReceiveResultCode(v) => v.write_xdr(w), - Self::SimplePaymentResult(v) => v.write_xdr(w), - Self::PathPaymentStrictReceiveResult(v) => v.write_xdr(w), - Self::PathPaymentStrictReceiveResultSuccess(v) => v.write_xdr(w), - Self::PathPaymentStrictSendResultCode(v) => v.write_xdr(w), - Self::PathPaymentStrictSendResult(v) => v.write_xdr(w), - Self::PathPaymentStrictSendResultSuccess(v) => v.write_xdr(w), - Self::ManageSellOfferResultCode(v) => v.write_xdr(w), - Self::ManageOfferEffect(v) => v.write_xdr(w), - Self::ManageOfferSuccessResult(v) => v.write_xdr(w), - Self::ManageOfferSuccessResultOffer(v) => v.write_xdr(w), - Self::ManageSellOfferResult(v) => v.write_xdr(w), - Self::ManageBuyOfferResultCode(v) => v.write_xdr(w), - Self::ManageBuyOfferResult(v) => v.write_xdr(w), - Self::SetOptionsResultCode(v) => v.write_xdr(w), - Self::SetOptionsResult(v) => v.write_xdr(w), - Self::ChangeTrustResultCode(v) => v.write_xdr(w), - Self::ChangeTrustResult(v) => v.write_xdr(w), - Self::AllowTrustResultCode(v) => v.write_xdr(w), - Self::AllowTrustResult(v) => v.write_xdr(w), - Self::AccountMergeResultCode(v) => v.write_xdr(w), - Self::AccountMergeResult(v) => v.write_xdr(w), - Self::InflationResultCode(v) => v.write_xdr(w), - Self::InflationPayout(v) => v.write_xdr(w), - Self::InflationResult(v) => v.write_xdr(w), - Self::ManageDataResultCode(v) => v.write_xdr(w), - Self::ManageDataResult(v) => v.write_xdr(w), - Self::BumpSequenceResultCode(v) => v.write_xdr(w), - Self::BumpSequenceResult(v) => v.write_xdr(w), - Self::CreateClaimableBalanceResultCode(v) => v.write_xdr(w), - Self::CreateClaimableBalanceResult(v) => v.write_xdr(w), - Self::ClaimClaimableBalanceResultCode(v) => v.write_xdr(w), - Self::ClaimClaimableBalanceResult(v) => v.write_xdr(w), - Self::BeginSponsoringFutureReservesResultCode(v) => v.write_xdr(w), - Self::BeginSponsoringFutureReservesResult(v) => v.write_xdr(w), - Self::EndSponsoringFutureReservesResultCode(v) => v.write_xdr(w), - Self::EndSponsoringFutureReservesResult(v) => v.write_xdr(w), - Self::RevokeSponsorshipResultCode(v) => v.write_xdr(w), - Self::RevokeSponsorshipResult(v) => v.write_xdr(w), - Self::ClawbackResultCode(v) => v.write_xdr(w), - Self::ClawbackResult(v) => v.write_xdr(w), - Self::ClawbackClaimableBalanceResultCode(v) => v.write_xdr(w), - Self::ClawbackClaimableBalanceResult(v) => v.write_xdr(w), - Self::SetTrustLineFlagsResultCode(v) => v.write_xdr(w), - Self::SetTrustLineFlagsResult(v) => v.write_xdr(w), - Self::LiquidityPoolDepositResultCode(v) => v.write_xdr(w), - Self::LiquidityPoolDepositResult(v) => v.write_xdr(w), - Self::LiquidityPoolWithdrawResultCode(v) => v.write_xdr(w), - Self::LiquidityPoolWithdrawResult(v) => v.write_xdr(w), - Self::InvokeHostFunctionResultCode(v) => v.write_xdr(w), - Self::InvokeHostFunctionResult(v) => v.write_xdr(w), - Self::ExtendFootprintTtlResultCode(v) => v.write_xdr(w), - Self::ExtendFootprintTtlResult(v) => v.write_xdr(w), - Self::RestoreFootprintResultCode(v) => v.write_xdr(w), - Self::RestoreFootprintResult(v) => v.write_xdr(w), - Self::OperationResultCode(v) => v.write_xdr(w), - Self::OperationResult(v) => v.write_xdr(w), - Self::OperationResultTr(v) => v.write_xdr(w), - Self::TransactionResultCode(v) => v.write_xdr(w), - Self::InnerTransactionResult(v) => v.write_xdr(w), - Self::InnerTransactionResultResult(v) => v.write_xdr(w), - Self::InnerTransactionResultExt(v) => v.write_xdr(w), - Self::InnerTransactionResultPair(v) => v.write_xdr(w), - Self::TransactionResult(v) => v.write_xdr(w), - Self::TransactionResultResult(v) => v.write_xdr(w), - Self::TransactionResultExt(v) => v.write_xdr(w), - Self::Hash(v) => v.write_xdr(w), - Self::Uint256(v) => v.write_xdr(w), - Self::Uint32(v) => v.write_xdr(w), - Self::Int32(v) => v.write_xdr(w), - Self::Uint64(v) => v.write_xdr(w), - Self::Int64(v) => v.write_xdr(w), - Self::TimePoint(v) => v.write_xdr(w), - Self::Duration(v) => v.write_xdr(w), - Self::ExtensionPoint(v) => v.write_xdr(w), - Self::CryptoKeyType(v) => v.write_xdr(w), - Self::PublicKeyType(v) => v.write_xdr(w), - Self::SignerKeyType(v) => v.write_xdr(w), - Self::PublicKey(v) => v.write_xdr(w), - Self::SignerKey(v) => v.write_xdr(w), - Self::SignerKeyEd25519SignedPayload(v) => v.write_xdr(w), - Self::Signature(v) => v.write_xdr(w), - Self::SignatureHint(v) => v.write_xdr(w), - Self::NodeId(v) => v.write_xdr(w), - Self::AccountId(v) => v.write_xdr(w), - Self::ContractId(v) => v.write_xdr(w), - Self::Curve25519Secret(v) => v.write_xdr(w), - Self::Curve25519Public(v) => v.write_xdr(w), - Self::HmacSha256Key(v) => v.write_xdr(w), - Self::HmacSha256Mac(v) => v.write_xdr(w), - Self::ShortHashSeed(v) => v.write_xdr(w), - Self::BinaryFuseFilterType(v) => v.write_xdr(w), - Self::SerializedBinaryFuseFilter(v) => v.write_xdr(w), - Self::PoolId(v) => v.write_xdr(w), - Self::ClaimableBalanceIdType(v) => v.write_xdr(w), - Self::ClaimableBalanceId(v) => v.write_xdr(w), - } - } -} diff --git a/src/next/jsonschema.rs b/src/next/jsonschema.rs deleted file mode 100644 index 70d06dec..00000000 --- a/src/next/jsonschema.rs +++ /dev/null @@ -1,36 +0,0 @@ -#![cfg(feature = "schemars")] -use schemars::{gen::SchemaGenerator, schema::Schema, JsonSchema}; - -macro_rules! impl_json_schema_string { - ($type:ident) => { - impl JsonSchema for super::$type { - fn schema_name() -> String { - stringify!($type).to_string() - } - - fn json_schema(gen: &mut SchemaGenerator) -> Schema { - String::json_schema(gen) - } - } - }; -} - -impl_json_schema_string!(PublicKey); -impl_json_schema_string!(AccountId); -impl_json_schema_string!(ContractId); -impl_json_schema_string!(MuxedAccount); -impl_json_schema_string!(MuxedAccountMed25519); -impl_json_schema_string!(MuxedEd25519Account); -impl_json_schema_string!(SignerKey); -impl_json_schema_string!(SignerKeyEd25519SignedPayload); -impl_json_schema_string!(NodeId); -impl_json_schema_string!(ScAddress); -impl_json_schema_string!(AssetCode); -impl_json_schema_string!(AssetCode4); -impl_json_schema_string!(AssetCode12); -impl_json_schema_string!(ClaimableBalanceId); -impl_json_schema_string!(PoolId); -impl_json_schema_string!(Int128Parts); -impl_json_schema_string!(UInt128Parts); -impl_json_schema_string!(Int256Parts); -impl_json_schema_string!(UInt256Parts); diff --git a/src/next/ledgerkey.rs b/src/next/ledgerkey.rs deleted file mode 100644 index 27e78cf2..00000000 --- a/src/next/ledgerkey.rs +++ /dev/null @@ -1,187 +0,0 @@ -use super::{ - AccountEntry, ClaimableBalanceEntry, ConfigSettingEntry, ContractCodeEntry, ContractDataEntry, - DataEntry, LedgerEntry, LedgerEntryData, LedgerKey, LedgerKeyAccount, - LedgerKeyClaimableBalance, LedgerKeyConfigSetting, LedgerKeyContractCode, - LedgerKeyContractData, LedgerKeyData, LedgerKeyLiquidityPool, LedgerKeyOffer, - LedgerKeyTrustLine, LedgerKeyTtl, LiquidityPoolEntry, OfferEntry, TrustLineEntry, TtlEntry, -}; - -impl LedgerEntry { - #[must_use] - pub fn to_key(&self) -> LedgerKey { - self.data.to_key() - } -} - -impl LedgerEntryData { - #[must_use] - pub fn to_key(&self) -> LedgerKey { - match &self { - LedgerEntryData::Ttl(e) => e.to_key().into(), - LedgerEntryData::Account(e) => e.to_key().into(), - LedgerEntryData::Trustline(e) => e.to_key().into(), - LedgerEntryData::Offer(e) => e.to_key().into(), - LedgerEntryData::Data(e) => e.to_key().into(), - LedgerEntryData::ClaimableBalance(e) => e.to_key().into(), - LedgerEntryData::LiquidityPool(e) => e.to_key().into(), - LedgerEntryData::ContractData(e) => e.to_key().into(), - LedgerEntryData::ContractCode(e) => e.to_key().into(), - LedgerEntryData::ConfigSetting(e) => e.to_key().into(), - } - } -} - -impl TtlEntry { - #[must_use] - pub fn to_key(&self) -> LedgerKeyTtl { - LedgerKeyTtl { - key_hash: self.key_hash.clone(), - } - } -} - -impl AccountEntry { - #[must_use] - pub fn to_key(&self) -> LedgerKeyAccount { - LedgerKeyAccount { - account_id: self.account_id.clone(), - } - } -} - -impl TrustLineEntry { - #[must_use] - pub fn to_key(&self) -> LedgerKeyTrustLine { - LedgerKeyTrustLine { - account_id: self.account_id.clone(), - asset: self.asset.clone(), - } - } -} - -impl OfferEntry { - #[must_use] - pub fn to_key(&self) -> LedgerKeyOffer { - LedgerKeyOffer { - seller_id: self.seller_id.clone(), - offer_id: self.offer_id, - } - } -} - -impl DataEntry { - #[must_use] - pub fn to_key(&self) -> LedgerKeyData { - LedgerKeyData { - account_id: self.account_id.clone(), - data_name: self.data_name.clone(), - } - } -} - -impl ClaimableBalanceEntry { - #[must_use] - pub fn to_key(&self) -> LedgerKeyClaimableBalance { - LedgerKeyClaimableBalance { - balance_id: self.balance_id.clone(), - } - } -} - -impl LiquidityPoolEntry { - #[must_use] - pub fn to_key(&self) -> LedgerKeyLiquidityPool { - LedgerKeyLiquidityPool { - liquidity_pool_id: self.liquidity_pool_id.clone(), - } - } -} - -impl ContractDataEntry { - #[must_use] - pub fn to_key(&self) -> LedgerKeyContractData { - LedgerKeyContractData { - contract: self.contract.clone(), - key: self.key.clone(), - durability: self.durability, - } - } -} - -impl ContractCodeEntry { - #[must_use] - pub fn to_key(&self) -> LedgerKeyContractCode { - LedgerKeyContractCode { - hash: self.hash.clone(), - } - } -} - -impl ConfigSettingEntry { - #[must_use] - pub fn to_key(&self) -> LedgerKeyConfigSetting { - LedgerKeyConfigSetting { - config_setting_id: self.discriminant(), - } - } -} - -impl From for LedgerKey { - fn from(key: LedgerKeyTtl) -> Self { - LedgerKey::Ttl(key) - } -} - -impl From for LedgerKey { - fn from(key: LedgerKeyAccount) -> Self { - LedgerKey::Account(key) - } -} - -impl From for LedgerKey { - fn from(key: LedgerKeyTrustLine) -> Self { - LedgerKey::Trustline(key) - } -} - -impl From for LedgerKey { - fn from(key: LedgerKeyOffer) -> Self { - LedgerKey::Offer(key) - } -} - -impl From for LedgerKey { - fn from(key: LedgerKeyData) -> Self { - LedgerKey::Data(key) - } -} - -impl From for LedgerKey { - fn from(key: LedgerKeyClaimableBalance) -> Self { - LedgerKey::ClaimableBalance(key) - } -} - -impl From for LedgerKey { - fn from(key: LedgerKeyLiquidityPool) -> Self { - LedgerKey::LiquidityPool(key) - } -} - -impl From for LedgerKey { - fn from(key: LedgerKeyContractData) -> Self { - LedgerKey::ContractData(key) - } -} - -impl From for LedgerKey { - fn from(key: LedgerKeyContractCode) -> Self { - LedgerKey::ContractCode(key) - } -} - -impl From for LedgerKey { - fn from(key: LedgerKeyConfigSetting) -> Self { - LedgerKey::ConfigSetting(key) - } -} diff --git a/src/next/mod.rs b/src/next/mod.rs deleted file mode 100644 index f59e9780..00000000 --- a/src/next/mod.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[allow(clippy::empty_line_after_doc_comments)] -mod generated; -mod ledgerkey; -pub use generated::*; - -mod default; -mod jsonschema; -mod str; - -mod scval_conversions; -pub use scval_conversions::*; -mod account_conversions; -mod transaction_conversions; - -mod scval_validations; -pub use scval_validations::*; - -#[cfg(feature = "alloc")] -mod scmap; - -mod tx_auths; -mod tx_hash; diff --git a/src/next/scmap.rs b/src/next/scmap.rs deleted file mode 100644 index 6e44e654..00000000 --- a/src/next/scmap.rs +++ /dev/null @@ -1,75 +0,0 @@ -#![allow(clippy::missing_errors_doc)] - -use super::{Error, ScMap, ScMapEntry, ScVal, Validate}; -extern crate alloc; -use alloc::vec::Vec; - -impl ScMap { - pub fn sorted_from_entries(entries: I) -> Result - where - E: TryInto, - I: Iterator, - { - let mut v = entries - .map(TryInto::try_into) - .collect::, _>>() - .map_err(|_| Error::Invalid)?; - // TODO: Add tests that prove order consistency of ScVal with RawVal. https://github.com/stellar/rs-stellar-xdr/issues/117 - v.sort_by(|a, b| a.key.cmp(&b.key)); - let m = ScMap(v.try_into()?); - // `validate` will further check that there are no duplicates. - m.validate()?; - Ok(m) - } - - pub fn sorted_from_pairs(pairs: I) -> Result - where - K: TryInto, - V: TryInto, - I: Iterator, - { - Self::sorted_from_entries(pairs) - } - - pub fn sorted_from(src: I) -> Result - where - E: TryInto, - I: IntoIterator, - { - Self::sorted_from_entries(src.into_iter()) - } -} - -#[cfg(test)] -mod test { - use super::*; - use alloc::{collections::BTreeMap, vec}; - - #[test] - fn scmap_from_map() -> Result<(), ()> { - let mut m: BTreeMap = BTreeMap::new(); - m.insert(1, 2); - m.insert(5, 6); - m.insert(3, 4); - let scm = ScMap::sorted_from(m)?; - assert_eq!(scm.0.first().unwrap().key, 1u32.into()); - assert_eq!(scm.0.last().unwrap().key, 5u32.into()); - Ok(()) - } - - #[test] - fn scmap_from_pairs() -> Result<(), ()> { - let pairs: Vec<(u32, u32)> = vec![(3, 4), (5, 6), (1, 2)]; - let scm = ScMap::sorted_from(pairs)?; - assert_eq!(scm.0.first().unwrap().key, 1u32.into()); - assert_eq!(scm.0.last().unwrap().key, 5u32.into()); - Ok(()) - } - - #[test] - fn scmap_from_pairs_containing_duplicate_keys() { - let pairs: Vec<(u32, u32)> = vec![(3, 4), (3, 5), (5, 6), (1, 2)]; - let scm = ScMap::sorted_from(pairs); - assert!(scm.is_err()); - } -} diff --git a/src/next/scval_conversions.rs b/src/next/scval_conversions.rs deleted file mode 100644 index d0882c9f..00000000 --- a/src/next/scval_conversions.rs +++ /dev/null @@ -1,860 +0,0 @@ -use super::{ - Int128Parts, ScBytes, ScError, ScMap, ScMapEntry, ScSymbol, ScVal, ScVec, UInt128Parts, -}; - -#[cfg(all(not(feature = "std"), feature = "alloc"))] -extern crate alloc; -#[cfg(all(not(feature = "std"), feature = "alloc"))] -use alloc::{string::String, vec, vec::Vec}; - -// TODO: Use the Error type for conversions in this file. - -impl From for ScVal { - fn from(v: ScError) -> Self { - ScVal::Error(v) - } -} - -impl TryFrom for ScError { - type Error = (); - fn try_from(v: ScVal) -> Result { - if let ScVal::Error(s) = v { - Ok(s) - } else { - Err(()) - } - } -} - -impl From for ScVal { - fn from(v: i32) -> ScVal { - ScVal::I32(v) - } -} - -impl From<&i32> for ScVal { - fn from(v: &i32) -> ScVal { - ScVal::I32(*v) - } -} - -impl TryFrom for i32 { - type Error = (); - fn try_from(v: ScVal) -> Result { - if let ScVal::I32(i) = v { - Ok(i) - } else { - Err(()) - } - } -} - -impl From for ScVal { - fn from(v: u32) -> ScVal { - ScVal::U32(v) - } -} - -impl From<&u32> for ScVal { - fn from(v: &u32) -> ScVal { - ScVal::U32(*v) - } -} - -impl TryFrom for u32 { - type Error = (); - fn try_from(v: ScVal) -> Result { - if let ScVal::U32(i) = v { - Ok(i) - } else { - Err(()) - } - } -} - -impl From for ScVal { - fn from(v: i64) -> ScVal { - ScVal::I64(v) - } -} - -impl From<&i64> for ScVal { - fn from(v: &i64) -> ScVal { - <_ as Into>::into(*v) - } -} - -impl TryFrom for i64 { - type Error = (); - fn try_from(v: ScVal) -> Result { - if let ScVal::I64(i) = v { - Ok(i) - } else { - Err(()) - } - } -} - -impl From<()> for ScVal { - fn from((): ()) -> Self { - ScVal::Void - } -} - -impl From<&()> for ScVal { - fn from((): &()) -> Self { - ScVal::Void - } -} - -impl TryFrom for () { - type Error = (); - fn try_from(v: ScVal) -> Result { - if let ScVal::Void = v { - Ok(()) - } else { - Err(()) - } - } -} - -impl From for ScVal { - fn from(v: bool) -> Self { - ScVal::Bool(v) - } -} - -impl From<&bool> for ScVal { - fn from(v: &bool) -> Self { - <_ as Into>::into(*v) - } -} - -impl TryFrom for bool { - type Error = (); - fn try_from(v: ScVal) -> Result { - if let ScVal::Bool(b) = v { - Ok(b) - } else { - Err(()) - } - } -} - -impl From for ScVal { - fn from(v: u64) -> Self { - ScVal::U64(v) - } -} - -impl From<&u64> for ScVal { - fn from(v: &u64) -> Self { - ScVal::U64(*v) - } -} - -impl TryFrom for u64 { - type Error = (); - fn try_from(v: ScVal) -> Result { - if let ScVal::U64(i) = v { - Ok(i) - } else { - Err(()) - } - } -} - -pub mod int128_helpers { - #[must_use] - #[inline(always)] - #[allow(clippy::inline_always, clippy::cast_possible_truncation)] - pub fn u128_hi(u: u128) -> u64 { - (u >> 64) as u64 - } - - #[must_use] - #[inline(always)] - #[allow(clippy::inline_always, clippy::cast_possible_truncation)] - pub fn u128_lo(u: u128) -> u64 { - u as u64 - } - - #[must_use] - #[inline(always)] - #[allow(clippy::inline_always)] - pub fn u128_from_pieces(hi: u64, lo: u64) -> u128 { - (u128::from(hi) << 64) | u128::from(lo) - } - - #[must_use] - #[inline(always)] - #[allow(clippy::inline_always, clippy::cast_possible_truncation)] - pub fn i128_hi(i: i128) -> i64 { - (i >> 64) as i64 - } - - #[must_use] - #[inline(always)] - #[allow( - clippy::inline_always, - clippy::cast_possible_truncation, - clippy::cast_sign_loss - )] - pub fn i128_lo(i: i128) -> u64 { - i as u64 - } - - #[must_use] - #[inline(always)] - #[allow( - clippy::inline_always, - clippy::cast_sign_loss, - clippy::cast_possible_wrap - )] - pub fn i128_from_pieces(hi: i64, lo: u64) -> i128 { - ((u128::from(hi as u64) << 64) | u128::from(lo)) as i128 - } -} - -#[allow(clippy::wildcard_imports)] -use int128_helpers::*; - -impl From for ScVal { - fn from(v: u128) -> Self { - ScVal::U128(UInt128Parts { - hi: u128_hi(v), - lo: u128_lo(v), - }) - } -} - -impl From<&u128> for ScVal { - fn from(v: &u128) -> Self { - >::from(*v) - } -} - -impl From<&UInt128Parts> for u128 { - fn from(v: &UInt128Parts) -> Self { - u128_from_pieces(v.hi, v.lo) - } -} - -impl TryFrom for u128 { - type Error = (); - fn try_from(v: ScVal) -> Result { - if let ScVal::U128(i) = v { - Ok((&i).into()) - } else { - Err(()) - } - } -} - -impl From for ScVal { - fn from(v: i128) -> Self { - ScVal::I128(Int128Parts { - hi: i128_hi(v), - lo: i128_lo(v), - }) - } -} - -impl From<&i128> for ScVal { - fn from(v: &i128) -> Self { - >::from(*v) - } -} - -impl From<&Int128Parts> for i128 { - fn from(v: &Int128Parts) -> Self { - i128_from_pieces(v.hi, v.lo) - } -} - -impl TryFrom for i128 { - type Error = (); - fn try_from(v: ScVal) -> Result { - if let ScVal::I128(i) = v { - Ok((&i).into()) - } else { - Err(()) - } - } -} - -impl From for ScVal { - fn from(v: ScSymbol) -> Self { - ScVal::Symbol(v) - } -} - -impl TryFrom for ScSymbol { - type Error = (); - fn try_from(v: ScVal) -> Result { - if let ScVal::Symbol(s) = v { - Ok(s) - } else { - Err(()) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom for ScVal { - type Error = (); - fn try_from(v: String) -> Result { - Ok(ScVal::Symbol(v.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&String> for ScVal { - type Error = (); - fn try_from(v: &String) -> Result { - Ok(ScVal::Symbol(v.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom for ScSymbol { - type Error = (); - fn try_from(v: String) -> Result { - Ok(ScSymbol(v.try_into().map_err(|_| ())?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&String> for ScSymbol { - type Error = (); - fn try_from(v: &String) -> Result { - Ok(ScSymbol(v.try_into().map_err(|_| ())?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&str> for ScVal { - type Error = (); - fn try_from(v: &str) -> Result { - Ok(ScVal::Symbol(v.try_into()?)) - } -} - -#[cfg(not(feature = "alloc"))] -impl TryFrom<&'static str> for ScVal { - type Error = (); - fn try_from(v: &'static str) -> Result { - Ok(ScVal::Symbol(v.try_into()?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&str> for ScSymbol { - type Error = (); - fn try_from(v: &str) -> Result { - Ok(ScSymbol(v.try_into().map_err(|_| ())?)) - } -} - -#[cfg(not(feature = "alloc"))] -impl TryFrom<&'static str> for ScSymbol { - type Error = (); - fn try_from(v: &'static str) -> Result { - Ok(ScSymbol(v.try_into().map_err(|_| ())?)) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom for String { - type Error = (); - fn try_from(v: ScVal) -> Result { - if let ScVal::Symbol(s) = v { - // TODO: It might be worth distinguishing the error case where this - // is an invalid symbol with invalid characters. - Ok(s.0.into_utf8_string().map_err(|_| ())?) - } else { - Err(()) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom> for ScVal { - type Error = (); - fn try_from(v: Vec) -> Result { - Ok(ScVal::Bytes(ScBytes(v.try_into().map_err(|_| ())?))) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&Vec> for ScVal { - type Error = (); - fn try_from(v: &Vec) -> Result { - Ok(ScVal::Bytes(ScBytes(v.try_into().map_err(|_| ())?))) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&[u8]> for ScVal { - type Error = (); - fn try_from(v: &[u8]) -> Result { - Ok(ScVal::Bytes(ScBytes(v.try_into().map_err(|_| ())?))) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<[u8; N]> for ScVal { - type Error = (); - fn try_from(v: [u8; N]) -> Result { - Ok(ScVal::Bytes(ScBytes(v.try_into().map_err(|_| ())?))) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&[u8; N]> for ScVal { - type Error = (); - fn try_from(v: &[u8; N]) -> Result { - Ok(ScVal::Bytes(ScBytes(v.try_into().map_err(|_| ())?))) - } -} - -#[cfg(not(feature = "alloc"))] -impl TryFrom<&'static [u8]> for ScVal { - type Error = (); - fn try_from(v: &'static [u8]) -> Result { - Ok(ScVal::Bytes(ScBytes(v.try_into().map_err(|_| ())?))) - } -} - -#[cfg(feature = "alloc")] -impl TryFrom for Vec { - type Error = (); - fn try_from(v: ScVal) -> Result { - if let ScVal::Bytes(ScBytes(b)) = v { - Ok(b.into()) - } else { - Err(()) - } - } -} - -#[cfg(feature = "alloc")] -impl TryFrom<&ScVal> for Vec { - type Error = (); - fn try_from(v: &ScVal) -> Result { - if let ScVal::Bytes(ScBytes(b)) = v { - Ok(b.into()) - } else { - Err(()) - } - } -} - -impl From for ScVal { - fn from(v: ScVec) -> Self { - ScVal::Vec(Some(v)) - } -} - -#[cfg(feature = "alloc")] -impl> TryFrom> for ScVal { - type Error = (); - fn try_from(v: Vec) -> Result { - Ok(ScVal::Vec(Some( - v.into_iter() - .map(|t| <_ as TryInto>::try_into(t)) - .collect::, _>>() // TODO: Impl conversion from Iterator to VecM in generated code. - .map_err(|_| ())? - .try_into() - .map_err(|_| ())?, - ))) - } -} - -#[cfg(feature = "alloc")] -impl + Clone> TryFrom<&Vec> for ScVal { - type Error = (); - fn try_from(v: &Vec) -> Result { - Ok(ScVal::Vec(Some( - v.iter() - .map(|t| <_ as TryInto>::try_into(t.clone())) - .collect::, _>>() // TODO: Impl conversion from Iterator to VecM in generated code. - .map_err(|_| ())? - .try_into() - .map_err(|_| ())?, - ))) - } -} - -#[cfg(feature = "alloc")] -impl + Clone> TryFrom<&[T]> for ScVal { - type Error = (); - fn try_from(v: &[T]) -> Result { - Ok(ScVal::Vec(Some( - v.iter() - .map(|t| <_ as TryInto>::try_into(t.clone())) - .collect::, _>>() // TODO: Impl conversion from Iterator to VecM in generated code. - .map_err(|_| ())? - .try_into() - .map_err(|_| ())?, - ))) - } -} - -#[cfg(feature = "alloc")] -impl + Clone> TryFrom for Vec { - type Error = (); - fn try_from(v: ScVal) -> Result { - if let ScVal::Vec(Some(v)) = v { - v.iter() - .map(|t| T::try_from(t.clone()).map_err(|_| ())) - .collect::, _>>() - } else { - Err(()) - } - } -} - -impl From for ScVal { - fn from(v: ScMap) -> Self { - ScVal::Map(Some(v)) - } -} - -impl TryFrom for ScMap { - type Error = (); - fn try_from(v: ScVal) -> Result { - if let ScVal::Map(Some(m)) = v { - Ok(m) - } else { - Err(()) - } - } -} - -impl TryFrom<(K, V)> for ScMapEntry -where - K: TryInto, - V: TryInto, -{ - type Error = (); - - fn try_from(v: (K, V)) -> Result { - Ok(ScMapEntry { - key: v.0.try_into().map_err(|_| ())?, - val: v.1.try_into().map_err(|_| ())?, - }) - } -} - -// TODO: Add conversions from std::collections::HashMap, im_rcOrdMap, and other -// popular map types to ScMap. - -impl> From> for ScVal { - fn from(v: Option) -> Self { - match v { - Some(v) => v.into(), - None => ().into(), - } - } -} - -impl From<&Option> for ScVal -where - T: Into + Clone, -{ - fn from(v: &Option) -> Self { - match v { - Some(v) => v.clone().into(), - None => ().into(), - } - } -} - -macro_rules! impl_for_tuple { - ( $count:literal $($typ:ident $idx:tt)+ ) => { - #[cfg(feature = "alloc")] - impl<$($typ),*> TryFrom<($($typ,)*)> for ScVec - where - $($typ: TryInto),* - { - type Error = (); - fn try_from(v: ($($typ,)*)) -> Result { - let vec: Vec = vec![$(v.$idx.try_into().map_err(|_| ())?),+]; - Ok(ScVec(vec.try_into()?)) - } - } - - #[cfg(feature = "alloc")] - impl<$($typ),*> TryFrom<&($($typ,)*)> for ScVec - where - $($typ: TryInto + Clone),* - { - type Error = (); - fn try_from(v: &($($typ,)*)) -> Result { - let vec: Vec = vec![$(v.$idx.clone().try_into().map_err(|_| ())?),+]; - Ok(ScVec(vec.try_into()?)) - } - } - - #[cfg(feature = "alloc")] - impl<$($typ),*> TryFrom<($($typ,)*)> for ScVal - where - $($typ: TryInto),* - { - type Error = (); - fn try_from(v: ($($typ,)*)) -> Result { - Ok(ScVal::Vec(Some(<_ as TryInto>::try_into(v)?))) - } - } - - #[cfg(feature = "alloc")] - impl<$($typ),*> TryFrom<&($($typ,)*)> for ScVal - where - $($typ: TryInto + Clone),* - { - type Error = (); - fn try_from(v: &($($typ,)*)) -> Result { - Ok(ScVal::Vec(Some(<_ as TryInto>::try_into(v)?))) - } - } - - impl<$($typ),*> TryFrom for ($($typ,)*) - where - // TODO: Consider removing the Clone constraint by changing the - // try_from to use a reference. - $($typ: TryFrom + Clone),* - { - type Error = (); - - fn try_from(vec: ScVec) -> Result { - if vec.len() != $count { - return Err(()); - } - Ok(( - $({ - let idx: usize = $idx; - let val = vec[idx].clone(); - $typ::try_from(val).map_err(|_| ())? - },)* - )) - } - } - - impl<$($typ),*> TryFrom for ($($typ,)*) - where - $($typ: TryFrom + Clone),* - { - type Error = (); - - fn try_from(obj: ScVal) -> Result { - if let ScVal::Vec(Some(vec)) = obj { - <_ as TryFrom>::try_from(vec) - } else { - Err(()) - } - } - } - }; -} - -impl_for_tuple! { 1 T0 0 } -impl_for_tuple! { 2 T0 0 T1 1 } -impl_for_tuple! { 3 T0 0 T1 1 T2 2 } -impl_for_tuple! { 4 T0 0 T1 1 T2 2 T3 3 } -impl_for_tuple! { 5 T0 0 T1 1 T2 2 T3 3 T4 4 } -impl_for_tuple! { 6 T0 0 T1 1 T2 2 T3 3 T4 4 T5 5 } -impl_for_tuple! { 7 T0 0 T1 1 T2 2 T3 3 T4 4 T5 5 T6 6 } -impl_for_tuple! { 8 T0 0 T1 1 T2 2 T3 3 T4 4 T5 5 T6 6 T7 7 } -impl_for_tuple! { 9 T0 0 T1 1 T2 2 T3 3 T4 4 T5 5 T6 6 T7 7 T8 8 } -impl_for_tuple! { 10 T0 0 T1 1 T2 2 T3 3 T4 4 T5 5 T6 6 T7 7 T8 8 T9 9 } -impl_for_tuple! { 11 T0 0 T1 1 T2 2 T3 3 T4 4 T5 5 T6 6 T7 7 T8 8 T9 9 T10 10 } -impl_for_tuple! { 12 T0 0 T1 1 T2 2 T3 3 T4 4 T5 5 T6 6 T7 7 T8 8 T9 9 T10 10 T11 11 } -impl_for_tuple! { 13 T0 0 T1 1 T2 2 T3 3 T4 4 T5 5 T6 6 T7 7 T8 8 T9 9 T10 10 T11 11 T12 12 } - -#[cfg(test)] -mod test { - use super::{int128_helpers, Int128Parts, ScVal, ScVec, UInt128Parts}; - - #[test] - fn i32_pos() { - let v = 5; - let val: ScVal = v.into(); - assert_eq!(val, ScVal::I32(5)); - let roundtrip: i32 = val.try_into().unwrap(); - assert_eq!(v, roundtrip); - } - - #[test] - fn i32_neg() { - let v = -5; - let val: ScVal = v.into(); - assert_eq!(val, ScVal::I32(-5)); - let roundtrip: i32 = val.try_into().unwrap(); - assert_eq!(v, roundtrip); - } - - #[test] - fn u32() { - use super::ScVal; - - let v = 5u32; - let val: ScVal = v.into(); - assert_eq!(val, ScVal::U32(5)); - let roundtrip: u32 = val.try_into().unwrap(); - assert_eq!(v, roundtrip); - } - - #[test] - fn i64_pos() { - let v = 5i64; - let val: ScVal = v.into(); - assert_eq!(val, ScVal::I64(5)); - let roundtrip: i64 = val.try_into().unwrap(); - assert_eq!(v, roundtrip); - } - - #[test] - fn i64_neg() { - let v = -5i64; - let val: ScVal = v.into(); - assert_eq!(val, ScVal::I64(-5)); - let roundtrip: i64 = val.try_into().unwrap(); - assert_eq!(v, roundtrip); - } - - #[test] - fn u64() { - let v = 5u64; - let val: ScVal = v.into(); - assert_eq!(val, ScVal::U64(5)); - let roundtrip: u64 = val.try_into().unwrap(); - assert_eq!(v, roundtrip); - } - - #[test] - fn u128() { - let hi = 0x1234_5678_9abc_def0u64; - let lo = 0xfedc_ba98_7654_3210u64; - let u = int128_helpers::u128_from_pieces(hi, lo); - assert_eq!(u, 0x1234_5678_9abc_def0_fedc_ba98_7654_3210); - assert_eq!(int128_helpers::u128_hi(u), hi); - assert_eq!(int128_helpers::u128_lo(u), lo); - - let val: ScVal = u.into(); - assert_eq!(val, ScVal::U128(UInt128Parts { hi, lo })); - let roundtrip: u128 = val.try_into().unwrap(); - assert_eq!(u, roundtrip); - } - - #[test] - #[allow(clippy::cast_sign_loss, clippy::cast_possible_wrap)] - fn i128() { - let part1 = 0x00ab_cdef_9876_5432u64; // some positive int64 - let part2 = 0xfedc_ba98_7654_3210u64; // some negative int64 - let roundtrip = |hi: i64, lo: u64, ref_i128: i128| { - let i = int128_helpers::i128_from_pieces(hi, lo); - assert_eq!(i, ref_i128); - assert_eq!(int128_helpers::i128_hi(i), hi); - assert_eq!(int128_helpers::i128_lo(i), lo); - - let val: ScVal = i.into(); - assert_eq!(val, ScVal::I128(Int128Parts { hi, lo })); - let roundtrip: i128 = val.try_into().unwrap(); - assert_eq!(i, roundtrip); - }; - roundtrip( - part1 as i64, - part1, - 0x00ab_cdef_9876_5432_00ab_cdef_9876_5432, - ); - roundtrip( - part2 as i64, - part2, - 0xfedc_ba98_7654_3210_fedc_ba98_7654_3210u128 as i128, - ); - roundtrip( - part1 as i64, - part2, - 0x00ab_cdef_9876_5432_fedc_ba98_7654_3210, - ); - roundtrip( - part2 as i64, - part1, - 0xfedc_ba98_7654_3210_00ab_cdef_9876_5432u128 as i128, - ); - } - - #[cfg(feature = "alloc")] - #[test] - fn binary() { - extern crate alloc; - use alloc::vec; - - let v = [1, 2, 3, 4, 5]; - let val: ScVal = v.try_into().unwrap(); - assert_eq!(val, ScVal::Bytes(vec![1, 2, 3, 4, 5].try_into().unwrap())); - - let v = &[1, 2, 3, 4, 5]; - let val: ScVal = v.try_into().unwrap(); - assert_eq!(val, ScVal::Bytes(vec![1, 2, 3, 4, 5].try_into().unwrap())); - } - - #[cfg(feature = "alloc")] - #[test] - fn vec() { - extern crate alloc; - use alloc::vec; - use alloc::vec::Vec; - - let v = vec![1, 2, 3, 4, 5]; - let val: ScVal = v.clone().try_into().unwrap(); - let roundtrip: Vec = val.try_into().unwrap(); - assert_eq!(v, roundtrip); - - let v = vec![vec![true], vec![false]]; - let val: ScVal = v.clone().try_into().unwrap(); - let roundtrip: Vec> = val.try_into().unwrap(); - assert_eq!(v, roundtrip); - } - - #[cfg(feature = "alloc")] - #[test] - fn tuple() { - extern crate alloc; - use alloc::vec; - use alloc::vec::Vec; - let v = (1i32, 2i64, vec![true, false]); - let val: ScVal = v.clone().try_into().unwrap(); - let roundtrip: (i32, i64, Vec) = val.try_into().unwrap(); - assert_eq!(v, roundtrip); - } - - #[cfg(feature = "alloc")] - #[test] - fn tuple_refs() { - extern crate alloc; - use alloc::vec; - use alloc::vec::Vec; - let v = &(1i32, 2i64, vec![true, false]); - let val: ScVal = v.try_into().unwrap(); - let roundtrip: (i32, i64, Vec) = val.try_into().unwrap(); - assert_eq!(v, &roundtrip); - } - - #[test] - fn option() { - let v: Option = Some(1); - let val: ScVal = v.into(); - assert_eq!(val, ScVal::I64(1)); - - let v: Option = None; - let val: ScVal = v.into(); - assert_eq!(val, ScVal::Void); - } - - #[test] - fn scval_from() { - let _ = ScVal::from(ScVec::default()); - } -} diff --git a/src/next/str.rs b/src/next/str.rs deleted file mode 100644 index a90cf0c5..00000000 --- a/src/next/str.rs +++ /dev/null @@ -1,520 +0,0 @@ -//# Custom string representations of the following types, also used for JSON -//# formatting. -//# -//# The types that have impls in this file are given to the generator's -//# --custom-str cli option, so that the generator does not generate -//# FromStr and Display impls for them. -//# -//# ## Strkey Types (SEP-23) -//# - PublicKey -//# - AccountId -//# - MuxedAccount -//# - MuxedAccountMed25519 -//# - SignerKey -//# - SignerKeyEd25519SignedPayload -//# - NodeId -//# -//# ## Asset Codes -//# - AssetCode -//# - AssetCode4 -//# - AssetCode12 -//# -//# ## Integers -//# - Int128Parts -//# - UInt128Parts -//# - Int256Parts -//# - UInt256Parts -//# -//# ## Other -//# - ClaimableBalanceId -//# - PoolId -#![cfg(feature = "alloc")] - -use super::{ - super::num128::{ - i128_str_from_pieces, i128_str_into_pieces, u128_str_from_pieces, u128_str_into_pieces, - }, - super::num256::{ - i256_str_from_pieces, i256_str_into_pieces, u256_str_from_pieces, u256_str_into_pieces, - }, - AccountId, AssetCode, AssetCode12, AssetCode4, ClaimableBalanceId, ContractId, Error, Hash, - Int128Parts, Int256Parts, MuxedAccount, MuxedAccountMed25519, MuxedEd25519Account, NodeId, - PoolId, PublicKey, ScAddress, SignerKey, SignerKeyEd25519SignedPayload, UInt128Parts, - UInt256Parts, Uint256, -}; - -impl From for Error { - fn from(_: stellar_strkey::DecodeError) -> Self { - Error::Invalid - } -} - -impl core::fmt::Display for PublicKey { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - match self { - PublicKey::PublicKeyTypeEd25519(Uint256(k)) => { - let k = stellar_strkey::ed25519::PublicKey::from_payload(k) - .map_err(|_| core::fmt::Error)?; - let s = k.to_string(); - f.write_str(&s)?; - } - } - Ok(()) - } -} - -impl core::str::FromStr for PublicKey { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let stellar_strkey::ed25519::PublicKey(k) = - stellar_strkey::ed25519::PublicKey::from_str(s)?; - Ok(PublicKey::PublicKeyTypeEd25519(Uint256(k))) - } -} - -impl core::fmt::Display for AccountId { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - self.0.fmt(f) - } -} - -impl core::str::FromStr for AccountId { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - Ok(AccountId(PublicKey::from_str(s)?)) - } -} - -impl core::fmt::Display for ContractId { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let k = stellar_strkey::Contract(self.0 .0); - let s = k.to_string(); - f.write_str(&s)?; - Ok(()) - } -} - -impl core::str::FromStr for ContractId { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let stellar_strkey::Contract(h) = stellar_strkey::Contract::from_str(s)?; - Ok(ContractId(Hash(h))) - } -} - -impl core::fmt::Display for PoolId { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let PoolId(Hash(p_id)) = self.clone(); - let key = stellar_strkey::Strkey::LiquidityPool(stellar_strkey::LiquidityPool(p_id)); - key.fmt(f) - } -} - -impl core::str::FromStr for PoolId { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let pool_key = stellar_strkey::LiquidityPool::from_str(s)?; - Ok(PoolId(Hash(pool_key.0))) - } -} - -impl core::fmt::Display for MuxedAccountMed25519 { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let MuxedAccountMed25519 { - ed25519: Uint256(ed25519), - id, - } = self; - let k = stellar_strkey::ed25519::MuxedAccount { - ed25519: *ed25519, - id: *id, - }; - let s = k.to_string(); - f.write_str(&s)?; - Ok(()) - } -} - -impl core::str::FromStr for MuxedAccountMed25519 { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let stellar_strkey::ed25519::MuxedAccount { ed25519, id } = - stellar_strkey::ed25519::MuxedAccount::from_str(s)?; - Ok(MuxedAccountMed25519 { - ed25519: Uint256(ed25519), - id, - }) - } -} - -impl core::str::FromStr for MuxedAccount { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let strkey = stellar_strkey::Strkey::from_str(s)?; - match strkey { - stellar_strkey::Strkey::PublicKeyEd25519(stellar_strkey::ed25519::PublicKey(k)) => { - Ok(MuxedAccount::Ed25519(Uint256(k))) - } - stellar_strkey::Strkey::MuxedAccountEd25519( - stellar_strkey::ed25519::MuxedAccount { ed25519, id }, - ) => Ok(MuxedAccount::MuxedEd25519(MuxedAccountMed25519 { - ed25519: Uint256(ed25519), - id, - })), - stellar_strkey::Strkey::PrivateKeyEd25519(_) - | stellar_strkey::Strkey::PreAuthTx(_) - | stellar_strkey::Strkey::HashX(_) - | stellar_strkey::Strkey::SignedPayloadEd25519(_) - | stellar_strkey::Strkey::Contract(_) - | stellar_strkey::Strkey::LiquidityPool(_) - | stellar_strkey::Strkey::ClaimableBalance(_) => Err(Error::Invalid), - } - } -} - -impl core::fmt::Display for MuxedAccount { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - match self { - MuxedAccount::Ed25519(Uint256(k)) => { - let k = stellar_strkey::ed25519::PublicKey(*k); - let s = k.to_string(); - f.write_str(&s)?; - } - MuxedAccount::MuxedEd25519(m) => m.fmt(f)?, - } - Ok(()) - } -} - -impl core::fmt::Display for NodeId { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - self.0.fmt(f) - } -} - -impl core::str::FromStr for NodeId { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - Ok(NodeId(PublicKey::from_str(s)?)) - } -} - -impl core::fmt::Display for SignerKeyEd25519SignedPayload { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let SignerKeyEd25519SignedPayload { - ed25519: Uint256(ed25519), - payload, - } = self; - let k = stellar_strkey::ed25519::SignedPayload { - ed25519: *ed25519, - payload: payload.into(), - }; - let s = k.to_string(); - f.write_str(&s)?; - Ok(()) - } -} - -impl core::str::FromStr for SignerKeyEd25519SignedPayload { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let stellar_strkey::ed25519::SignedPayload { ed25519, payload } = - stellar_strkey::ed25519::SignedPayload::from_str(s)?; - Ok(SignerKeyEd25519SignedPayload { - ed25519: Uint256(ed25519), - payload: payload.try_into()?, - }) - } -} - -impl core::str::FromStr for SignerKey { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let strkey = stellar_strkey::Strkey::from_str(s)?; - match strkey { - stellar_strkey::Strkey::PublicKeyEd25519(stellar_strkey::ed25519::PublicKey(k)) => { - Ok(SignerKey::Ed25519(Uint256(k))) - } - stellar_strkey::Strkey::PreAuthTx(stellar_strkey::PreAuthTx(h)) => { - Ok(SignerKey::PreAuthTx(Uint256(h))) - } - stellar_strkey::Strkey::HashX(stellar_strkey::HashX(h)) => { - Ok(SignerKey::HashX(Uint256(h))) - } - stellar_strkey::Strkey::SignedPayloadEd25519( - stellar_strkey::ed25519::SignedPayload { ed25519, payload }, - ) => Ok(SignerKey::Ed25519SignedPayload( - SignerKeyEd25519SignedPayload { - ed25519: Uint256(ed25519), - payload: payload.try_into()?, - }, - )), - stellar_strkey::Strkey::PrivateKeyEd25519(_) - | stellar_strkey::Strkey::Contract(_) - | stellar_strkey::Strkey::MuxedAccountEd25519(_) - | stellar_strkey::Strkey::LiquidityPool(_) - | stellar_strkey::Strkey::ClaimableBalance(_) => Err(Error::Invalid), - } - } -} - -impl core::fmt::Display for SignerKey { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - match self { - SignerKey::Ed25519(Uint256(k)) => { - let k = stellar_strkey::ed25519::PublicKey(*k); - let s = k.to_string(); - f.write_str(&s)?; - } - SignerKey::PreAuthTx(Uint256(h)) => { - let k = stellar_strkey::PreAuthTx(*h); - let s = k.to_string(); - f.write_str(&s)?; - } - SignerKey::HashX(Uint256(h)) => { - let k = stellar_strkey::HashX(*h); - let s = k.to_string(); - f.write_str(&s)?; - } - SignerKey::Ed25519SignedPayload(p) => p.fmt(f)?, - } - Ok(()) - } -} - -impl core::str::FromStr for MuxedEd25519Account { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let strkey = stellar_strkey::Strkey::from_str(s)?; - match strkey { - stellar_strkey::Strkey::MuxedAccountEd25519(muxed_ed25519) => Ok(MuxedEd25519Account { - id: muxed_ed25519.id, - ed25519: Uint256(muxed_ed25519.ed25519), - }), - _ => Err(Error::Invalid), - } - } -} - -impl core::fmt::Display for MuxedEd25519Account { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let k = - stellar_strkey::Strkey::MuxedAccountEd25519(stellar_strkey::ed25519::MuxedAccount { - ed25519: self.ed25519.0, - id: self.id, - }); - let s = k.to_string(); - f.write_str(&s) - } -} - -impl core::str::FromStr for ScAddress { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let strkey = stellar_strkey::Strkey::from_str(s)?; - match strkey { - stellar_strkey::Strkey::PublicKeyEd25519(stellar_strkey::ed25519::PublicKey(k)) => Ok( - ScAddress::Account(AccountId(PublicKey::PublicKeyTypeEd25519(Uint256(k)))), - ), - stellar_strkey::Strkey::Contract(stellar_strkey::Contract(h)) => { - Ok(ScAddress::Contract(ContractId(Hash(h)))) - } - stellar_strkey::Strkey::MuxedAccountEd25519(muxed_ed25519) => { - Ok(ScAddress::MuxedAccount(MuxedEd25519Account { - id: muxed_ed25519.id, - ed25519: Uint256(muxed_ed25519.ed25519), - })) - } - stellar_strkey::Strkey::LiquidityPool(liquidity_pool) => { - Ok(ScAddress::LiquidityPool(PoolId(Hash(liquidity_pool.0)))) - } - stellar_strkey::Strkey::ClaimableBalance(stellar_strkey::ClaimableBalance::V0( - claimable_balance, - )) => Ok(ScAddress::ClaimableBalance( - ClaimableBalanceId::ClaimableBalanceIdTypeV0(Hash(claimable_balance)), - )), - stellar_strkey::Strkey::PrivateKeyEd25519(_) - | stellar_strkey::Strkey::PreAuthTx(_) - | stellar_strkey::Strkey::HashX(_) - | stellar_strkey::Strkey::SignedPayloadEd25519(_) => Err(Error::Invalid), - } - } -} - -impl core::fmt::Display for ScAddress { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - match self { - ScAddress::Account(a) => a.fmt(f), - ScAddress::Contract(ContractId(Hash(h))) => { - let k = stellar_strkey::Contract(*h); - let s = k.to_string(); - f.write_str(&s) - } - ScAddress::MuxedAccount(muxed_ed25519_account) => { - let k = stellar_strkey::Strkey::MuxedAccountEd25519( - stellar_strkey::ed25519::MuxedAccount { - ed25519: muxed_ed25519_account.ed25519.0, - id: muxed_ed25519_account.id, - }, - ); - let s = k.to_string(); - f.write_str(&s) - } - ScAddress::ClaimableBalance(claimable_balance_id) => claimable_balance_id.fmt(f), - ScAddress::LiquidityPool(pool_id) => pool_id.fmt(f), - } - } -} - -impl core::str::FromStr for AssetCode4 { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let mut code = AssetCode4([0u8; 4]); - escape_bytes::unescape_into(&mut code.0, s.as_bytes()).map_err(|_| Error::Invalid)?; - Ok(code) - } -} - -impl core::fmt::Display for AssetCode4 { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - if let Some(last_idx) = self.0.iter().rposition(|c| *c != 0) { - for b in escape_bytes::Escape::new(&self.0[..=last_idx]) { - write!(f, "{}", b as char)?; - } - } - Ok(()) - } -} - -impl core::str::FromStr for AssetCode12 { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let mut code = AssetCode12([0u8; 12]); - escape_bytes::unescape_into(&mut code.0, s.as_bytes()).map_err(|_| Error::Invalid)?; - Ok(code) - } -} - -impl core::fmt::Display for AssetCode12 { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - if let Some(last_idx) = self.0.iter().rposition(|c| *c != 0) { - for b in escape_bytes::Escape::new(&self.0[..=last_idx]) { - write!(f, "{}", b as char)?; - } - } - Ok(()) - } -} - -impl core::str::FromStr for AssetCode { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let mut code = [0u8; 12]; - let n = escape_bytes::unescape_into(&mut code, s.as_bytes()).map_err(|_| Error::Invalid)?; - if n <= 4 { - Ok(AssetCode::CreditAlphanum4(AssetCode4([ - code[0], code[1], code[2], code[3], - ]))) - } else if n <= 12 { - Ok(AssetCode::CreditAlphanum12(AssetCode12(code))) - } else { - Err(Error::Invalid) - } - } -} - -impl core::fmt::Display for AssetCode { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - match self { - AssetCode::CreditAlphanum4(c) => c.fmt(f), - AssetCode::CreditAlphanum12(c) => c.fmt(f), - } - } -} - -impl core::str::FromStr for ClaimableBalanceId { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let stellar_strkey::ClaimableBalance::V0(cb_id) = - stellar_strkey::ClaimableBalance::from_str(s)?; - Ok(ClaimableBalanceId::ClaimableBalanceIdTypeV0(Hash(cb_id))) - } -} - -impl core::fmt::Display for ClaimableBalanceId { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let ClaimableBalanceId::ClaimableBalanceIdTypeV0(Hash(cb_id)) = self.clone(); - let key = - stellar_strkey::Strkey::ClaimableBalance(stellar_strkey::ClaimableBalance::V0(cb_id)); - key.fmt(f) - } -} - -impl core::fmt::Display for UInt128Parts { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let v = u128_str_from_pieces(self.hi, self.lo); - write!(f, "{v}") - } -} - -impl core::str::FromStr for UInt128Parts { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let (hi, lo) = u128_str_into_pieces(s).map_err(|_| Error::Invalid)?; - Ok(Self { hi, lo }) - } -} - -impl core::fmt::Display for Int128Parts { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let v = i128_str_from_pieces(self.hi, self.lo); - write!(f, "{v}") - } -} - -impl core::str::FromStr for Int128Parts { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let (hi, lo) = i128_str_into_pieces(s).map_err(|_| Error::Invalid)?; - Ok(Self { hi, lo }) - } -} - -impl core::fmt::Display for UInt256Parts { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let u256 = u256_str_from_pieces(self.hi_hi, self.hi_lo, self.lo_hi, self.lo_lo); - write!(f, "{u256}") - } -} - -impl core::str::FromStr for UInt256Parts { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let (hi_hi, hi_lo, lo_hi, lo_lo) = u256_str_into_pieces(s).map_err(|_| Error::Invalid)?; - Ok(Self { - hi_hi, - hi_lo, - lo_hi, - lo_lo, - }) - } -} - -impl core::fmt::Display for Int256Parts { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let i256 = i256_str_from_pieces(self.hi_hi, self.hi_lo, self.lo_hi, self.lo_lo); - write!(f, "{i256}") - } -} - -impl core::str::FromStr for Int256Parts { - type Err = Error; - fn from_str(s: &str) -> core::result::Result { - let (hi_hi, hi_lo, lo_hi, lo_lo) = i256_str_into_pieces(s).map_err(|_| Error::Invalid)?; - Ok(Self { - hi_hi, - hi_lo, - lo_hi, - lo_lo, - }) - } -} diff --git a/src/next/transaction_conversions.rs b/src/next/transaction_conversions.rs deleted file mode 100644 index 4ecb43c4..00000000 --- a/src/next/transaction_conversions.rs +++ /dev/null @@ -1,96 +0,0 @@ -use super::{ - FeeBumpTransaction, FeeBumpTransactionEnvelope, MuxedAccount, Preconditions, TimeBounds, - Transaction, TransactionEnvelope, TransactionExt, TransactionV0, TransactionV0Ext, - TransactionV1Envelope, Uint256, VecM, -}; - -impl From for TransactionEnvelope { - fn from(tx: Transaction) -> Self { - TransactionEnvelope::Tx(TransactionV1Envelope { - tx, - signatures: VecM::default(), - }) - } -} - -impl From for TransactionEnvelope { - fn from(tx: FeeBumpTransaction) -> Self { - TransactionEnvelope::TxFeeBump(FeeBumpTransactionEnvelope { - tx, - signatures: VecM::default(), - }) - } -} - -impl From for MuxedAccount { - fn from(ed25519: Uint256) -> Self { - MuxedAccount::Ed25519(ed25519) - } -} - -impl From for TransactionExt { - fn from(ext: TransactionV0Ext) -> Self { - match ext { - TransactionV0Ext::V0 => TransactionExt::V0, - } - } -} - -impl From> for Preconditions { - fn from(maybe_timebounds: Option) -> Self { - match maybe_timebounds { - None => Preconditions::None, - Some(timebounds) => Preconditions::Time(timebounds), - } - } -} - -impl From for Transaction { - fn from(tx: TransactionV0) -> Self { - Transaction { - source_account: tx.source_account_ed25519.into(), - cond: tx.time_bounds.into(), - ext: tx.ext.into(), - fee: tx.fee, - memo: tx.memo, - operations: tx.operations, - seq_num: tx.seq_num, - } - } -} - -impl From<&FeeBumpTransaction> for TransactionEnvelope { - fn from(tx: &FeeBumpTransaction) -> Self { - tx.clone().into() - } -} - -impl From<&Transaction> for TransactionEnvelope { - fn from(tx: &Transaction) -> Self { - tx.clone().into() - } -} - -impl From<&Uint256> for MuxedAccount { - fn from(ed25519: &Uint256) -> Self { - ed25519.clone().into() - } -} - -impl From<&TransactionV0Ext> for TransactionExt { - fn from(ext: &TransactionV0Ext) -> Self { - ext.clone().into() - } -} - -impl From<&Option> for Preconditions { - fn from(maybe_timebounds: &Option) -> Self { - maybe_timebounds.clone().into() - } -} - -impl From<&TransactionV0> for Transaction { - fn from(tx: &TransactionV0) -> Self { - tx.clone().into() - } -} diff --git a/src/next/tx_auths.rs b/src/next/tx_auths.rs deleted file mode 100644 index 2020d722..00000000 --- a/src/next/tx_auths.rs +++ /dev/null @@ -1,168 +0,0 @@ -use super::{ - FeeBumpTransaction, FeeBumpTransactionEnvelope, FeeBumpTransactionInnerTx, - InvokeHostFunctionOp, Operation, OperationBody, SorobanAuthorizationEntry, Transaction, - TransactionEnvelope, TransactionV0, TransactionV0Envelope, TransactionV1Envelope, VecM, -}; - -impl TransactionEnvelope { - pub fn auths(&self) -> FlatMapOperationToSorobanAuthorizationEntryIter<'_> { - match self { - TransactionEnvelope::TxV0(e) => e.auths(), - TransactionEnvelope::Tx(e) => e.auths(), - TransactionEnvelope::TxFeeBump(e) => e.auths(), - } - } - - #[cfg(feature = "alloc")] - pub fn auths_mut(&mut self) -> FlatMapOperationToSorobanAuthorizationEntryIterMut<'_> { - match self { - TransactionEnvelope::TxV0(e) => e.auths_mut(), - TransactionEnvelope::Tx(e) => e.auths_mut(), - TransactionEnvelope::TxFeeBump(e) => e.auths_mut(), - } - } -} - -impl FeeBumpTransactionEnvelope { - pub fn auths(&self) -> FlatMapOperationToSorobanAuthorizationEntryIter<'_> { - self.tx.auths() - } - - #[cfg(feature = "alloc")] - pub fn auths_mut(&mut self) -> FlatMapOperationToSorobanAuthorizationEntryIterMut<'_> { - self.tx.auths_mut() - } -} - -impl FeeBumpTransaction { - pub fn auths(&self) -> FlatMapOperationToSorobanAuthorizationEntryIter<'_> { - self.inner_tx.auths() - } - - #[cfg(feature = "alloc")] - pub fn auths_mut(&mut self) -> FlatMapOperationToSorobanAuthorizationEntryIterMut<'_> { - self.inner_tx.auths_mut() - } -} - -impl FeeBumpTransactionInnerTx { - pub fn auths(&self) -> FlatMapOperationToSorobanAuthorizationEntryIter<'_> { - match self { - FeeBumpTransactionInnerTx::Tx(e) => e.auths(), - } - } - - #[cfg(feature = "alloc")] - pub fn auths_mut(&mut self) -> FlatMapOperationToSorobanAuthorizationEntryIterMut<'_> { - match self { - FeeBumpTransactionInnerTx::Tx(e) => e.auths_mut(), - } - } -} - -impl TransactionV1Envelope { - pub fn auths(&self) -> FlatMapOperationToSorobanAuthorizationEntryIter<'_> { - self.tx.auths() - } - - #[cfg(feature = "alloc")] - pub fn auths_mut(&mut self) -> FlatMapOperationToSorobanAuthorizationEntryIterMut<'_> { - self.tx.auths_mut() - } -} - -impl TransactionV0Envelope { - pub fn auths(&self) -> FlatMapOperationToSorobanAuthorizationEntryIter<'_> { - self.tx.auths() - } - - #[cfg(feature = "alloc")] - pub fn auths_mut(&mut self) -> FlatMapOperationToSorobanAuthorizationEntryIterMut<'_> { - self.tx.auths_mut() - } -} - -impl Transaction { - pub fn auths(&self) -> FlatMapOperationToSorobanAuthorizationEntryIter<'_> { - self.operations.auths() - } - - #[cfg(feature = "alloc")] - pub fn auths_mut(&mut self) -> FlatMapOperationToSorobanAuthorizationEntryIterMut<'_> { - self.operations.auths_mut() - } -} - -impl TransactionV0 { - pub fn auths(&self) -> FlatMapOperationToSorobanAuthorizationEntryIter<'_> { - self.operations.auths() - } - - #[cfg(feature = "alloc")] - pub fn auths_mut(&mut self) -> FlatMapOperationToSorobanAuthorizationEntryIterMut<'_> { - self.operations.auths_mut() - } -} - -type FlatMapOperationToSorobanAuthorizationEntryIter<'a> = core::iter::FlatMap< - core::slice::Iter<'a, Operation>, - core::slice::Iter<'a, SorobanAuthorizationEntry>, - fn(&'a Operation) -> core::slice::Iter<'a, SorobanAuthorizationEntry>, ->; - -#[cfg(feature = "alloc")] -type FlatMapOperationToSorobanAuthorizationEntryIterMut<'a> = core::iter::FlatMap< - core::slice::IterMut<'a, Operation>, - core::slice::IterMut<'a, SorobanAuthorizationEntry>, - fn(&'a mut Operation) -> core::slice::IterMut<'a, SorobanAuthorizationEntry>, ->; - -impl VecM { - pub fn auths(&self) -> FlatMapOperationToSorobanAuthorizationEntryIter<'_> { - self.iter().flat_map(Operation::auths) - } - - #[cfg(feature = "alloc")] - pub fn auths_mut(&mut self) -> FlatMapOperationToSorobanAuthorizationEntryIterMut<'_> { - self.iter_mut().flat_map(Operation::auths_mut) - } -} - -impl Operation { - pub fn auths(&self) -> core::slice::Iter<'_, SorobanAuthorizationEntry> { - self.body.auths() - } - - #[cfg(feature = "alloc")] - pub fn auths_mut(&mut self) -> core::slice::IterMut<'_, SorobanAuthorizationEntry> { - self.body.auths_mut() - } -} - -impl OperationBody { - pub fn auths(&self) -> core::slice::Iter<'_, SorobanAuthorizationEntry> { - match self { - OperationBody::InvokeHostFunction(op) => op.auths(), - _ => [].iter(), - } - } - - #[cfg(feature = "alloc")] - pub fn auths_mut(&mut self) -> core::slice::IterMut<'_, SorobanAuthorizationEntry> { - match self { - OperationBody::InvokeHostFunction(op) => op.auths_mut(), - _ => [].iter_mut(), - } - } -} - -impl InvokeHostFunctionOp { - pub fn auths(&self) -> core::slice::Iter<'_, SorobanAuthorizationEntry> { - self.auth.iter() - } - - #[cfg(feature = "alloc")] - pub fn auths_mut(&mut self) -> core::slice::IterMut<'_, SorobanAuthorizationEntry> { - self.auth.iter_mut() - } -} diff --git a/src/next/tx_hash.rs b/src/next/tx_hash.rs deleted file mode 100644 index 2f999368..00000000 --- a/src/next/tx_hash.rs +++ /dev/null @@ -1,182 +0,0 @@ -#![cfg(feature = "std")] -use super::{ - FeeBumpTransaction, FeeBumpTransactionEnvelope, FeeBumpTransactionInnerTx, Hash, Limits, - Transaction, TransactionEnvelope, TransactionSignaturePayload, - TransactionSignaturePayloadTaggedTransaction, TransactionV0, TransactionV0Envelope, - TransactionV1Envelope, WriteXdr, -}; - -use sha2::{Digest, Sha256}; - -impl TransactionEnvelope { - /// Computes the hash of the transaction envelope. - /// - /// # Arguments - /// - /// * `network_id` - The network ID to include in the hash computation. - /// - /// # Returns - /// - /// The transaction hash. - /// - /// # Errors - /// - /// If there is any issue serializing to XDR. - pub fn hash(&self, network_id: [u8; 32]) -> Result<[u8; 32], super::Error> { - match self { - TransactionEnvelope::TxV0(e) => e.hash(network_id), - TransactionEnvelope::Tx(e) => e.hash(network_id), - TransactionEnvelope::TxFeeBump(e) => e.hash(network_id), - } - } -} - -impl TransactionV0Envelope { - /// Computes the hash of the V0 transaction envelope. - /// - /// # Arguments - /// - /// * `network_id` - The network ID to include in the hash computation. - /// - /// # Returns - /// - /// The transaction hash. - /// - /// # Errors - /// - /// If there is any issue serializing to XDR. - pub fn hash(&self, network_id: [u8; 32]) -> Result<[u8; 32], super::Error> { - self.tx.hash(network_id) - } -} - -impl TransactionV1Envelope { - /// Computes the hash of the V1 transaction envelope. - /// - /// # Arguments - /// - /// * `network_id` - The network ID to include in the hash computation. - /// - /// # Returns - /// - /// The transaction hash. - /// - /// # Errors - /// - /// If there is any issue serializing to XDR. - pub fn hash(&self, network_id: [u8; 32]) -> Result<[u8; 32], super::Error> { - self.tx.hash(network_id) - } -} - -impl TransactionV0 { - /// Computes the hash of the V0 transaction. - /// - /// # Arguments - /// - /// * `network_id` - The network ID to include in the hash computation. - /// - /// # Returns - /// - /// The transaction hash. - /// - /// # Errors - /// - /// If there is any issue serializing to XDR. - pub fn hash(&self, network_id: [u8; 32]) -> Result<[u8; 32], super::Error> { - <_ as Into>::into(self).hash(network_id) - } -} - -impl FeeBumpTransactionEnvelope { - /// Computes the hash of the fee bump transaction envelope. - /// - /// # Arguments - /// - /// * `network_id` - The network ID to include in the hash computation. - /// - /// # Returns - /// - /// The transaction hash. - /// - /// # Errors - /// - /// If there is any issue serializing to XDR. - pub fn hash(&self, network_id: [u8; 32]) -> Result<[u8; 32], super::Error> { - self.tx.hash(network_id) - } -} - -impl FeeBumpTransactionInnerTx { - /// Computes the hash of the fee bump transaction inner tx. - /// - /// # Arguments - /// - /// * `network_id` - The network ID to include in the hash computation. - /// - /// # Returns - /// - /// The transaction hash. - /// - /// # Errors - /// - /// If there is any issue serializing to XDR. - pub fn hash(&self, network_id: [u8; 32]) -> Result<[u8; 32], super::Error> { - match self { - Self::Tx(inner_tx) => inner_tx.hash(network_id), - } - } -} - -impl Transaction { - /// Computes the hash of the transaction. - /// - /// # Arguments - /// - /// * `network_id` - The network ID to include in the hash computation. - /// - /// # Returns - /// - /// The transaction hash. - /// - /// # Errors - /// - /// If there is any issue serializing to XDR. - pub fn hash(&self, network_id: [u8; 32]) -> Result<[u8; 32], super::Error> { - let payload = TransactionSignaturePayload { - network_id: Hash(network_id), - // TODO: Add support for borrowing the self here instead of cloning it. - tagged_transaction: TransactionSignaturePayloadTaggedTransaction::Tx(self.clone()), - }; - let payload = payload.to_xdr(Limits::none())?; - let hash = Sha256::digest(payload); - Ok(hash.into()) - } -} - -impl FeeBumpTransaction { - /// Computes the hash of the fee bump transaction. - /// - /// # Arguments - /// - /// * `network_id` - The network ID to include in the hash computation. - /// - /// # Returns - /// - /// The transaction hash. - /// - /// # Errors - /// - /// If there is any issue serializing to XDR. - pub fn hash(&self, network_id: [u8; 32]) -> Result<[u8; 32], super::Error> { - let payload = TransactionSignaturePayload { - network_id: Hash(network_id), - tagged_transaction: TransactionSignaturePayloadTaggedTransaction::TxFeeBump( - self.clone(), - ), - }; - let payload = payload.to_xdr(Limits::none())?; - let hash = Sha256::digest(payload); - Ok(hash.into()) - } -} diff --git a/src/curr/scmap.rs b/src/scmap.rs similarity index 100% rename from src/curr/scmap.rs rename to src/scmap.rs diff --git a/src/curr/scval_conversions.rs b/src/scval_conversions.rs similarity index 100% rename from src/curr/scval_conversions.rs rename to src/scval_conversions.rs diff --git a/src/next/scval_validations.rs b/src/scval_validations.rs similarity index 99% rename from src/next/scval_validations.rs rename to src/scval_validations.rs index e067fe05..aa9fb754 100644 --- a/src/next/scval_validations.rs +++ b/src/scval_validations.rs @@ -76,7 +76,7 @@ impl Validate for ScMap { #[cfg(test)] mod test { - use crate::next::ScSymbol; + use crate::ScSymbol; use super::{Error, ScVal, Validate}; diff --git a/src/curr/str.rs b/src/str.rs similarity index 98% rename from src/curr/str.rs rename to src/str.rs index e3e44223..26cff8bd 100644 --- a/src/curr/str.rs +++ b/src/str.rs @@ -31,17 +31,17 @@ #![cfg(feature = "alloc")] use super::{ - super::num128::{ - i128_str_from_pieces, i128_str_into_pieces, u128_str_from_pieces, u128_str_into_pieces, - }, - super::num256::{ - i256_str_from_pieces, i256_str_into_pieces, u256_str_from_pieces, u256_str_into_pieces, - }, AccountId, AssetCode, AssetCode12, AssetCode4, ClaimableBalanceId, ContractId, Error, Hash, Int128Parts, Int256Parts, MuxedAccount, MuxedAccountMed25519, MuxedEd25519Account, NodeId, PoolId, PublicKey, ScAddress, SignerKey, SignerKeyEd25519SignedPayload, UInt128Parts, UInt256Parts, Uint256, }; +use crate::num128::{ + i128_str_from_pieces, i128_str_into_pieces, u128_str_from_pieces, u128_str_into_pieces, +}; +use crate::num256::{ + i256_str_from_pieces, i256_str_into_pieces, u256_str_from_pieces, u256_str_into_pieces, +}; impl From for Error { fn from(_: stellar_strkey::DecodeError) -> Self { diff --git a/src/curr/transaction_conversions.rs b/src/transaction_conversions.rs similarity index 100% rename from src/curr/transaction_conversions.rs rename to src/transaction_conversions.rs diff --git a/src/curr/tx_auths.rs b/src/tx_auths.rs similarity index 100% rename from src/curr/tx_auths.rs rename to src/tx_auths.rs diff --git a/src/curr/tx_hash.rs b/src/tx_hash.rs similarity index 100% rename from src/curr/tx_hash.rs rename to src/tx_hash.rs diff --git a/tests/account_conversions.rs b/tests/account_conversions.rs index cab94738..b1504452 100644 --- a/tests/account_conversions.rs +++ b/tests/account_conversions.rs @@ -1,13 +1,6 @@ -#![cfg(all( - any(feature = "curr", feature = "next"), - not(all(feature = "curr", feature = "next")) -))] #![cfg(feature = "std")] -#[cfg(feature = "curr")] -use stellar_xdr::curr as stellar_xdr; -#[cfg(feature = "next")] -use stellar_xdr::next as stellar_xdr; +use stellar_xdr; use stellar_xdr::{AccountId, MuxedAccount, MuxedAccountMed25519, PublicKey, Uint256}; diff --git a/tests/arbitrary.rs b/tests/arbitrary.rs index 56d384fd..db175393 100644 --- a/tests/arbitrary.rs +++ b/tests/arbitrary.rs @@ -1,7 +1,7 @@ -#![cfg(all(feature = "next", feature = "arbitrary"))] +#![cfg(feature = "arbitrary")] use arbitrary::{Arbitrary, Unstructured}; -use stellar_xdr::next::ScMap; +use stellar_xdr::ScMap; #[test] fn arb() { diff --git a/tests/default.rs b/tests/default.rs index dd49e1ee..f3a39350 100644 --- a/tests/default.rs +++ b/tests/default.rs @@ -1,13 +1,6 @@ -#![cfg(all( - feature = "alloc", - any(feature = "curr", feature = "next"), - not(all(feature = "curr", feature = "next")) -))] +#![cfg(feature = "alloc")] -#[cfg(feature = "curr")] -use stellar_xdr::curr as stellar_xdr; -#[cfg(feature = "next")] -use stellar_xdr::next as stellar_xdr; +use stellar_xdr; use stellar_xdr::{Hash, TransactionEnvelope, Uint32}; diff --git a/tests/ledgerkey_to_key.rs b/tests/ledgerkey_to_key.rs index c16ed44a..7dfaa031 100644 --- a/tests/ledgerkey_to_key.rs +++ b/tests/ledgerkey_to_key.rs @@ -1,13 +1,6 @@ -#![cfg(all( - any(feature = "curr", feature = "next"), - not(all(feature = "curr", feature = "next")) -))] #![cfg(feature = "std")] -#[cfg(feature = "curr")] -use stellar_xdr::curr as stellar_xdr; -#[cfg(feature = "next")] -use stellar_xdr::next as stellar_xdr; +use stellar_xdr; use stellar_xdr::{ AccountEntry, AccountEntryExt, AccountId, AlphaNum4, Asset, AssetCode4, ClaimableBalanceEntry, diff --git a/tests/serde.rs b/tests/serde.rs index e531c591..b42c6101 100644 --- a/tests/serde.rs +++ b/tests/serde.rs @@ -1,20 +1,11 @@ -#![cfg(all( - any(feature = "curr", feature = "next"), - not(all(feature = "curr", feature = "next")) -))] #![cfg(all(feature = "std", feature = "serde"))] -#[cfg(feature = "curr")] -use stellar_xdr::curr as stellar_xdr; -#[cfg(feature = "next")] -use stellar_xdr::next as stellar_xdr; +use stellar_xdr; use stellar_xdr::{BytesM, Hash, StringM, VecM}; -#[cfg(feature = "curr")] use stellar_xdr::{AccountId, Int128Parts}; -#[cfg(feature = "curr")] use std::str::FromStr; #[test] @@ -37,8 +28,7 @@ fn test_serde_ser() -> Result<(), Box> { ))?, "\"3031323334353637383930313233343536373839303133343536373839303132\"" ); - #[cfg(feature = "curr")] - assert_eq!( + assert_eq!( serde_json::to_string(&AccountId::from_str( "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF" )?)?, @@ -66,8 +56,7 @@ fn test_serde_der() -> Result<(), Box> { <_ as Into>::into(*b"01234567890123456789013456789012"), ); - #[cfg(feature = "curr")] - assert_eq!( + assert_eq!( AccountId::from_str("GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF")?, serde_json::from_str("\"GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF\"")?, ); @@ -75,7 +64,6 @@ fn test_serde_der() -> Result<(), Box> { Ok(()) } -#[cfg(feature = "curr")] #[test] fn test_structs_that_ser_to_string_and_dual_der() -> Result<(), Box> { assert_eq!( diff --git a/tests/serde_ints.rs b/tests/serde_ints.rs index 802c44c6..d18842c3 100644 --- a/tests/serde_ints.rs +++ b/tests/serde_ints.rs @@ -1,7 +1,6 @@ -#![cfg(feature = "curr")] #![cfg(all(feature = "std", feature = "serde"))] -use stellar_xdr::curr as stellar_xdr; +use stellar_xdr; use stellar_xdr::{ConfigSettingEntry, ScNonceKey, ScVal, SequenceNumber}; #[test] diff --git a/tests/serde_tx.rs b/tests/serde_tx.rs index 25fbc885..3047d172 100644 --- a/tests/serde_tx.rs +++ b/tests/serde_tx.rs @@ -1,7 +1,6 @@ -#![cfg(feature = "curr")] #![cfg(all(feature = "std", feature = "serde"))] -use stellar_xdr::curr as stellar_xdr; +use stellar_xdr; use stellar_xdr::{ AccountId, AlphaNum4, AssetCode4, ChangeTrustAsset, ChangeTrustOp, Memo, MuxedAccount, @@ -9,7 +8,6 @@ use stellar_xdr::{ TransactionExt, TransactionV1Envelope, Uint256, }; -#[cfg(feature = "curr")] #[test] fn test_serde_tx() -> Result<(), Box> { let te = TransactionEnvelope::Tx(TransactionV1Envelope { diff --git a/tests/serde_tx_schema.rs b/tests/serde_tx_schema.rs index 1c4a95fc..b356df5c 100644 --- a/tests/serde_tx_schema.rs +++ b/tests/serde_tx_schema.rs @@ -1,7 +1,6 @@ -#![cfg(feature = "curr")] #![cfg(all(feature = "schemars", feature = "serde", feature = "alloc"))] -use stellar_xdr::curr as stellar_xdr; +use stellar_xdr; #[allow(clippy::too_many_lines)] #[test] diff --git a/tests/str.rs b/tests/str.rs index 6105b115..285b37b1 100644 --- a/tests/str.rs +++ b/tests/str.rs @@ -1,7 +1,6 @@ -#![cfg(feature = "curr")] #![cfg(feature = "std")] -use stellar_xdr::curr as stellar_xdr; +use stellar_xdr; use stellar_xdr::{ AccountId, AssetCode, AssetCode12, AssetCode4, ClaimableBalanceId, ContractId, Error, Hash, diff --git a/tests/stringm.rs b/tests/stringm.rs index e7b31ff9..52c0d1dd 100644 --- a/tests/stringm.rs +++ b/tests/stringm.rs @@ -1,13 +1,6 @@ -#![cfg(all( - any(feature = "curr", feature = "next"), - not(all(feature = "curr", feature = "next")) -))] #![cfg(feature = "std")] -#[cfg(feature = "curr")] -use stellar_xdr::curr as stellar_xdr; -#[cfg(feature = "next")] -use stellar_xdr::next as stellar_xdr; +use stellar_xdr; use stellar_xdr::{Error, StringM}; diff --git a/tests/tx_auths.rs b/tests/tx_auths.rs index 24b8c5b8..79d1413e 100644 --- a/tests/tx_auths.rs +++ b/tests/tx_auths.rs @@ -1,13 +1,6 @@ -#![cfg(all( - feature = "alloc", - any(feature = "curr", feature = "next"), - not(all(feature = "curr", feature = "next")) -))] - -#[cfg(feature = "curr")] -use stellar_xdr::curr as stellar_xdr; -#[cfg(feature = "next")] -use stellar_xdr::next as stellar_xdr; +#![cfg(feature = "alloc")] + +use stellar_xdr; use stellar_xdr::{ Asset, ContractId, Error, FeeBumpTransaction, FeeBumpTransactionEnvelope, diff --git a/tests/tx_base64_skip_whitespace.rs b/tests/tx_base64_skip_whitespace.rs index 01b23871..1a80f946 100644 --- a/tests/tx_base64_skip_whitespace.rs +++ b/tests/tx_base64_skip_whitespace.rs @@ -1,13 +1,6 @@ -#![cfg(all( - any(feature = "curr", feature = "next"), - not(all(feature = "curr", feature = "next")) -))] #![cfg(all(feature = "std", feature = "base64"))] -#[cfg(feature = "curr")] -use stellar_xdr::curr as stellar_xdr; -#[cfg(feature = "next")] -use stellar_xdr::next as stellar_xdr; +use stellar_xdr; use base64::Engine; use std::assert_eq; diff --git a/tests/tx_debug_display.rs b/tests/tx_debug_display.rs index 1550d080..f682e18b 100644 --- a/tests/tx_debug_display.rs +++ b/tests/tx_debug_display.rs @@ -1,12 +1,5 @@ -#![cfg(all( - any(feature = "curr", feature = "next"), - not(all(feature = "curr", feature = "next")) -))] -#[cfg(feature = "curr")] -use stellar_xdr::curr as stellar_xdr; -#[cfg(feature = "next")] -use stellar_xdr::next as stellar_xdr; +use stellar_xdr; use stellar_xdr::{BytesM, Error, Hash, StringM, VecM}; diff --git a/tests/tx_hash.rs b/tests/tx_hash.rs index 36e8427c..e2a131bb 100644 --- a/tests/tx_hash.rs +++ b/tests/tx_hash.rs @@ -1,16 +1,8 @@ -#![cfg(all( - feature = "std", - feature = "base64", - any(feature = "curr", feature = "next"), - not(all(feature = "curr", feature = "next")) -))] +#![cfg(all(feature = "std", feature = "base64"))] use bytes_lit::bytes; -#[cfg(feature = "curr")] -use stellar_xdr::curr as stellar_xdr; -#[cfg(feature = "next")] -use stellar_xdr::next as stellar_xdr; +use stellar_xdr; use stellar_xdr::{ FeeBumpTransaction, FeeBumpTransactionEnvelope, FeeBumpTransactionInnerTx, Limits, Memo, diff --git a/tests/tx_prot18.rs b/tests/tx_prot18.rs index f4f2cb97..1d95f26d 100644 --- a/tests/tx_prot18.rs +++ b/tests/tx_prot18.rs @@ -1,13 +1,6 @@ -#![cfg(all( - any(feature = "curr", feature = "next"), - not(all(feature = "curr", feature = "next")) -))] #![cfg(all(feature = "std", feature = "base64"))] -#[cfg(feature = "curr")] -use stellar_xdr::curr as stellar_xdr; -#[cfg(feature = "next")] -use stellar_xdr::next as stellar_xdr; +use stellar_xdr; use stellar_xdr::{Error, Limits, OperationBody, ReadXdr, SequenceNumber, TransactionEnvelope}; diff --git a/tests/tx_read_edge_cases.rs b/tests/tx_read_edge_cases.rs index 6fc47d44..62e1e7f5 100644 --- a/tests/tx_read_edge_cases.rs +++ b/tests/tx_read_edge_cases.rs @@ -1,13 +1,6 @@ -#![cfg(all( - any(feature = "curr", feature = "next"), - not(all(feature = "curr", feature = "next")) -))] #![cfg(all(feature = "std", feature = "base64"))] -#[cfg(feature = "curr")] -use stellar_xdr::curr as stellar_xdr; -#[cfg(feature = "next")] -use stellar_xdr::next as stellar_xdr; +use stellar_xdr; use std::io::{self, Cursor}; use stellar_xdr::Error; diff --git a/tests/tx_small.rs b/tests/tx_small.rs index b564d75a..a3928541 100644 --- a/tests/tx_small.rs +++ b/tests/tx_small.rs @@ -1,12 +1,5 @@ -#![cfg(all( - any(feature = "curr", feature = "next"), - not(all(feature = "curr", feature = "next")) -))] -#[cfg(feature = "curr")] -use stellar_xdr::curr as stellar_xdr; -#[cfg(feature = "next")] -use stellar_xdr::next as stellar_xdr; +use stellar_xdr; use stellar_xdr::{ Error, Memo, MuxedAccount, Preconditions, SequenceNumber, Transaction, TransactionEnvelope, diff --git a/tests/vecm.rs b/tests/vecm.rs index a5411f17..9da251bd 100644 --- a/tests/vecm.rs +++ b/tests/vecm.rs @@ -1,13 +1,6 @@ -#![cfg(all( - any(feature = "curr", feature = "next"), - not(all(feature = "curr", feature = "next")) -))] #![cfg(feature = "std")] -#[cfg(feature = "curr")] -use stellar_xdr::curr as stellar_xdr; -#[cfg(feature = "next")] -use stellar_xdr::next as stellar_xdr; +use stellar_xdr; use stellar_xdr::{BytesM, Limits, ReadXdr, ScVal, VecM}; diff --git a/xdr b/xdr new file mode 160000 index 00000000..8e4d2715 --- /dev/null +++ b/xdr @@ -0,0 +1 @@ +Subproject commit 8e4d2715336508f45bb0034b3cba3764519895ac diff --git a/xdr/curr-version b/xdr-version similarity index 100% rename from xdr/curr-version rename to xdr-version diff --git a/xdr/curr b/xdr/curr deleted file mode 160000 index cff714a5..00000000 --- a/xdr/curr +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cff714a5ebaaaf2dac343b3546c2df73f0b7a36e diff --git a/xdr/next b/xdr/next deleted file mode 160000 index 5b64bdbd..00000000 --- a/xdr/next +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5b64bdbd3a15267a093765106fb03935852bdc1d diff --git a/xdr/next-version b/xdr/next-version deleted file mode 100644 index 4d79155d..00000000 --- a/xdr/next-version +++ /dev/null @@ -1 +0,0 @@ -5b64bdbd3a15267a093765106fb03935852bdc1d \ No newline at end of file From 8180843ed283447943e6bb9cc2265255ccfd2a77 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 25 Mar 2026 14:51:14 +1000 Subject: [PATCH 26/28] update --- Cargo.toml | 3 + xdr-json/{curr => }/AccountEntry.json | 0 xdr-json/{curr => }/AccountEntryExt.json | 0 .../{curr => }/AccountEntryExtensionV1.json | 0 .../AccountEntryExtensionV1Ext.json | 0 .../{curr => }/AccountEntryExtensionV2.json | 0 .../AccountEntryExtensionV2Ext.json | 0 .../{curr => }/AccountEntryExtensionV3.json | 0 xdr-json/{curr => }/AccountFlags.json | 0 xdr-json/{curr => }/AccountId.json | 0 xdr-json/{curr => }/AccountMergeResult.json | 0 .../{curr => }/AccountMergeResultCode.json | 0 xdr-json/{curr => }/AllowTrustOp.json | 0 xdr-json/{curr => }/AllowTrustResult.json | 0 xdr-json/{curr => }/AllowTrustResultCode.json | 0 xdr-json/{curr => }/AlphaNum12.json | 0 xdr-json/{curr => }/AlphaNum4.json | 0 xdr-json/{curr => }/Asset.json | 0 xdr-json/{curr => }/AssetCode.json | 0 xdr-json/{curr => }/AssetCode12.json | 0 xdr-json/{curr => }/AssetCode4.json | 0 xdr-json/{curr => }/AssetType.json | 0 xdr-json/{curr => }/Auth.json | 0 xdr-json/{curr => }/AuthCert.json | 0 xdr-json/{curr => }/AuthenticatedMessage.json | 0 .../{curr => }/AuthenticatedMessageV0.json | 0 .../BeginSponsoringFutureReservesOp.json | 0 .../BeginSponsoringFutureReservesResult.json | 0 ...ginSponsoringFutureReservesResultCode.json | 0 xdr-json/{curr => }/BinaryFuseFilterType.json | 0 xdr-json/{curr => }/BucketEntry.json | 0 xdr-json/{curr => }/BucketEntryType.json | 0 xdr-json/{curr => }/BucketListType.json | 0 xdr-json/{curr => }/BucketMetadata.json | 0 xdr-json/{curr => }/BucketMetadataExt.json | 0 xdr-json/{curr => }/BumpSequenceOp.json | 0 xdr-json/{curr => }/BumpSequenceResult.json | 0 .../{curr => }/BumpSequenceResultCode.json | 0 xdr-json/{curr => }/ChangeTrustAsset.json | 0 xdr-json/{curr => }/ChangeTrustOp.json | 0 xdr-json/{curr => }/ChangeTrustResult.json | 0 .../{curr => }/ChangeTrustResultCode.json | 0 xdr-json/{curr => }/ClaimAtom.json | 0 xdr-json/{curr => }/ClaimAtomType.json | 0 .../{curr => }/ClaimClaimableBalanceOp.json | 0 .../ClaimClaimableBalanceResult.json | 0 .../ClaimClaimableBalanceResultCode.json | 0 xdr-json/{curr => }/ClaimLiquidityAtom.json | 0 xdr-json/{curr => }/ClaimOfferAtom.json | 0 xdr-json/{curr => }/ClaimOfferAtomV0.json | 0 xdr-json/{curr => }/ClaimPredicate.json | 0 xdr-json/{curr => }/ClaimPredicateType.json | 0 .../{curr => }/ClaimableBalanceEntry.json | 0 .../{curr => }/ClaimableBalanceEntryExt.json | 0 .../ClaimableBalanceEntryExtensionV1.json | 0 .../ClaimableBalanceEntryExtensionV1Ext.json | 0 .../{curr => }/ClaimableBalanceFlags.json | 0 xdr-json/{curr => }/ClaimableBalanceId.json | 0 .../{curr => }/ClaimableBalanceIdType.json | 0 xdr-json/{curr => }/Claimant.json | 0 xdr-json/{curr => }/ClaimantType.json | 0 xdr-json/{curr => }/ClaimantV0.json | 0 .../ClawbackClaimableBalanceOp.json | 0 .../ClawbackClaimableBalanceResult.json | 0 .../ClawbackClaimableBalanceResultCode.json | 0 xdr-json/{curr => }/ClawbackOp.json | 0 xdr-json/{curr => }/ClawbackResult.json | 0 xdr-json/{curr => }/ClawbackResultCode.json | 0 .../ConfigSettingContractBandwidthV0.json | 0 .../ConfigSettingContractComputeV0.json | 0 .../ConfigSettingContractEventsV0.json | 0 ...ConfigSettingContractExecutionLanesV0.json | 0 ...ConfigSettingContractHistoricalDataV0.json | 0 .../ConfigSettingContractLedgerCostExtV0.json | 0 .../ConfigSettingContractLedgerCostV0.json | 0 ...onfigSettingContractParallelComputeV0.json | 0 xdr-json/{curr => }/ConfigSettingEntry.json | 0 xdr-json/{curr => }/ConfigSettingId.json | 0 .../{curr => }/ConfigSettingScpTiming.json | 0 xdr-json/{curr => }/ConfigUpgradeSet.json | 0 xdr-json/{curr => }/ConfigUpgradeSetKey.json | 0 .../{curr => }/ContractCodeCostInputs.json | 0 xdr-json/{curr => }/ContractCodeEntry.json | 0 xdr-json/{curr => }/ContractCodeEntryExt.json | 0 xdr-json/{curr => }/ContractCodeEntryV1.json | 0 .../{curr => }/ContractCostParamEntry.json | 0 xdr-json/{curr => }/ContractCostParams.json | 0 xdr-json/{curr => }/ContractCostType.json | 0 .../{curr => }/ContractDataDurability.json | 0 xdr-json/{curr => }/ContractDataEntry.json | 0 xdr-json/{curr => }/ContractEvent.json | 0 xdr-json/{curr => }/ContractEventBody.json | 0 xdr-json/{curr => }/ContractEventType.json | 0 xdr-json/{curr => }/ContractEventV0.json | 0 xdr-json/{curr => }/ContractExecutable.json | 0 .../{curr => }/ContractExecutableType.json | 0 xdr-json/{curr => }/ContractId.json | 0 xdr-json/{curr => }/ContractIdPreimage.json | 0 .../ContractIdPreimageFromAddress.json | 0 .../{curr => }/ContractIdPreimageType.json | 0 xdr-json/{curr => }/CreateAccountOp.json | 0 xdr-json/{curr => }/CreateAccountResult.json | 0 .../{curr => }/CreateAccountResultCode.json | 0 .../{curr => }/CreateClaimableBalanceOp.json | 0 .../CreateClaimableBalanceResult.json | 0 .../CreateClaimableBalanceResultCode.json | 0 xdr-json/{curr => }/CreateContractArgs.json | 0 xdr-json/{curr => }/CreateContractArgsV2.json | 0 .../{curr => }/CreatePassiveSellOfferOp.json | 0 xdr-json/{curr => }/CryptoKeyType.json | 0 xdr-json/{curr => }/Curve25519Public.json | 0 xdr-json/{curr => }/Curve25519Secret.json | 0 xdr-json/{curr => }/DataEntry.json | 0 xdr-json/{curr => }/DataEntryExt.json | 0 xdr-json/{curr => }/DataValue.json | 0 xdr-json/{curr => }/DecoratedSignature.json | 0 xdr-json/{curr => }/DependentTxCluster.json | 0 xdr-json/{curr => }/DiagnosticEvent.json | 0 xdr-json/{curr => }/DontHave.json | 0 xdr-json/{curr => }/Duration.json | 0 xdr-json/{curr => }/EncodedLedgerKey.json | 0 xdr-json/{curr => }/EncryptedBody.json | 0 .../EndSponsoringFutureReservesResult.json | 0 ...EndSponsoringFutureReservesResultCode.json | 0 xdr-json/{curr => }/EnvelopeType.json | 0 xdr-json/{curr => }/ErrorCode.json | 0 xdr-json/{curr => }/EvictionIterator.json | 0 xdr-json/{curr => }/ExtendFootprintTtlOp.json | 0 .../{curr => }/ExtendFootprintTtlResult.json | 0 .../ExtendFootprintTtlResultCode.json | 0 xdr-json/{curr => }/ExtensionPoint.json | 0 xdr-json/{curr => }/FeeBumpTransaction.json | 0 .../FeeBumpTransactionEnvelope.json | 0 .../{curr => }/FeeBumpTransactionExt.json | 0 .../{curr => }/FeeBumpTransactionInnerTx.json | 0 xdr-json/{curr => }/FloodAdvert.json | 0 xdr-json/{curr => }/FloodDemand.json | 0 xdr-json/{curr => }/FreezeBypassTxs.json | 0 xdr-json/{curr => }/FreezeBypassTxsDelta.json | 0 xdr-json/{curr => }/FrozenLedgerKeys.json | 0 .../{curr => }/FrozenLedgerKeysDelta.json | 0 .../{curr => }/GeneralizedTransactionSet.json | 0 xdr-json/{curr => }/Hash.json | 0 xdr-json/{curr => }/HashIdPreimage.json | 0 .../{curr => }/HashIdPreimageContractId.json | 0 .../{curr => }/HashIdPreimageOperationId.json | 0 .../{curr => }/HashIdPreimageRevokeId.json | 0 .../HashIdPreimageSorobanAuthorization.json | 0 xdr-json/{curr => }/Hello.json | 0 xdr-json/{curr => }/HmacSha256Key.json | 0 xdr-json/{curr => }/HmacSha256Mac.json | 0 xdr-json/{curr => }/HostFunction.json | 0 xdr-json/{curr => }/HostFunctionType.json | 0 .../{curr => }/HotArchiveBucketEntry.json | 0 .../{curr => }/HotArchiveBucketEntryType.json | 0 xdr-json/{curr => }/InflationPayout.json | 0 xdr-json/{curr => }/InflationResult.json | 0 xdr-json/{curr => }/InflationResultCode.json | 0 .../{curr => }/InnerTransactionResult.json | 0 .../{curr => }/InnerTransactionResultExt.json | 0 .../InnerTransactionResultPair.json | 0 .../InnerTransactionResultResult.json | 0 xdr-json/{curr => }/Int128Parts.json | 0 xdr-json/{curr => }/Int256Parts.json | 0 xdr-json/{curr => }/Int32.json | 0 xdr-json/{curr => }/Int64.json | 0 xdr-json/{curr => }/InvokeContractArgs.json | 0 xdr-json/{curr => }/InvokeHostFunctionOp.json | 0 .../{curr => }/InvokeHostFunctionResult.json | 0 .../InvokeHostFunctionResultCode.json | 0 .../InvokeHostFunctionSuccessPreImage.json | 0 xdr-json/{curr => }/IpAddrType.json | 0 xdr-json/{curr => }/LedgerBounds.json | 0 xdr-json/{curr => }/LedgerCloseMeta.json | 0 xdr-json/{curr => }/LedgerCloseMetaBatch.json | 0 xdr-json/{curr => }/LedgerCloseMetaExt.json | 0 xdr-json/{curr => }/LedgerCloseMetaExtV1.json | 0 xdr-json/{curr => }/LedgerCloseMetaV0.json | 0 xdr-json/{curr => }/LedgerCloseMetaV1.json | 0 xdr-json/{curr => }/LedgerCloseMetaV2.json | 0 .../{curr => }/LedgerCloseValueSignature.json | 0 xdr-json/{curr => }/LedgerEntry.json | 0 xdr-json/{curr => }/LedgerEntryChange.json | 0 .../{curr => }/LedgerEntryChangeType.json | 0 xdr-json/{curr => }/LedgerEntryChanges.json | 0 xdr-json/{curr => }/LedgerEntryData.json | 0 xdr-json/{curr => }/LedgerEntryExt.json | 0 .../{curr => }/LedgerEntryExtensionV1.json | 0 .../{curr => }/LedgerEntryExtensionV1Ext.json | 0 xdr-json/{curr => }/LedgerEntryType.json | 0 xdr-json/{curr => }/LedgerFootprint.json | 0 xdr-json/{curr => }/LedgerHeader.json | 0 xdr-json/{curr => }/LedgerHeaderExt.json | 0 .../{curr => }/LedgerHeaderExtensionV1.json | 0 .../LedgerHeaderExtensionV1Ext.json | 0 xdr-json/{curr => }/LedgerHeaderFlags.json | 0 .../{curr => }/LedgerHeaderHistoryEntry.json | 0 .../LedgerHeaderHistoryEntryExt.json | 0 xdr-json/{curr => }/LedgerKey.json | 0 xdr-json/{curr => }/LedgerKeyAccount.json | 0 .../{curr => }/LedgerKeyClaimableBalance.json | 0 .../{curr => }/LedgerKeyConfigSetting.json | 0 .../{curr => }/LedgerKeyContractCode.json | 0 .../{curr => }/LedgerKeyContractData.json | 0 xdr-json/{curr => }/LedgerKeyData.json | 0 .../{curr => }/LedgerKeyLiquidityPool.json | 0 xdr-json/{curr => }/LedgerKeyOffer.json | 0 xdr-json/{curr => }/LedgerKeyTrustLine.json | 0 xdr-json/{curr => }/LedgerKeyTtl.json | 0 xdr-json/{curr => }/LedgerScpMessages.json | 0 xdr-json/{curr => }/LedgerUpgrade.json | 0 xdr-json/{curr => }/LedgerUpgradeType.json | 0 xdr-json/{curr => }/Liabilities.json | 0 ...iquidityPoolConstantProductParameters.json | 0 .../{curr => }/LiquidityPoolDepositOp.json | 0 .../LiquidityPoolDepositResult.json | 0 .../LiquidityPoolDepositResultCode.json | 0 xdr-json/{curr => }/LiquidityPoolEntry.json | 0 .../{curr => }/LiquidityPoolEntryBody.json | 0 .../LiquidityPoolEntryConstantProduct.json | 0 .../{curr => }/LiquidityPoolParameters.json | 0 xdr-json/{curr => }/LiquidityPoolType.json | 0 .../{curr => }/LiquidityPoolWithdrawOp.json | 0 .../LiquidityPoolWithdrawResult.json | 0 .../LiquidityPoolWithdrawResultCode.json | 0 xdr-json/{curr => }/ManageBuyOfferOp.json | 0 xdr-json/{curr => }/ManageBuyOfferResult.json | 0 .../{curr => }/ManageBuyOfferResultCode.json | 0 xdr-json/{curr => }/ManageDataOp.json | 0 xdr-json/{curr => }/ManageDataResult.json | 0 xdr-json/{curr => }/ManageDataResultCode.json | 0 xdr-json/{curr => }/ManageOfferEffect.json | 0 .../{curr => }/ManageOfferSuccessResult.json | 0 .../ManageOfferSuccessResultOffer.json | 0 xdr-json/{curr => }/ManageSellOfferOp.json | 0 .../{curr => }/ManageSellOfferResult.json | 0 .../{curr => }/ManageSellOfferResultCode.json | 0 xdr-json/{curr => }/Memo.json | 0 xdr-json/{curr => }/MemoType.json | 0 xdr-json/{curr => }/MessageType.json | 0 xdr-json/{curr => }/MuxedAccount.json | 0 xdr-json/{curr => }/MuxedAccountMed25519.json | 0 xdr-json/{curr => }/MuxedEd25519Account.json | 0 xdr-json/{curr => }/NodeId.json | 0 xdr-json/{curr => }/OfferEntry.json | 0 xdr-json/{curr => }/OfferEntryExt.json | 0 xdr-json/{curr => }/OfferEntryFlags.json | 0 xdr-json/{curr => }/Operation.json | 0 xdr-json/{curr => }/OperationBody.json | 0 xdr-json/{curr => }/OperationMeta.json | 0 xdr-json/{curr => }/OperationMetaV2.json | 0 xdr-json/{curr => }/OperationResult.json | 0 xdr-json/{curr => }/OperationResultCode.json | 0 xdr-json/{curr => }/OperationResultTr.json | 0 xdr-json/{curr => }/OperationType.json | 0 .../{curr => }/ParallelTxExecutionStage.json | 0 xdr-json/{curr => }/ParallelTxsComponent.json | 0 .../PathPaymentStrictReceiveOp.json | 0 .../PathPaymentStrictReceiveResult.json | 0 .../PathPaymentStrictReceiveResultCode.json | 0 ...PathPaymentStrictReceiveResultSuccess.json | 0 .../{curr => }/PathPaymentStrictSendOp.json | 0 .../PathPaymentStrictSendResult.json | 0 .../PathPaymentStrictSendResultCode.json | 0 .../PathPaymentStrictSendResultSuccess.json | 0 xdr-json/{curr => }/PaymentOp.json | 0 xdr-json/{curr => }/PaymentResult.json | 0 xdr-json/{curr => }/PaymentResultCode.json | 0 xdr-json/{curr => }/PeerAddress.json | 0 xdr-json/{curr => }/PeerAddressIp.json | 0 xdr-json/{curr => }/PeerStats.json | 0 xdr-json/{curr => }/PersistedScpState.json | 0 xdr-json/{curr => }/PersistedScpStateV0.json | 0 xdr-json/{curr => }/PersistedScpStateV1.json | 0 xdr-json/{curr => }/PoolId.json | 0 xdr-json/{curr => }/PreconditionType.json | 0 xdr-json/{curr => }/Preconditions.json | 0 xdr-json/{curr => }/PreconditionsV2.json | 0 xdr-json/{curr => }/Price.json | 0 xdr-json/{curr => }/PublicKey.json | 0 xdr-json/{curr => }/PublicKeyType.json | 0 xdr-json/{curr => }/RestoreFootprintOp.json | 0 .../{curr => }/RestoreFootprintResult.json | 0 .../RestoreFootprintResultCode.json | 0 xdr-json/{curr => }/RevokeSponsorshipOp.json | 0 .../{curr => }/RevokeSponsorshipOpSigner.json | 0 .../{curr => }/RevokeSponsorshipResult.json | 0 .../RevokeSponsorshipResultCode.json | 0 .../{curr => }/RevokeSponsorshipType.json | 0 xdr-json/{curr => }/SError.json | 0 xdr-json/{curr => }/ScAddress.json | 0 xdr-json/{curr => }/ScAddressType.json | 0 xdr-json/{curr => }/ScBytes.json | 0 xdr-json/{curr => }/ScContractInstance.json | 0 xdr-json/{curr => }/ScEnvMetaEntry.json | 0 .../ScEnvMetaEntryInterfaceVersion.json | 0 xdr-json/{curr => }/ScEnvMetaKind.json | 0 xdr-json/{curr => }/ScError.json | 0 xdr-json/{curr => }/ScErrorCode.json | 0 xdr-json/{curr => }/ScErrorType.json | 0 xdr-json/{curr => }/ScMap.json | 0 xdr-json/{curr => }/ScMapEntry.json | 0 xdr-json/{curr => }/ScMetaEntry.json | 0 xdr-json/{curr => }/ScMetaKind.json | 0 xdr-json/{curr => }/ScMetaV0.json | 0 xdr-json/{curr => }/ScNonceKey.json | 0 xdr-json/{curr => }/ScSpecEntry.json | 0 xdr-json/{curr => }/ScSpecEntryKind.json | 0 .../{curr => }/ScSpecEventDataFormat.json | 0 .../ScSpecEventParamLocationV0.json | 0 xdr-json/{curr => }/ScSpecEventParamV0.json | 0 xdr-json/{curr => }/ScSpecEventV0.json | 0 .../{curr => }/ScSpecFunctionInputV0.json | 0 xdr-json/{curr => }/ScSpecFunctionV0.json | 0 xdr-json/{curr => }/ScSpecType.json | 0 xdr-json/{curr => }/ScSpecTypeBytesN.json | 0 xdr-json/{curr => }/ScSpecTypeDef.json | 0 xdr-json/{curr => }/ScSpecTypeMap.json | 0 xdr-json/{curr => }/ScSpecTypeOption.json | 0 xdr-json/{curr => }/ScSpecTypeResult.json | 0 xdr-json/{curr => }/ScSpecTypeTuple.json | 0 xdr-json/{curr => }/ScSpecTypeUdt.json | 0 xdr-json/{curr => }/ScSpecTypeVec.json | 0 xdr-json/{curr => }/ScSpecUdtEnumCaseV0.json | 0 xdr-json/{curr => }/ScSpecUdtEnumV0.json | 0 .../{curr => }/ScSpecUdtErrorEnumCaseV0.json | 0 xdr-json/{curr => }/ScSpecUdtErrorEnumV0.json | 0 .../{curr => }/ScSpecUdtStructFieldV0.json | 0 xdr-json/{curr => }/ScSpecUdtStructV0.json | 0 .../{curr => }/ScSpecUdtUnionCaseTupleV0.json | 0 xdr-json/{curr => }/ScSpecUdtUnionCaseV0.json | 0 .../{curr => }/ScSpecUdtUnionCaseV0Kind.json | 0 .../{curr => }/ScSpecUdtUnionCaseVoidV0.json | 0 xdr-json/{curr => }/ScSpecUdtUnionV0.json | 0 xdr-json/{curr => }/ScString.json | 0 xdr-json/{curr => }/ScSymbol.json | 0 xdr-json/{curr => }/ScVal.json | 0 xdr-json/{curr => }/ScValType.json | 0 xdr-json/{curr => }/ScVec.json | 0 xdr-json/{curr => }/ScpBallot.json | 0 xdr-json/{curr => }/ScpEnvelope.json | 0 xdr-json/{curr => }/ScpHistoryEntry.json | 0 xdr-json/{curr => }/ScpHistoryEntryV0.json | 0 xdr-json/{curr => }/ScpNomination.json | 0 xdr-json/{curr => }/ScpQuorumSet.json | 0 xdr-json/{curr => }/ScpStatement.json | 0 xdr-json/{curr => }/ScpStatementConfirm.json | 0 .../{curr => }/ScpStatementExternalize.json | 0 xdr-json/{curr => }/ScpStatementPledges.json | 0 xdr-json/{curr => }/ScpStatementPrepare.json | 0 xdr-json/{curr => }/ScpStatementType.json | 0 xdr-json/{curr => }/SendMore.json | 0 xdr-json/{curr => }/SendMoreExtended.json | 0 xdr-json/{curr => }/SequenceNumber.json | 0 .../SerializedBinaryFuseFilter.json | 0 xdr-json/{curr => }/SetOptionsOp.json | 0 xdr-json/{curr => }/SetOptionsResult.json | 0 xdr-json/{curr => }/SetOptionsResultCode.json | 0 xdr-json/{curr => }/SetTrustLineFlagsOp.json | 0 .../{curr => }/SetTrustLineFlagsResult.json | 0 .../SetTrustLineFlagsResultCode.json | 0 xdr-json/{curr => }/ShortHashSeed.json | 0 xdr-json/{curr => }/Signature.json | 0 xdr-json/{curr => }/SignatureHint.json | 0 .../SignedTimeSlicedSurveyRequestMessage.json | 0 ...SignedTimeSlicedSurveyResponseMessage.json | 0 ...imeSlicedSurveyStartCollectingMessage.json | 0 ...TimeSlicedSurveyStopCollectingMessage.json | 0 xdr-json/{curr => }/Signer.json | 0 xdr-json/{curr => }/SignerKey.json | 0 .../SignerKeyEd25519SignedPayload.json | 0 xdr-json/{curr => }/SignerKeyType.json | 0 xdr-json/{curr => }/SimplePaymentResult.json | 0 .../{curr => }/SorobanAddressCredentials.json | 0 .../SorobanAuthorizationEntries.json | 0 .../{curr => }/SorobanAuthorizationEntry.json | 0 .../{curr => }/SorobanAuthorizedFunction.json | 0 .../SorobanAuthorizedFunctionType.json | 0 .../SorobanAuthorizedInvocation.json | 0 xdr-json/{curr => }/SorobanCredentials.json | 0 .../{curr => }/SorobanCredentialsType.json | 0 xdr-json/{curr => }/SorobanResources.json | 0 .../{curr => }/SorobanResourcesExtV0.json | 0 .../{curr => }/SorobanTransactionData.json | 0 .../{curr => }/SorobanTransactionDataExt.json | 0 .../{curr => }/SorobanTransactionMeta.json | 0 .../{curr => }/SorobanTransactionMetaExt.json | 0 .../SorobanTransactionMetaExtV1.json | 0 .../{curr => }/SorobanTransactionMetaV2.json | 0 .../{curr => }/SponsorshipDescriptor.json | 0 .../{curr => }/StateArchivalSettings.json | 0 xdr-json/{curr => }/StellarMessage.json | 0 xdr-json/{curr => }/StellarValue.json | 0 xdr-json/{curr => }/StellarValueExt.json | 0 xdr-json/{curr => }/StellarValueType.json | 0 .../{curr => }/StoredDebugTransactionSet.json | 0 xdr-json/{curr => }/StoredTransactionSet.json | 0 xdr-json/{curr => }/String32.json | 0 xdr-json/{curr => }/String64.json | 0 .../{curr => }/SurveyMessageCommandType.json | 0 .../{curr => }/SurveyMessageResponseType.json | 0 xdr-json/{curr => }/SurveyRequestMessage.json | 0 xdr-json/{curr => }/SurveyResponseBody.json | 0 .../{curr => }/SurveyResponseMessage.json | 0 xdr-json/{curr => }/ThresholdIndexes.json | 0 xdr-json/{curr => }/Thresholds.json | 0 xdr-json/{curr => }/TimeBounds.json | 0 xdr-json/{curr => }/TimePoint.json | 0 xdr-json/{curr => }/TimeSlicedNodeData.json | 0 xdr-json/{curr => }/TimeSlicedPeerData.json | 0 .../{curr => }/TimeSlicedPeerDataList.json | 0 .../TimeSlicedSurveyRequestMessage.json | 0 .../TimeSlicedSurveyResponseMessage.json | 0 ...imeSlicedSurveyStartCollectingMessage.json | 0 ...TimeSlicedSurveyStopCollectingMessage.json | 0 .../{curr => }/TopologyResponseBodyV2.json | 0 xdr-json/{curr => }/Transaction.json | 0 xdr-json/{curr => }/TransactionEnvelope.json | 0 xdr-json/{curr => }/TransactionEvent.json | 0 .../{curr => }/TransactionEventStage.json | 0 xdr-json/{curr => }/TransactionExt.json | 0 .../{curr => }/TransactionHistoryEntry.json | 0 .../TransactionHistoryEntryExt.json | 0 .../TransactionHistoryResultEntry.json | 0 .../TransactionHistoryResultEntryExt.json | 0 xdr-json/{curr => }/TransactionMeta.json | 0 xdr-json/{curr => }/TransactionMetaV1.json | 0 xdr-json/{curr => }/TransactionMetaV2.json | 0 xdr-json/{curr => }/TransactionMetaV3.json | 0 xdr-json/{curr => }/TransactionMetaV4.json | 0 xdr-json/{curr => }/TransactionPhase.json | 0 xdr-json/{curr => }/TransactionResult.json | 0 .../{curr => }/TransactionResultCode.json | 0 xdr-json/{curr => }/TransactionResultExt.json | 0 .../{curr => }/TransactionResultMeta.json | 0 .../{curr => }/TransactionResultMetaV1.json | 0 .../{curr => }/TransactionResultPair.json | 0 .../{curr => }/TransactionResultResult.json | 0 xdr-json/{curr => }/TransactionResultSet.json | 0 xdr-json/{curr => }/TransactionSet.json | 0 xdr-json/{curr => }/TransactionSetV1.json | 0 .../TransactionSignaturePayload.json | 0 ...tionSignaturePayloadTaggedTransaction.json | 0 xdr-json/{curr => }/TransactionV0.json | 0 .../{curr => }/TransactionV0Envelope.json | 0 xdr-json/{curr => }/TransactionV0Ext.json | 0 .../{curr => }/TransactionV1Envelope.json | 0 xdr-json/{curr => }/TrustLineAsset.json | 0 xdr-json/{curr => }/TrustLineEntry.json | 0 xdr-json/{curr => }/TrustLineEntryExt.json | 0 .../{curr => }/TrustLineEntryExtensionV2.json | 0 .../TrustLineEntryExtensionV2Ext.json | 0 xdr-json/{curr => }/TrustLineEntryV1.json | 0 xdr-json/{curr => }/TrustLineEntryV1Ext.json | 0 xdr-json/{curr => }/TrustLineFlags.json | 0 xdr-json/{curr => }/TtlEntry.json | 0 xdr-json/{curr => }/TxAdvertVector.json | 0 xdr-json/{curr => }/TxDemandVector.json | 0 xdr-json/{curr => }/TxSetComponent.json | 0 .../TxSetComponentTxsMaybeDiscountedFee.json | 0 xdr-json/{curr => }/TxSetComponentType.json | 0 xdr-json/{curr => }/UInt128Parts.json | 0 xdr-json/{curr => }/UInt256Parts.json | 0 xdr-json/{curr => }/Uint256.json | 0 xdr-json/{curr => }/Uint32.json | 0 xdr-json/{curr => }/Uint64.json | 0 xdr-json/{curr => }/UpgradeEntryMeta.json | 0 xdr-json/{curr => }/UpgradeType.json | 0 xdr-json/{curr => }/Value.json | 0 xdr-json/next/AccountEntry.json | 284 - xdr-json/next/AccountEntryExt.json | 187 - xdr-json/next/AccountEntryExtensionV1.json | 163 - xdr-json/next/AccountEntryExtensionV1Ext.json | 133 - xdr-json/next/AccountEntryExtensionV2.json | 109 - xdr-json/next/AccountEntryExtensionV2Ext.json | 65 - xdr-json/next/AccountEntryExtensionV3.json | 41 - xdr-json/next/AccountFlags.json | 12 - xdr-json/next/AccountId.json | 5 - xdr-json/next/AccountMergeResult.json | 36 - xdr-json/next/AccountMergeResultCode.json | 16 - xdr-json/next/AllowTrustOp.json | 36 - xdr-json/next/AllowTrustResult.json | 15 - xdr-json/next/AllowTrustResultCode.json | 15 - xdr-json/next/AlphaNum12.json | 30 - xdr-json/next/AlphaNum4.json | 30 - xdr-json/next/Asset.json | 84 - xdr-json/next/AssetCode.json | 5 - xdr-json/next/AssetCode12.json | 5 - xdr-json/next/AssetCode4.json | 5 - xdr-json/next/AssetType.json | 12 - xdr-json/next/Auth.json | 19 - xdr-json/next/AuthCert.json | 54 - xdr-json/next/AuthenticatedMessage.json | 4349 ---------- xdr-json/next/AuthenticatedMessageV0.json | 4331 ---------- .../next/BeginSponsoringFutureReservesOp.json | 23 - .../BeginSponsoringFutureReservesResult.json | 12 - ...ginSponsoringFutureReservesResultCode.json | 12 - xdr-json/next/BinaryFuseFilterType.json | 11 - xdr-json/next/BucketEntry.json | 2893 ------- xdr-json/next/BucketEntryType.json | 12 - xdr-json/next/BucketListType.json | 10 - xdr-json/next/BucketMetadata.json | 56 - xdr-json/next/BucketMetadataExt.json | 40 - xdr-json/next/BumpSequenceOp.json | 24 - xdr-json/next/BumpSequenceResult.json | 10 - xdr-json/next/BumpSequenceResultCode.json | 10 - xdr-json/next/ChangeTrustAsset.json | 165 - xdr-json/next/ChangeTrustOp.json | 179 - xdr-json/next/ChangeTrustResult.json | 17 - xdr-json/next/ChangeTrustResultCode.json | 17 - xdr-json/next/ClaimAtom.json | 221 - xdr-json/next/ClaimAtomType.json | 11 - xdr-json/next/ClaimClaimableBalanceOp.json | 23 - .../next/ClaimClaimableBalanceResult.json | 15 - .../next/ClaimClaimableBalanceResultCode.json | 15 - xdr-json/next/ClaimLiquidityAtom.json | 113 - xdr-json/next/ClaimOfferAtom.json | 114 - xdr-json/next/ClaimOfferAtomV0.json | 118 - xdr-json/next/ClaimPredicate.json | 172 - xdr-json/next/ClaimPredicateType.json | 14 - xdr-json/next/ClaimableBalanceEntry.json | 277 - xdr-json/next/ClaimableBalanceEntryExt.json | 57 - .../ClaimableBalanceEntryExtensionV1.json | 33 - .../ClaimableBalanceEntryExtensionV1Ext.json | 9 - xdr-json/next/ClaimableBalanceFlags.json | 9 - xdr-json/next/ClaimableBalanceId.json | 5 - xdr-json/next/ClaimableBalanceIdType.json | 9 - xdr-json/next/Claimant.json | 126 - xdr-json/next/ClaimantType.json | 9 - xdr-json/next/ClaimantV0.json | 108 - xdr-json/next/ClawbackClaimableBalanceOp.json | 23 - .../next/ClawbackClaimableBalanceResult.json | 12 - .../ClawbackClaimableBalanceResultCode.json | 12 - xdr-json/next/ClawbackOp.json | 105 - xdr-json/next/ClawbackResult.json | 13 - xdr-json/next/ClawbackResultCode.json | 13 - .../ConfigSettingContractBandwidthV0.json | 30 - .../next/ConfigSettingContractComputeV0.json | 32 - .../next/ConfigSettingContractEventsV0.json | 24 - ...ConfigSettingContractExecutionLanesV0.json | 20 - ...ConfigSettingContractHistoricalDataV0.json | 18 - .../ConfigSettingContractLedgerCostExtV0.json | 24 - .../ConfigSettingContractLedgerCostV0.json | 92 - ...onfigSettingContractParallelComputeV0.json | 20 - xdr-json/next/ConfigSettingEntry.json | 725 -- xdr-json/next/ConfigSettingId.json | 29 - xdr-json/next/ConfigSettingScpTiming.json | 44 - xdr-json/next/ConfigUpgradeSet.json | 739 -- xdr-json/next/ConfigUpgradeSetKey.json | 31 - xdr-json/next/ContractCodeCostInputs.json | 87 - xdr-json/next/ContractCodeEntry.json | 151 - xdr-json/next/ContractCodeEntryExt.json | 127 - xdr-json/next/ContractCodeEntryV1.json | 103 - xdr-json/next/ContractCostParamEntry.json | 35 - xdr-json/next/ContractCostParams.json | 39 - xdr-json/next/ContractCostType.json | 94 - xdr-json/next/ContractDataDurability.json | 10 - xdr-json/next/ContractDataEntry.json | 570 -- xdr-json/next/ContractEvent.json | 612 -- xdr-json/next/ContractEventBody.json | 565 -- xdr-json/next/ContractEventType.json | 11 - xdr-json/next/ContractEventV0.json | 547 -- xdr-json/next/ContractExecutable.json | 34 - xdr-json/next/ContractExecutableType.json | 10 - xdr-json/next/ContractId.json | 5 - xdr-json/next/ContractIdPreimage.json | 134 - .../next/ContractIdPreimageFromAddress.json | 31 - xdr-json/next/ContractIdPreimageType.json | 10 - xdr-json/next/CreateAccountOp.json | 27 - xdr-json/next/CreateAccountResult.json | 13 - xdr-json/next/CreateAccountResultCode.json | 13 - xdr-json/next/CreateClaimableBalanceOp.json | 219 - .../next/CreateClaimableBalanceResult.json | 39 - .../CreateClaimableBalanceResultCode.json | 14 - xdr-json/next/CreateContractArgs.json | 174 - xdr-json/next/CreateContractArgsV2.json | 672 -- xdr-json/next/CreatePassiveSellOfferOp.json | 124 - xdr-json/next/CryptoKeyType.json | 13 - xdr-json/next/Curve25519Public.json | 25 - xdr-json/next/Curve25519Secret.json | 25 - xdr-json/next/DataEntry.json | 57 - xdr-json/next/DataEntryExt.json | 9 - xdr-json/next/DataValue.json | 9 - xdr-json/next/DecoratedSignature.json | 35 - xdr-json/next/DependentTxCluster.json | 3013 ------- xdr-json/next/DiagnosticEvent.json | 628 -- xdr-json/next/DontHave.json | 55 - xdr-json/next/Duration.json | 6 - xdr-json/next/EncodedLedgerKey.json | 8 - xdr-json/next/EncryptedBody.json | 9 - .../EndSponsoringFutureReservesResult.json | 10 - ...EndSponsoringFutureReservesResultCode.json | 10 - xdr-json/next/EnvelopeType.json | 18 - xdr-json/next/ErrorCode.json | 13 - xdr-json/next/EvictionIterator.json | 28 - xdr-json/next/ExtendFootprintTtlOp.json | 33 - xdr-json/next/ExtendFootprintTtlResult.json | 12 - .../next/ExtendFootprintTtlResultCode.json | 12 - xdr-json/next/ExtensionPoint.json | 9 - xdr-json/next/FeeBumpTransaction.json | 2872 ------ xdr-json/next/FeeBumpTransactionEnvelope.json | 2892 ------- xdr-json/next/FeeBumpTransactionExt.json | 9 - xdr-json/next/FeeBumpTransactionInnerTx.json | 2843 ------ xdr-json/next/FloodAdvert.json | 32 - xdr-json/next/FloodDemand.json | 32 - xdr-json/next/FreezeBypassTxs.json | 26 - xdr-json/next/FreezeBypassTxsDelta.json | 38 - xdr-json/next/FrozenLedgerKeys.json | 30 - xdr-json/next/FrozenLedgerKeysDelta.json | 38 - xdr-json/next/GeneralizedTransactionSet.json | 3160 ------- xdr-json/next/Hash.json | 9 - xdr-json/next/HashIdPreimage.json | 930 -- xdr-json/next/HashIdPreimageContractId.json | 152 - xdr-json/next/HashIdPreimageOperationId.json | 37 - xdr-json/next/HashIdPreimageRevokeId.json | 119 - .../HashIdPreimageSorobanAuthorization.json | 800 -- xdr-json/next/Hello.json | 120 - xdr-json/next/HmacSha256Key.json | 25 - xdr-json/next/HmacSha256Mac.json | 25 - xdr-json/next/HostFunction.json | 765 -- xdr-json/next/HostFunctionType.json | 12 - xdr-json/next/HotArchiveBucketEntry.json | 2882 ------ xdr-json/next/HotArchiveBucketEntryType.json | 11 - xdr-json/next/InflationPayout.json | 27 - xdr-json/next/InflationResult.json | 55 - xdr-json/next/InflationResultCode.json | 10 - xdr-json/next/InnerTransactionResult.json | 1307 --- xdr-json/next/InnerTransactionResultExt.json | 9 - xdr-json/next/InnerTransactionResultPair.json | 1327 --- .../next/InnerTransactionResultResult.json | 1282 --- xdr-json/next/Int128Parts.json | 5 - xdr-json/next/Int256Parts.json | 5 - xdr-json/next/Int32.json | 6 - xdr-json/next/Int64.json | 6 - xdr-json/next/InvokeContractArgs.json | 551 -- xdr-json/next/InvokeHostFunctionOp.json | 905 -- xdr-json/next/InvokeHostFunctionResult.json | 38 - .../next/InvokeHostFunctionResultCode.json | 14 - .../InvokeHostFunctionSuccessPreImage.json | 632 -- xdr-json/next/IpAddrType.json | 10 - xdr-json/next/LedgerBounds.json | 26 - xdr-json/next/LedgerCloseMeta.json | 7664 ---------------- xdr-json/next/LedgerCloseMetaBatch.json | 7690 ----------------- xdr-json/next/LedgerCloseMetaExt.json | 55 - xdr-json/next/LedgerCloseMetaExtV1.json | 31 - xdr-json/next/LedgerCloseMetaV0.json | 7289 ---------------- xdr-json/next/LedgerCloseMetaV1.json | 7476 ---------------- xdr-json/next/LedgerCloseMetaV2.json | 7476 ---------------- xdr-json/next/LedgerCloseValueSignature.json | 34 - xdr-json/next/LedgerEntry.json | 2504 ------ xdr-json/next/LedgerEntryChange.json | 2856 ------ xdr-json/next/LedgerEntryChangeType.json | 13 - xdr-json/next/LedgerEntryChanges.json | 2858 ------ xdr-json/next/LedgerEntryData.json | 2439 ------ xdr-json/next/LedgerEntryExt.json | 69 - xdr-json/next/LedgerEntryExtensionV1.json | 45 - xdr-json/next/LedgerEntryExtensionV1Ext.json | 9 - xdr-json/next/LedgerEntryType.json | 18 - xdr-json/next/LedgerFootprint.json | 948 -- xdr-json/next/LedgerHeader.json | 247 - xdr-json/next/LedgerHeaderExt.json | 57 - xdr-json/next/LedgerHeaderExtensionV1.json | 33 - xdr-json/next/LedgerHeaderExtensionV1Ext.json | 9 - xdr-json/next/LedgerHeaderFlags.json | 11 - xdr-json/next/LedgerHeaderHistoryEntry.json | 278 - .../next/LedgerHeaderHistoryEntryExt.json | 9 - xdr-json/next/LedgerKey.json | 926 -- xdr-json/next/LedgerKeyAccount.json | 23 - xdr-json/next/LedgerKeyClaimableBalance.json | 23 - xdr-json/next/LedgerKeyConfigSetting.json | 47 - xdr-json/next/LedgerKeyContractCode.json | 22 - xdr-json/next/LedgerKeyContractData.json | 555 -- xdr-json/next/LedgerKeyData.json | 35 - xdr-json/next/LedgerKeyLiquidityPool.json | 23 - xdr-json/next/LedgerKeyOffer.json | 27 - xdr-json/next/LedgerKeyTrustLine.json | 112 - xdr-json/next/LedgerKeyTtl.json | 22 - xdr-json/next/LedgerScpMessages.json | 297 - xdr-json/next/LedgerUpgrade.json | 127 - xdr-json/next/LedgerUpgradeType.json | 15 - xdr-json/next/Liabilities.json | 22 - ...iquidityPoolConstantProductParameters.json | 103 - xdr-json/next/LiquidityPoolDepositOp.json | 57 - xdr-json/next/LiquidityPoolDepositResult.json | 17 - .../next/LiquidityPoolDepositResultCode.json | 17 - xdr-json/next/LiquidityPoolEntry.json | 166 - xdr-json/next/LiquidityPoolEntryBody.json | 149 - .../LiquidityPoolEntryConstantProduct.json | 131 - xdr-json/next/LiquidityPoolParameters.json | 121 - xdr-json/next/LiquidityPoolType.json | 9 - xdr-json/next/LiquidityPoolWithdrawOp.json | 35 - .../next/LiquidityPoolWithdrawResult.json | 15 - .../next/LiquidityPoolWithdrawResultCode.json | 15 - xdr-json/next/ManageBuyOfferOp.json | 128 - xdr-json/next/ManageBuyOfferResult.json | 374 - xdr-json/next/ManageBuyOfferResultCode.json | 21 - xdr-json/next/ManageDataOp.json | 45 - xdr-json/next/ManageDataResult.json | 13 - xdr-json/next/ManageDataResultCode.json | 13 - xdr-json/next/ManageOfferEffect.json | 11 - xdr-json/next/ManageOfferSuccessResult.json | 339 - .../next/ManageOfferSuccessResultOffer.json | 184 - xdr-json/next/ManageSellOfferOp.json | 128 - xdr-json/next/ManageSellOfferResult.json | 374 - xdr-json/next/ManageSellOfferResultCode.json | 21 - xdr-json/next/Memo.json | 77 - xdr-json/next/MemoType.json | 13 - xdr-json/next/MessageType.json | 29 - xdr-json/next/MuxedAccount.json | 5 - xdr-json/next/MuxedAccountMed25519.json | 5 - xdr-json/next/MuxedEd25519Account.json | 5 - xdr-json/next/NodeId.json | 5 - xdr-json/next/OfferEntry.json | 149 - xdr-json/next/OfferEntryExt.json | 9 - xdr-json/next/OfferEntryFlags.json | 9 - xdr-json/next/Operation.json | 2408 ------ xdr-json/next/OperationBody.json | 2388 ----- xdr-json/next/OperationMeta.json | 2874 ------ xdr-json/next/OperationMetaV2.json | 2964 ------- xdr-json/next/OperationResult.json | 1226 --- xdr-json/next/OperationResultCode.json | 15 - xdr-json/next/OperationResultTr.json | 1199 --- xdr-json/next/OperationType.json | 35 - xdr-json/next/ParallelTxExecutionStage.json | 3021 ------- xdr-json/next/ParallelTxsComponent.json | 3048 ------- xdr-json/next/PathPaymentStrictReceiveOp.json | 121 - .../next/PathPaymentStrictReceiveResult.json | 304 - .../PathPaymentStrictReceiveResultCode.json | 21 - ...PathPaymentStrictReceiveResultSuccess.json | 259 - xdr-json/next/PathPaymentStrictSendOp.json | 121 - .../next/PathPaymentStrictSendResult.json | 304 - .../next/PathPaymentStrictSendResultCode.json | 21 - .../PathPaymentStrictSendResultSuccess.json | 259 - xdr-json/next/PaymentOp.json | 105 - xdr-json/next/PaymentResult.json | 18 - xdr-json/next/PaymentResultCode.json | 18 - xdr-json/next/PeerAddress.json | 73 - xdr-json/next/PeerAddressIp.json | 49 - xdr-json/next/PeerStats.json | 83 - xdr-json/next/PersistedScpState.json | 3584 -------- xdr-json/next/PersistedScpStateV0.json | 3531 -------- xdr-json/next/PersistedScpStateV1.json | 329 - xdr-json/next/PoolId.json | 5 - xdr-json/next/PreconditionType.json | 11 - xdr-json/next/Preconditions.json | 150 - xdr-json/next/PreconditionsV2.json | 115 - xdr-json/next/Price.json | 24 - xdr-json/next/PublicKey.json | 5 - xdr-json/next/PublicKeyType.json | 9 - xdr-json/next/RestoreFootprintOp.json | 27 - xdr-json/next/RestoreFootprintResult.json | 12 - xdr-json/next/RestoreFootprintResultCode.json | 12 - xdr-json/next/RevokeSponsorshipOp.json | 972 --- xdr-json/next/RevokeSponsorshipOpSigner.json | 30 - xdr-json/next/RevokeSponsorshipResult.json | 14 - .../next/RevokeSponsorshipResultCode.json | 14 - xdr-json/next/RevokeSponsorshipType.json | 10 - xdr-json/next/SError.json | 39 - xdr-json/next/ScAddress.json | 5 - xdr-json/next/ScAddressType.json | 13 - xdr-json/next/ScBytes.json | 8 - xdr-json/next/ScContractInstance.json | 549 -- xdr-json/next/ScEnvMetaEntry.json | 46 - .../next/ScEnvMetaEntryInterfaceVersion.json | 26 - xdr-json/next/ScEnvMetaKind.json | 9 - xdr-json/next/ScError.json | 143 - xdr-json/next/ScErrorCode.json | 18 - xdr-json/next/ScErrorType.json | 18 - xdr-json/next/ScMap.json | 531 -- xdr-json/next/ScMapEntry.json | 543 -- xdr-json/next/ScMetaEntry.json | 46 - xdr-json/next/ScMetaKind.json | 9 - xdr-json/next/ScMetaV0.json | 28 - xdr-json/next/ScNonceKey.json | 18 - xdr-json/next/ScSpecEntry.json | 685 -- xdr-json/next/ScSpecEntryKind.json | 14 - xdr-json/next/ScSpecEventDataFormat.json | 11 - xdr-json/next/ScSpecEventParamLocationV0.json | 10 - xdr-json/next/ScSpecEventParamV0.json | 256 - xdr-json/next/ScSpecEventV0.json | 317 - xdr-json/next/ScSpecFunctionInputV0.json | 244 - xdr-json/next/ScSpecFunctionV0.json | 284 - xdr-json/next/ScSpecType.json | 34 - xdr-json/next/ScSpecTypeBytesN.json | 20 - xdr-json/next/ScSpecTypeDef.json | 324 - xdr-json/next/ScSpecTypeMap.json | 232 - xdr-json/next/ScSpecTypeOption.json | 228 - xdr-json/next/ScSpecTypeResult.json | 232 - xdr-json/next/ScSpecTypeTuple.json | 232 - xdr-json/next/ScSpecTypeUdt.json | 24 - xdr-json/next/ScSpecTypeVec.json | 228 - xdr-json/next/ScSpecUdtEnumCaseV0.json | 38 - xdr-json/next/ScSpecUdtEnumV0.json | 70 - xdr-json/next/ScSpecUdtErrorEnumCaseV0.json | 38 - xdr-json/next/ScSpecUdtErrorEnumV0.json | 70 - xdr-json/next/ScSpecUdtStructFieldV0.json | 244 - xdr-json/next/ScSpecUdtStructV0.json | 276 - xdr-json/next/ScSpecUdtUnionCaseTupleV0.json | 244 - xdr-json/next/ScSpecUdtUnionCaseV0.json | 289 - xdr-json/next/ScSpecUdtUnionCaseV0Kind.json | 10 - xdr-json/next/ScSpecUdtUnionCaseVoidV0.json | 32 - xdr-json/next/ScSpecUdtUnionV0.json | 319 - xdr-json/next/ScString.json | 18 - xdr-json/next/ScSymbol.json | 18 - xdr-json/next/ScVal.json | 778 -- xdr-json/next/ScValType.json | 30 - xdr-json/next/ScVec.json | 531 -- xdr-json/next/ScpBallot.json | 32 - xdr-json/next/ScpEnvelope.json | 275 - xdr-json/next/ScpHistoryEntry.json | 365 - xdr-json/next/ScpHistoryEntryV0.json | 347 - xdr-json/next/ScpNomination.json | 46 - xdr-json/next/ScpQuorumSet.json | 71 - xdr-json/next/ScpStatement.json | 252 - xdr-json/next/ScpStatementConfirm.json | 70 - xdr-json/next/ScpStatementExternalize.json | 58 - xdr-json/next/ScpStatementPledges.json | 231 - xdr-json/next/ScpStatementPrepare.json | 84 - xdr-json/next/ScpStatementType.json | 12 - xdr-json/next/SendMore.json | 20 - xdr-json/next/SendMoreExtended.json | 26 - xdr-json/next/SequenceNumber.json | 6 - xdr-json/next/SerializedBinaryFuseFilter.json | 92 - xdr-json/next/SetOptionsOp.json | 124 - xdr-json/next/SetOptionsResult.json | 19 - xdr-json/next/SetOptionsResultCode.json | 19 - xdr-json/next/SetTrustLineFlagsOp.json | 110 - xdr-json/next/SetTrustLineFlagsResult.json | 14 - .../next/SetTrustLineFlagsResultCode.json | 14 - xdr-json/next/ShortHashSeed.json | 25 - xdr-json/next/Signature.json | 9 - xdr-json/next/SignatureHint.json | 9 - .../SignedTimeSlicedSurveyRequestMessage.json | 120 - ...SignedTimeSlicedSurveyResponseMessage.json | 96 - ...imeSlicedSurveyStartCollectingMessage.json | 58 - ...TimeSlicedSurveyStopCollectingMessage.json | 58 - xdr-json/next/Signer.json | 29 - xdr-json/next/SignerKey.json | 5 - .../next/SignerKeyEd25519SignedPayload.json | 5 - xdr-json/next/SignerKeyType.json | 12 - xdr-json/next/SimplePaymentResult.json | 102 - xdr-json/next/SorobanAddressCredentials.json | 553 -- .../next/SorobanAuthorizationEntries.json | 838 -- xdr-json/next/SorobanAuthorizationEntry.json | 834 -- xdr-json/next/SorobanAuthorizedFunction.json | 752 -- .../next/SorobanAuthorizedFunctionType.json | 11 - .../next/SorobanAuthorizedInvocation.json | 790 -- xdr-json/next/SorobanCredentials.json | 577 -- xdr-json/next/SorobanCredentialsType.json | 10 - xdr-json/next/SorobanResources.json | 978 --- xdr-json/next/SorobanResourcesExtV0.json | 24 - xdr-json/next/SorobanTransactionData.json | 1038 --- xdr-json/next/SorobanTransactionDataExt.json | 50 - xdr-json/next/SorobanTransactionMeta.json | 706 -- xdr-json/next/SorobanTransactionMetaExt.json | 63 - .../next/SorobanTransactionMetaExtV1.json | 39 - xdr-json/next/SorobanTransactionMetaV2.json | 602 -- xdr-json/next/SponsorshipDescriptor.json | 24 - xdr-json/next/StateArchivalSettings.json | 70 - xdr-json/next/StellarMessage.json | 4294 --------- xdr-json/next/StellarValue.json | 99 - xdr-json/next/StellarValueExt.json | 58 - xdr-json/next/StellarValueType.json | 10 - xdr-json/next/StoredDebugTransactionSet.json | 3311 ------- xdr-json/next/StoredTransactionSet.json | 3211 ------- xdr-json/next/String32.json | 18 - xdr-json/next/String64.json | 18 - xdr-json/next/SurveyMessageCommandType.json | 9 - xdr-json/next/SurveyMessageResponseType.json | 9 - xdr-json/next/SurveyRequestMessage.json | 67 - xdr-json/next/SurveyResponseBody.json | 213 - xdr-json/next/SurveyResponseMessage.json | 55 - xdr-json/next/ThresholdIndexes.json | 12 - xdr-json/next/Thresholds.json | 9 - xdr-json/next/TimeBounds.json | 28 - xdr-json/next/TimePoint.json | 6 - xdr-json/next/TimeSlicedNodeData.json | 72 - xdr-json/next/TimeSlicedPeerData.json | 101 - xdr-json/next/TimeSlicedPeerDataList.json | 105 - .../next/TimeSlicedSurveyRequestMessage.json | 97 - .../next/TimeSlicedSurveyResponseMessage.json | 73 - ...imeSlicedSurveyStartCollectingMessage.json | 35 - ...TimeSlicedSurveyStopCollectingMessage.json | 35 - xdr-json/next/TopologyResponseBodyV2.json | 195 - xdr-json/next/Transaction.json | 2778 ------ xdr-json/next/TransactionEnvelope.json | 3011 ------- xdr-json/next/TransactionEvent.json | 637 -- xdr-json/next/TransactionEventStage.json | 11 - xdr-json/next/TransactionExt.json | 1062 --- xdr-json/next/TransactionHistoryEntry.json | 3226 ------- xdr-json/next/TransactionHistoryEntryExt.json | 3182 ------- .../next/TransactionHistoryResultEntry.json | 1497 ---- .../TransactionHistoryResultEntryExt.json | 9 - xdr-json/next/TransactionMeta.json | 3319 ------- xdr-json/next/TransactionMetaV1.json | 2894 ------- xdr-json/next/TransactionMetaV2.json | 2898 ------- xdr-json/next/TransactionMetaV3.json | 3084 ------- xdr-json/next/TransactionMetaV4.json | 3127 ------- xdr-json/next/TransactionPhase.json | 3120 ------- xdr-json/next/TransactionResult.json | 1432 --- xdr-json/next/TransactionResultCode.json | 28 - xdr-json/next/TransactionResultExt.json | 9 - xdr-json/next/TransactionResultMeta.json | 4634 ---------- xdr-json/next/TransactionResultMetaV1.json | 4642 ---------- xdr-json/next/TransactionResultPair.json | 1452 ---- xdr-json/next/TransactionResultResult.json | 1407 --- xdr-json/next/TransactionResultSet.json | 1468 ---- xdr-json/next/TransactionSet.json | 3033 ------- xdr-json/next/TransactionSetV1.json | 3142 ------- .../next/TransactionSignaturePayload.json | 2919 ------- ...tionSignaturePayloadTaggedTransaction.json | 2901 ------- xdr-json/next/TransactionV0.json | 2550 ------ xdr-json/next/TransactionV0Envelope.json | 2597 ------ xdr-json/next/TransactionV0Ext.json | 9 - xdr-json/next/TransactionV1Envelope.json | 2825 ------ xdr-json/next/TrustLineAsset.json | 98 - xdr-json/next/TrustLineEntry.json | 230 - xdr-json/next/TrustLineEntryExt.json | 110 - xdr-json/next/TrustLineEntryExtensionV2.json | 32 - .../next/TrustLineEntryExtensionV2Ext.json | 9 - xdr-json/next/TrustLineEntryV1.json | 86 - xdr-json/next/TrustLineEntryV1Ext.json | 56 - xdr-json/next/TrustLineFlags.json | 11 - xdr-json/next/TtlEntry.json | 28 - xdr-json/next/TxAdvertVector.json | 14 - xdr-json/next/TxDemandVector.json | 14 - xdr-json/next/TxSetComponent.json | 3050 ------- .../TxSetComponentTxsMaybeDiscountedFee.json | 3032 ------- xdr-json/next/TxSetComponentType.json | 9 - xdr-json/next/UInt128Parts.json | 5 - xdr-json/next/UInt256Parts.json | 5 - xdr-json/next/Uint256.json | 9 - xdr-json/next/Uint32.json | 7 - xdr-json/next/Uint64.json | 7 - xdr-json/next/UpgradeEntryMeta.json | 2995 ------- xdr-json/next/UpgradeType.json | 9 - xdr-json/next/Value.json | 8 - xdr-version | 2 +- 938 files changed, 4 insertions(+), 244622 deletions(-) rename xdr-json/{curr => }/AccountEntry.json (100%) rename xdr-json/{curr => }/AccountEntryExt.json (100%) rename xdr-json/{curr => }/AccountEntryExtensionV1.json (100%) rename xdr-json/{curr => }/AccountEntryExtensionV1Ext.json (100%) rename xdr-json/{curr => }/AccountEntryExtensionV2.json (100%) rename xdr-json/{curr => }/AccountEntryExtensionV2Ext.json (100%) rename xdr-json/{curr => }/AccountEntryExtensionV3.json (100%) rename xdr-json/{curr => }/AccountFlags.json (100%) rename xdr-json/{curr => }/AccountId.json (100%) rename xdr-json/{curr => }/AccountMergeResult.json (100%) rename xdr-json/{curr => }/AccountMergeResultCode.json (100%) rename xdr-json/{curr => }/AllowTrustOp.json (100%) rename xdr-json/{curr => }/AllowTrustResult.json (100%) rename xdr-json/{curr => }/AllowTrustResultCode.json (100%) rename xdr-json/{curr => }/AlphaNum12.json (100%) rename xdr-json/{curr => }/AlphaNum4.json (100%) rename xdr-json/{curr => }/Asset.json (100%) rename xdr-json/{curr => }/AssetCode.json (100%) rename xdr-json/{curr => }/AssetCode12.json (100%) rename xdr-json/{curr => }/AssetCode4.json (100%) rename xdr-json/{curr => }/AssetType.json (100%) rename xdr-json/{curr => }/Auth.json (100%) rename xdr-json/{curr => }/AuthCert.json (100%) rename xdr-json/{curr => }/AuthenticatedMessage.json (100%) rename xdr-json/{curr => }/AuthenticatedMessageV0.json (100%) rename xdr-json/{curr => }/BeginSponsoringFutureReservesOp.json (100%) rename xdr-json/{curr => }/BeginSponsoringFutureReservesResult.json (100%) rename xdr-json/{curr => }/BeginSponsoringFutureReservesResultCode.json (100%) rename xdr-json/{curr => }/BinaryFuseFilterType.json (100%) rename xdr-json/{curr => }/BucketEntry.json (100%) rename xdr-json/{curr => }/BucketEntryType.json (100%) rename xdr-json/{curr => }/BucketListType.json (100%) rename xdr-json/{curr => }/BucketMetadata.json (100%) rename xdr-json/{curr => }/BucketMetadataExt.json (100%) rename xdr-json/{curr => }/BumpSequenceOp.json (100%) rename xdr-json/{curr => }/BumpSequenceResult.json (100%) rename xdr-json/{curr => }/BumpSequenceResultCode.json (100%) rename xdr-json/{curr => }/ChangeTrustAsset.json (100%) rename xdr-json/{curr => }/ChangeTrustOp.json (100%) rename xdr-json/{curr => }/ChangeTrustResult.json (100%) rename xdr-json/{curr => }/ChangeTrustResultCode.json (100%) rename xdr-json/{curr => }/ClaimAtom.json (100%) rename xdr-json/{curr => }/ClaimAtomType.json (100%) rename xdr-json/{curr => }/ClaimClaimableBalanceOp.json (100%) rename xdr-json/{curr => }/ClaimClaimableBalanceResult.json (100%) rename xdr-json/{curr => }/ClaimClaimableBalanceResultCode.json (100%) rename xdr-json/{curr => }/ClaimLiquidityAtom.json (100%) rename xdr-json/{curr => }/ClaimOfferAtom.json (100%) rename xdr-json/{curr => }/ClaimOfferAtomV0.json (100%) rename xdr-json/{curr => }/ClaimPredicate.json (100%) rename xdr-json/{curr => }/ClaimPredicateType.json (100%) rename xdr-json/{curr => }/ClaimableBalanceEntry.json (100%) rename xdr-json/{curr => }/ClaimableBalanceEntryExt.json (100%) rename xdr-json/{curr => }/ClaimableBalanceEntryExtensionV1.json (100%) rename xdr-json/{curr => }/ClaimableBalanceEntryExtensionV1Ext.json (100%) rename xdr-json/{curr => }/ClaimableBalanceFlags.json (100%) rename xdr-json/{curr => }/ClaimableBalanceId.json (100%) rename xdr-json/{curr => }/ClaimableBalanceIdType.json (100%) rename xdr-json/{curr => }/Claimant.json (100%) rename xdr-json/{curr => }/ClaimantType.json (100%) rename xdr-json/{curr => }/ClaimantV0.json (100%) rename xdr-json/{curr => }/ClawbackClaimableBalanceOp.json (100%) rename xdr-json/{curr => }/ClawbackClaimableBalanceResult.json (100%) rename xdr-json/{curr => }/ClawbackClaimableBalanceResultCode.json (100%) rename xdr-json/{curr => }/ClawbackOp.json (100%) rename xdr-json/{curr => }/ClawbackResult.json (100%) rename xdr-json/{curr => }/ClawbackResultCode.json (100%) rename xdr-json/{curr => }/ConfigSettingContractBandwidthV0.json (100%) rename xdr-json/{curr => }/ConfigSettingContractComputeV0.json (100%) rename xdr-json/{curr => }/ConfigSettingContractEventsV0.json (100%) rename xdr-json/{curr => }/ConfigSettingContractExecutionLanesV0.json (100%) rename xdr-json/{curr => }/ConfigSettingContractHistoricalDataV0.json (100%) rename xdr-json/{curr => }/ConfigSettingContractLedgerCostExtV0.json (100%) rename xdr-json/{curr => }/ConfigSettingContractLedgerCostV0.json (100%) rename xdr-json/{curr => }/ConfigSettingContractParallelComputeV0.json (100%) rename xdr-json/{curr => }/ConfigSettingEntry.json (100%) rename xdr-json/{curr => }/ConfigSettingId.json (100%) rename xdr-json/{curr => }/ConfigSettingScpTiming.json (100%) rename xdr-json/{curr => }/ConfigUpgradeSet.json (100%) rename xdr-json/{curr => }/ConfigUpgradeSetKey.json (100%) rename xdr-json/{curr => }/ContractCodeCostInputs.json (100%) rename xdr-json/{curr => }/ContractCodeEntry.json (100%) rename xdr-json/{curr => }/ContractCodeEntryExt.json (100%) rename xdr-json/{curr => }/ContractCodeEntryV1.json (100%) rename xdr-json/{curr => }/ContractCostParamEntry.json (100%) rename xdr-json/{curr => }/ContractCostParams.json (100%) rename xdr-json/{curr => }/ContractCostType.json (100%) rename xdr-json/{curr => }/ContractDataDurability.json (100%) rename xdr-json/{curr => }/ContractDataEntry.json (100%) rename xdr-json/{curr => }/ContractEvent.json (100%) rename xdr-json/{curr => }/ContractEventBody.json (100%) rename xdr-json/{curr => }/ContractEventType.json (100%) rename xdr-json/{curr => }/ContractEventV0.json (100%) rename xdr-json/{curr => }/ContractExecutable.json (100%) rename xdr-json/{curr => }/ContractExecutableType.json (100%) rename xdr-json/{curr => }/ContractId.json (100%) rename xdr-json/{curr => }/ContractIdPreimage.json (100%) rename xdr-json/{curr => }/ContractIdPreimageFromAddress.json (100%) rename xdr-json/{curr => }/ContractIdPreimageType.json (100%) rename xdr-json/{curr => }/CreateAccountOp.json (100%) rename xdr-json/{curr => }/CreateAccountResult.json (100%) rename xdr-json/{curr => }/CreateAccountResultCode.json (100%) rename xdr-json/{curr => }/CreateClaimableBalanceOp.json (100%) rename xdr-json/{curr => }/CreateClaimableBalanceResult.json (100%) rename xdr-json/{curr => }/CreateClaimableBalanceResultCode.json (100%) rename xdr-json/{curr => }/CreateContractArgs.json (100%) rename xdr-json/{curr => }/CreateContractArgsV2.json (100%) rename xdr-json/{curr => }/CreatePassiveSellOfferOp.json (100%) rename xdr-json/{curr => }/CryptoKeyType.json (100%) rename xdr-json/{curr => }/Curve25519Public.json (100%) rename xdr-json/{curr => }/Curve25519Secret.json (100%) rename xdr-json/{curr => }/DataEntry.json (100%) rename xdr-json/{curr => }/DataEntryExt.json (100%) rename xdr-json/{curr => }/DataValue.json (100%) rename xdr-json/{curr => }/DecoratedSignature.json (100%) rename xdr-json/{curr => }/DependentTxCluster.json (100%) rename xdr-json/{curr => }/DiagnosticEvent.json (100%) rename xdr-json/{curr => }/DontHave.json (100%) rename xdr-json/{curr => }/Duration.json (100%) rename xdr-json/{curr => }/EncodedLedgerKey.json (100%) rename xdr-json/{curr => }/EncryptedBody.json (100%) rename xdr-json/{curr => }/EndSponsoringFutureReservesResult.json (100%) rename xdr-json/{curr => }/EndSponsoringFutureReservesResultCode.json (100%) rename xdr-json/{curr => }/EnvelopeType.json (100%) rename xdr-json/{curr => }/ErrorCode.json (100%) rename xdr-json/{curr => }/EvictionIterator.json (100%) rename xdr-json/{curr => }/ExtendFootprintTtlOp.json (100%) rename xdr-json/{curr => }/ExtendFootprintTtlResult.json (100%) rename xdr-json/{curr => }/ExtendFootprintTtlResultCode.json (100%) rename xdr-json/{curr => }/ExtensionPoint.json (100%) rename xdr-json/{curr => }/FeeBumpTransaction.json (100%) rename xdr-json/{curr => }/FeeBumpTransactionEnvelope.json (100%) rename xdr-json/{curr => }/FeeBumpTransactionExt.json (100%) rename xdr-json/{curr => }/FeeBumpTransactionInnerTx.json (100%) rename xdr-json/{curr => }/FloodAdvert.json (100%) rename xdr-json/{curr => }/FloodDemand.json (100%) rename xdr-json/{curr => }/FreezeBypassTxs.json (100%) rename xdr-json/{curr => }/FreezeBypassTxsDelta.json (100%) rename xdr-json/{curr => }/FrozenLedgerKeys.json (100%) rename xdr-json/{curr => }/FrozenLedgerKeysDelta.json (100%) rename xdr-json/{curr => }/GeneralizedTransactionSet.json (100%) rename xdr-json/{curr => }/Hash.json (100%) rename xdr-json/{curr => }/HashIdPreimage.json (100%) rename xdr-json/{curr => }/HashIdPreimageContractId.json (100%) rename xdr-json/{curr => }/HashIdPreimageOperationId.json (100%) rename xdr-json/{curr => }/HashIdPreimageRevokeId.json (100%) rename xdr-json/{curr => }/HashIdPreimageSorobanAuthorization.json (100%) rename xdr-json/{curr => }/Hello.json (100%) rename xdr-json/{curr => }/HmacSha256Key.json (100%) rename xdr-json/{curr => }/HmacSha256Mac.json (100%) rename xdr-json/{curr => }/HostFunction.json (100%) rename xdr-json/{curr => }/HostFunctionType.json (100%) rename xdr-json/{curr => }/HotArchiveBucketEntry.json (100%) rename xdr-json/{curr => }/HotArchiveBucketEntryType.json (100%) rename xdr-json/{curr => }/InflationPayout.json (100%) rename xdr-json/{curr => }/InflationResult.json (100%) rename xdr-json/{curr => }/InflationResultCode.json (100%) rename xdr-json/{curr => }/InnerTransactionResult.json (100%) rename xdr-json/{curr => }/InnerTransactionResultExt.json (100%) rename xdr-json/{curr => }/InnerTransactionResultPair.json (100%) rename xdr-json/{curr => }/InnerTransactionResultResult.json (100%) rename xdr-json/{curr => }/Int128Parts.json (100%) rename xdr-json/{curr => }/Int256Parts.json (100%) rename xdr-json/{curr => }/Int32.json (100%) rename xdr-json/{curr => }/Int64.json (100%) rename xdr-json/{curr => }/InvokeContractArgs.json (100%) rename xdr-json/{curr => }/InvokeHostFunctionOp.json (100%) rename xdr-json/{curr => }/InvokeHostFunctionResult.json (100%) rename xdr-json/{curr => }/InvokeHostFunctionResultCode.json (100%) rename xdr-json/{curr => }/InvokeHostFunctionSuccessPreImage.json (100%) rename xdr-json/{curr => }/IpAddrType.json (100%) rename xdr-json/{curr => }/LedgerBounds.json (100%) rename xdr-json/{curr => }/LedgerCloseMeta.json (100%) rename xdr-json/{curr => }/LedgerCloseMetaBatch.json (100%) rename xdr-json/{curr => }/LedgerCloseMetaExt.json (100%) rename xdr-json/{curr => }/LedgerCloseMetaExtV1.json (100%) rename xdr-json/{curr => }/LedgerCloseMetaV0.json (100%) rename xdr-json/{curr => }/LedgerCloseMetaV1.json (100%) rename xdr-json/{curr => }/LedgerCloseMetaV2.json (100%) rename xdr-json/{curr => }/LedgerCloseValueSignature.json (100%) rename xdr-json/{curr => }/LedgerEntry.json (100%) rename xdr-json/{curr => }/LedgerEntryChange.json (100%) rename xdr-json/{curr => }/LedgerEntryChangeType.json (100%) rename xdr-json/{curr => }/LedgerEntryChanges.json (100%) rename xdr-json/{curr => }/LedgerEntryData.json (100%) rename xdr-json/{curr => }/LedgerEntryExt.json (100%) rename xdr-json/{curr => }/LedgerEntryExtensionV1.json (100%) rename xdr-json/{curr => }/LedgerEntryExtensionV1Ext.json (100%) rename xdr-json/{curr => }/LedgerEntryType.json (100%) rename xdr-json/{curr => }/LedgerFootprint.json (100%) rename xdr-json/{curr => }/LedgerHeader.json (100%) rename xdr-json/{curr => }/LedgerHeaderExt.json (100%) rename xdr-json/{curr => }/LedgerHeaderExtensionV1.json (100%) rename xdr-json/{curr => }/LedgerHeaderExtensionV1Ext.json (100%) rename xdr-json/{curr => }/LedgerHeaderFlags.json (100%) rename xdr-json/{curr => }/LedgerHeaderHistoryEntry.json (100%) rename xdr-json/{curr => }/LedgerHeaderHistoryEntryExt.json (100%) rename xdr-json/{curr => }/LedgerKey.json (100%) rename xdr-json/{curr => }/LedgerKeyAccount.json (100%) rename xdr-json/{curr => }/LedgerKeyClaimableBalance.json (100%) rename xdr-json/{curr => }/LedgerKeyConfigSetting.json (100%) rename xdr-json/{curr => }/LedgerKeyContractCode.json (100%) rename xdr-json/{curr => }/LedgerKeyContractData.json (100%) rename xdr-json/{curr => }/LedgerKeyData.json (100%) rename xdr-json/{curr => }/LedgerKeyLiquidityPool.json (100%) rename xdr-json/{curr => }/LedgerKeyOffer.json (100%) rename xdr-json/{curr => }/LedgerKeyTrustLine.json (100%) rename xdr-json/{curr => }/LedgerKeyTtl.json (100%) rename xdr-json/{curr => }/LedgerScpMessages.json (100%) rename xdr-json/{curr => }/LedgerUpgrade.json (100%) rename xdr-json/{curr => }/LedgerUpgradeType.json (100%) rename xdr-json/{curr => }/Liabilities.json (100%) rename xdr-json/{curr => }/LiquidityPoolConstantProductParameters.json (100%) rename xdr-json/{curr => }/LiquidityPoolDepositOp.json (100%) rename xdr-json/{curr => }/LiquidityPoolDepositResult.json (100%) rename xdr-json/{curr => }/LiquidityPoolDepositResultCode.json (100%) rename xdr-json/{curr => }/LiquidityPoolEntry.json (100%) rename xdr-json/{curr => }/LiquidityPoolEntryBody.json (100%) rename xdr-json/{curr => }/LiquidityPoolEntryConstantProduct.json (100%) rename xdr-json/{curr => }/LiquidityPoolParameters.json (100%) rename xdr-json/{curr => }/LiquidityPoolType.json (100%) rename xdr-json/{curr => }/LiquidityPoolWithdrawOp.json (100%) rename xdr-json/{curr => }/LiquidityPoolWithdrawResult.json (100%) rename xdr-json/{curr => }/LiquidityPoolWithdrawResultCode.json (100%) rename xdr-json/{curr => }/ManageBuyOfferOp.json (100%) rename xdr-json/{curr => }/ManageBuyOfferResult.json (100%) rename xdr-json/{curr => }/ManageBuyOfferResultCode.json (100%) rename xdr-json/{curr => }/ManageDataOp.json (100%) rename xdr-json/{curr => }/ManageDataResult.json (100%) rename xdr-json/{curr => }/ManageDataResultCode.json (100%) rename xdr-json/{curr => }/ManageOfferEffect.json (100%) rename xdr-json/{curr => }/ManageOfferSuccessResult.json (100%) rename xdr-json/{curr => }/ManageOfferSuccessResultOffer.json (100%) rename xdr-json/{curr => }/ManageSellOfferOp.json (100%) rename xdr-json/{curr => }/ManageSellOfferResult.json (100%) rename xdr-json/{curr => }/ManageSellOfferResultCode.json (100%) rename xdr-json/{curr => }/Memo.json (100%) rename xdr-json/{curr => }/MemoType.json (100%) rename xdr-json/{curr => }/MessageType.json (100%) rename xdr-json/{curr => }/MuxedAccount.json (100%) rename xdr-json/{curr => }/MuxedAccountMed25519.json (100%) rename xdr-json/{curr => }/MuxedEd25519Account.json (100%) rename xdr-json/{curr => }/NodeId.json (100%) rename xdr-json/{curr => }/OfferEntry.json (100%) rename xdr-json/{curr => }/OfferEntryExt.json (100%) rename xdr-json/{curr => }/OfferEntryFlags.json (100%) rename xdr-json/{curr => }/Operation.json (100%) rename xdr-json/{curr => }/OperationBody.json (100%) rename xdr-json/{curr => }/OperationMeta.json (100%) rename xdr-json/{curr => }/OperationMetaV2.json (100%) rename xdr-json/{curr => }/OperationResult.json (100%) rename xdr-json/{curr => }/OperationResultCode.json (100%) rename xdr-json/{curr => }/OperationResultTr.json (100%) rename xdr-json/{curr => }/OperationType.json (100%) rename xdr-json/{curr => }/ParallelTxExecutionStage.json (100%) rename xdr-json/{curr => }/ParallelTxsComponent.json (100%) rename xdr-json/{curr => }/PathPaymentStrictReceiveOp.json (100%) rename xdr-json/{curr => }/PathPaymentStrictReceiveResult.json (100%) rename xdr-json/{curr => }/PathPaymentStrictReceiveResultCode.json (100%) rename xdr-json/{curr => }/PathPaymentStrictReceiveResultSuccess.json (100%) rename xdr-json/{curr => }/PathPaymentStrictSendOp.json (100%) rename xdr-json/{curr => }/PathPaymentStrictSendResult.json (100%) rename xdr-json/{curr => }/PathPaymentStrictSendResultCode.json (100%) rename xdr-json/{curr => }/PathPaymentStrictSendResultSuccess.json (100%) rename xdr-json/{curr => }/PaymentOp.json (100%) rename xdr-json/{curr => }/PaymentResult.json (100%) rename xdr-json/{curr => }/PaymentResultCode.json (100%) rename xdr-json/{curr => }/PeerAddress.json (100%) rename xdr-json/{curr => }/PeerAddressIp.json (100%) rename xdr-json/{curr => }/PeerStats.json (100%) rename xdr-json/{curr => }/PersistedScpState.json (100%) rename xdr-json/{curr => }/PersistedScpStateV0.json (100%) rename xdr-json/{curr => }/PersistedScpStateV1.json (100%) rename xdr-json/{curr => }/PoolId.json (100%) rename xdr-json/{curr => }/PreconditionType.json (100%) rename xdr-json/{curr => }/Preconditions.json (100%) rename xdr-json/{curr => }/PreconditionsV2.json (100%) rename xdr-json/{curr => }/Price.json (100%) rename xdr-json/{curr => }/PublicKey.json (100%) rename xdr-json/{curr => }/PublicKeyType.json (100%) rename xdr-json/{curr => }/RestoreFootprintOp.json (100%) rename xdr-json/{curr => }/RestoreFootprintResult.json (100%) rename xdr-json/{curr => }/RestoreFootprintResultCode.json (100%) rename xdr-json/{curr => }/RevokeSponsorshipOp.json (100%) rename xdr-json/{curr => }/RevokeSponsorshipOpSigner.json (100%) rename xdr-json/{curr => }/RevokeSponsorshipResult.json (100%) rename xdr-json/{curr => }/RevokeSponsorshipResultCode.json (100%) rename xdr-json/{curr => }/RevokeSponsorshipType.json (100%) rename xdr-json/{curr => }/SError.json (100%) rename xdr-json/{curr => }/ScAddress.json (100%) rename xdr-json/{curr => }/ScAddressType.json (100%) rename xdr-json/{curr => }/ScBytes.json (100%) rename xdr-json/{curr => }/ScContractInstance.json (100%) rename xdr-json/{curr => }/ScEnvMetaEntry.json (100%) rename xdr-json/{curr => }/ScEnvMetaEntryInterfaceVersion.json (100%) rename xdr-json/{curr => }/ScEnvMetaKind.json (100%) rename xdr-json/{curr => }/ScError.json (100%) rename xdr-json/{curr => }/ScErrorCode.json (100%) rename xdr-json/{curr => }/ScErrorType.json (100%) rename xdr-json/{curr => }/ScMap.json (100%) rename xdr-json/{curr => }/ScMapEntry.json (100%) rename xdr-json/{curr => }/ScMetaEntry.json (100%) rename xdr-json/{curr => }/ScMetaKind.json (100%) rename xdr-json/{curr => }/ScMetaV0.json (100%) rename xdr-json/{curr => }/ScNonceKey.json (100%) rename xdr-json/{curr => }/ScSpecEntry.json (100%) rename xdr-json/{curr => }/ScSpecEntryKind.json (100%) rename xdr-json/{curr => }/ScSpecEventDataFormat.json (100%) rename xdr-json/{curr => }/ScSpecEventParamLocationV0.json (100%) rename xdr-json/{curr => }/ScSpecEventParamV0.json (100%) rename xdr-json/{curr => }/ScSpecEventV0.json (100%) rename xdr-json/{curr => }/ScSpecFunctionInputV0.json (100%) rename xdr-json/{curr => }/ScSpecFunctionV0.json (100%) rename xdr-json/{curr => }/ScSpecType.json (100%) rename xdr-json/{curr => }/ScSpecTypeBytesN.json (100%) rename xdr-json/{curr => }/ScSpecTypeDef.json (100%) rename xdr-json/{curr => }/ScSpecTypeMap.json (100%) rename xdr-json/{curr => }/ScSpecTypeOption.json (100%) rename xdr-json/{curr => }/ScSpecTypeResult.json (100%) rename xdr-json/{curr => }/ScSpecTypeTuple.json (100%) rename xdr-json/{curr => }/ScSpecTypeUdt.json (100%) rename xdr-json/{curr => }/ScSpecTypeVec.json (100%) rename xdr-json/{curr => }/ScSpecUdtEnumCaseV0.json (100%) rename xdr-json/{curr => }/ScSpecUdtEnumV0.json (100%) rename xdr-json/{curr => }/ScSpecUdtErrorEnumCaseV0.json (100%) rename xdr-json/{curr => }/ScSpecUdtErrorEnumV0.json (100%) rename xdr-json/{curr => }/ScSpecUdtStructFieldV0.json (100%) rename xdr-json/{curr => }/ScSpecUdtStructV0.json (100%) rename xdr-json/{curr => }/ScSpecUdtUnionCaseTupleV0.json (100%) rename xdr-json/{curr => }/ScSpecUdtUnionCaseV0.json (100%) rename xdr-json/{curr => }/ScSpecUdtUnionCaseV0Kind.json (100%) rename xdr-json/{curr => }/ScSpecUdtUnionCaseVoidV0.json (100%) rename xdr-json/{curr => }/ScSpecUdtUnionV0.json (100%) rename xdr-json/{curr => }/ScString.json (100%) rename xdr-json/{curr => }/ScSymbol.json (100%) rename xdr-json/{curr => }/ScVal.json (100%) rename xdr-json/{curr => }/ScValType.json (100%) rename xdr-json/{curr => }/ScVec.json (100%) rename xdr-json/{curr => }/ScpBallot.json (100%) rename xdr-json/{curr => }/ScpEnvelope.json (100%) rename xdr-json/{curr => }/ScpHistoryEntry.json (100%) rename xdr-json/{curr => }/ScpHistoryEntryV0.json (100%) rename xdr-json/{curr => }/ScpNomination.json (100%) rename xdr-json/{curr => }/ScpQuorumSet.json (100%) rename xdr-json/{curr => }/ScpStatement.json (100%) rename xdr-json/{curr => }/ScpStatementConfirm.json (100%) rename xdr-json/{curr => }/ScpStatementExternalize.json (100%) rename xdr-json/{curr => }/ScpStatementPledges.json (100%) rename xdr-json/{curr => }/ScpStatementPrepare.json (100%) rename xdr-json/{curr => }/ScpStatementType.json (100%) rename xdr-json/{curr => }/SendMore.json (100%) rename xdr-json/{curr => }/SendMoreExtended.json (100%) rename xdr-json/{curr => }/SequenceNumber.json (100%) rename xdr-json/{curr => }/SerializedBinaryFuseFilter.json (100%) rename xdr-json/{curr => }/SetOptionsOp.json (100%) rename xdr-json/{curr => }/SetOptionsResult.json (100%) rename xdr-json/{curr => }/SetOptionsResultCode.json (100%) rename xdr-json/{curr => }/SetTrustLineFlagsOp.json (100%) rename xdr-json/{curr => }/SetTrustLineFlagsResult.json (100%) rename xdr-json/{curr => }/SetTrustLineFlagsResultCode.json (100%) rename xdr-json/{curr => }/ShortHashSeed.json (100%) rename xdr-json/{curr => }/Signature.json (100%) rename xdr-json/{curr => }/SignatureHint.json (100%) rename xdr-json/{curr => }/SignedTimeSlicedSurveyRequestMessage.json (100%) rename xdr-json/{curr => }/SignedTimeSlicedSurveyResponseMessage.json (100%) rename xdr-json/{curr => }/SignedTimeSlicedSurveyStartCollectingMessage.json (100%) rename xdr-json/{curr => }/SignedTimeSlicedSurveyStopCollectingMessage.json (100%) rename xdr-json/{curr => }/Signer.json (100%) rename xdr-json/{curr => }/SignerKey.json (100%) rename xdr-json/{curr => }/SignerKeyEd25519SignedPayload.json (100%) rename xdr-json/{curr => }/SignerKeyType.json (100%) rename xdr-json/{curr => }/SimplePaymentResult.json (100%) rename xdr-json/{curr => }/SorobanAddressCredentials.json (100%) rename xdr-json/{curr => }/SorobanAuthorizationEntries.json (100%) rename xdr-json/{curr => }/SorobanAuthorizationEntry.json (100%) rename xdr-json/{curr => }/SorobanAuthorizedFunction.json (100%) rename xdr-json/{curr => }/SorobanAuthorizedFunctionType.json (100%) rename xdr-json/{curr => }/SorobanAuthorizedInvocation.json (100%) rename xdr-json/{curr => }/SorobanCredentials.json (100%) rename xdr-json/{curr => }/SorobanCredentialsType.json (100%) rename xdr-json/{curr => }/SorobanResources.json (100%) rename xdr-json/{curr => }/SorobanResourcesExtV0.json (100%) rename xdr-json/{curr => }/SorobanTransactionData.json (100%) rename xdr-json/{curr => }/SorobanTransactionDataExt.json (100%) rename xdr-json/{curr => }/SorobanTransactionMeta.json (100%) rename xdr-json/{curr => }/SorobanTransactionMetaExt.json (100%) rename xdr-json/{curr => }/SorobanTransactionMetaExtV1.json (100%) rename xdr-json/{curr => }/SorobanTransactionMetaV2.json (100%) rename xdr-json/{curr => }/SponsorshipDescriptor.json (100%) rename xdr-json/{curr => }/StateArchivalSettings.json (100%) rename xdr-json/{curr => }/StellarMessage.json (100%) rename xdr-json/{curr => }/StellarValue.json (100%) rename xdr-json/{curr => }/StellarValueExt.json (100%) rename xdr-json/{curr => }/StellarValueType.json (100%) rename xdr-json/{curr => }/StoredDebugTransactionSet.json (100%) rename xdr-json/{curr => }/StoredTransactionSet.json (100%) rename xdr-json/{curr => }/String32.json (100%) rename xdr-json/{curr => }/String64.json (100%) rename xdr-json/{curr => }/SurveyMessageCommandType.json (100%) rename xdr-json/{curr => }/SurveyMessageResponseType.json (100%) rename xdr-json/{curr => }/SurveyRequestMessage.json (100%) rename xdr-json/{curr => }/SurveyResponseBody.json (100%) rename xdr-json/{curr => }/SurveyResponseMessage.json (100%) rename xdr-json/{curr => }/ThresholdIndexes.json (100%) rename xdr-json/{curr => }/Thresholds.json (100%) rename xdr-json/{curr => }/TimeBounds.json (100%) rename xdr-json/{curr => }/TimePoint.json (100%) rename xdr-json/{curr => }/TimeSlicedNodeData.json (100%) rename xdr-json/{curr => }/TimeSlicedPeerData.json (100%) rename xdr-json/{curr => }/TimeSlicedPeerDataList.json (100%) rename xdr-json/{curr => }/TimeSlicedSurveyRequestMessage.json (100%) rename xdr-json/{curr => }/TimeSlicedSurveyResponseMessage.json (100%) rename xdr-json/{curr => }/TimeSlicedSurveyStartCollectingMessage.json (100%) rename xdr-json/{curr => }/TimeSlicedSurveyStopCollectingMessage.json (100%) rename xdr-json/{curr => }/TopologyResponseBodyV2.json (100%) rename xdr-json/{curr => }/Transaction.json (100%) rename xdr-json/{curr => }/TransactionEnvelope.json (100%) rename xdr-json/{curr => }/TransactionEvent.json (100%) rename xdr-json/{curr => }/TransactionEventStage.json (100%) rename xdr-json/{curr => }/TransactionExt.json (100%) rename xdr-json/{curr => }/TransactionHistoryEntry.json (100%) rename xdr-json/{curr => }/TransactionHistoryEntryExt.json (100%) rename xdr-json/{curr => }/TransactionHistoryResultEntry.json (100%) rename xdr-json/{curr => }/TransactionHistoryResultEntryExt.json (100%) rename xdr-json/{curr => }/TransactionMeta.json (100%) rename xdr-json/{curr => }/TransactionMetaV1.json (100%) rename xdr-json/{curr => }/TransactionMetaV2.json (100%) rename xdr-json/{curr => }/TransactionMetaV3.json (100%) rename xdr-json/{curr => }/TransactionMetaV4.json (100%) rename xdr-json/{curr => }/TransactionPhase.json (100%) rename xdr-json/{curr => }/TransactionResult.json (100%) rename xdr-json/{curr => }/TransactionResultCode.json (100%) rename xdr-json/{curr => }/TransactionResultExt.json (100%) rename xdr-json/{curr => }/TransactionResultMeta.json (100%) rename xdr-json/{curr => }/TransactionResultMetaV1.json (100%) rename xdr-json/{curr => }/TransactionResultPair.json (100%) rename xdr-json/{curr => }/TransactionResultResult.json (100%) rename xdr-json/{curr => }/TransactionResultSet.json (100%) rename xdr-json/{curr => }/TransactionSet.json (100%) rename xdr-json/{curr => }/TransactionSetV1.json (100%) rename xdr-json/{curr => }/TransactionSignaturePayload.json (100%) rename xdr-json/{curr => }/TransactionSignaturePayloadTaggedTransaction.json (100%) rename xdr-json/{curr => }/TransactionV0.json (100%) rename xdr-json/{curr => }/TransactionV0Envelope.json (100%) rename xdr-json/{curr => }/TransactionV0Ext.json (100%) rename xdr-json/{curr => }/TransactionV1Envelope.json (100%) rename xdr-json/{curr => }/TrustLineAsset.json (100%) rename xdr-json/{curr => }/TrustLineEntry.json (100%) rename xdr-json/{curr => }/TrustLineEntryExt.json (100%) rename xdr-json/{curr => }/TrustLineEntryExtensionV2.json (100%) rename xdr-json/{curr => }/TrustLineEntryExtensionV2Ext.json (100%) rename xdr-json/{curr => }/TrustLineEntryV1.json (100%) rename xdr-json/{curr => }/TrustLineEntryV1Ext.json (100%) rename xdr-json/{curr => }/TrustLineFlags.json (100%) rename xdr-json/{curr => }/TtlEntry.json (100%) rename xdr-json/{curr => }/TxAdvertVector.json (100%) rename xdr-json/{curr => }/TxDemandVector.json (100%) rename xdr-json/{curr => }/TxSetComponent.json (100%) rename xdr-json/{curr => }/TxSetComponentTxsMaybeDiscountedFee.json (100%) rename xdr-json/{curr => }/TxSetComponentType.json (100%) rename xdr-json/{curr => }/UInt128Parts.json (100%) rename xdr-json/{curr => }/UInt256Parts.json (100%) rename xdr-json/{curr => }/Uint256.json (100%) rename xdr-json/{curr => }/Uint32.json (100%) rename xdr-json/{curr => }/Uint64.json (100%) rename xdr-json/{curr => }/UpgradeEntryMeta.json (100%) rename xdr-json/{curr => }/UpgradeType.json (100%) rename xdr-json/{curr => }/Value.json (100%) delete mode 100644 xdr-json/next/AccountEntry.json delete mode 100644 xdr-json/next/AccountEntryExt.json delete mode 100644 xdr-json/next/AccountEntryExtensionV1.json delete mode 100644 xdr-json/next/AccountEntryExtensionV1Ext.json delete mode 100644 xdr-json/next/AccountEntryExtensionV2.json delete mode 100644 xdr-json/next/AccountEntryExtensionV2Ext.json delete mode 100644 xdr-json/next/AccountEntryExtensionV3.json delete mode 100644 xdr-json/next/AccountFlags.json delete mode 100644 xdr-json/next/AccountId.json delete mode 100644 xdr-json/next/AccountMergeResult.json delete mode 100644 xdr-json/next/AccountMergeResultCode.json delete mode 100644 xdr-json/next/AllowTrustOp.json delete mode 100644 xdr-json/next/AllowTrustResult.json delete mode 100644 xdr-json/next/AllowTrustResultCode.json delete mode 100644 xdr-json/next/AlphaNum12.json delete mode 100644 xdr-json/next/AlphaNum4.json delete mode 100644 xdr-json/next/Asset.json delete mode 100644 xdr-json/next/AssetCode.json delete mode 100644 xdr-json/next/AssetCode12.json delete mode 100644 xdr-json/next/AssetCode4.json delete mode 100644 xdr-json/next/AssetType.json delete mode 100644 xdr-json/next/Auth.json delete mode 100644 xdr-json/next/AuthCert.json delete mode 100644 xdr-json/next/AuthenticatedMessage.json delete mode 100644 xdr-json/next/AuthenticatedMessageV0.json delete mode 100644 xdr-json/next/BeginSponsoringFutureReservesOp.json delete mode 100644 xdr-json/next/BeginSponsoringFutureReservesResult.json delete mode 100644 xdr-json/next/BeginSponsoringFutureReservesResultCode.json delete mode 100644 xdr-json/next/BinaryFuseFilterType.json delete mode 100644 xdr-json/next/BucketEntry.json delete mode 100644 xdr-json/next/BucketEntryType.json delete mode 100644 xdr-json/next/BucketListType.json delete mode 100644 xdr-json/next/BucketMetadata.json delete mode 100644 xdr-json/next/BucketMetadataExt.json delete mode 100644 xdr-json/next/BumpSequenceOp.json delete mode 100644 xdr-json/next/BumpSequenceResult.json delete mode 100644 xdr-json/next/BumpSequenceResultCode.json delete mode 100644 xdr-json/next/ChangeTrustAsset.json delete mode 100644 xdr-json/next/ChangeTrustOp.json delete mode 100644 xdr-json/next/ChangeTrustResult.json delete mode 100644 xdr-json/next/ChangeTrustResultCode.json delete mode 100644 xdr-json/next/ClaimAtom.json delete mode 100644 xdr-json/next/ClaimAtomType.json delete mode 100644 xdr-json/next/ClaimClaimableBalanceOp.json delete mode 100644 xdr-json/next/ClaimClaimableBalanceResult.json delete mode 100644 xdr-json/next/ClaimClaimableBalanceResultCode.json delete mode 100644 xdr-json/next/ClaimLiquidityAtom.json delete mode 100644 xdr-json/next/ClaimOfferAtom.json delete mode 100644 xdr-json/next/ClaimOfferAtomV0.json delete mode 100644 xdr-json/next/ClaimPredicate.json delete mode 100644 xdr-json/next/ClaimPredicateType.json delete mode 100644 xdr-json/next/ClaimableBalanceEntry.json delete mode 100644 xdr-json/next/ClaimableBalanceEntryExt.json delete mode 100644 xdr-json/next/ClaimableBalanceEntryExtensionV1.json delete mode 100644 xdr-json/next/ClaimableBalanceEntryExtensionV1Ext.json delete mode 100644 xdr-json/next/ClaimableBalanceFlags.json delete mode 100644 xdr-json/next/ClaimableBalanceId.json delete mode 100644 xdr-json/next/ClaimableBalanceIdType.json delete mode 100644 xdr-json/next/Claimant.json delete mode 100644 xdr-json/next/ClaimantType.json delete mode 100644 xdr-json/next/ClaimantV0.json delete mode 100644 xdr-json/next/ClawbackClaimableBalanceOp.json delete mode 100644 xdr-json/next/ClawbackClaimableBalanceResult.json delete mode 100644 xdr-json/next/ClawbackClaimableBalanceResultCode.json delete mode 100644 xdr-json/next/ClawbackOp.json delete mode 100644 xdr-json/next/ClawbackResult.json delete mode 100644 xdr-json/next/ClawbackResultCode.json delete mode 100644 xdr-json/next/ConfigSettingContractBandwidthV0.json delete mode 100644 xdr-json/next/ConfigSettingContractComputeV0.json delete mode 100644 xdr-json/next/ConfigSettingContractEventsV0.json delete mode 100644 xdr-json/next/ConfigSettingContractExecutionLanesV0.json delete mode 100644 xdr-json/next/ConfigSettingContractHistoricalDataV0.json delete mode 100644 xdr-json/next/ConfigSettingContractLedgerCostExtV0.json delete mode 100644 xdr-json/next/ConfigSettingContractLedgerCostV0.json delete mode 100644 xdr-json/next/ConfigSettingContractParallelComputeV0.json delete mode 100644 xdr-json/next/ConfigSettingEntry.json delete mode 100644 xdr-json/next/ConfigSettingId.json delete mode 100644 xdr-json/next/ConfigSettingScpTiming.json delete mode 100644 xdr-json/next/ConfigUpgradeSet.json delete mode 100644 xdr-json/next/ConfigUpgradeSetKey.json delete mode 100644 xdr-json/next/ContractCodeCostInputs.json delete mode 100644 xdr-json/next/ContractCodeEntry.json delete mode 100644 xdr-json/next/ContractCodeEntryExt.json delete mode 100644 xdr-json/next/ContractCodeEntryV1.json delete mode 100644 xdr-json/next/ContractCostParamEntry.json delete mode 100644 xdr-json/next/ContractCostParams.json delete mode 100644 xdr-json/next/ContractCostType.json delete mode 100644 xdr-json/next/ContractDataDurability.json delete mode 100644 xdr-json/next/ContractDataEntry.json delete mode 100644 xdr-json/next/ContractEvent.json delete mode 100644 xdr-json/next/ContractEventBody.json delete mode 100644 xdr-json/next/ContractEventType.json delete mode 100644 xdr-json/next/ContractEventV0.json delete mode 100644 xdr-json/next/ContractExecutable.json delete mode 100644 xdr-json/next/ContractExecutableType.json delete mode 100644 xdr-json/next/ContractId.json delete mode 100644 xdr-json/next/ContractIdPreimage.json delete mode 100644 xdr-json/next/ContractIdPreimageFromAddress.json delete mode 100644 xdr-json/next/ContractIdPreimageType.json delete mode 100644 xdr-json/next/CreateAccountOp.json delete mode 100644 xdr-json/next/CreateAccountResult.json delete mode 100644 xdr-json/next/CreateAccountResultCode.json delete mode 100644 xdr-json/next/CreateClaimableBalanceOp.json delete mode 100644 xdr-json/next/CreateClaimableBalanceResult.json delete mode 100644 xdr-json/next/CreateClaimableBalanceResultCode.json delete mode 100644 xdr-json/next/CreateContractArgs.json delete mode 100644 xdr-json/next/CreateContractArgsV2.json delete mode 100644 xdr-json/next/CreatePassiveSellOfferOp.json delete mode 100644 xdr-json/next/CryptoKeyType.json delete mode 100644 xdr-json/next/Curve25519Public.json delete mode 100644 xdr-json/next/Curve25519Secret.json delete mode 100644 xdr-json/next/DataEntry.json delete mode 100644 xdr-json/next/DataEntryExt.json delete mode 100644 xdr-json/next/DataValue.json delete mode 100644 xdr-json/next/DecoratedSignature.json delete mode 100644 xdr-json/next/DependentTxCluster.json delete mode 100644 xdr-json/next/DiagnosticEvent.json delete mode 100644 xdr-json/next/DontHave.json delete mode 100644 xdr-json/next/Duration.json delete mode 100644 xdr-json/next/EncodedLedgerKey.json delete mode 100644 xdr-json/next/EncryptedBody.json delete mode 100644 xdr-json/next/EndSponsoringFutureReservesResult.json delete mode 100644 xdr-json/next/EndSponsoringFutureReservesResultCode.json delete mode 100644 xdr-json/next/EnvelopeType.json delete mode 100644 xdr-json/next/ErrorCode.json delete mode 100644 xdr-json/next/EvictionIterator.json delete mode 100644 xdr-json/next/ExtendFootprintTtlOp.json delete mode 100644 xdr-json/next/ExtendFootprintTtlResult.json delete mode 100644 xdr-json/next/ExtendFootprintTtlResultCode.json delete mode 100644 xdr-json/next/ExtensionPoint.json delete mode 100644 xdr-json/next/FeeBumpTransaction.json delete mode 100644 xdr-json/next/FeeBumpTransactionEnvelope.json delete mode 100644 xdr-json/next/FeeBumpTransactionExt.json delete mode 100644 xdr-json/next/FeeBumpTransactionInnerTx.json delete mode 100644 xdr-json/next/FloodAdvert.json delete mode 100644 xdr-json/next/FloodDemand.json delete mode 100644 xdr-json/next/FreezeBypassTxs.json delete mode 100644 xdr-json/next/FreezeBypassTxsDelta.json delete mode 100644 xdr-json/next/FrozenLedgerKeys.json delete mode 100644 xdr-json/next/FrozenLedgerKeysDelta.json delete mode 100644 xdr-json/next/GeneralizedTransactionSet.json delete mode 100644 xdr-json/next/Hash.json delete mode 100644 xdr-json/next/HashIdPreimage.json delete mode 100644 xdr-json/next/HashIdPreimageContractId.json delete mode 100644 xdr-json/next/HashIdPreimageOperationId.json delete mode 100644 xdr-json/next/HashIdPreimageRevokeId.json delete mode 100644 xdr-json/next/HashIdPreimageSorobanAuthorization.json delete mode 100644 xdr-json/next/Hello.json delete mode 100644 xdr-json/next/HmacSha256Key.json delete mode 100644 xdr-json/next/HmacSha256Mac.json delete mode 100644 xdr-json/next/HostFunction.json delete mode 100644 xdr-json/next/HostFunctionType.json delete mode 100644 xdr-json/next/HotArchiveBucketEntry.json delete mode 100644 xdr-json/next/HotArchiveBucketEntryType.json delete mode 100644 xdr-json/next/InflationPayout.json delete mode 100644 xdr-json/next/InflationResult.json delete mode 100644 xdr-json/next/InflationResultCode.json delete mode 100644 xdr-json/next/InnerTransactionResult.json delete mode 100644 xdr-json/next/InnerTransactionResultExt.json delete mode 100644 xdr-json/next/InnerTransactionResultPair.json delete mode 100644 xdr-json/next/InnerTransactionResultResult.json delete mode 100644 xdr-json/next/Int128Parts.json delete mode 100644 xdr-json/next/Int256Parts.json delete mode 100644 xdr-json/next/Int32.json delete mode 100644 xdr-json/next/Int64.json delete mode 100644 xdr-json/next/InvokeContractArgs.json delete mode 100644 xdr-json/next/InvokeHostFunctionOp.json delete mode 100644 xdr-json/next/InvokeHostFunctionResult.json delete mode 100644 xdr-json/next/InvokeHostFunctionResultCode.json delete mode 100644 xdr-json/next/InvokeHostFunctionSuccessPreImage.json delete mode 100644 xdr-json/next/IpAddrType.json delete mode 100644 xdr-json/next/LedgerBounds.json delete mode 100644 xdr-json/next/LedgerCloseMeta.json delete mode 100644 xdr-json/next/LedgerCloseMetaBatch.json delete mode 100644 xdr-json/next/LedgerCloseMetaExt.json delete mode 100644 xdr-json/next/LedgerCloseMetaExtV1.json delete mode 100644 xdr-json/next/LedgerCloseMetaV0.json delete mode 100644 xdr-json/next/LedgerCloseMetaV1.json delete mode 100644 xdr-json/next/LedgerCloseMetaV2.json delete mode 100644 xdr-json/next/LedgerCloseValueSignature.json delete mode 100644 xdr-json/next/LedgerEntry.json delete mode 100644 xdr-json/next/LedgerEntryChange.json delete mode 100644 xdr-json/next/LedgerEntryChangeType.json delete mode 100644 xdr-json/next/LedgerEntryChanges.json delete mode 100644 xdr-json/next/LedgerEntryData.json delete mode 100644 xdr-json/next/LedgerEntryExt.json delete mode 100644 xdr-json/next/LedgerEntryExtensionV1.json delete mode 100644 xdr-json/next/LedgerEntryExtensionV1Ext.json delete mode 100644 xdr-json/next/LedgerEntryType.json delete mode 100644 xdr-json/next/LedgerFootprint.json delete mode 100644 xdr-json/next/LedgerHeader.json delete mode 100644 xdr-json/next/LedgerHeaderExt.json delete mode 100644 xdr-json/next/LedgerHeaderExtensionV1.json delete mode 100644 xdr-json/next/LedgerHeaderExtensionV1Ext.json delete mode 100644 xdr-json/next/LedgerHeaderFlags.json delete mode 100644 xdr-json/next/LedgerHeaderHistoryEntry.json delete mode 100644 xdr-json/next/LedgerHeaderHistoryEntryExt.json delete mode 100644 xdr-json/next/LedgerKey.json delete mode 100644 xdr-json/next/LedgerKeyAccount.json delete mode 100644 xdr-json/next/LedgerKeyClaimableBalance.json delete mode 100644 xdr-json/next/LedgerKeyConfigSetting.json delete mode 100644 xdr-json/next/LedgerKeyContractCode.json delete mode 100644 xdr-json/next/LedgerKeyContractData.json delete mode 100644 xdr-json/next/LedgerKeyData.json delete mode 100644 xdr-json/next/LedgerKeyLiquidityPool.json delete mode 100644 xdr-json/next/LedgerKeyOffer.json delete mode 100644 xdr-json/next/LedgerKeyTrustLine.json delete mode 100644 xdr-json/next/LedgerKeyTtl.json delete mode 100644 xdr-json/next/LedgerScpMessages.json delete mode 100644 xdr-json/next/LedgerUpgrade.json delete mode 100644 xdr-json/next/LedgerUpgradeType.json delete mode 100644 xdr-json/next/Liabilities.json delete mode 100644 xdr-json/next/LiquidityPoolConstantProductParameters.json delete mode 100644 xdr-json/next/LiquidityPoolDepositOp.json delete mode 100644 xdr-json/next/LiquidityPoolDepositResult.json delete mode 100644 xdr-json/next/LiquidityPoolDepositResultCode.json delete mode 100644 xdr-json/next/LiquidityPoolEntry.json delete mode 100644 xdr-json/next/LiquidityPoolEntryBody.json delete mode 100644 xdr-json/next/LiquidityPoolEntryConstantProduct.json delete mode 100644 xdr-json/next/LiquidityPoolParameters.json delete mode 100644 xdr-json/next/LiquidityPoolType.json delete mode 100644 xdr-json/next/LiquidityPoolWithdrawOp.json delete mode 100644 xdr-json/next/LiquidityPoolWithdrawResult.json delete mode 100644 xdr-json/next/LiquidityPoolWithdrawResultCode.json delete mode 100644 xdr-json/next/ManageBuyOfferOp.json delete mode 100644 xdr-json/next/ManageBuyOfferResult.json delete mode 100644 xdr-json/next/ManageBuyOfferResultCode.json delete mode 100644 xdr-json/next/ManageDataOp.json delete mode 100644 xdr-json/next/ManageDataResult.json delete mode 100644 xdr-json/next/ManageDataResultCode.json delete mode 100644 xdr-json/next/ManageOfferEffect.json delete mode 100644 xdr-json/next/ManageOfferSuccessResult.json delete mode 100644 xdr-json/next/ManageOfferSuccessResultOffer.json delete mode 100644 xdr-json/next/ManageSellOfferOp.json delete mode 100644 xdr-json/next/ManageSellOfferResult.json delete mode 100644 xdr-json/next/ManageSellOfferResultCode.json delete mode 100644 xdr-json/next/Memo.json delete mode 100644 xdr-json/next/MemoType.json delete mode 100644 xdr-json/next/MessageType.json delete mode 100644 xdr-json/next/MuxedAccount.json delete mode 100644 xdr-json/next/MuxedAccountMed25519.json delete mode 100644 xdr-json/next/MuxedEd25519Account.json delete mode 100644 xdr-json/next/NodeId.json delete mode 100644 xdr-json/next/OfferEntry.json delete mode 100644 xdr-json/next/OfferEntryExt.json delete mode 100644 xdr-json/next/OfferEntryFlags.json delete mode 100644 xdr-json/next/Operation.json delete mode 100644 xdr-json/next/OperationBody.json delete mode 100644 xdr-json/next/OperationMeta.json delete mode 100644 xdr-json/next/OperationMetaV2.json delete mode 100644 xdr-json/next/OperationResult.json delete mode 100644 xdr-json/next/OperationResultCode.json delete mode 100644 xdr-json/next/OperationResultTr.json delete mode 100644 xdr-json/next/OperationType.json delete mode 100644 xdr-json/next/ParallelTxExecutionStage.json delete mode 100644 xdr-json/next/ParallelTxsComponent.json delete mode 100644 xdr-json/next/PathPaymentStrictReceiveOp.json delete mode 100644 xdr-json/next/PathPaymentStrictReceiveResult.json delete mode 100644 xdr-json/next/PathPaymentStrictReceiveResultCode.json delete mode 100644 xdr-json/next/PathPaymentStrictReceiveResultSuccess.json delete mode 100644 xdr-json/next/PathPaymentStrictSendOp.json delete mode 100644 xdr-json/next/PathPaymentStrictSendResult.json delete mode 100644 xdr-json/next/PathPaymentStrictSendResultCode.json delete mode 100644 xdr-json/next/PathPaymentStrictSendResultSuccess.json delete mode 100644 xdr-json/next/PaymentOp.json delete mode 100644 xdr-json/next/PaymentResult.json delete mode 100644 xdr-json/next/PaymentResultCode.json delete mode 100644 xdr-json/next/PeerAddress.json delete mode 100644 xdr-json/next/PeerAddressIp.json delete mode 100644 xdr-json/next/PeerStats.json delete mode 100644 xdr-json/next/PersistedScpState.json delete mode 100644 xdr-json/next/PersistedScpStateV0.json delete mode 100644 xdr-json/next/PersistedScpStateV1.json delete mode 100644 xdr-json/next/PoolId.json delete mode 100644 xdr-json/next/PreconditionType.json delete mode 100644 xdr-json/next/Preconditions.json delete mode 100644 xdr-json/next/PreconditionsV2.json delete mode 100644 xdr-json/next/Price.json delete mode 100644 xdr-json/next/PublicKey.json delete mode 100644 xdr-json/next/PublicKeyType.json delete mode 100644 xdr-json/next/RestoreFootprintOp.json delete mode 100644 xdr-json/next/RestoreFootprintResult.json delete mode 100644 xdr-json/next/RestoreFootprintResultCode.json delete mode 100644 xdr-json/next/RevokeSponsorshipOp.json delete mode 100644 xdr-json/next/RevokeSponsorshipOpSigner.json delete mode 100644 xdr-json/next/RevokeSponsorshipResult.json delete mode 100644 xdr-json/next/RevokeSponsorshipResultCode.json delete mode 100644 xdr-json/next/RevokeSponsorshipType.json delete mode 100644 xdr-json/next/SError.json delete mode 100644 xdr-json/next/ScAddress.json delete mode 100644 xdr-json/next/ScAddressType.json delete mode 100644 xdr-json/next/ScBytes.json delete mode 100644 xdr-json/next/ScContractInstance.json delete mode 100644 xdr-json/next/ScEnvMetaEntry.json delete mode 100644 xdr-json/next/ScEnvMetaEntryInterfaceVersion.json delete mode 100644 xdr-json/next/ScEnvMetaKind.json delete mode 100644 xdr-json/next/ScError.json delete mode 100644 xdr-json/next/ScErrorCode.json delete mode 100644 xdr-json/next/ScErrorType.json delete mode 100644 xdr-json/next/ScMap.json delete mode 100644 xdr-json/next/ScMapEntry.json delete mode 100644 xdr-json/next/ScMetaEntry.json delete mode 100644 xdr-json/next/ScMetaKind.json delete mode 100644 xdr-json/next/ScMetaV0.json delete mode 100644 xdr-json/next/ScNonceKey.json delete mode 100644 xdr-json/next/ScSpecEntry.json delete mode 100644 xdr-json/next/ScSpecEntryKind.json delete mode 100644 xdr-json/next/ScSpecEventDataFormat.json delete mode 100644 xdr-json/next/ScSpecEventParamLocationV0.json delete mode 100644 xdr-json/next/ScSpecEventParamV0.json delete mode 100644 xdr-json/next/ScSpecEventV0.json delete mode 100644 xdr-json/next/ScSpecFunctionInputV0.json delete mode 100644 xdr-json/next/ScSpecFunctionV0.json delete mode 100644 xdr-json/next/ScSpecType.json delete mode 100644 xdr-json/next/ScSpecTypeBytesN.json delete mode 100644 xdr-json/next/ScSpecTypeDef.json delete mode 100644 xdr-json/next/ScSpecTypeMap.json delete mode 100644 xdr-json/next/ScSpecTypeOption.json delete mode 100644 xdr-json/next/ScSpecTypeResult.json delete mode 100644 xdr-json/next/ScSpecTypeTuple.json delete mode 100644 xdr-json/next/ScSpecTypeUdt.json delete mode 100644 xdr-json/next/ScSpecTypeVec.json delete mode 100644 xdr-json/next/ScSpecUdtEnumCaseV0.json delete mode 100644 xdr-json/next/ScSpecUdtEnumV0.json delete mode 100644 xdr-json/next/ScSpecUdtErrorEnumCaseV0.json delete mode 100644 xdr-json/next/ScSpecUdtErrorEnumV0.json delete mode 100644 xdr-json/next/ScSpecUdtStructFieldV0.json delete mode 100644 xdr-json/next/ScSpecUdtStructV0.json delete mode 100644 xdr-json/next/ScSpecUdtUnionCaseTupleV0.json delete mode 100644 xdr-json/next/ScSpecUdtUnionCaseV0.json delete mode 100644 xdr-json/next/ScSpecUdtUnionCaseV0Kind.json delete mode 100644 xdr-json/next/ScSpecUdtUnionCaseVoidV0.json delete mode 100644 xdr-json/next/ScSpecUdtUnionV0.json delete mode 100644 xdr-json/next/ScString.json delete mode 100644 xdr-json/next/ScSymbol.json delete mode 100644 xdr-json/next/ScVal.json delete mode 100644 xdr-json/next/ScValType.json delete mode 100644 xdr-json/next/ScVec.json delete mode 100644 xdr-json/next/ScpBallot.json delete mode 100644 xdr-json/next/ScpEnvelope.json delete mode 100644 xdr-json/next/ScpHistoryEntry.json delete mode 100644 xdr-json/next/ScpHistoryEntryV0.json delete mode 100644 xdr-json/next/ScpNomination.json delete mode 100644 xdr-json/next/ScpQuorumSet.json delete mode 100644 xdr-json/next/ScpStatement.json delete mode 100644 xdr-json/next/ScpStatementConfirm.json delete mode 100644 xdr-json/next/ScpStatementExternalize.json delete mode 100644 xdr-json/next/ScpStatementPledges.json delete mode 100644 xdr-json/next/ScpStatementPrepare.json delete mode 100644 xdr-json/next/ScpStatementType.json delete mode 100644 xdr-json/next/SendMore.json delete mode 100644 xdr-json/next/SendMoreExtended.json delete mode 100644 xdr-json/next/SequenceNumber.json delete mode 100644 xdr-json/next/SerializedBinaryFuseFilter.json delete mode 100644 xdr-json/next/SetOptionsOp.json delete mode 100644 xdr-json/next/SetOptionsResult.json delete mode 100644 xdr-json/next/SetOptionsResultCode.json delete mode 100644 xdr-json/next/SetTrustLineFlagsOp.json delete mode 100644 xdr-json/next/SetTrustLineFlagsResult.json delete mode 100644 xdr-json/next/SetTrustLineFlagsResultCode.json delete mode 100644 xdr-json/next/ShortHashSeed.json delete mode 100644 xdr-json/next/Signature.json delete mode 100644 xdr-json/next/SignatureHint.json delete mode 100644 xdr-json/next/SignedTimeSlicedSurveyRequestMessage.json delete mode 100644 xdr-json/next/SignedTimeSlicedSurveyResponseMessage.json delete mode 100644 xdr-json/next/SignedTimeSlicedSurveyStartCollectingMessage.json delete mode 100644 xdr-json/next/SignedTimeSlicedSurveyStopCollectingMessage.json delete mode 100644 xdr-json/next/Signer.json delete mode 100644 xdr-json/next/SignerKey.json delete mode 100644 xdr-json/next/SignerKeyEd25519SignedPayload.json delete mode 100644 xdr-json/next/SignerKeyType.json delete mode 100644 xdr-json/next/SimplePaymentResult.json delete mode 100644 xdr-json/next/SorobanAddressCredentials.json delete mode 100644 xdr-json/next/SorobanAuthorizationEntries.json delete mode 100644 xdr-json/next/SorobanAuthorizationEntry.json delete mode 100644 xdr-json/next/SorobanAuthorizedFunction.json delete mode 100644 xdr-json/next/SorobanAuthorizedFunctionType.json delete mode 100644 xdr-json/next/SorobanAuthorizedInvocation.json delete mode 100644 xdr-json/next/SorobanCredentials.json delete mode 100644 xdr-json/next/SorobanCredentialsType.json delete mode 100644 xdr-json/next/SorobanResources.json delete mode 100644 xdr-json/next/SorobanResourcesExtV0.json delete mode 100644 xdr-json/next/SorobanTransactionData.json delete mode 100644 xdr-json/next/SorobanTransactionDataExt.json delete mode 100644 xdr-json/next/SorobanTransactionMeta.json delete mode 100644 xdr-json/next/SorobanTransactionMetaExt.json delete mode 100644 xdr-json/next/SorobanTransactionMetaExtV1.json delete mode 100644 xdr-json/next/SorobanTransactionMetaV2.json delete mode 100644 xdr-json/next/SponsorshipDescriptor.json delete mode 100644 xdr-json/next/StateArchivalSettings.json delete mode 100644 xdr-json/next/StellarMessage.json delete mode 100644 xdr-json/next/StellarValue.json delete mode 100644 xdr-json/next/StellarValueExt.json delete mode 100644 xdr-json/next/StellarValueType.json delete mode 100644 xdr-json/next/StoredDebugTransactionSet.json delete mode 100644 xdr-json/next/StoredTransactionSet.json delete mode 100644 xdr-json/next/String32.json delete mode 100644 xdr-json/next/String64.json delete mode 100644 xdr-json/next/SurveyMessageCommandType.json delete mode 100644 xdr-json/next/SurveyMessageResponseType.json delete mode 100644 xdr-json/next/SurveyRequestMessage.json delete mode 100644 xdr-json/next/SurveyResponseBody.json delete mode 100644 xdr-json/next/SurveyResponseMessage.json delete mode 100644 xdr-json/next/ThresholdIndexes.json delete mode 100644 xdr-json/next/Thresholds.json delete mode 100644 xdr-json/next/TimeBounds.json delete mode 100644 xdr-json/next/TimePoint.json delete mode 100644 xdr-json/next/TimeSlicedNodeData.json delete mode 100644 xdr-json/next/TimeSlicedPeerData.json delete mode 100644 xdr-json/next/TimeSlicedPeerDataList.json delete mode 100644 xdr-json/next/TimeSlicedSurveyRequestMessage.json delete mode 100644 xdr-json/next/TimeSlicedSurveyResponseMessage.json delete mode 100644 xdr-json/next/TimeSlicedSurveyStartCollectingMessage.json delete mode 100644 xdr-json/next/TimeSlicedSurveyStopCollectingMessage.json delete mode 100644 xdr-json/next/TopologyResponseBodyV2.json delete mode 100644 xdr-json/next/Transaction.json delete mode 100644 xdr-json/next/TransactionEnvelope.json delete mode 100644 xdr-json/next/TransactionEvent.json delete mode 100644 xdr-json/next/TransactionEventStage.json delete mode 100644 xdr-json/next/TransactionExt.json delete mode 100644 xdr-json/next/TransactionHistoryEntry.json delete mode 100644 xdr-json/next/TransactionHistoryEntryExt.json delete mode 100644 xdr-json/next/TransactionHistoryResultEntry.json delete mode 100644 xdr-json/next/TransactionHistoryResultEntryExt.json delete mode 100644 xdr-json/next/TransactionMeta.json delete mode 100644 xdr-json/next/TransactionMetaV1.json delete mode 100644 xdr-json/next/TransactionMetaV2.json delete mode 100644 xdr-json/next/TransactionMetaV3.json delete mode 100644 xdr-json/next/TransactionMetaV4.json delete mode 100644 xdr-json/next/TransactionPhase.json delete mode 100644 xdr-json/next/TransactionResult.json delete mode 100644 xdr-json/next/TransactionResultCode.json delete mode 100644 xdr-json/next/TransactionResultExt.json delete mode 100644 xdr-json/next/TransactionResultMeta.json delete mode 100644 xdr-json/next/TransactionResultMetaV1.json delete mode 100644 xdr-json/next/TransactionResultPair.json delete mode 100644 xdr-json/next/TransactionResultResult.json delete mode 100644 xdr-json/next/TransactionResultSet.json delete mode 100644 xdr-json/next/TransactionSet.json delete mode 100644 xdr-json/next/TransactionSetV1.json delete mode 100644 xdr-json/next/TransactionSignaturePayload.json delete mode 100644 xdr-json/next/TransactionSignaturePayloadTaggedTransaction.json delete mode 100644 xdr-json/next/TransactionV0.json delete mode 100644 xdr-json/next/TransactionV0Envelope.json delete mode 100644 xdr-json/next/TransactionV0Ext.json delete mode 100644 xdr-json/next/TransactionV1Envelope.json delete mode 100644 xdr-json/next/TrustLineAsset.json delete mode 100644 xdr-json/next/TrustLineEntry.json delete mode 100644 xdr-json/next/TrustLineEntryExt.json delete mode 100644 xdr-json/next/TrustLineEntryExtensionV2.json delete mode 100644 xdr-json/next/TrustLineEntryExtensionV2Ext.json delete mode 100644 xdr-json/next/TrustLineEntryV1.json delete mode 100644 xdr-json/next/TrustLineEntryV1Ext.json delete mode 100644 xdr-json/next/TrustLineFlags.json delete mode 100644 xdr-json/next/TtlEntry.json delete mode 100644 xdr-json/next/TxAdvertVector.json delete mode 100644 xdr-json/next/TxDemandVector.json delete mode 100644 xdr-json/next/TxSetComponent.json delete mode 100644 xdr-json/next/TxSetComponentTxsMaybeDiscountedFee.json delete mode 100644 xdr-json/next/TxSetComponentType.json delete mode 100644 xdr-json/next/UInt128Parts.json delete mode 100644 xdr-json/next/UInt256Parts.json delete mode 100644 xdr-json/next/Uint256.json delete mode 100644 xdr-json/next/Uint32.json delete mode 100644 xdr-json/next/Uint64.json delete mode 100644 xdr-json/next/UpgradeEntryMeta.json delete mode 100644 xdr-json/next/UpgradeType.json delete mode 100644 xdr-json/next/Value.json diff --git a/Cargo.toml b/Cargo.toml index 6afb3af8..1740d30e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,6 +44,9 @@ default = ["std"] std = ["alloc", "dep:sha2"] alloc = ["dep:hex", "dep:stellar-strkey", "escape-bytes/alloc", "dep:ethnum"] +# Features from the XDR +test_feature = [] + # Features dependent on optional dependencies. base64 = ["std", "dep:base64"] serde = ["alloc", "dep:serde", "dep:serde_with", "hex/serde"] diff --git a/xdr-json/curr/AccountEntry.json b/xdr-json/AccountEntry.json similarity index 100% rename from xdr-json/curr/AccountEntry.json rename to xdr-json/AccountEntry.json diff --git a/xdr-json/curr/AccountEntryExt.json b/xdr-json/AccountEntryExt.json similarity index 100% rename from xdr-json/curr/AccountEntryExt.json rename to xdr-json/AccountEntryExt.json diff --git a/xdr-json/curr/AccountEntryExtensionV1.json b/xdr-json/AccountEntryExtensionV1.json similarity index 100% rename from xdr-json/curr/AccountEntryExtensionV1.json rename to xdr-json/AccountEntryExtensionV1.json diff --git a/xdr-json/curr/AccountEntryExtensionV1Ext.json b/xdr-json/AccountEntryExtensionV1Ext.json similarity index 100% rename from xdr-json/curr/AccountEntryExtensionV1Ext.json rename to xdr-json/AccountEntryExtensionV1Ext.json diff --git a/xdr-json/curr/AccountEntryExtensionV2.json b/xdr-json/AccountEntryExtensionV2.json similarity index 100% rename from xdr-json/curr/AccountEntryExtensionV2.json rename to xdr-json/AccountEntryExtensionV2.json diff --git a/xdr-json/curr/AccountEntryExtensionV2Ext.json b/xdr-json/AccountEntryExtensionV2Ext.json similarity index 100% rename from xdr-json/curr/AccountEntryExtensionV2Ext.json rename to xdr-json/AccountEntryExtensionV2Ext.json diff --git a/xdr-json/curr/AccountEntryExtensionV3.json b/xdr-json/AccountEntryExtensionV3.json similarity index 100% rename from xdr-json/curr/AccountEntryExtensionV3.json rename to xdr-json/AccountEntryExtensionV3.json diff --git a/xdr-json/curr/AccountFlags.json b/xdr-json/AccountFlags.json similarity index 100% rename from xdr-json/curr/AccountFlags.json rename to xdr-json/AccountFlags.json diff --git a/xdr-json/curr/AccountId.json b/xdr-json/AccountId.json similarity index 100% rename from xdr-json/curr/AccountId.json rename to xdr-json/AccountId.json diff --git a/xdr-json/curr/AccountMergeResult.json b/xdr-json/AccountMergeResult.json similarity index 100% rename from xdr-json/curr/AccountMergeResult.json rename to xdr-json/AccountMergeResult.json diff --git a/xdr-json/curr/AccountMergeResultCode.json b/xdr-json/AccountMergeResultCode.json similarity index 100% rename from xdr-json/curr/AccountMergeResultCode.json rename to xdr-json/AccountMergeResultCode.json diff --git a/xdr-json/curr/AllowTrustOp.json b/xdr-json/AllowTrustOp.json similarity index 100% rename from xdr-json/curr/AllowTrustOp.json rename to xdr-json/AllowTrustOp.json diff --git a/xdr-json/curr/AllowTrustResult.json b/xdr-json/AllowTrustResult.json similarity index 100% rename from xdr-json/curr/AllowTrustResult.json rename to xdr-json/AllowTrustResult.json diff --git a/xdr-json/curr/AllowTrustResultCode.json b/xdr-json/AllowTrustResultCode.json similarity index 100% rename from xdr-json/curr/AllowTrustResultCode.json rename to xdr-json/AllowTrustResultCode.json diff --git a/xdr-json/curr/AlphaNum12.json b/xdr-json/AlphaNum12.json similarity index 100% rename from xdr-json/curr/AlphaNum12.json rename to xdr-json/AlphaNum12.json diff --git a/xdr-json/curr/AlphaNum4.json b/xdr-json/AlphaNum4.json similarity index 100% rename from xdr-json/curr/AlphaNum4.json rename to xdr-json/AlphaNum4.json diff --git a/xdr-json/curr/Asset.json b/xdr-json/Asset.json similarity index 100% rename from xdr-json/curr/Asset.json rename to xdr-json/Asset.json diff --git a/xdr-json/curr/AssetCode.json b/xdr-json/AssetCode.json similarity index 100% rename from xdr-json/curr/AssetCode.json rename to xdr-json/AssetCode.json diff --git a/xdr-json/curr/AssetCode12.json b/xdr-json/AssetCode12.json similarity index 100% rename from xdr-json/curr/AssetCode12.json rename to xdr-json/AssetCode12.json diff --git a/xdr-json/curr/AssetCode4.json b/xdr-json/AssetCode4.json similarity index 100% rename from xdr-json/curr/AssetCode4.json rename to xdr-json/AssetCode4.json diff --git a/xdr-json/curr/AssetType.json b/xdr-json/AssetType.json similarity index 100% rename from xdr-json/curr/AssetType.json rename to xdr-json/AssetType.json diff --git a/xdr-json/curr/Auth.json b/xdr-json/Auth.json similarity index 100% rename from xdr-json/curr/Auth.json rename to xdr-json/Auth.json diff --git a/xdr-json/curr/AuthCert.json b/xdr-json/AuthCert.json similarity index 100% rename from xdr-json/curr/AuthCert.json rename to xdr-json/AuthCert.json diff --git a/xdr-json/curr/AuthenticatedMessage.json b/xdr-json/AuthenticatedMessage.json similarity index 100% rename from xdr-json/curr/AuthenticatedMessage.json rename to xdr-json/AuthenticatedMessage.json diff --git a/xdr-json/curr/AuthenticatedMessageV0.json b/xdr-json/AuthenticatedMessageV0.json similarity index 100% rename from xdr-json/curr/AuthenticatedMessageV0.json rename to xdr-json/AuthenticatedMessageV0.json diff --git a/xdr-json/curr/BeginSponsoringFutureReservesOp.json b/xdr-json/BeginSponsoringFutureReservesOp.json similarity index 100% rename from xdr-json/curr/BeginSponsoringFutureReservesOp.json rename to xdr-json/BeginSponsoringFutureReservesOp.json diff --git a/xdr-json/curr/BeginSponsoringFutureReservesResult.json b/xdr-json/BeginSponsoringFutureReservesResult.json similarity index 100% rename from xdr-json/curr/BeginSponsoringFutureReservesResult.json rename to xdr-json/BeginSponsoringFutureReservesResult.json diff --git a/xdr-json/curr/BeginSponsoringFutureReservesResultCode.json b/xdr-json/BeginSponsoringFutureReservesResultCode.json similarity index 100% rename from xdr-json/curr/BeginSponsoringFutureReservesResultCode.json rename to xdr-json/BeginSponsoringFutureReservesResultCode.json diff --git a/xdr-json/curr/BinaryFuseFilterType.json b/xdr-json/BinaryFuseFilterType.json similarity index 100% rename from xdr-json/curr/BinaryFuseFilterType.json rename to xdr-json/BinaryFuseFilterType.json diff --git a/xdr-json/curr/BucketEntry.json b/xdr-json/BucketEntry.json similarity index 100% rename from xdr-json/curr/BucketEntry.json rename to xdr-json/BucketEntry.json diff --git a/xdr-json/curr/BucketEntryType.json b/xdr-json/BucketEntryType.json similarity index 100% rename from xdr-json/curr/BucketEntryType.json rename to xdr-json/BucketEntryType.json diff --git a/xdr-json/curr/BucketListType.json b/xdr-json/BucketListType.json similarity index 100% rename from xdr-json/curr/BucketListType.json rename to xdr-json/BucketListType.json diff --git a/xdr-json/curr/BucketMetadata.json b/xdr-json/BucketMetadata.json similarity index 100% rename from xdr-json/curr/BucketMetadata.json rename to xdr-json/BucketMetadata.json diff --git a/xdr-json/curr/BucketMetadataExt.json b/xdr-json/BucketMetadataExt.json similarity index 100% rename from xdr-json/curr/BucketMetadataExt.json rename to xdr-json/BucketMetadataExt.json diff --git a/xdr-json/curr/BumpSequenceOp.json b/xdr-json/BumpSequenceOp.json similarity index 100% rename from xdr-json/curr/BumpSequenceOp.json rename to xdr-json/BumpSequenceOp.json diff --git a/xdr-json/curr/BumpSequenceResult.json b/xdr-json/BumpSequenceResult.json similarity index 100% rename from xdr-json/curr/BumpSequenceResult.json rename to xdr-json/BumpSequenceResult.json diff --git a/xdr-json/curr/BumpSequenceResultCode.json b/xdr-json/BumpSequenceResultCode.json similarity index 100% rename from xdr-json/curr/BumpSequenceResultCode.json rename to xdr-json/BumpSequenceResultCode.json diff --git a/xdr-json/curr/ChangeTrustAsset.json b/xdr-json/ChangeTrustAsset.json similarity index 100% rename from xdr-json/curr/ChangeTrustAsset.json rename to xdr-json/ChangeTrustAsset.json diff --git a/xdr-json/curr/ChangeTrustOp.json b/xdr-json/ChangeTrustOp.json similarity index 100% rename from xdr-json/curr/ChangeTrustOp.json rename to xdr-json/ChangeTrustOp.json diff --git a/xdr-json/curr/ChangeTrustResult.json b/xdr-json/ChangeTrustResult.json similarity index 100% rename from xdr-json/curr/ChangeTrustResult.json rename to xdr-json/ChangeTrustResult.json diff --git a/xdr-json/curr/ChangeTrustResultCode.json b/xdr-json/ChangeTrustResultCode.json similarity index 100% rename from xdr-json/curr/ChangeTrustResultCode.json rename to xdr-json/ChangeTrustResultCode.json diff --git a/xdr-json/curr/ClaimAtom.json b/xdr-json/ClaimAtom.json similarity index 100% rename from xdr-json/curr/ClaimAtom.json rename to xdr-json/ClaimAtom.json diff --git a/xdr-json/curr/ClaimAtomType.json b/xdr-json/ClaimAtomType.json similarity index 100% rename from xdr-json/curr/ClaimAtomType.json rename to xdr-json/ClaimAtomType.json diff --git a/xdr-json/curr/ClaimClaimableBalanceOp.json b/xdr-json/ClaimClaimableBalanceOp.json similarity index 100% rename from xdr-json/curr/ClaimClaimableBalanceOp.json rename to xdr-json/ClaimClaimableBalanceOp.json diff --git a/xdr-json/curr/ClaimClaimableBalanceResult.json b/xdr-json/ClaimClaimableBalanceResult.json similarity index 100% rename from xdr-json/curr/ClaimClaimableBalanceResult.json rename to xdr-json/ClaimClaimableBalanceResult.json diff --git a/xdr-json/curr/ClaimClaimableBalanceResultCode.json b/xdr-json/ClaimClaimableBalanceResultCode.json similarity index 100% rename from xdr-json/curr/ClaimClaimableBalanceResultCode.json rename to xdr-json/ClaimClaimableBalanceResultCode.json diff --git a/xdr-json/curr/ClaimLiquidityAtom.json b/xdr-json/ClaimLiquidityAtom.json similarity index 100% rename from xdr-json/curr/ClaimLiquidityAtom.json rename to xdr-json/ClaimLiquidityAtom.json diff --git a/xdr-json/curr/ClaimOfferAtom.json b/xdr-json/ClaimOfferAtom.json similarity index 100% rename from xdr-json/curr/ClaimOfferAtom.json rename to xdr-json/ClaimOfferAtom.json diff --git a/xdr-json/curr/ClaimOfferAtomV0.json b/xdr-json/ClaimOfferAtomV0.json similarity index 100% rename from xdr-json/curr/ClaimOfferAtomV0.json rename to xdr-json/ClaimOfferAtomV0.json diff --git a/xdr-json/curr/ClaimPredicate.json b/xdr-json/ClaimPredicate.json similarity index 100% rename from xdr-json/curr/ClaimPredicate.json rename to xdr-json/ClaimPredicate.json diff --git a/xdr-json/curr/ClaimPredicateType.json b/xdr-json/ClaimPredicateType.json similarity index 100% rename from xdr-json/curr/ClaimPredicateType.json rename to xdr-json/ClaimPredicateType.json diff --git a/xdr-json/curr/ClaimableBalanceEntry.json b/xdr-json/ClaimableBalanceEntry.json similarity index 100% rename from xdr-json/curr/ClaimableBalanceEntry.json rename to xdr-json/ClaimableBalanceEntry.json diff --git a/xdr-json/curr/ClaimableBalanceEntryExt.json b/xdr-json/ClaimableBalanceEntryExt.json similarity index 100% rename from xdr-json/curr/ClaimableBalanceEntryExt.json rename to xdr-json/ClaimableBalanceEntryExt.json diff --git a/xdr-json/curr/ClaimableBalanceEntryExtensionV1.json b/xdr-json/ClaimableBalanceEntryExtensionV1.json similarity index 100% rename from xdr-json/curr/ClaimableBalanceEntryExtensionV1.json rename to xdr-json/ClaimableBalanceEntryExtensionV1.json diff --git a/xdr-json/curr/ClaimableBalanceEntryExtensionV1Ext.json b/xdr-json/ClaimableBalanceEntryExtensionV1Ext.json similarity index 100% rename from xdr-json/curr/ClaimableBalanceEntryExtensionV1Ext.json rename to xdr-json/ClaimableBalanceEntryExtensionV1Ext.json diff --git a/xdr-json/curr/ClaimableBalanceFlags.json b/xdr-json/ClaimableBalanceFlags.json similarity index 100% rename from xdr-json/curr/ClaimableBalanceFlags.json rename to xdr-json/ClaimableBalanceFlags.json diff --git a/xdr-json/curr/ClaimableBalanceId.json b/xdr-json/ClaimableBalanceId.json similarity index 100% rename from xdr-json/curr/ClaimableBalanceId.json rename to xdr-json/ClaimableBalanceId.json diff --git a/xdr-json/curr/ClaimableBalanceIdType.json b/xdr-json/ClaimableBalanceIdType.json similarity index 100% rename from xdr-json/curr/ClaimableBalanceIdType.json rename to xdr-json/ClaimableBalanceIdType.json diff --git a/xdr-json/curr/Claimant.json b/xdr-json/Claimant.json similarity index 100% rename from xdr-json/curr/Claimant.json rename to xdr-json/Claimant.json diff --git a/xdr-json/curr/ClaimantType.json b/xdr-json/ClaimantType.json similarity index 100% rename from xdr-json/curr/ClaimantType.json rename to xdr-json/ClaimantType.json diff --git a/xdr-json/curr/ClaimantV0.json b/xdr-json/ClaimantV0.json similarity index 100% rename from xdr-json/curr/ClaimantV0.json rename to xdr-json/ClaimantV0.json diff --git a/xdr-json/curr/ClawbackClaimableBalanceOp.json b/xdr-json/ClawbackClaimableBalanceOp.json similarity index 100% rename from xdr-json/curr/ClawbackClaimableBalanceOp.json rename to xdr-json/ClawbackClaimableBalanceOp.json diff --git a/xdr-json/curr/ClawbackClaimableBalanceResult.json b/xdr-json/ClawbackClaimableBalanceResult.json similarity index 100% rename from xdr-json/curr/ClawbackClaimableBalanceResult.json rename to xdr-json/ClawbackClaimableBalanceResult.json diff --git a/xdr-json/curr/ClawbackClaimableBalanceResultCode.json b/xdr-json/ClawbackClaimableBalanceResultCode.json similarity index 100% rename from xdr-json/curr/ClawbackClaimableBalanceResultCode.json rename to xdr-json/ClawbackClaimableBalanceResultCode.json diff --git a/xdr-json/curr/ClawbackOp.json b/xdr-json/ClawbackOp.json similarity index 100% rename from xdr-json/curr/ClawbackOp.json rename to xdr-json/ClawbackOp.json diff --git a/xdr-json/curr/ClawbackResult.json b/xdr-json/ClawbackResult.json similarity index 100% rename from xdr-json/curr/ClawbackResult.json rename to xdr-json/ClawbackResult.json diff --git a/xdr-json/curr/ClawbackResultCode.json b/xdr-json/ClawbackResultCode.json similarity index 100% rename from xdr-json/curr/ClawbackResultCode.json rename to xdr-json/ClawbackResultCode.json diff --git a/xdr-json/curr/ConfigSettingContractBandwidthV0.json b/xdr-json/ConfigSettingContractBandwidthV0.json similarity index 100% rename from xdr-json/curr/ConfigSettingContractBandwidthV0.json rename to xdr-json/ConfigSettingContractBandwidthV0.json diff --git a/xdr-json/curr/ConfigSettingContractComputeV0.json b/xdr-json/ConfigSettingContractComputeV0.json similarity index 100% rename from xdr-json/curr/ConfigSettingContractComputeV0.json rename to xdr-json/ConfigSettingContractComputeV0.json diff --git a/xdr-json/curr/ConfigSettingContractEventsV0.json b/xdr-json/ConfigSettingContractEventsV0.json similarity index 100% rename from xdr-json/curr/ConfigSettingContractEventsV0.json rename to xdr-json/ConfigSettingContractEventsV0.json diff --git a/xdr-json/curr/ConfigSettingContractExecutionLanesV0.json b/xdr-json/ConfigSettingContractExecutionLanesV0.json similarity index 100% rename from xdr-json/curr/ConfigSettingContractExecutionLanesV0.json rename to xdr-json/ConfigSettingContractExecutionLanesV0.json diff --git a/xdr-json/curr/ConfigSettingContractHistoricalDataV0.json b/xdr-json/ConfigSettingContractHistoricalDataV0.json similarity index 100% rename from xdr-json/curr/ConfigSettingContractHistoricalDataV0.json rename to xdr-json/ConfigSettingContractHistoricalDataV0.json diff --git a/xdr-json/curr/ConfigSettingContractLedgerCostExtV0.json b/xdr-json/ConfigSettingContractLedgerCostExtV0.json similarity index 100% rename from xdr-json/curr/ConfigSettingContractLedgerCostExtV0.json rename to xdr-json/ConfigSettingContractLedgerCostExtV0.json diff --git a/xdr-json/curr/ConfigSettingContractLedgerCostV0.json b/xdr-json/ConfigSettingContractLedgerCostV0.json similarity index 100% rename from xdr-json/curr/ConfigSettingContractLedgerCostV0.json rename to xdr-json/ConfigSettingContractLedgerCostV0.json diff --git a/xdr-json/curr/ConfigSettingContractParallelComputeV0.json b/xdr-json/ConfigSettingContractParallelComputeV0.json similarity index 100% rename from xdr-json/curr/ConfigSettingContractParallelComputeV0.json rename to xdr-json/ConfigSettingContractParallelComputeV0.json diff --git a/xdr-json/curr/ConfigSettingEntry.json b/xdr-json/ConfigSettingEntry.json similarity index 100% rename from xdr-json/curr/ConfigSettingEntry.json rename to xdr-json/ConfigSettingEntry.json diff --git a/xdr-json/curr/ConfigSettingId.json b/xdr-json/ConfigSettingId.json similarity index 100% rename from xdr-json/curr/ConfigSettingId.json rename to xdr-json/ConfigSettingId.json diff --git a/xdr-json/curr/ConfigSettingScpTiming.json b/xdr-json/ConfigSettingScpTiming.json similarity index 100% rename from xdr-json/curr/ConfigSettingScpTiming.json rename to xdr-json/ConfigSettingScpTiming.json diff --git a/xdr-json/curr/ConfigUpgradeSet.json b/xdr-json/ConfigUpgradeSet.json similarity index 100% rename from xdr-json/curr/ConfigUpgradeSet.json rename to xdr-json/ConfigUpgradeSet.json diff --git a/xdr-json/curr/ConfigUpgradeSetKey.json b/xdr-json/ConfigUpgradeSetKey.json similarity index 100% rename from xdr-json/curr/ConfigUpgradeSetKey.json rename to xdr-json/ConfigUpgradeSetKey.json diff --git a/xdr-json/curr/ContractCodeCostInputs.json b/xdr-json/ContractCodeCostInputs.json similarity index 100% rename from xdr-json/curr/ContractCodeCostInputs.json rename to xdr-json/ContractCodeCostInputs.json diff --git a/xdr-json/curr/ContractCodeEntry.json b/xdr-json/ContractCodeEntry.json similarity index 100% rename from xdr-json/curr/ContractCodeEntry.json rename to xdr-json/ContractCodeEntry.json diff --git a/xdr-json/curr/ContractCodeEntryExt.json b/xdr-json/ContractCodeEntryExt.json similarity index 100% rename from xdr-json/curr/ContractCodeEntryExt.json rename to xdr-json/ContractCodeEntryExt.json diff --git a/xdr-json/curr/ContractCodeEntryV1.json b/xdr-json/ContractCodeEntryV1.json similarity index 100% rename from xdr-json/curr/ContractCodeEntryV1.json rename to xdr-json/ContractCodeEntryV1.json diff --git a/xdr-json/curr/ContractCostParamEntry.json b/xdr-json/ContractCostParamEntry.json similarity index 100% rename from xdr-json/curr/ContractCostParamEntry.json rename to xdr-json/ContractCostParamEntry.json diff --git a/xdr-json/curr/ContractCostParams.json b/xdr-json/ContractCostParams.json similarity index 100% rename from xdr-json/curr/ContractCostParams.json rename to xdr-json/ContractCostParams.json diff --git a/xdr-json/curr/ContractCostType.json b/xdr-json/ContractCostType.json similarity index 100% rename from xdr-json/curr/ContractCostType.json rename to xdr-json/ContractCostType.json diff --git a/xdr-json/curr/ContractDataDurability.json b/xdr-json/ContractDataDurability.json similarity index 100% rename from xdr-json/curr/ContractDataDurability.json rename to xdr-json/ContractDataDurability.json diff --git a/xdr-json/curr/ContractDataEntry.json b/xdr-json/ContractDataEntry.json similarity index 100% rename from xdr-json/curr/ContractDataEntry.json rename to xdr-json/ContractDataEntry.json diff --git a/xdr-json/curr/ContractEvent.json b/xdr-json/ContractEvent.json similarity index 100% rename from xdr-json/curr/ContractEvent.json rename to xdr-json/ContractEvent.json diff --git a/xdr-json/curr/ContractEventBody.json b/xdr-json/ContractEventBody.json similarity index 100% rename from xdr-json/curr/ContractEventBody.json rename to xdr-json/ContractEventBody.json diff --git a/xdr-json/curr/ContractEventType.json b/xdr-json/ContractEventType.json similarity index 100% rename from xdr-json/curr/ContractEventType.json rename to xdr-json/ContractEventType.json diff --git a/xdr-json/curr/ContractEventV0.json b/xdr-json/ContractEventV0.json similarity index 100% rename from xdr-json/curr/ContractEventV0.json rename to xdr-json/ContractEventV0.json diff --git a/xdr-json/curr/ContractExecutable.json b/xdr-json/ContractExecutable.json similarity index 100% rename from xdr-json/curr/ContractExecutable.json rename to xdr-json/ContractExecutable.json diff --git a/xdr-json/curr/ContractExecutableType.json b/xdr-json/ContractExecutableType.json similarity index 100% rename from xdr-json/curr/ContractExecutableType.json rename to xdr-json/ContractExecutableType.json diff --git a/xdr-json/curr/ContractId.json b/xdr-json/ContractId.json similarity index 100% rename from xdr-json/curr/ContractId.json rename to xdr-json/ContractId.json diff --git a/xdr-json/curr/ContractIdPreimage.json b/xdr-json/ContractIdPreimage.json similarity index 100% rename from xdr-json/curr/ContractIdPreimage.json rename to xdr-json/ContractIdPreimage.json diff --git a/xdr-json/curr/ContractIdPreimageFromAddress.json b/xdr-json/ContractIdPreimageFromAddress.json similarity index 100% rename from xdr-json/curr/ContractIdPreimageFromAddress.json rename to xdr-json/ContractIdPreimageFromAddress.json diff --git a/xdr-json/curr/ContractIdPreimageType.json b/xdr-json/ContractIdPreimageType.json similarity index 100% rename from xdr-json/curr/ContractIdPreimageType.json rename to xdr-json/ContractIdPreimageType.json diff --git a/xdr-json/curr/CreateAccountOp.json b/xdr-json/CreateAccountOp.json similarity index 100% rename from xdr-json/curr/CreateAccountOp.json rename to xdr-json/CreateAccountOp.json diff --git a/xdr-json/curr/CreateAccountResult.json b/xdr-json/CreateAccountResult.json similarity index 100% rename from xdr-json/curr/CreateAccountResult.json rename to xdr-json/CreateAccountResult.json diff --git a/xdr-json/curr/CreateAccountResultCode.json b/xdr-json/CreateAccountResultCode.json similarity index 100% rename from xdr-json/curr/CreateAccountResultCode.json rename to xdr-json/CreateAccountResultCode.json diff --git a/xdr-json/curr/CreateClaimableBalanceOp.json b/xdr-json/CreateClaimableBalanceOp.json similarity index 100% rename from xdr-json/curr/CreateClaimableBalanceOp.json rename to xdr-json/CreateClaimableBalanceOp.json diff --git a/xdr-json/curr/CreateClaimableBalanceResult.json b/xdr-json/CreateClaimableBalanceResult.json similarity index 100% rename from xdr-json/curr/CreateClaimableBalanceResult.json rename to xdr-json/CreateClaimableBalanceResult.json diff --git a/xdr-json/curr/CreateClaimableBalanceResultCode.json b/xdr-json/CreateClaimableBalanceResultCode.json similarity index 100% rename from xdr-json/curr/CreateClaimableBalanceResultCode.json rename to xdr-json/CreateClaimableBalanceResultCode.json diff --git a/xdr-json/curr/CreateContractArgs.json b/xdr-json/CreateContractArgs.json similarity index 100% rename from xdr-json/curr/CreateContractArgs.json rename to xdr-json/CreateContractArgs.json diff --git a/xdr-json/curr/CreateContractArgsV2.json b/xdr-json/CreateContractArgsV2.json similarity index 100% rename from xdr-json/curr/CreateContractArgsV2.json rename to xdr-json/CreateContractArgsV2.json diff --git a/xdr-json/curr/CreatePassiveSellOfferOp.json b/xdr-json/CreatePassiveSellOfferOp.json similarity index 100% rename from xdr-json/curr/CreatePassiveSellOfferOp.json rename to xdr-json/CreatePassiveSellOfferOp.json diff --git a/xdr-json/curr/CryptoKeyType.json b/xdr-json/CryptoKeyType.json similarity index 100% rename from xdr-json/curr/CryptoKeyType.json rename to xdr-json/CryptoKeyType.json diff --git a/xdr-json/curr/Curve25519Public.json b/xdr-json/Curve25519Public.json similarity index 100% rename from xdr-json/curr/Curve25519Public.json rename to xdr-json/Curve25519Public.json diff --git a/xdr-json/curr/Curve25519Secret.json b/xdr-json/Curve25519Secret.json similarity index 100% rename from xdr-json/curr/Curve25519Secret.json rename to xdr-json/Curve25519Secret.json diff --git a/xdr-json/curr/DataEntry.json b/xdr-json/DataEntry.json similarity index 100% rename from xdr-json/curr/DataEntry.json rename to xdr-json/DataEntry.json diff --git a/xdr-json/curr/DataEntryExt.json b/xdr-json/DataEntryExt.json similarity index 100% rename from xdr-json/curr/DataEntryExt.json rename to xdr-json/DataEntryExt.json diff --git a/xdr-json/curr/DataValue.json b/xdr-json/DataValue.json similarity index 100% rename from xdr-json/curr/DataValue.json rename to xdr-json/DataValue.json diff --git a/xdr-json/curr/DecoratedSignature.json b/xdr-json/DecoratedSignature.json similarity index 100% rename from xdr-json/curr/DecoratedSignature.json rename to xdr-json/DecoratedSignature.json diff --git a/xdr-json/curr/DependentTxCluster.json b/xdr-json/DependentTxCluster.json similarity index 100% rename from xdr-json/curr/DependentTxCluster.json rename to xdr-json/DependentTxCluster.json diff --git a/xdr-json/curr/DiagnosticEvent.json b/xdr-json/DiagnosticEvent.json similarity index 100% rename from xdr-json/curr/DiagnosticEvent.json rename to xdr-json/DiagnosticEvent.json diff --git a/xdr-json/curr/DontHave.json b/xdr-json/DontHave.json similarity index 100% rename from xdr-json/curr/DontHave.json rename to xdr-json/DontHave.json diff --git a/xdr-json/curr/Duration.json b/xdr-json/Duration.json similarity index 100% rename from xdr-json/curr/Duration.json rename to xdr-json/Duration.json diff --git a/xdr-json/curr/EncodedLedgerKey.json b/xdr-json/EncodedLedgerKey.json similarity index 100% rename from xdr-json/curr/EncodedLedgerKey.json rename to xdr-json/EncodedLedgerKey.json diff --git a/xdr-json/curr/EncryptedBody.json b/xdr-json/EncryptedBody.json similarity index 100% rename from xdr-json/curr/EncryptedBody.json rename to xdr-json/EncryptedBody.json diff --git a/xdr-json/curr/EndSponsoringFutureReservesResult.json b/xdr-json/EndSponsoringFutureReservesResult.json similarity index 100% rename from xdr-json/curr/EndSponsoringFutureReservesResult.json rename to xdr-json/EndSponsoringFutureReservesResult.json diff --git a/xdr-json/curr/EndSponsoringFutureReservesResultCode.json b/xdr-json/EndSponsoringFutureReservesResultCode.json similarity index 100% rename from xdr-json/curr/EndSponsoringFutureReservesResultCode.json rename to xdr-json/EndSponsoringFutureReservesResultCode.json diff --git a/xdr-json/curr/EnvelopeType.json b/xdr-json/EnvelopeType.json similarity index 100% rename from xdr-json/curr/EnvelopeType.json rename to xdr-json/EnvelopeType.json diff --git a/xdr-json/curr/ErrorCode.json b/xdr-json/ErrorCode.json similarity index 100% rename from xdr-json/curr/ErrorCode.json rename to xdr-json/ErrorCode.json diff --git a/xdr-json/curr/EvictionIterator.json b/xdr-json/EvictionIterator.json similarity index 100% rename from xdr-json/curr/EvictionIterator.json rename to xdr-json/EvictionIterator.json diff --git a/xdr-json/curr/ExtendFootprintTtlOp.json b/xdr-json/ExtendFootprintTtlOp.json similarity index 100% rename from xdr-json/curr/ExtendFootprintTtlOp.json rename to xdr-json/ExtendFootprintTtlOp.json diff --git a/xdr-json/curr/ExtendFootprintTtlResult.json b/xdr-json/ExtendFootprintTtlResult.json similarity index 100% rename from xdr-json/curr/ExtendFootprintTtlResult.json rename to xdr-json/ExtendFootprintTtlResult.json diff --git a/xdr-json/curr/ExtendFootprintTtlResultCode.json b/xdr-json/ExtendFootprintTtlResultCode.json similarity index 100% rename from xdr-json/curr/ExtendFootprintTtlResultCode.json rename to xdr-json/ExtendFootprintTtlResultCode.json diff --git a/xdr-json/curr/ExtensionPoint.json b/xdr-json/ExtensionPoint.json similarity index 100% rename from xdr-json/curr/ExtensionPoint.json rename to xdr-json/ExtensionPoint.json diff --git a/xdr-json/curr/FeeBumpTransaction.json b/xdr-json/FeeBumpTransaction.json similarity index 100% rename from xdr-json/curr/FeeBumpTransaction.json rename to xdr-json/FeeBumpTransaction.json diff --git a/xdr-json/curr/FeeBumpTransactionEnvelope.json b/xdr-json/FeeBumpTransactionEnvelope.json similarity index 100% rename from xdr-json/curr/FeeBumpTransactionEnvelope.json rename to xdr-json/FeeBumpTransactionEnvelope.json diff --git a/xdr-json/curr/FeeBumpTransactionExt.json b/xdr-json/FeeBumpTransactionExt.json similarity index 100% rename from xdr-json/curr/FeeBumpTransactionExt.json rename to xdr-json/FeeBumpTransactionExt.json diff --git a/xdr-json/curr/FeeBumpTransactionInnerTx.json b/xdr-json/FeeBumpTransactionInnerTx.json similarity index 100% rename from xdr-json/curr/FeeBumpTransactionInnerTx.json rename to xdr-json/FeeBumpTransactionInnerTx.json diff --git a/xdr-json/curr/FloodAdvert.json b/xdr-json/FloodAdvert.json similarity index 100% rename from xdr-json/curr/FloodAdvert.json rename to xdr-json/FloodAdvert.json diff --git a/xdr-json/curr/FloodDemand.json b/xdr-json/FloodDemand.json similarity index 100% rename from xdr-json/curr/FloodDemand.json rename to xdr-json/FloodDemand.json diff --git a/xdr-json/curr/FreezeBypassTxs.json b/xdr-json/FreezeBypassTxs.json similarity index 100% rename from xdr-json/curr/FreezeBypassTxs.json rename to xdr-json/FreezeBypassTxs.json diff --git a/xdr-json/curr/FreezeBypassTxsDelta.json b/xdr-json/FreezeBypassTxsDelta.json similarity index 100% rename from xdr-json/curr/FreezeBypassTxsDelta.json rename to xdr-json/FreezeBypassTxsDelta.json diff --git a/xdr-json/curr/FrozenLedgerKeys.json b/xdr-json/FrozenLedgerKeys.json similarity index 100% rename from xdr-json/curr/FrozenLedgerKeys.json rename to xdr-json/FrozenLedgerKeys.json diff --git a/xdr-json/curr/FrozenLedgerKeysDelta.json b/xdr-json/FrozenLedgerKeysDelta.json similarity index 100% rename from xdr-json/curr/FrozenLedgerKeysDelta.json rename to xdr-json/FrozenLedgerKeysDelta.json diff --git a/xdr-json/curr/GeneralizedTransactionSet.json b/xdr-json/GeneralizedTransactionSet.json similarity index 100% rename from xdr-json/curr/GeneralizedTransactionSet.json rename to xdr-json/GeneralizedTransactionSet.json diff --git a/xdr-json/curr/Hash.json b/xdr-json/Hash.json similarity index 100% rename from xdr-json/curr/Hash.json rename to xdr-json/Hash.json diff --git a/xdr-json/curr/HashIdPreimage.json b/xdr-json/HashIdPreimage.json similarity index 100% rename from xdr-json/curr/HashIdPreimage.json rename to xdr-json/HashIdPreimage.json diff --git a/xdr-json/curr/HashIdPreimageContractId.json b/xdr-json/HashIdPreimageContractId.json similarity index 100% rename from xdr-json/curr/HashIdPreimageContractId.json rename to xdr-json/HashIdPreimageContractId.json diff --git a/xdr-json/curr/HashIdPreimageOperationId.json b/xdr-json/HashIdPreimageOperationId.json similarity index 100% rename from xdr-json/curr/HashIdPreimageOperationId.json rename to xdr-json/HashIdPreimageOperationId.json diff --git a/xdr-json/curr/HashIdPreimageRevokeId.json b/xdr-json/HashIdPreimageRevokeId.json similarity index 100% rename from xdr-json/curr/HashIdPreimageRevokeId.json rename to xdr-json/HashIdPreimageRevokeId.json diff --git a/xdr-json/curr/HashIdPreimageSorobanAuthorization.json b/xdr-json/HashIdPreimageSorobanAuthorization.json similarity index 100% rename from xdr-json/curr/HashIdPreimageSorobanAuthorization.json rename to xdr-json/HashIdPreimageSorobanAuthorization.json diff --git a/xdr-json/curr/Hello.json b/xdr-json/Hello.json similarity index 100% rename from xdr-json/curr/Hello.json rename to xdr-json/Hello.json diff --git a/xdr-json/curr/HmacSha256Key.json b/xdr-json/HmacSha256Key.json similarity index 100% rename from xdr-json/curr/HmacSha256Key.json rename to xdr-json/HmacSha256Key.json diff --git a/xdr-json/curr/HmacSha256Mac.json b/xdr-json/HmacSha256Mac.json similarity index 100% rename from xdr-json/curr/HmacSha256Mac.json rename to xdr-json/HmacSha256Mac.json diff --git a/xdr-json/curr/HostFunction.json b/xdr-json/HostFunction.json similarity index 100% rename from xdr-json/curr/HostFunction.json rename to xdr-json/HostFunction.json diff --git a/xdr-json/curr/HostFunctionType.json b/xdr-json/HostFunctionType.json similarity index 100% rename from xdr-json/curr/HostFunctionType.json rename to xdr-json/HostFunctionType.json diff --git a/xdr-json/curr/HotArchiveBucketEntry.json b/xdr-json/HotArchiveBucketEntry.json similarity index 100% rename from xdr-json/curr/HotArchiveBucketEntry.json rename to xdr-json/HotArchiveBucketEntry.json diff --git a/xdr-json/curr/HotArchiveBucketEntryType.json b/xdr-json/HotArchiveBucketEntryType.json similarity index 100% rename from xdr-json/curr/HotArchiveBucketEntryType.json rename to xdr-json/HotArchiveBucketEntryType.json diff --git a/xdr-json/curr/InflationPayout.json b/xdr-json/InflationPayout.json similarity index 100% rename from xdr-json/curr/InflationPayout.json rename to xdr-json/InflationPayout.json diff --git a/xdr-json/curr/InflationResult.json b/xdr-json/InflationResult.json similarity index 100% rename from xdr-json/curr/InflationResult.json rename to xdr-json/InflationResult.json diff --git a/xdr-json/curr/InflationResultCode.json b/xdr-json/InflationResultCode.json similarity index 100% rename from xdr-json/curr/InflationResultCode.json rename to xdr-json/InflationResultCode.json diff --git a/xdr-json/curr/InnerTransactionResult.json b/xdr-json/InnerTransactionResult.json similarity index 100% rename from xdr-json/curr/InnerTransactionResult.json rename to xdr-json/InnerTransactionResult.json diff --git a/xdr-json/curr/InnerTransactionResultExt.json b/xdr-json/InnerTransactionResultExt.json similarity index 100% rename from xdr-json/curr/InnerTransactionResultExt.json rename to xdr-json/InnerTransactionResultExt.json diff --git a/xdr-json/curr/InnerTransactionResultPair.json b/xdr-json/InnerTransactionResultPair.json similarity index 100% rename from xdr-json/curr/InnerTransactionResultPair.json rename to xdr-json/InnerTransactionResultPair.json diff --git a/xdr-json/curr/InnerTransactionResultResult.json b/xdr-json/InnerTransactionResultResult.json similarity index 100% rename from xdr-json/curr/InnerTransactionResultResult.json rename to xdr-json/InnerTransactionResultResult.json diff --git a/xdr-json/curr/Int128Parts.json b/xdr-json/Int128Parts.json similarity index 100% rename from xdr-json/curr/Int128Parts.json rename to xdr-json/Int128Parts.json diff --git a/xdr-json/curr/Int256Parts.json b/xdr-json/Int256Parts.json similarity index 100% rename from xdr-json/curr/Int256Parts.json rename to xdr-json/Int256Parts.json diff --git a/xdr-json/curr/Int32.json b/xdr-json/Int32.json similarity index 100% rename from xdr-json/curr/Int32.json rename to xdr-json/Int32.json diff --git a/xdr-json/curr/Int64.json b/xdr-json/Int64.json similarity index 100% rename from xdr-json/curr/Int64.json rename to xdr-json/Int64.json diff --git a/xdr-json/curr/InvokeContractArgs.json b/xdr-json/InvokeContractArgs.json similarity index 100% rename from xdr-json/curr/InvokeContractArgs.json rename to xdr-json/InvokeContractArgs.json diff --git a/xdr-json/curr/InvokeHostFunctionOp.json b/xdr-json/InvokeHostFunctionOp.json similarity index 100% rename from xdr-json/curr/InvokeHostFunctionOp.json rename to xdr-json/InvokeHostFunctionOp.json diff --git a/xdr-json/curr/InvokeHostFunctionResult.json b/xdr-json/InvokeHostFunctionResult.json similarity index 100% rename from xdr-json/curr/InvokeHostFunctionResult.json rename to xdr-json/InvokeHostFunctionResult.json diff --git a/xdr-json/curr/InvokeHostFunctionResultCode.json b/xdr-json/InvokeHostFunctionResultCode.json similarity index 100% rename from xdr-json/curr/InvokeHostFunctionResultCode.json rename to xdr-json/InvokeHostFunctionResultCode.json diff --git a/xdr-json/curr/InvokeHostFunctionSuccessPreImage.json b/xdr-json/InvokeHostFunctionSuccessPreImage.json similarity index 100% rename from xdr-json/curr/InvokeHostFunctionSuccessPreImage.json rename to xdr-json/InvokeHostFunctionSuccessPreImage.json diff --git a/xdr-json/curr/IpAddrType.json b/xdr-json/IpAddrType.json similarity index 100% rename from xdr-json/curr/IpAddrType.json rename to xdr-json/IpAddrType.json diff --git a/xdr-json/curr/LedgerBounds.json b/xdr-json/LedgerBounds.json similarity index 100% rename from xdr-json/curr/LedgerBounds.json rename to xdr-json/LedgerBounds.json diff --git a/xdr-json/curr/LedgerCloseMeta.json b/xdr-json/LedgerCloseMeta.json similarity index 100% rename from xdr-json/curr/LedgerCloseMeta.json rename to xdr-json/LedgerCloseMeta.json diff --git a/xdr-json/curr/LedgerCloseMetaBatch.json b/xdr-json/LedgerCloseMetaBatch.json similarity index 100% rename from xdr-json/curr/LedgerCloseMetaBatch.json rename to xdr-json/LedgerCloseMetaBatch.json diff --git a/xdr-json/curr/LedgerCloseMetaExt.json b/xdr-json/LedgerCloseMetaExt.json similarity index 100% rename from xdr-json/curr/LedgerCloseMetaExt.json rename to xdr-json/LedgerCloseMetaExt.json diff --git a/xdr-json/curr/LedgerCloseMetaExtV1.json b/xdr-json/LedgerCloseMetaExtV1.json similarity index 100% rename from xdr-json/curr/LedgerCloseMetaExtV1.json rename to xdr-json/LedgerCloseMetaExtV1.json diff --git a/xdr-json/curr/LedgerCloseMetaV0.json b/xdr-json/LedgerCloseMetaV0.json similarity index 100% rename from xdr-json/curr/LedgerCloseMetaV0.json rename to xdr-json/LedgerCloseMetaV0.json diff --git a/xdr-json/curr/LedgerCloseMetaV1.json b/xdr-json/LedgerCloseMetaV1.json similarity index 100% rename from xdr-json/curr/LedgerCloseMetaV1.json rename to xdr-json/LedgerCloseMetaV1.json diff --git a/xdr-json/curr/LedgerCloseMetaV2.json b/xdr-json/LedgerCloseMetaV2.json similarity index 100% rename from xdr-json/curr/LedgerCloseMetaV2.json rename to xdr-json/LedgerCloseMetaV2.json diff --git a/xdr-json/curr/LedgerCloseValueSignature.json b/xdr-json/LedgerCloseValueSignature.json similarity index 100% rename from xdr-json/curr/LedgerCloseValueSignature.json rename to xdr-json/LedgerCloseValueSignature.json diff --git a/xdr-json/curr/LedgerEntry.json b/xdr-json/LedgerEntry.json similarity index 100% rename from xdr-json/curr/LedgerEntry.json rename to xdr-json/LedgerEntry.json diff --git a/xdr-json/curr/LedgerEntryChange.json b/xdr-json/LedgerEntryChange.json similarity index 100% rename from xdr-json/curr/LedgerEntryChange.json rename to xdr-json/LedgerEntryChange.json diff --git a/xdr-json/curr/LedgerEntryChangeType.json b/xdr-json/LedgerEntryChangeType.json similarity index 100% rename from xdr-json/curr/LedgerEntryChangeType.json rename to xdr-json/LedgerEntryChangeType.json diff --git a/xdr-json/curr/LedgerEntryChanges.json b/xdr-json/LedgerEntryChanges.json similarity index 100% rename from xdr-json/curr/LedgerEntryChanges.json rename to xdr-json/LedgerEntryChanges.json diff --git a/xdr-json/curr/LedgerEntryData.json b/xdr-json/LedgerEntryData.json similarity index 100% rename from xdr-json/curr/LedgerEntryData.json rename to xdr-json/LedgerEntryData.json diff --git a/xdr-json/curr/LedgerEntryExt.json b/xdr-json/LedgerEntryExt.json similarity index 100% rename from xdr-json/curr/LedgerEntryExt.json rename to xdr-json/LedgerEntryExt.json diff --git a/xdr-json/curr/LedgerEntryExtensionV1.json b/xdr-json/LedgerEntryExtensionV1.json similarity index 100% rename from xdr-json/curr/LedgerEntryExtensionV1.json rename to xdr-json/LedgerEntryExtensionV1.json diff --git a/xdr-json/curr/LedgerEntryExtensionV1Ext.json b/xdr-json/LedgerEntryExtensionV1Ext.json similarity index 100% rename from xdr-json/curr/LedgerEntryExtensionV1Ext.json rename to xdr-json/LedgerEntryExtensionV1Ext.json diff --git a/xdr-json/curr/LedgerEntryType.json b/xdr-json/LedgerEntryType.json similarity index 100% rename from xdr-json/curr/LedgerEntryType.json rename to xdr-json/LedgerEntryType.json diff --git a/xdr-json/curr/LedgerFootprint.json b/xdr-json/LedgerFootprint.json similarity index 100% rename from xdr-json/curr/LedgerFootprint.json rename to xdr-json/LedgerFootprint.json diff --git a/xdr-json/curr/LedgerHeader.json b/xdr-json/LedgerHeader.json similarity index 100% rename from xdr-json/curr/LedgerHeader.json rename to xdr-json/LedgerHeader.json diff --git a/xdr-json/curr/LedgerHeaderExt.json b/xdr-json/LedgerHeaderExt.json similarity index 100% rename from xdr-json/curr/LedgerHeaderExt.json rename to xdr-json/LedgerHeaderExt.json diff --git a/xdr-json/curr/LedgerHeaderExtensionV1.json b/xdr-json/LedgerHeaderExtensionV1.json similarity index 100% rename from xdr-json/curr/LedgerHeaderExtensionV1.json rename to xdr-json/LedgerHeaderExtensionV1.json diff --git a/xdr-json/curr/LedgerHeaderExtensionV1Ext.json b/xdr-json/LedgerHeaderExtensionV1Ext.json similarity index 100% rename from xdr-json/curr/LedgerHeaderExtensionV1Ext.json rename to xdr-json/LedgerHeaderExtensionV1Ext.json diff --git a/xdr-json/curr/LedgerHeaderFlags.json b/xdr-json/LedgerHeaderFlags.json similarity index 100% rename from xdr-json/curr/LedgerHeaderFlags.json rename to xdr-json/LedgerHeaderFlags.json diff --git a/xdr-json/curr/LedgerHeaderHistoryEntry.json b/xdr-json/LedgerHeaderHistoryEntry.json similarity index 100% rename from xdr-json/curr/LedgerHeaderHistoryEntry.json rename to xdr-json/LedgerHeaderHistoryEntry.json diff --git a/xdr-json/curr/LedgerHeaderHistoryEntryExt.json b/xdr-json/LedgerHeaderHistoryEntryExt.json similarity index 100% rename from xdr-json/curr/LedgerHeaderHistoryEntryExt.json rename to xdr-json/LedgerHeaderHistoryEntryExt.json diff --git a/xdr-json/curr/LedgerKey.json b/xdr-json/LedgerKey.json similarity index 100% rename from xdr-json/curr/LedgerKey.json rename to xdr-json/LedgerKey.json diff --git a/xdr-json/curr/LedgerKeyAccount.json b/xdr-json/LedgerKeyAccount.json similarity index 100% rename from xdr-json/curr/LedgerKeyAccount.json rename to xdr-json/LedgerKeyAccount.json diff --git a/xdr-json/curr/LedgerKeyClaimableBalance.json b/xdr-json/LedgerKeyClaimableBalance.json similarity index 100% rename from xdr-json/curr/LedgerKeyClaimableBalance.json rename to xdr-json/LedgerKeyClaimableBalance.json diff --git a/xdr-json/curr/LedgerKeyConfigSetting.json b/xdr-json/LedgerKeyConfigSetting.json similarity index 100% rename from xdr-json/curr/LedgerKeyConfigSetting.json rename to xdr-json/LedgerKeyConfigSetting.json diff --git a/xdr-json/curr/LedgerKeyContractCode.json b/xdr-json/LedgerKeyContractCode.json similarity index 100% rename from xdr-json/curr/LedgerKeyContractCode.json rename to xdr-json/LedgerKeyContractCode.json diff --git a/xdr-json/curr/LedgerKeyContractData.json b/xdr-json/LedgerKeyContractData.json similarity index 100% rename from xdr-json/curr/LedgerKeyContractData.json rename to xdr-json/LedgerKeyContractData.json diff --git a/xdr-json/curr/LedgerKeyData.json b/xdr-json/LedgerKeyData.json similarity index 100% rename from xdr-json/curr/LedgerKeyData.json rename to xdr-json/LedgerKeyData.json diff --git a/xdr-json/curr/LedgerKeyLiquidityPool.json b/xdr-json/LedgerKeyLiquidityPool.json similarity index 100% rename from xdr-json/curr/LedgerKeyLiquidityPool.json rename to xdr-json/LedgerKeyLiquidityPool.json diff --git a/xdr-json/curr/LedgerKeyOffer.json b/xdr-json/LedgerKeyOffer.json similarity index 100% rename from xdr-json/curr/LedgerKeyOffer.json rename to xdr-json/LedgerKeyOffer.json diff --git a/xdr-json/curr/LedgerKeyTrustLine.json b/xdr-json/LedgerKeyTrustLine.json similarity index 100% rename from xdr-json/curr/LedgerKeyTrustLine.json rename to xdr-json/LedgerKeyTrustLine.json diff --git a/xdr-json/curr/LedgerKeyTtl.json b/xdr-json/LedgerKeyTtl.json similarity index 100% rename from xdr-json/curr/LedgerKeyTtl.json rename to xdr-json/LedgerKeyTtl.json diff --git a/xdr-json/curr/LedgerScpMessages.json b/xdr-json/LedgerScpMessages.json similarity index 100% rename from xdr-json/curr/LedgerScpMessages.json rename to xdr-json/LedgerScpMessages.json diff --git a/xdr-json/curr/LedgerUpgrade.json b/xdr-json/LedgerUpgrade.json similarity index 100% rename from xdr-json/curr/LedgerUpgrade.json rename to xdr-json/LedgerUpgrade.json diff --git a/xdr-json/curr/LedgerUpgradeType.json b/xdr-json/LedgerUpgradeType.json similarity index 100% rename from xdr-json/curr/LedgerUpgradeType.json rename to xdr-json/LedgerUpgradeType.json diff --git a/xdr-json/curr/Liabilities.json b/xdr-json/Liabilities.json similarity index 100% rename from xdr-json/curr/Liabilities.json rename to xdr-json/Liabilities.json diff --git a/xdr-json/curr/LiquidityPoolConstantProductParameters.json b/xdr-json/LiquidityPoolConstantProductParameters.json similarity index 100% rename from xdr-json/curr/LiquidityPoolConstantProductParameters.json rename to xdr-json/LiquidityPoolConstantProductParameters.json diff --git a/xdr-json/curr/LiquidityPoolDepositOp.json b/xdr-json/LiquidityPoolDepositOp.json similarity index 100% rename from xdr-json/curr/LiquidityPoolDepositOp.json rename to xdr-json/LiquidityPoolDepositOp.json diff --git a/xdr-json/curr/LiquidityPoolDepositResult.json b/xdr-json/LiquidityPoolDepositResult.json similarity index 100% rename from xdr-json/curr/LiquidityPoolDepositResult.json rename to xdr-json/LiquidityPoolDepositResult.json diff --git a/xdr-json/curr/LiquidityPoolDepositResultCode.json b/xdr-json/LiquidityPoolDepositResultCode.json similarity index 100% rename from xdr-json/curr/LiquidityPoolDepositResultCode.json rename to xdr-json/LiquidityPoolDepositResultCode.json diff --git a/xdr-json/curr/LiquidityPoolEntry.json b/xdr-json/LiquidityPoolEntry.json similarity index 100% rename from xdr-json/curr/LiquidityPoolEntry.json rename to xdr-json/LiquidityPoolEntry.json diff --git a/xdr-json/curr/LiquidityPoolEntryBody.json b/xdr-json/LiquidityPoolEntryBody.json similarity index 100% rename from xdr-json/curr/LiquidityPoolEntryBody.json rename to xdr-json/LiquidityPoolEntryBody.json diff --git a/xdr-json/curr/LiquidityPoolEntryConstantProduct.json b/xdr-json/LiquidityPoolEntryConstantProduct.json similarity index 100% rename from xdr-json/curr/LiquidityPoolEntryConstantProduct.json rename to xdr-json/LiquidityPoolEntryConstantProduct.json diff --git a/xdr-json/curr/LiquidityPoolParameters.json b/xdr-json/LiquidityPoolParameters.json similarity index 100% rename from xdr-json/curr/LiquidityPoolParameters.json rename to xdr-json/LiquidityPoolParameters.json diff --git a/xdr-json/curr/LiquidityPoolType.json b/xdr-json/LiquidityPoolType.json similarity index 100% rename from xdr-json/curr/LiquidityPoolType.json rename to xdr-json/LiquidityPoolType.json diff --git a/xdr-json/curr/LiquidityPoolWithdrawOp.json b/xdr-json/LiquidityPoolWithdrawOp.json similarity index 100% rename from xdr-json/curr/LiquidityPoolWithdrawOp.json rename to xdr-json/LiquidityPoolWithdrawOp.json diff --git a/xdr-json/curr/LiquidityPoolWithdrawResult.json b/xdr-json/LiquidityPoolWithdrawResult.json similarity index 100% rename from xdr-json/curr/LiquidityPoolWithdrawResult.json rename to xdr-json/LiquidityPoolWithdrawResult.json diff --git a/xdr-json/curr/LiquidityPoolWithdrawResultCode.json b/xdr-json/LiquidityPoolWithdrawResultCode.json similarity index 100% rename from xdr-json/curr/LiquidityPoolWithdrawResultCode.json rename to xdr-json/LiquidityPoolWithdrawResultCode.json diff --git a/xdr-json/curr/ManageBuyOfferOp.json b/xdr-json/ManageBuyOfferOp.json similarity index 100% rename from xdr-json/curr/ManageBuyOfferOp.json rename to xdr-json/ManageBuyOfferOp.json diff --git a/xdr-json/curr/ManageBuyOfferResult.json b/xdr-json/ManageBuyOfferResult.json similarity index 100% rename from xdr-json/curr/ManageBuyOfferResult.json rename to xdr-json/ManageBuyOfferResult.json diff --git a/xdr-json/curr/ManageBuyOfferResultCode.json b/xdr-json/ManageBuyOfferResultCode.json similarity index 100% rename from xdr-json/curr/ManageBuyOfferResultCode.json rename to xdr-json/ManageBuyOfferResultCode.json diff --git a/xdr-json/curr/ManageDataOp.json b/xdr-json/ManageDataOp.json similarity index 100% rename from xdr-json/curr/ManageDataOp.json rename to xdr-json/ManageDataOp.json diff --git a/xdr-json/curr/ManageDataResult.json b/xdr-json/ManageDataResult.json similarity index 100% rename from xdr-json/curr/ManageDataResult.json rename to xdr-json/ManageDataResult.json diff --git a/xdr-json/curr/ManageDataResultCode.json b/xdr-json/ManageDataResultCode.json similarity index 100% rename from xdr-json/curr/ManageDataResultCode.json rename to xdr-json/ManageDataResultCode.json diff --git a/xdr-json/curr/ManageOfferEffect.json b/xdr-json/ManageOfferEffect.json similarity index 100% rename from xdr-json/curr/ManageOfferEffect.json rename to xdr-json/ManageOfferEffect.json diff --git a/xdr-json/curr/ManageOfferSuccessResult.json b/xdr-json/ManageOfferSuccessResult.json similarity index 100% rename from xdr-json/curr/ManageOfferSuccessResult.json rename to xdr-json/ManageOfferSuccessResult.json diff --git a/xdr-json/curr/ManageOfferSuccessResultOffer.json b/xdr-json/ManageOfferSuccessResultOffer.json similarity index 100% rename from xdr-json/curr/ManageOfferSuccessResultOffer.json rename to xdr-json/ManageOfferSuccessResultOffer.json diff --git a/xdr-json/curr/ManageSellOfferOp.json b/xdr-json/ManageSellOfferOp.json similarity index 100% rename from xdr-json/curr/ManageSellOfferOp.json rename to xdr-json/ManageSellOfferOp.json diff --git a/xdr-json/curr/ManageSellOfferResult.json b/xdr-json/ManageSellOfferResult.json similarity index 100% rename from xdr-json/curr/ManageSellOfferResult.json rename to xdr-json/ManageSellOfferResult.json diff --git a/xdr-json/curr/ManageSellOfferResultCode.json b/xdr-json/ManageSellOfferResultCode.json similarity index 100% rename from xdr-json/curr/ManageSellOfferResultCode.json rename to xdr-json/ManageSellOfferResultCode.json diff --git a/xdr-json/curr/Memo.json b/xdr-json/Memo.json similarity index 100% rename from xdr-json/curr/Memo.json rename to xdr-json/Memo.json diff --git a/xdr-json/curr/MemoType.json b/xdr-json/MemoType.json similarity index 100% rename from xdr-json/curr/MemoType.json rename to xdr-json/MemoType.json diff --git a/xdr-json/curr/MessageType.json b/xdr-json/MessageType.json similarity index 100% rename from xdr-json/curr/MessageType.json rename to xdr-json/MessageType.json diff --git a/xdr-json/curr/MuxedAccount.json b/xdr-json/MuxedAccount.json similarity index 100% rename from xdr-json/curr/MuxedAccount.json rename to xdr-json/MuxedAccount.json diff --git a/xdr-json/curr/MuxedAccountMed25519.json b/xdr-json/MuxedAccountMed25519.json similarity index 100% rename from xdr-json/curr/MuxedAccountMed25519.json rename to xdr-json/MuxedAccountMed25519.json diff --git a/xdr-json/curr/MuxedEd25519Account.json b/xdr-json/MuxedEd25519Account.json similarity index 100% rename from xdr-json/curr/MuxedEd25519Account.json rename to xdr-json/MuxedEd25519Account.json diff --git a/xdr-json/curr/NodeId.json b/xdr-json/NodeId.json similarity index 100% rename from xdr-json/curr/NodeId.json rename to xdr-json/NodeId.json diff --git a/xdr-json/curr/OfferEntry.json b/xdr-json/OfferEntry.json similarity index 100% rename from xdr-json/curr/OfferEntry.json rename to xdr-json/OfferEntry.json diff --git a/xdr-json/curr/OfferEntryExt.json b/xdr-json/OfferEntryExt.json similarity index 100% rename from xdr-json/curr/OfferEntryExt.json rename to xdr-json/OfferEntryExt.json diff --git a/xdr-json/curr/OfferEntryFlags.json b/xdr-json/OfferEntryFlags.json similarity index 100% rename from xdr-json/curr/OfferEntryFlags.json rename to xdr-json/OfferEntryFlags.json diff --git a/xdr-json/curr/Operation.json b/xdr-json/Operation.json similarity index 100% rename from xdr-json/curr/Operation.json rename to xdr-json/Operation.json diff --git a/xdr-json/curr/OperationBody.json b/xdr-json/OperationBody.json similarity index 100% rename from xdr-json/curr/OperationBody.json rename to xdr-json/OperationBody.json diff --git a/xdr-json/curr/OperationMeta.json b/xdr-json/OperationMeta.json similarity index 100% rename from xdr-json/curr/OperationMeta.json rename to xdr-json/OperationMeta.json diff --git a/xdr-json/curr/OperationMetaV2.json b/xdr-json/OperationMetaV2.json similarity index 100% rename from xdr-json/curr/OperationMetaV2.json rename to xdr-json/OperationMetaV2.json diff --git a/xdr-json/curr/OperationResult.json b/xdr-json/OperationResult.json similarity index 100% rename from xdr-json/curr/OperationResult.json rename to xdr-json/OperationResult.json diff --git a/xdr-json/curr/OperationResultCode.json b/xdr-json/OperationResultCode.json similarity index 100% rename from xdr-json/curr/OperationResultCode.json rename to xdr-json/OperationResultCode.json diff --git a/xdr-json/curr/OperationResultTr.json b/xdr-json/OperationResultTr.json similarity index 100% rename from xdr-json/curr/OperationResultTr.json rename to xdr-json/OperationResultTr.json diff --git a/xdr-json/curr/OperationType.json b/xdr-json/OperationType.json similarity index 100% rename from xdr-json/curr/OperationType.json rename to xdr-json/OperationType.json diff --git a/xdr-json/curr/ParallelTxExecutionStage.json b/xdr-json/ParallelTxExecutionStage.json similarity index 100% rename from xdr-json/curr/ParallelTxExecutionStage.json rename to xdr-json/ParallelTxExecutionStage.json diff --git a/xdr-json/curr/ParallelTxsComponent.json b/xdr-json/ParallelTxsComponent.json similarity index 100% rename from xdr-json/curr/ParallelTxsComponent.json rename to xdr-json/ParallelTxsComponent.json diff --git a/xdr-json/curr/PathPaymentStrictReceiveOp.json b/xdr-json/PathPaymentStrictReceiveOp.json similarity index 100% rename from xdr-json/curr/PathPaymentStrictReceiveOp.json rename to xdr-json/PathPaymentStrictReceiveOp.json diff --git a/xdr-json/curr/PathPaymentStrictReceiveResult.json b/xdr-json/PathPaymentStrictReceiveResult.json similarity index 100% rename from xdr-json/curr/PathPaymentStrictReceiveResult.json rename to xdr-json/PathPaymentStrictReceiveResult.json diff --git a/xdr-json/curr/PathPaymentStrictReceiveResultCode.json b/xdr-json/PathPaymentStrictReceiveResultCode.json similarity index 100% rename from xdr-json/curr/PathPaymentStrictReceiveResultCode.json rename to xdr-json/PathPaymentStrictReceiveResultCode.json diff --git a/xdr-json/curr/PathPaymentStrictReceiveResultSuccess.json b/xdr-json/PathPaymentStrictReceiveResultSuccess.json similarity index 100% rename from xdr-json/curr/PathPaymentStrictReceiveResultSuccess.json rename to xdr-json/PathPaymentStrictReceiveResultSuccess.json diff --git a/xdr-json/curr/PathPaymentStrictSendOp.json b/xdr-json/PathPaymentStrictSendOp.json similarity index 100% rename from xdr-json/curr/PathPaymentStrictSendOp.json rename to xdr-json/PathPaymentStrictSendOp.json diff --git a/xdr-json/curr/PathPaymentStrictSendResult.json b/xdr-json/PathPaymentStrictSendResult.json similarity index 100% rename from xdr-json/curr/PathPaymentStrictSendResult.json rename to xdr-json/PathPaymentStrictSendResult.json diff --git a/xdr-json/curr/PathPaymentStrictSendResultCode.json b/xdr-json/PathPaymentStrictSendResultCode.json similarity index 100% rename from xdr-json/curr/PathPaymentStrictSendResultCode.json rename to xdr-json/PathPaymentStrictSendResultCode.json diff --git a/xdr-json/curr/PathPaymentStrictSendResultSuccess.json b/xdr-json/PathPaymentStrictSendResultSuccess.json similarity index 100% rename from xdr-json/curr/PathPaymentStrictSendResultSuccess.json rename to xdr-json/PathPaymentStrictSendResultSuccess.json diff --git a/xdr-json/curr/PaymentOp.json b/xdr-json/PaymentOp.json similarity index 100% rename from xdr-json/curr/PaymentOp.json rename to xdr-json/PaymentOp.json diff --git a/xdr-json/curr/PaymentResult.json b/xdr-json/PaymentResult.json similarity index 100% rename from xdr-json/curr/PaymentResult.json rename to xdr-json/PaymentResult.json diff --git a/xdr-json/curr/PaymentResultCode.json b/xdr-json/PaymentResultCode.json similarity index 100% rename from xdr-json/curr/PaymentResultCode.json rename to xdr-json/PaymentResultCode.json diff --git a/xdr-json/curr/PeerAddress.json b/xdr-json/PeerAddress.json similarity index 100% rename from xdr-json/curr/PeerAddress.json rename to xdr-json/PeerAddress.json diff --git a/xdr-json/curr/PeerAddressIp.json b/xdr-json/PeerAddressIp.json similarity index 100% rename from xdr-json/curr/PeerAddressIp.json rename to xdr-json/PeerAddressIp.json diff --git a/xdr-json/curr/PeerStats.json b/xdr-json/PeerStats.json similarity index 100% rename from xdr-json/curr/PeerStats.json rename to xdr-json/PeerStats.json diff --git a/xdr-json/curr/PersistedScpState.json b/xdr-json/PersistedScpState.json similarity index 100% rename from xdr-json/curr/PersistedScpState.json rename to xdr-json/PersistedScpState.json diff --git a/xdr-json/curr/PersistedScpStateV0.json b/xdr-json/PersistedScpStateV0.json similarity index 100% rename from xdr-json/curr/PersistedScpStateV0.json rename to xdr-json/PersistedScpStateV0.json diff --git a/xdr-json/curr/PersistedScpStateV1.json b/xdr-json/PersistedScpStateV1.json similarity index 100% rename from xdr-json/curr/PersistedScpStateV1.json rename to xdr-json/PersistedScpStateV1.json diff --git a/xdr-json/curr/PoolId.json b/xdr-json/PoolId.json similarity index 100% rename from xdr-json/curr/PoolId.json rename to xdr-json/PoolId.json diff --git a/xdr-json/curr/PreconditionType.json b/xdr-json/PreconditionType.json similarity index 100% rename from xdr-json/curr/PreconditionType.json rename to xdr-json/PreconditionType.json diff --git a/xdr-json/curr/Preconditions.json b/xdr-json/Preconditions.json similarity index 100% rename from xdr-json/curr/Preconditions.json rename to xdr-json/Preconditions.json diff --git a/xdr-json/curr/PreconditionsV2.json b/xdr-json/PreconditionsV2.json similarity index 100% rename from xdr-json/curr/PreconditionsV2.json rename to xdr-json/PreconditionsV2.json diff --git a/xdr-json/curr/Price.json b/xdr-json/Price.json similarity index 100% rename from xdr-json/curr/Price.json rename to xdr-json/Price.json diff --git a/xdr-json/curr/PublicKey.json b/xdr-json/PublicKey.json similarity index 100% rename from xdr-json/curr/PublicKey.json rename to xdr-json/PublicKey.json diff --git a/xdr-json/curr/PublicKeyType.json b/xdr-json/PublicKeyType.json similarity index 100% rename from xdr-json/curr/PublicKeyType.json rename to xdr-json/PublicKeyType.json diff --git a/xdr-json/curr/RestoreFootprintOp.json b/xdr-json/RestoreFootprintOp.json similarity index 100% rename from xdr-json/curr/RestoreFootprintOp.json rename to xdr-json/RestoreFootprintOp.json diff --git a/xdr-json/curr/RestoreFootprintResult.json b/xdr-json/RestoreFootprintResult.json similarity index 100% rename from xdr-json/curr/RestoreFootprintResult.json rename to xdr-json/RestoreFootprintResult.json diff --git a/xdr-json/curr/RestoreFootprintResultCode.json b/xdr-json/RestoreFootprintResultCode.json similarity index 100% rename from xdr-json/curr/RestoreFootprintResultCode.json rename to xdr-json/RestoreFootprintResultCode.json diff --git a/xdr-json/curr/RevokeSponsorshipOp.json b/xdr-json/RevokeSponsorshipOp.json similarity index 100% rename from xdr-json/curr/RevokeSponsorshipOp.json rename to xdr-json/RevokeSponsorshipOp.json diff --git a/xdr-json/curr/RevokeSponsorshipOpSigner.json b/xdr-json/RevokeSponsorshipOpSigner.json similarity index 100% rename from xdr-json/curr/RevokeSponsorshipOpSigner.json rename to xdr-json/RevokeSponsorshipOpSigner.json diff --git a/xdr-json/curr/RevokeSponsorshipResult.json b/xdr-json/RevokeSponsorshipResult.json similarity index 100% rename from xdr-json/curr/RevokeSponsorshipResult.json rename to xdr-json/RevokeSponsorshipResult.json diff --git a/xdr-json/curr/RevokeSponsorshipResultCode.json b/xdr-json/RevokeSponsorshipResultCode.json similarity index 100% rename from xdr-json/curr/RevokeSponsorshipResultCode.json rename to xdr-json/RevokeSponsorshipResultCode.json diff --git a/xdr-json/curr/RevokeSponsorshipType.json b/xdr-json/RevokeSponsorshipType.json similarity index 100% rename from xdr-json/curr/RevokeSponsorshipType.json rename to xdr-json/RevokeSponsorshipType.json diff --git a/xdr-json/curr/SError.json b/xdr-json/SError.json similarity index 100% rename from xdr-json/curr/SError.json rename to xdr-json/SError.json diff --git a/xdr-json/curr/ScAddress.json b/xdr-json/ScAddress.json similarity index 100% rename from xdr-json/curr/ScAddress.json rename to xdr-json/ScAddress.json diff --git a/xdr-json/curr/ScAddressType.json b/xdr-json/ScAddressType.json similarity index 100% rename from xdr-json/curr/ScAddressType.json rename to xdr-json/ScAddressType.json diff --git a/xdr-json/curr/ScBytes.json b/xdr-json/ScBytes.json similarity index 100% rename from xdr-json/curr/ScBytes.json rename to xdr-json/ScBytes.json diff --git a/xdr-json/curr/ScContractInstance.json b/xdr-json/ScContractInstance.json similarity index 100% rename from xdr-json/curr/ScContractInstance.json rename to xdr-json/ScContractInstance.json diff --git a/xdr-json/curr/ScEnvMetaEntry.json b/xdr-json/ScEnvMetaEntry.json similarity index 100% rename from xdr-json/curr/ScEnvMetaEntry.json rename to xdr-json/ScEnvMetaEntry.json diff --git a/xdr-json/curr/ScEnvMetaEntryInterfaceVersion.json b/xdr-json/ScEnvMetaEntryInterfaceVersion.json similarity index 100% rename from xdr-json/curr/ScEnvMetaEntryInterfaceVersion.json rename to xdr-json/ScEnvMetaEntryInterfaceVersion.json diff --git a/xdr-json/curr/ScEnvMetaKind.json b/xdr-json/ScEnvMetaKind.json similarity index 100% rename from xdr-json/curr/ScEnvMetaKind.json rename to xdr-json/ScEnvMetaKind.json diff --git a/xdr-json/curr/ScError.json b/xdr-json/ScError.json similarity index 100% rename from xdr-json/curr/ScError.json rename to xdr-json/ScError.json diff --git a/xdr-json/curr/ScErrorCode.json b/xdr-json/ScErrorCode.json similarity index 100% rename from xdr-json/curr/ScErrorCode.json rename to xdr-json/ScErrorCode.json diff --git a/xdr-json/curr/ScErrorType.json b/xdr-json/ScErrorType.json similarity index 100% rename from xdr-json/curr/ScErrorType.json rename to xdr-json/ScErrorType.json diff --git a/xdr-json/curr/ScMap.json b/xdr-json/ScMap.json similarity index 100% rename from xdr-json/curr/ScMap.json rename to xdr-json/ScMap.json diff --git a/xdr-json/curr/ScMapEntry.json b/xdr-json/ScMapEntry.json similarity index 100% rename from xdr-json/curr/ScMapEntry.json rename to xdr-json/ScMapEntry.json diff --git a/xdr-json/curr/ScMetaEntry.json b/xdr-json/ScMetaEntry.json similarity index 100% rename from xdr-json/curr/ScMetaEntry.json rename to xdr-json/ScMetaEntry.json diff --git a/xdr-json/curr/ScMetaKind.json b/xdr-json/ScMetaKind.json similarity index 100% rename from xdr-json/curr/ScMetaKind.json rename to xdr-json/ScMetaKind.json diff --git a/xdr-json/curr/ScMetaV0.json b/xdr-json/ScMetaV0.json similarity index 100% rename from xdr-json/curr/ScMetaV0.json rename to xdr-json/ScMetaV0.json diff --git a/xdr-json/curr/ScNonceKey.json b/xdr-json/ScNonceKey.json similarity index 100% rename from xdr-json/curr/ScNonceKey.json rename to xdr-json/ScNonceKey.json diff --git a/xdr-json/curr/ScSpecEntry.json b/xdr-json/ScSpecEntry.json similarity index 100% rename from xdr-json/curr/ScSpecEntry.json rename to xdr-json/ScSpecEntry.json diff --git a/xdr-json/curr/ScSpecEntryKind.json b/xdr-json/ScSpecEntryKind.json similarity index 100% rename from xdr-json/curr/ScSpecEntryKind.json rename to xdr-json/ScSpecEntryKind.json diff --git a/xdr-json/curr/ScSpecEventDataFormat.json b/xdr-json/ScSpecEventDataFormat.json similarity index 100% rename from xdr-json/curr/ScSpecEventDataFormat.json rename to xdr-json/ScSpecEventDataFormat.json diff --git a/xdr-json/curr/ScSpecEventParamLocationV0.json b/xdr-json/ScSpecEventParamLocationV0.json similarity index 100% rename from xdr-json/curr/ScSpecEventParamLocationV0.json rename to xdr-json/ScSpecEventParamLocationV0.json diff --git a/xdr-json/curr/ScSpecEventParamV0.json b/xdr-json/ScSpecEventParamV0.json similarity index 100% rename from xdr-json/curr/ScSpecEventParamV0.json rename to xdr-json/ScSpecEventParamV0.json diff --git a/xdr-json/curr/ScSpecEventV0.json b/xdr-json/ScSpecEventV0.json similarity index 100% rename from xdr-json/curr/ScSpecEventV0.json rename to xdr-json/ScSpecEventV0.json diff --git a/xdr-json/curr/ScSpecFunctionInputV0.json b/xdr-json/ScSpecFunctionInputV0.json similarity index 100% rename from xdr-json/curr/ScSpecFunctionInputV0.json rename to xdr-json/ScSpecFunctionInputV0.json diff --git a/xdr-json/curr/ScSpecFunctionV0.json b/xdr-json/ScSpecFunctionV0.json similarity index 100% rename from xdr-json/curr/ScSpecFunctionV0.json rename to xdr-json/ScSpecFunctionV0.json diff --git a/xdr-json/curr/ScSpecType.json b/xdr-json/ScSpecType.json similarity index 100% rename from xdr-json/curr/ScSpecType.json rename to xdr-json/ScSpecType.json diff --git a/xdr-json/curr/ScSpecTypeBytesN.json b/xdr-json/ScSpecTypeBytesN.json similarity index 100% rename from xdr-json/curr/ScSpecTypeBytesN.json rename to xdr-json/ScSpecTypeBytesN.json diff --git a/xdr-json/curr/ScSpecTypeDef.json b/xdr-json/ScSpecTypeDef.json similarity index 100% rename from xdr-json/curr/ScSpecTypeDef.json rename to xdr-json/ScSpecTypeDef.json diff --git a/xdr-json/curr/ScSpecTypeMap.json b/xdr-json/ScSpecTypeMap.json similarity index 100% rename from xdr-json/curr/ScSpecTypeMap.json rename to xdr-json/ScSpecTypeMap.json diff --git a/xdr-json/curr/ScSpecTypeOption.json b/xdr-json/ScSpecTypeOption.json similarity index 100% rename from xdr-json/curr/ScSpecTypeOption.json rename to xdr-json/ScSpecTypeOption.json diff --git a/xdr-json/curr/ScSpecTypeResult.json b/xdr-json/ScSpecTypeResult.json similarity index 100% rename from xdr-json/curr/ScSpecTypeResult.json rename to xdr-json/ScSpecTypeResult.json diff --git a/xdr-json/curr/ScSpecTypeTuple.json b/xdr-json/ScSpecTypeTuple.json similarity index 100% rename from xdr-json/curr/ScSpecTypeTuple.json rename to xdr-json/ScSpecTypeTuple.json diff --git a/xdr-json/curr/ScSpecTypeUdt.json b/xdr-json/ScSpecTypeUdt.json similarity index 100% rename from xdr-json/curr/ScSpecTypeUdt.json rename to xdr-json/ScSpecTypeUdt.json diff --git a/xdr-json/curr/ScSpecTypeVec.json b/xdr-json/ScSpecTypeVec.json similarity index 100% rename from xdr-json/curr/ScSpecTypeVec.json rename to xdr-json/ScSpecTypeVec.json diff --git a/xdr-json/curr/ScSpecUdtEnumCaseV0.json b/xdr-json/ScSpecUdtEnumCaseV0.json similarity index 100% rename from xdr-json/curr/ScSpecUdtEnumCaseV0.json rename to xdr-json/ScSpecUdtEnumCaseV0.json diff --git a/xdr-json/curr/ScSpecUdtEnumV0.json b/xdr-json/ScSpecUdtEnumV0.json similarity index 100% rename from xdr-json/curr/ScSpecUdtEnumV0.json rename to xdr-json/ScSpecUdtEnumV0.json diff --git a/xdr-json/curr/ScSpecUdtErrorEnumCaseV0.json b/xdr-json/ScSpecUdtErrorEnumCaseV0.json similarity index 100% rename from xdr-json/curr/ScSpecUdtErrorEnumCaseV0.json rename to xdr-json/ScSpecUdtErrorEnumCaseV0.json diff --git a/xdr-json/curr/ScSpecUdtErrorEnumV0.json b/xdr-json/ScSpecUdtErrorEnumV0.json similarity index 100% rename from xdr-json/curr/ScSpecUdtErrorEnumV0.json rename to xdr-json/ScSpecUdtErrorEnumV0.json diff --git a/xdr-json/curr/ScSpecUdtStructFieldV0.json b/xdr-json/ScSpecUdtStructFieldV0.json similarity index 100% rename from xdr-json/curr/ScSpecUdtStructFieldV0.json rename to xdr-json/ScSpecUdtStructFieldV0.json diff --git a/xdr-json/curr/ScSpecUdtStructV0.json b/xdr-json/ScSpecUdtStructV0.json similarity index 100% rename from xdr-json/curr/ScSpecUdtStructV0.json rename to xdr-json/ScSpecUdtStructV0.json diff --git a/xdr-json/curr/ScSpecUdtUnionCaseTupleV0.json b/xdr-json/ScSpecUdtUnionCaseTupleV0.json similarity index 100% rename from xdr-json/curr/ScSpecUdtUnionCaseTupleV0.json rename to xdr-json/ScSpecUdtUnionCaseTupleV0.json diff --git a/xdr-json/curr/ScSpecUdtUnionCaseV0.json b/xdr-json/ScSpecUdtUnionCaseV0.json similarity index 100% rename from xdr-json/curr/ScSpecUdtUnionCaseV0.json rename to xdr-json/ScSpecUdtUnionCaseV0.json diff --git a/xdr-json/curr/ScSpecUdtUnionCaseV0Kind.json b/xdr-json/ScSpecUdtUnionCaseV0Kind.json similarity index 100% rename from xdr-json/curr/ScSpecUdtUnionCaseV0Kind.json rename to xdr-json/ScSpecUdtUnionCaseV0Kind.json diff --git a/xdr-json/curr/ScSpecUdtUnionCaseVoidV0.json b/xdr-json/ScSpecUdtUnionCaseVoidV0.json similarity index 100% rename from xdr-json/curr/ScSpecUdtUnionCaseVoidV0.json rename to xdr-json/ScSpecUdtUnionCaseVoidV0.json diff --git a/xdr-json/curr/ScSpecUdtUnionV0.json b/xdr-json/ScSpecUdtUnionV0.json similarity index 100% rename from xdr-json/curr/ScSpecUdtUnionV0.json rename to xdr-json/ScSpecUdtUnionV0.json diff --git a/xdr-json/curr/ScString.json b/xdr-json/ScString.json similarity index 100% rename from xdr-json/curr/ScString.json rename to xdr-json/ScString.json diff --git a/xdr-json/curr/ScSymbol.json b/xdr-json/ScSymbol.json similarity index 100% rename from xdr-json/curr/ScSymbol.json rename to xdr-json/ScSymbol.json diff --git a/xdr-json/curr/ScVal.json b/xdr-json/ScVal.json similarity index 100% rename from xdr-json/curr/ScVal.json rename to xdr-json/ScVal.json diff --git a/xdr-json/curr/ScValType.json b/xdr-json/ScValType.json similarity index 100% rename from xdr-json/curr/ScValType.json rename to xdr-json/ScValType.json diff --git a/xdr-json/curr/ScVec.json b/xdr-json/ScVec.json similarity index 100% rename from xdr-json/curr/ScVec.json rename to xdr-json/ScVec.json diff --git a/xdr-json/curr/ScpBallot.json b/xdr-json/ScpBallot.json similarity index 100% rename from xdr-json/curr/ScpBallot.json rename to xdr-json/ScpBallot.json diff --git a/xdr-json/curr/ScpEnvelope.json b/xdr-json/ScpEnvelope.json similarity index 100% rename from xdr-json/curr/ScpEnvelope.json rename to xdr-json/ScpEnvelope.json diff --git a/xdr-json/curr/ScpHistoryEntry.json b/xdr-json/ScpHistoryEntry.json similarity index 100% rename from xdr-json/curr/ScpHistoryEntry.json rename to xdr-json/ScpHistoryEntry.json diff --git a/xdr-json/curr/ScpHistoryEntryV0.json b/xdr-json/ScpHistoryEntryV0.json similarity index 100% rename from xdr-json/curr/ScpHistoryEntryV0.json rename to xdr-json/ScpHistoryEntryV0.json diff --git a/xdr-json/curr/ScpNomination.json b/xdr-json/ScpNomination.json similarity index 100% rename from xdr-json/curr/ScpNomination.json rename to xdr-json/ScpNomination.json diff --git a/xdr-json/curr/ScpQuorumSet.json b/xdr-json/ScpQuorumSet.json similarity index 100% rename from xdr-json/curr/ScpQuorumSet.json rename to xdr-json/ScpQuorumSet.json diff --git a/xdr-json/curr/ScpStatement.json b/xdr-json/ScpStatement.json similarity index 100% rename from xdr-json/curr/ScpStatement.json rename to xdr-json/ScpStatement.json diff --git a/xdr-json/curr/ScpStatementConfirm.json b/xdr-json/ScpStatementConfirm.json similarity index 100% rename from xdr-json/curr/ScpStatementConfirm.json rename to xdr-json/ScpStatementConfirm.json diff --git a/xdr-json/curr/ScpStatementExternalize.json b/xdr-json/ScpStatementExternalize.json similarity index 100% rename from xdr-json/curr/ScpStatementExternalize.json rename to xdr-json/ScpStatementExternalize.json diff --git a/xdr-json/curr/ScpStatementPledges.json b/xdr-json/ScpStatementPledges.json similarity index 100% rename from xdr-json/curr/ScpStatementPledges.json rename to xdr-json/ScpStatementPledges.json diff --git a/xdr-json/curr/ScpStatementPrepare.json b/xdr-json/ScpStatementPrepare.json similarity index 100% rename from xdr-json/curr/ScpStatementPrepare.json rename to xdr-json/ScpStatementPrepare.json diff --git a/xdr-json/curr/ScpStatementType.json b/xdr-json/ScpStatementType.json similarity index 100% rename from xdr-json/curr/ScpStatementType.json rename to xdr-json/ScpStatementType.json diff --git a/xdr-json/curr/SendMore.json b/xdr-json/SendMore.json similarity index 100% rename from xdr-json/curr/SendMore.json rename to xdr-json/SendMore.json diff --git a/xdr-json/curr/SendMoreExtended.json b/xdr-json/SendMoreExtended.json similarity index 100% rename from xdr-json/curr/SendMoreExtended.json rename to xdr-json/SendMoreExtended.json diff --git a/xdr-json/curr/SequenceNumber.json b/xdr-json/SequenceNumber.json similarity index 100% rename from xdr-json/curr/SequenceNumber.json rename to xdr-json/SequenceNumber.json diff --git a/xdr-json/curr/SerializedBinaryFuseFilter.json b/xdr-json/SerializedBinaryFuseFilter.json similarity index 100% rename from xdr-json/curr/SerializedBinaryFuseFilter.json rename to xdr-json/SerializedBinaryFuseFilter.json diff --git a/xdr-json/curr/SetOptionsOp.json b/xdr-json/SetOptionsOp.json similarity index 100% rename from xdr-json/curr/SetOptionsOp.json rename to xdr-json/SetOptionsOp.json diff --git a/xdr-json/curr/SetOptionsResult.json b/xdr-json/SetOptionsResult.json similarity index 100% rename from xdr-json/curr/SetOptionsResult.json rename to xdr-json/SetOptionsResult.json diff --git a/xdr-json/curr/SetOptionsResultCode.json b/xdr-json/SetOptionsResultCode.json similarity index 100% rename from xdr-json/curr/SetOptionsResultCode.json rename to xdr-json/SetOptionsResultCode.json diff --git a/xdr-json/curr/SetTrustLineFlagsOp.json b/xdr-json/SetTrustLineFlagsOp.json similarity index 100% rename from xdr-json/curr/SetTrustLineFlagsOp.json rename to xdr-json/SetTrustLineFlagsOp.json diff --git a/xdr-json/curr/SetTrustLineFlagsResult.json b/xdr-json/SetTrustLineFlagsResult.json similarity index 100% rename from xdr-json/curr/SetTrustLineFlagsResult.json rename to xdr-json/SetTrustLineFlagsResult.json diff --git a/xdr-json/curr/SetTrustLineFlagsResultCode.json b/xdr-json/SetTrustLineFlagsResultCode.json similarity index 100% rename from xdr-json/curr/SetTrustLineFlagsResultCode.json rename to xdr-json/SetTrustLineFlagsResultCode.json diff --git a/xdr-json/curr/ShortHashSeed.json b/xdr-json/ShortHashSeed.json similarity index 100% rename from xdr-json/curr/ShortHashSeed.json rename to xdr-json/ShortHashSeed.json diff --git a/xdr-json/curr/Signature.json b/xdr-json/Signature.json similarity index 100% rename from xdr-json/curr/Signature.json rename to xdr-json/Signature.json diff --git a/xdr-json/curr/SignatureHint.json b/xdr-json/SignatureHint.json similarity index 100% rename from xdr-json/curr/SignatureHint.json rename to xdr-json/SignatureHint.json diff --git a/xdr-json/curr/SignedTimeSlicedSurveyRequestMessage.json b/xdr-json/SignedTimeSlicedSurveyRequestMessage.json similarity index 100% rename from xdr-json/curr/SignedTimeSlicedSurveyRequestMessage.json rename to xdr-json/SignedTimeSlicedSurveyRequestMessage.json diff --git a/xdr-json/curr/SignedTimeSlicedSurveyResponseMessage.json b/xdr-json/SignedTimeSlicedSurveyResponseMessage.json similarity index 100% rename from xdr-json/curr/SignedTimeSlicedSurveyResponseMessage.json rename to xdr-json/SignedTimeSlicedSurveyResponseMessage.json diff --git a/xdr-json/curr/SignedTimeSlicedSurveyStartCollectingMessage.json b/xdr-json/SignedTimeSlicedSurveyStartCollectingMessage.json similarity index 100% rename from xdr-json/curr/SignedTimeSlicedSurveyStartCollectingMessage.json rename to xdr-json/SignedTimeSlicedSurveyStartCollectingMessage.json diff --git a/xdr-json/curr/SignedTimeSlicedSurveyStopCollectingMessage.json b/xdr-json/SignedTimeSlicedSurveyStopCollectingMessage.json similarity index 100% rename from xdr-json/curr/SignedTimeSlicedSurveyStopCollectingMessage.json rename to xdr-json/SignedTimeSlicedSurveyStopCollectingMessage.json diff --git a/xdr-json/curr/Signer.json b/xdr-json/Signer.json similarity index 100% rename from xdr-json/curr/Signer.json rename to xdr-json/Signer.json diff --git a/xdr-json/curr/SignerKey.json b/xdr-json/SignerKey.json similarity index 100% rename from xdr-json/curr/SignerKey.json rename to xdr-json/SignerKey.json diff --git a/xdr-json/curr/SignerKeyEd25519SignedPayload.json b/xdr-json/SignerKeyEd25519SignedPayload.json similarity index 100% rename from xdr-json/curr/SignerKeyEd25519SignedPayload.json rename to xdr-json/SignerKeyEd25519SignedPayload.json diff --git a/xdr-json/curr/SignerKeyType.json b/xdr-json/SignerKeyType.json similarity index 100% rename from xdr-json/curr/SignerKeyType.json rename to xdr-json/SignerKeyType.json diff --git a/xdr-json/curr/SimplePaymentResult.json b/xdr-json/SimplePaymentResult.json similarity index 100% rename from xdr-json/curr/SimplePaymentResult.json rename to xdr-json/SimplePaymentResult.json diff --git a/xdr-json/curr/SorobanAddressCredentials.json b/xdr-json/SorobanAddressCredentials.json similarity index 100% rename from xdr-json/curr/SorobanAddressCredentials.json rename to xdr-json/SorobanAddressCredentials.json diff --git a/xdr-json/curr/SorobanAuthorizationEntries.json b/xdr-json/SorobanAuthorizationEntries.json similarity index 100% rename from xdr-json/curr/SorobanAuthorizationEntries.json rename to xdr-json/SorobanAuthorizationEntries.json diff --git a/xdr-json/curr/SorobanAuthorizationEntry.json b/xdr-json/SorobanAuthorizationEntry.json similarity index 100% rename from xdr-json/curr/SorobanAuthorizationEntry.json rename to xdr-json/SorobanAuthorizationEntry.json diff --git a/xdr-json/curr/SorobanAuthorizedFunction.json b/xdr-json/SorobanAuthorizedFunction.json similarity index 100% rename from xdr-json/curr/SorobanAuthorizedFunction.json rename to xdr-json/SorobanAuthorizedFunction.json diff --git a/xdr-json/curr/SorobanAuthorizedFunctionType.json b/xdr-json/SorobanAuthorizedFunctionType.json similarity index 100% rename from xdr-json/curr/SorobanAuthorizedFunctionType.json rename to xdr-json/SorobanAuthorizedFunctionType.json diff --git a/xdr-json/curr/SorobanAuthorizedInvocation.json b/xdr-json/SorobanAuthorizedInvocation.json similarity index 100% rename from xdr-json/curr/SorobanAuthorizedInvocation.json rename to xdr-json/SorobanAuthorizedInvocation.json diff --git a/xdr-json/curr/SorobanCredentials.json b/xdr-json/SorobanCredentials.json similarity index 100% rename from xdr-json/curr/SorobanCredentials.json rename to xdr-json/SorobanCredentials.json diff --git a/xdr-json/curr/SorobanCredentialsType.json b/xdr-json/SorobanCredentialsType.json similarity index 100% rename from xdr-json/curr/SorobanCredentialsType.json rename to xdr-json/SorobanCredentialsType.json diff --git a/xdr-json/curr/SorobanResources.json b/xdr-json/SorobanResources.json similarity index 100% rename from xdr-json/curr/SorobanResources.json rename to xdr-json/SorobanResources.json diff --git a/xdr-json/curr/SorobanResourcesExtV0.json b/xdr-json/SorobanResourcesExtV0.json similarity index 100% rename from xdr-json/curr/SorobanResourcesExtV0.json rename to xdr-json/SorobanResourcesExtV0.json diff --git a/xdr-json/curr/SorobanTransactionData.json b/xdr-json/SorobanTransactionData.json similarity index 100% rename from xdr-json/curr/SorobanTransactionData.json rename to xdr-json/SorobanTransactionData.json diff --git a/xdr-json/curr/SorobanTransactionDataExt.json b/xdr-json/SorobanTransactionDataExt.json similarity index 100% rename from xdr-json/curr/SorobanTransactionDataExt.json rename to xdr-json/SorobanTransactionDataExt.json diff --git a/xdr-json/curr/SorobanTransactionMeta.json b/xdr-json/SorobanTransactionMeta.json similarity index 100% rename from xdr-json/curr/SorobanTransactionMeta.json rename to xdr-json/SorobanTransactionMeta.json diff --git a/xdr-json/curr/SorobanTransactionMetaExt.json b/xdr-json/SorobanTransactionMetaExt.json similarity index 100% rename from xdr-json/curr/SorobanTransactionMetaExt.json rename to xdr-json/SorobanTransactionMetaExt.json diff --git a/xdr-json/curr/SorobanTransactionMetaExtV1.json b/xdr-json/SorobanTransactionMetaExtV1.json similarity index 100% rename from xdr-json/curr/SorobanTransactionMetaExtV1.json rename to xdr-json/SorobanTransactionMetaExtV1.json diff --git a/xdr-json/curr/SorobanTransactionMetaV2.json b/xdr-json/SorobanTransactionMetaV2.json similarity index 100% rename from xdr-json/curr/SorobanTransactionMetaV2.json rename to xdr-json/SorobanTransactionMetaV2.json diff --git a/xdr-json/curr/SponsorshipDescriptor.json b/xdr-json/SponsorshipDescriptor.json similarity index 100% rename from xdr-json/curr/SponsorshipDescriptor.json rename to xdr-json/SponsorshipDescriptor.json diff --git a/xdr-json/curr/StateArchivalSettings.json b/xdr-json/StateArchivalSettings.json similarity index 100% rename from xdr-json/curr/StateArchivalSettings.json rename to xdr-json/StateArchivalSettings.json diff --git a/xdr-json/curr/StellarMessage.json b/xdr-json/StellarMessage.json similarity index 100% rename from xdr-json/curr/StellarMessage.json rename to xdr-json/StellarMessage.json diff --git a/xdr-json/curr/StellarValue.json b/xdr-json/StellarValue.json similarity index 100% rename from xdr-json/curr/StellarValue.json rename to xdr-json/StellarValue.json diff --git a/xdr-json/curr/StellarValueExt.json b/xdr-json/StellarValueExt.json similarity index 100% rename from xdr-json/curr/StellarValueExt.json rename to xdr-json/StellarValueExt.json diff --git a/xdr-json/curr/StellarValueType.json b/xdr-json/StellarValueType.json similarity index 100% rename from xdr-json/curr/StellarValueType.json rename to xdr-json/StellarValueType.json diff --git a/xdr-json/curr/StoredDebugTransactionSet.json b/xdr-json/StoredDebugTransactionSet.json similarity index 100% rename from xdr-json/curr/StoredDebugTransactionSet.json rename to xdr-json/StoredDebugTransactionSet.json diff --git a/xdr-json/curr/StoredTransactionSet.json b/xdr-json/StoredTransactionSet.json similarity index 100% rename from xdr-json/curr/StoredTransactionSet.json rename to xdr-json/StoredTransactionSet.json diff --git a/xdr-json/curr/String32.json b/xdr-json/String32.json similarity index 100% rename from xdr-json/curr/String32.json rename to xdr-json/String32.json diff --git a/xdr-json/curr/String64.json b/xdr-json/String64.json similarity index 100% rename from xdr-json/curr/String64.json rename to xdr-json/String64.json diff --git a/xdr-json/curr/SurveyMessageCommandType.json b/xdr-json/SurveyMessageCommandType.json similarity index 100% rename from xdr-json/curr/SurveyMessageCommandType.json rename to xdr-json/SurveyMessageCommandType.json diff --git a/xdr-json/curr/SurveyMessageResponseType.json b/xdr-json/SurveyMessageResponseType.json similarity index 100% rename from xdr-json/curr/SurveyMessageResponseType.json rename to xdr-json/SurveyMessageResponseType.json diff --git a/xdr-json/curr/SurveyRequestMessage.json b/xdr-json/SurveyRequestMessage.json similarity index 100% rename from xdr-json/curr/SurveyRequestMessage.json rename to xdr-json/SurveyRequestMessage.json diff --git a/xdr-json/curr/SurveyResponseBody.json b/xdr-json/SurveyResponseBody.json similarity index 100% rename from xdr-json/curr/SurveyResponseBody.json rename to xdr-json/SurveyResponseBody.json diff --git a/xdr-json/curr/SurveyResponseMessage.json b/xdr-json/SurveyResponseMessage.json similarity index 100% rename from xdr-json/curr/SurveyResponseMessage.json rename to xdr-json/SurveyResponseMessage.json diff --git a/xdr-json/curr/ThresholdIndexes.json b/xdr-json/ThresholdIndexes.json similarity index 100% rename from xdr-json/curr/ThresholdIndexes.json rename to xdr-json/ThresholdIndexes.json diff --git a/xdr-json/curr/Thresholds.json b/xdr-json/Thresholds.json similarity index 100% rename from xdr-json/curr/Thresholds.json rename to xdr-json/Thresholds.json diff --git a/xdr-json/curr/TimeBounds.json b/xdr-json/TimeBounds.json similarity index 100% rename from xdr-json/curr/TimeBounds.json rename to xdr-json/TimeBounds.json diff --git a/xdr-json/curr/TimePoint.json b/xdr-json/TimePoint.json similarity index 100% rename from xdr-json/curr/TimePoint.json rename to xdr-json/TimePoint.json diff --git a/xdr-json/curr/TimeSlicedNodeData.json b/xdr-json/TimeSlicedNodeData.json similarity index 100% rename from xdr-json/curr/TimeSlicedNodeData.json rename to xdr-json/TimeSlicedNodeData.json diff --git a/xdr-json/curr/TimeSlicedPeerData.json b/xdr-json/TimeSlicedPeerData.json similarity index 100% rename from xdr-json/curr/TimeSlicedPeerData.json rename to xdr-json/TimeSlicedPeerData.json diff --git a/xdr-json/curr/TimeSlicedPeerDataList.json b/xdr-json/TimeSlicedPeerDataList.json similarity index 100% rename from xdr-json/curr/TimeSlicedPeerDataList.json rename to xdr-json/TimeSlicedPeerDataList.json diff --git a/xdr-json/curr/TimeSlicedSurveyRequestMessage.json b/xdr-json/TimeSlicedSurveyRequestMessage.json similarity index 100% rename from xdr-json/curr/TimeSlicedSurveyRequestMessage.json rename to xdr-json/TimeSlicedSurveyRequestMessage.json diff --git a/xdr-json/curr/TimeSlicedSurveyResponseMessage.json b/xdr-json/TimeSlicedSurveyResponseMessage.json similarity index 100% rename from xdr-json/curr/TimeSlicedSurveyResponseMessage.json rename to xdr-json/TimeSlicedSurveyResponseMessage.json diff --git a/xdr-json/curr/TimeSlicedSurveyStartCollectingMessage.json b/xdr-json/TimeSlicedSurveyStartCollectingMessage.json similarity index 100% rename from xdr-json/curr/TimeSlicedSurveyStartCollectingMessage.json rename to xdr-json/TimeSlicedSurveyStartCollectingMessage.json diff --git a/xdr-json/curr/TimeSlicedSurveyStopCollectingMessage.json b/xdr-json/TimeSlicedSurveyStopCollectingMessage.json similarity index 100% rename from xdr-json/curr/TimeSlicedSurveyStopCollectingMessage.json rename to xdr-json/TimeSlicedSurveyStopCollectingMessage.json diff --git a/xdr-json/curr/TopologyResponseBodyV2.json b/xdr-json/TopologyResponseBodyV2.json similarity index 100% rename from xdr-json/curr/TopologyResponseBodyV2.json rename to xdr-json/TopologyResponseBodyV2.json diff --git a/xdr-json/curr/Transaction.json b/xdr-json/Transaction.json similarity index 100% rename from xdr-json/curr/Transaction.json rename to xdr-json/Transaction.json diff --git a/xdr-json/curr/TransactionEnvelope.json b/xdr-json/TransactionEnvelope.json similarity index 100% rename from xdr-json/curr/TransactionEnvelope.json rename to xdr-json/TransactionEnvelope.json diff --git a/xdr-json/curr/TransactionEvent.json b/xdr-json/TransactionEvent.json similarity index 100% rename from xdr-json/curr/TransactionEvent.json rename to xdr-json/TransactionEvent.json diff --git a/xdr-json/curr/TransactionEventStage.json b/xdr-json/TransactionEventStage.json similarity index 100% rename from xdr-json/curr/TransactionEventStage.json rename to xdr-json/TransactionEventStage.json diff --git a/xdr-json/curr/TransactionExt.json b/xdr-json/TransactionExt.json similarity index 100% rename from xdr-json/curr/TransactionExt.json rename to xdr-json/TransactionExt.json diff --git a/xdr-json/curr/TransactionHistoryEntry.json b/xdr-json/TransactionHistoryEntry.json similarity index 100% rename from xdr-json/curr/TransactionHistoryEntry.json rename to xdr-json/TransactionHistoryEntry.json diff --git a/xdr-json/curr/TransactionHistoryEntryExt.json b/xdr-json/TransactionHistoryEntryExt.json similarity index 100% rename from xdr-json/curr/TransactionHistoryEntryExt.json rename to xdr-json/TransactionHistoryEntryExt.json diff --git a/xdr-json/curr/TransactionHistoryResultEntry.json b/xdr-json/TransactionHistoryResultEntry.json similarity index 100% rename from xdr-json/curr/TransactionHistoryResultEntry.json rename to xdr-json/TransactionHistoryResultEntry.json diff --git a/xdr-json/curr/TransactionHistoryResultEntryExt.json b/xdr-json/TransactionHistoryResultEntryExt.json similarity index 100% rename from xdr-json/curr/TransactionHistoryResultEntryExt.json rename to xdr-json/TransactionHistoryResultEntryExt.json diff --git a/xdr-json/curr/TransactionMeta.json b/xdr-json/TransactionMeta.json similarity index 100% rename from xdr-json/curr/TransactionMeta.json rename to xdr-json/TransactionMeta.json diff --git a/xdr-json/curr/TransactionMetaV1.json b/xdr-json/TransactionMetaV1.json similarity index 100% rename from xdr-json/curr/TransactionMetaV1.json rename to xdr-json/TransactionMetaV1.json diff --git a/xdr-json/curr/TransactionMetaV2.json b/xdr-json/TransactionMetaV2.json similarity index 100% rename from xdr-json/curr/TransactionMetaV2.json rename to xdr-json/TransactionMetaV2.json diff --git a/xdr-json/curr/TransactionMetaV3.json b/xdr-json/TransactionMetaV3.json similarity index 100% rename from xdr-json/curr/TransactionMetaV3.json rename to xdr-json/TransactionMetaV3.json diff --git a/xdr-json/curr/TransactionMetaV4.json b/xdr-json/TransactionMetaV4.json similarity index 100% rename from xdr-json/curr/TransactionMetaV4.json rename to xdr-json/TransactionMetaV4.json diff --git a/xdr-json/curr/TransactionPhase.json b/xdr-json/TransactionPhase.json similarity index 100% rename from xdr-json/curr/TransactionPhase.json rename to xdr-json/TransactionPhase.json diff --git a/xdr-json/curr/TransactionResult.json b/xdr-json/TransactionResult.json similarity index 100% rename from xdr-json/curr/TransactionResult.json rename to xdr-json/TransactionResult.json diff --git a/xdr-json/curr/TransactionResultCode.json b/xdr-json/TransactionResultCode.json similarity index 100% rename from xdr-json/curr/TransactionResultCode.json rename to xdr-json/TransactionResultCode.json diff --git a/xdr-json/curr/TransactionResultExt.json b/xdr-json/TransactionResultExt.json similarity index 100% rename from xdr-json/curr/TransactionResultExt.json rename to xdr-json/TransactionResultExt.json diff --git a/xdr-json/curr/TransactionResultMeta.json b/xdr-json/TransactionResultMeta.json similarity index 100% rename from xdr-json/curr/TransactionResultMeta.json rename to xdr-json/TransactionResultMeta.json diff --git a/xdr-json/curr/TransactionResultMetaV1.json b/xdr-json/TransactionResultMetaV1.json similarity index 100% rename from xdr-json/curr/TransactionResultMetaV1.json rename to xdr-json/TransactionResultMetaV1.json diff --git a/xdr-json/curr/TransactionResultPair.json b/xdr-json/TransactionResultPair.json similarity index 100% rename from xdr-json/curr/TransactionResultPair.json rename to xdr-json/TransactionResultPair.json diff --git a/xdr-json/curr/TransactionResultResult.json b/xdr-json/TransactionResultResult.json similarity index 100% rename from xdr-json/curr/TransactionResultResult.json rename to xdr-json/TransactionResultResult.json diff --git a/xdr-json/curr/TransactionResultSet.json b/xdr-json/TransactionResultSet.json similarity index 100% rename from xdr-json/curr/TransactionResultSet.json rename to xdr-json/TransactionResultSet.json diff --git a/xdr-json/curr/TransactionSet.json b/xdr-json/TransactionSet.json similarity index 100% rename from xdr-json/curr/TransactionSet.json rename to xdr-json/TransactionSet.json diff --git a/xdr-json/curr/TransactionSetV1.json b/xdr-json/TransactionSetV1.json similarity index 100% rename from xdr-json/curr/TransactionSetV1.json rename to xdr-json/TransactionSetV1.json diff --git a/xdr-json/curr/TransactionSignaturePayload.json b/xdr-json/TransactionSignaturePayload.json similarity index 100% rename from xdr-json/curr/TransactionSignaturePayload.json rename to xdr-json/TransactionSignaturePayload.json diff --git a/xdr-json/curr/TransactionSignaturePayloadTaggedTransaction.json b/xdr-json/TransactionSignaturePayloadTaggedTransaction.json similarity index 100% rename from xdr-json/curr/TransactionSignaturePayloadTaggedTransaction.json rename to xdr-json/TransactionSignaturePayloadTaggedTransaction.json diff --git a/xdr-json/curr/TransactionV0.json b/xdr-json/TransactionV0.json similarity index 100% rename from xdr-json/curr/TransactionV0.json rename to xdr-json/TransactionV0.json diff --git a/xdr-json/curr/TransactionV0Envelope.json b/xdr-json/TransactionV0Envelope.json similarity index 100% rename from xdr-json/curr/TransactionV0Envelope.json rename to xdr-json/TransactionV0Envelope.json diff --git a/xdr-json/curr/TransactionV0Ext.json b/xdr-json/TransactionV0Ext.json similarity index 100% rename from xdr-json/curr/TransactionV0Ext.json rename to xdr-json/TransactionV0Ext.json diff --git a/xdr-json/curr/TransactionV1Envelope.json b/xdr-json/TransactionV1Envelope.json similarity index 100% rename from xdr-json/curr/TransactionV1Envelope.json rename to xdr-json/TransactionV1Envelope.json diff --git a/xdr-json/curr/TrustLineAsset.json b/xdr-json/TrustLineAsset.json similarity index 100% rename from xdr-json/curr/TrustLineAsset.json rename to xdr-json/TrustLineAsset.json diff --git a/xdr-json/curr/TrustLineEntry.json b/xdr-json/TrustLineEntry.json similarity index 100% rename from xdr-json/curr/TrustLineEntry.json rename to xdr-json/TrustLineEntry.json diff --git a/xdr-json/curr/TrustLineEntryExt.json b/xdr-json/TrustLineEntryExt.json similarity index 100% rename from xdr-json/curr/TrustLineEntryExt.json rename to xdr-json/TrustLineEntryExt.json diff --git a/xdr-json/curr/TrustLineEntryExtensionV2.json b/xdr-json/TrustLineEntryExtensionV2.json similarity index 100% rename from xdr-json/curr/TrustLineEntryExtensionV2.json rename to xdr-json/TrustLineEntryExtensionV2.json diff --git a/xdr-json/curr/TrustLineEntryExtensionV2Ext.json b/xdr-json/TrustLineEntryExtensionV2Ext.json similarity index 100% rename from xdr-json/curr/TrustLineEntryExtensionV2Ext.json rename to xdr-json/TrustLineEntryExtensionV2Ext.json diff --git a/xdr-json/curr/TrustLineEntryV1.json b/xdr-json/TrustLineEntryV1.json similarity index 100% rename from xdr-json/curr/TrustLineEntryV1.json rename to xdr-json/TrustLineEntryV1.json diff --git a/xdr-json/curr/TrustLineEntryV1Ext.json b/xdr-json/TrustLineEntryV1Ext.json similarity index 100% rename from xdr-json/curr/TrustLineEntryV1Ext.json rename to xdr-json/TrustLineEntryV1Ext.json diff --git a/xdr-json/curr/TrustLineFlags.json b/xdr-json/TrustLineFlags.json similarity index 100% rename from xdr-json/curr/TrustLineFlags.json rename to xdr-json/TrustLineFlags.json diff --git a/xdr-json/curr/TtlEntry.json b/xdr-json/TtlEntry.json similarity index 100% rename from xdr-json/curr/TtlEntry.json rename to xdr-json/TtlEntry.json diff --git a/xdr-json/curr/TxAdvertVector.json b/xdr-json/TxAdvertVector.json similarity index 100% rename from xdr-json/curr/TxAdvertVector.json rename to xdr-json/TxAdvertVector.json diff --git a/xdr-json/curr/TxDemandVector.json b/xdr-json/TxDemandVector.json similarity index 100% rename from xdr-json/curr/TxDemandVector.json rename to xdr-json/TxDemandVector.json diff --git a/xdr-json/curr/TxSetComponent.json b/xdr-json/TxSetComponent.json similarity index 100% rename from xdr-json/curr/TxSetComponent.json rename to xdr-json/TxSetComponent.json diff --git a/xdr-json/curr/TxSetComponentTxsMaybeDiscountedFee.json b/xdr-json/TxSetComponentTxsMaybeDiscountedFee.json similarity index 100% rename from xdr-json/curr/TxSetComponentTxsMaybeDiscountedFee.json rename to xdr-json/TxSetComponentTxsMaybeDiscountedFee.json diff --git a/xdr-json/curr/TxSetComponentType.json b/xdr-json/TxSetComponentType.json similarity index 100% rename from xdr-json/curr/TxSetComponentType.json rename to xdr-json/TxSetComponentType.json diff --git a/xdr-json/curr/UInt128Parts.json b/xdr-json/UInt128Parts.json similarity index 100% rename from xdr-json/curr/UInt128Parts.json rename to xdr-json/UInt128Parts.json diff --git a/xdr-json/curr/UInt256Parts.json b/xdr-json/UInt256Parts.json similarity index 100% rename from xdr-json/curr/UInt256Parts.json rename to xdr-json/UInt256Parts.json diff --git a/xdr-json/curr/Uint256.json b/xdr-json/Uint256.json similarity index 100% rename from xdr-json/curr/Uint256.json rename to xdr-json/Uint256.json diff --git a/xdr-json/curr/Uint32.json b/xdr-json/Uint32.json similarity index 100% rename from xdr-json/curr/Uint32.json rename to xdr-json/Uint32.json diff --git a/xdr-json/curr/Uint64.json b/xdr-json/Uint64.json similarity index 100% rename from xdr-json/curr/Uint64.json rename to xdr-json/Uint64.json diff --git a/xdr-json/curr/UpgradeEntryMeta.json b/xdr-json/UpgradeEntryMeta.json similarity index 100% rename from xdr-json/curr/UpgradeEntryMeta.json rename to xdr-json/UpgradeEntryMeta.json diff --git a/xdr-json/curr/UpgradeType.json b/xdr-json/UpgradeType.json similarity index 100% rename from xdr-json/curr/UpgradeType.json rename to xdr-json/UpgradeType.json diff --git a/xdr-json/curr/Value.json b/xdr-json/Value.json similarity index 100% rename from xdr-json/curr/Value.json rename to xdr-json/Value.json diff --git a/xdr-json/next/AccountEntry.json b/xdr-json/next/AccountEntry.json deleted file mode 100644 index 5cccb902..00000000 --- a/xdr-json/next/AccountEntry.json +++ /dev/null @@ -1,284 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AccountEntry", - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "$schema": { - "type": "string" - }, - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/AccountEntryExt.json b/xdr-json/next/AccountEntryExt.json deleted file mode 100644 index 44d7316d..00000000 --- a/xdr-json/next/AccountEntryExt.json +++ /dev/null @@ -1,187 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AccountEntryExt", - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/AccountEntryExtensionV1.json b/xdr-json/next/AccountEntryExtensionV1.json deleted file mode 100644 index 0c7e673f..00000000 --- a/xdr-json/next/AccountEntryExtensionV1.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AccountEntryExtensionV1", - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/AccountEntryExtensionV1Ext.json b/xdr-json/next/AccountEntryExtensionV1Ext.json deleted file mode 100644 index 6a3cbd22..00000000 --- a/xdr-json/next/AccountEntryExtensionV1Ext.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AccountEntryExtensionV1Ext", - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/AccountEntryExtensionV2.json b/xdr-json/next/AccountEntryExtensionV2.json deleted file mode 100644 index 0d0a68e7..00000000 --- a/xdr-json/next/AccountEntryExtensionV2.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AccountEntryExtensionV2", - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/AccountEntryExtensionV2Ext.json b/xdr-json/next/AccountEntryExtensionV2Ext.json deleted file mode 100644 index 09e80d1e..00000000 --- a/xdr-json/next/AccountEntryExtensionV2Ext.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AccountEntryExtensionV2Ext", - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/AccountEntryExtensionV3.json b/xdr-json/next/AccountEntryExtensionV3.json deleted file mode 100644 index 6329d9e6..00000000 --- a/xdr-json/next/AccountEntryExtensionV3.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AccountEntryExtensionV3", - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/AccountFlags.json b/xdr-json/next/AccountFlags.json deleted file mode 100644 index 24561857..00000000 --- a/xdr-json/next/AccountFlags.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AccountFlags", - "description": "AccountFlags is an XDR Enum defined as:\n\n```text enum AccountFlags { // masks for each flag\n\n// Flags set on issuer accounts // TrustLines are created with authorized set to \"false\" requiring // the issuer to set it for each TrustLine AUTH_REQUIRED_FLAG = 0x1, // If set, the authorized flag in TrustLines can be cleared // otherwise, authorization cannot be revoked AUTH_REVOCABLE_FLAG = 0x2, // Once set, causes all AUTH_* flags to be read-only AUTH_IMMUTABLE_FLAG = 0x4, // Trustlines are created with clawback enabled set to \"true\", // and claimable balances created from those trustlines are created // with clawback enabled set to \"true\" AUTH_CLAWBACK_ENABLED_FLAG = 0x8 }; ```", - "type": "string", - "enum": [ - "required_flag", - "revocable_flag", - "immutable_flag", - "clawback_enabled_flag" - ] -} \ No newline at end of file diff --git a/xdr-json/next/AccountId.json b/xdr-json/next/AccountId.json deleted file mode 100644 index 245854ea..00000000 --- a/xdr-json/next/AccountId.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AccountId", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/AccountMergeResult.json b/xdr-json/next/AccountMergeResult.json deleted file mode 100644 index 69844e13..00000000 --- a/xdr-json/next/AccountMergeResult.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AccountMergeResult", - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/AccountMergeResultCode.json b/xdr-json/next/AccountMergeResultCode.json deleted file mode 100644 index 4331b446..00000000 --- a/xdr-json/next/AccountMergeResultCode.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AccountMergeResultCode", - "description": "AccountMergeResultCode is an XDR Enum defined as:\n\n```text enum AccountMergeResultCode { // codes considered as \"success\" for the operation ACCOUNT_MERGE_SUCCESS = 0, // codes considered as \"failure\" for the operation ACCOUNT_MERGE_MALFORMED = -1, // can't merge onto itself ACCOUNT_MERGE_NO_ACCOUNT = -2, // destination does not exist ACCOUNT_MERGE_IMMUTABLE_SET = -3, // source account has AUTH_IMMUTABLE set ACCOUNT_MERGE_HAS_SUB_ENTRIES = -4, // account has trust lines/offers ACCOUNT_MERGE_SEQNUM_TOO_FAR = -5, // sequence number is over max allowed ACCOUNT_MERGE_DEST_FULL = -6, // can't add source balance to // destination balance ACCOUNT_MERGE_IS_SPONSOR = -7 // can't merge account that is a sponsor }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] -} \ No newline at end of file diff --git a/xdr-json/next/AllowTrustOp.json b/xdr-json/next/AllowTrustOp.json deleted file mode 100644 index 0eb23695..00000000 --- a/xdr-json/next/AllowTrustOp.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AllowTrustOp", - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "$schema": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AssetCode": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/AllowTrustResult.json b/xdr-json/next/AllowTrustResult.json deleted file mode 100644 index b74c3b09..00000000 --- a/xdr-json/next/AllowTrustResult.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AllowTrustResult", - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] -} \ No newline at end of file diff --git a/xdr-json/next/AllowTrustResultCode.json b/xdr-json/next/AllowTrustResultCode.json deleted file mode 100644 index bc0f6b32..00000000 --- a/xdr-json/next/AllowTrustResultCode.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AllowTrustResultCode", - "description": "AllowTrustResultCode is an XDR Enum defined as:\n\n```text enum AllowTrustResultCode { // codes considered as \"success\" for the operation ALLOW_TRUST_SUCCESS = 0, // codes considered as \"failure\" for the operation ALLOW_TRUST_MALFORMED = -1, // asset is not ASSET_TYPE_ALPHANUM ALLOW_TRUST_NO_TRUST_LINE = -2, // trustor does not have a trustline // source account does not require trust ALLOW_TRUST_TRUST_NOT_REQUIRED = -3, ALLOW_TRUST_CANT_REVOKE = -4, // source account can't revoke trust, ALLOW_TRUST_SELF_NOT_ALLOWED = -5, // trusting self is not allowed ALLOW_TRUST_LOW_RESERVE = -6 // claimable balances can't be created // on revoke due to low reserves }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] -} \ No newline at end of file diff --git a/xdr-json/next/AlphaNum12.json b/xdr-json/next/AlphaNum12.json deleted file mode 100644 index 1e8f634c..00000000 --- a/xdr-json/next/AlphaNum12.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AlphaNum12", - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "$schema": { - "type": "string" - }, - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/AlphaNum4.json b/xdr-json/next/AlphaNum4.json deleted file mode 100644 index f99bf6e8..00000000 --- a/xdr-json/next/AlphaNum4.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AlphaNum4", - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "$schema": { - "type": "string" - }, - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/Asset.json b/xdr-json/next/Asset.json deleted file mode 100644 index d89ad8be..00000000 --- a/xdr-json/next/Asset.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Asset", - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/AssetCode.json b/xdr-json/next/AssetCode.json deleted file mode 100644 index c42e3d52..00000000 --- a/xdr-json/next/AssetCode.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AssetCode", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/AssetCode12.json b/xdr-json/next/AssetCode12.json deleted file mode 100644 index ad950af2..00000000 --- a/xdr-json/next/AssetCode12.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AssetCode12", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/AssetCode4.json b/xdr-json/next/AssetCode4.json deleted file mode 100644 index cfacfe2d..00000000 --- a/xdr-json/next/AssetCode4.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AssetCode4", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/AssetType.json b/xdr-json/next/AssetType.json deleted file mode 100644 index 619ba3a4..00000000 --- a/xdr-json/next/AssetType.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AssetType", - "description": "AssetType is an XDR Enum defined as:\n\n```text enum AssetType { ASSET_TYPE_NATIVE = 0, ASSET_TYPE_CREDIT_ALPHANUM4 = 1, ASSET_TYPE_CREDIT_ALPHANUM12 = 2, ASSET_TYPE_POOL_SHARE = 3 }; ```", - "type": "string", - "enum": [ - "native", - "credit_alphanum4", - "credit_alphanum12", - "pool_share" - ] -} \ No newline at end of file diff --git a/xdr-json/next/Auth.json b/xdr-json/next/Auth.json deleted file mode 100644 index a3eecde0..00000000 --- a/xdr-json/next/Auth.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Auth", - "description": "Auth is an XDR Struct defined as:\n\n```text struct Auth { int flags; }; ```", - "type": "object", - "required": [ - "flags" - ], - "properties": { - "$schema": { - "type": "string" - }, - "flags": { - "type": "integer", - "format": "int32" - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/AuthCert.json b/xdr-json/next/AuthCert.json deleted file mode 100644 index d8ec99bb..00000000 --- a/xdr-json/next/AuthCert.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AuthCert", - "description": "AuthCert is an XDR Struct defined as:\n\n```text struct AuthCert { Curve25519Public pubkey; uint64 expiration; Signature sig; }; ```", - "type": "object", - "required": [ - "expiration", - "pubkey", - "sig" - ], - "properties": { - "$schema": { - "type": "string" - }, - "expiration": { - "type": "string" - }, - "pubkey": { - "$ref": "#/definitions/Curve25519Public" - }, - "sig": { - "$ref": "#/definitions/Signature" - } - }, - "unevaluatedProperties": false, - "definitions": { - "Curve25519Public": { - "description": "Curve25519Public is an XDR Struct defined as:\n\n```text struct Curve25519Public { opaque key[32]; }; ```", - "type": "object", - "required": [ - "key" - ], - "properties": { - "key": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 32, - "minItems": 32 - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/AuthenticatedMessage.json b/xdr-json/next/AuthenticatedMessage.json deleted file mode 100644 index 001aad38..00000000 --- a/xdr-json/next/AuthenticatedMessage.json +++ /dev/null @@ -1,4349 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AuthenticatedMessage", - "description": "AuthenticatedMessage is an XDR Union defined as:\n\n```text union AuthenticatedMessage switch (uint32 v) { case 0: struct { uint64 sequence; StellarMessage message; HmacSha256Mac mac; } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/AuthenticatedMessageV0" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "Auth": { - "description": "Auth is an XDR Struct defined as:\n\n```text struct Auth { int flags; }; ```", - "type": "object", - "required": [ - "flags" - ], - "properties": { - "flags": { - "type": "integer", - "format": "int32" - } - } - }, - "AuthCert": { - "description": "AuthCert is an XDR Struct defined as:\n\n```text struct AuthCert { Curve25519Public pubkey; uint64 expiration; Signature sig; }; ```", - "type": "object", - "required": [ - "expiration", - "pubkey", - "sig" - ], - "properties": { - "expiration": { - "type": "string" - }, - "pubkey": { - "$ref": "#/definitions/Curve25519Public" - }, - "sig": { - "$ref": "#/definitions/Signature" - } - } - }, - "AuthenticatedMessageV0": { - "description": "AuthenticatedMessageV0 is an XDR NestedStruct defined as:\n\n```text struct { uint64 sequence; StellarMessage message; HmacSha256Mac mac; } ```", - "type": "object", - "required": [ - "mac", - "message", - "sequence" - ], - "properties": { - "mac": { - "$ref": "#/definitions/HmacSha256Mac" - }, - "message": { - "$ref": "#/definitions/StellarMessage" - }, - "sequence": { - "type": "string" - } - } - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Curve25519Public": { - "description": "Curve25519Public is an XDR Struct defined as:\n\n```text struct Curve25519Public { opaque key[32]; }; ```", - "type": "object", - "required": [ - "key" - ], - "properties": { - "key": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 32, - "minItems": 32 - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "DontHave": { - "description": "DontHave is an XDR Struct defined as:\n\n```text struct DontHave { MessageType type; uint256 reqHash; }; ```", - "type": "object", - "required": [ - "req_hash", - "type_" - ], - "properties": { - "req_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "type_": { - "$ref": "#/definitions/MessageType" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncryptedBody": { - "description": "EncryptedBody is an XDR Typedef defined as:\n\n```text typedef opaque EncryptedBody<64000>; ```", - "type": "string", - "maxLength": 128000, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ErrorCode": { - "description": "ErrorCode is an XDR Enum defined as:\n\n```text enum ErrorCode { ERR_MISC = 0, // Unspecific error ERR_DATA = 1, // Malformed data ERR_CONF = 2, // Misconfiguration error ERR_AUTH = 3, // Authentication failure ERR_LOAD = 4 // System overloaded }; ```", - "type": "string", - "enum": [ - "misc", - "data", - "conf", - "auth", - "load" - ] - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "FloodAdvert": { - "description": "FloodAdvert is an XDR Struct defined as:\n\n```text struct FloodAdvert { TxAdvertVector txHashes; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "$ref": "#/definitions/TxAdvertVector" - } - } - }, - "FloodDemand": { - "description": "FloodDemand is an XDR Struct defined as:\n\n```text struct FloodDemand { TxDemandVector txHashes; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "$ref": "#/definitions/TxDemandVector" - } - } - }, - "GeneralizedTransactionSet": { - "description": "GeneralizedTransactionSet is an XDR Union defined as:\n\n```text union GeneralizedTransactionSet switch (int v) { // We consider the legacy TransactionSet to be v0. case 1: TransactionSetV1 v1TxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionSetV1" - } - } - } - ] - }, - "Hello": { - "description": "Hello is an XDR Struct defined as:\n\n```text struct Hello { uint32 ledgerVersion; uint32 overlayVersion; uint32 overlayMinVersion; Hash networkID; string versionStr<100>; int listeningPort; NodeID peerID; AuthCert cert; uint256 nonce; }; ```", - "type": "object", - "required": [ - "cert", - "ledger_version", - "listening_port", - "network_id", - "nonce", - "overlay_min_version", - "overlay_version", - "peer_id", - "version_str" - ], - "properties": { - "cert": { - "$ref": "#/definitions/AuthCert" - }, - "ledger_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "listening_port": { - "type": "integer", - "format": "int32" - }, - "network_id": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "nonce": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "overlay_min_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "overlay_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "peer_id": { - "$ref": "#/definitions/NodeId" - }, - "version_str": { - "$ref": "#/definitions/StringM<100>" - } - } - }, - "HmacSha256Mac": { - "description": "HmacSha256Mac is an XDR Struct defined as:\n\n```text struct HmacSha256Mac { opaque mac[32]; }; ```", - "type": "object", - "required": [ - "mac" - ], - "properties": { - "mac": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 32, - "minItems": 32 - } - } - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MessageType": { - "description": "MessageType is an XDR Enum defined as:\n\n```text enum MessageType { ERROR_MSG = 0, AUTH = 2, DONT_HAVE = 3, // GET_PEERS (4) is deprecated\n\nPEERS = 5,\n\nGET_TX_SET = 6, // gets a particular txset by hash TX_SET = 7, GENERALIZED_TX_SET = 17,\n\nTRANSACTION = 8, // pass on a tx you have heard about\n\n// SCP GET_SCP_QUORUMSET = 9, SCP_QUORUMSET = 10, SCP_MESSAGE = 11, GET_SCP_STATE = 12,\n\n// new messages HELLO = 13,\n\n// SURVEY_REQUEST (14) removed and replaced by TIME_SLICED_SURVEY_REQUEST // SURVEY_RESPONSE (15) removed and replaced by TIME_SLICED_SURVEY_RESPONSE\n\nSEND_MORE = 16, SEND_MORE_EXTENDED = 20,\n\nFLOOD_ADVERT = 18, FLOOD_DEMAND = 19,\n\nTIME_SLICED_SURVEY_REQUEST = 21, TIME_SLICED_SURVEY_RESPONSE = 22, TIME_SLICED_SURVEY_START_COLLECTING = 23, TIME_SLICED_SURVEY_STOP_COLLECTING = 24 }; ```", - "type": "string", - "enum": [ - "error_msg", - "auth", - "dont_have", - "peers", - "get_tx_set", - "tx_set", - "generalized_tx_set", - "transaction", - "get_scp_quorumset", - "scp_quorumset", - "scp_message", - "get_scp_state", - "hello", - "send_more", - "send_more_extended", - "flood_advert", - "flood_demand", - "time_sliced_survey_request", - "time_sliced_survey_response", - "time_sliced_survey_start_collecting", - "time_sliced_survey_stop_collecting" - ] - }, - "MuxedAccount": { - "type": "string" - }, - "NodeId": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PeerAddress": { - "description": "PeerAddress is an XDR Struct defined as:\n\n```text struct PeerAddress { union switch (IPAddrType type) { case IPv4: opaque ipv4[4]; case IPv6: opaque ipv6[16]; } ip; uint32 port; uint32 numFailures; }; ```", - "type": "object", - "required": [ - "ip", - "num_failures", - "port" - ], - "properties": { - "ip": { - "$ref": "#/definitions/PeerAddressIp" - }, - "num_failures": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "port": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "PeerAddressIp": { - "description": "PeerAddressIp is an XDR NestedUnion defined as:\n\n```text union switch (IPAddrType type) { case IPv4: opaque ipv4[4]; case IPv6: opaque ipv6[16]; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "i_pv4" - ], - "properties": { - "i_pv4": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 4, - "minItems": 4 - } - } - }, - { - "type": "object", - "required": [ - "i_pv6" - ], - "properties": { - "i_pv6": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 16, - "minItems": 16 - } - } - } - ] - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "SError": { - "description": "SError is an XDR Struct defined as:\n\n```text struct Error { ErrorCode code; string msg<100>; }; ```", - "type": "object", - "required": [ - "code", - "msg" - ], - "properties": { - "code": { - "$ref": "#/definitions/ErrorCode" - }, - "msg": { - "$ref": "#/definitions/StringM<100>" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpEnvelope": { - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpQuorumSet": { - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "SendMore": { - "description": "SendMore is an XDR Struct defined as:\n\n```text struct SendMore { uint32 numMessages; }; ```", - "type": "object", - "required": [ - "num_messages" - ], - "properties": { - "num_messages": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SendMoreExtended": { - "description": "SendMoreExtended is an XDR Struct defined as:\n\n```text struct SendMoreExtended { uint32 numMessages; uint32 numBytes; }; ```", - "type": "object", - "required": [ - "num_bytes", - "num_messages" - ], - "properties": { - "num_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_messages": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "SignedTimeSlicedSurveyRequestMessage": { - "description": "SignedTimeSlicedSurveyRequestMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyRequestMessage { Signature requestSignature; TimeSlicedSurveyRequestMessage request; }; ```", - "type": "object", - "required": [ - "request", - "request_signature" - ], - "properties": { - "request": { - "$ref": "#/definitions/TimeSlicedSurveyRequestMessage" - }, - "request_signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "SignedTimeSlicedSurveyResponseMessage": { - "description": "SignedTimeSlicedSurveyResponseMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyResponseMessage { Signature responseSignature; TimeSlicedSurveyResponseMessage response; }; ```", - "type": "object", - "required": [ - "response", - "response_signature" - ], - "properties": { - "response": { - "$ref": "#/definitions/TimeSlicedSurveyResponseMessage" - }, - "response_signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "SignedTimeSlicedSurveyStartCollectingMessage": { - "description": "SignedTimeSlicedSurveyStartCollectingMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyStartCollectingMessage { Signature signature; TimeSlicedSurveyStartCollectingMessage startCollecting; }; ```", - "type": "object", - "required": [ - "signature", - "start_collecting" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "start_collecting": { - "$ref": "#/definitions/TimeSlicedSurveyStartCollectingMessage" - } - } - }, - "SignedTimeSlicedSurveyStopCollectingMessage": { - "description": "SignedTimeSlicedSurveyStopCollectingMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyStopCollectingMessage { Signature signature; TimeSlicedSurveyStopCollectingMessage stopCollecting; }; ```", - "type": "object", - "required": [ - "signature", - "stop_collecting" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "stop_collecting": { - "$ref": "#/definitions/TimeSlicedSurveyStopCollectingMessage" - } - } - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "StellarMessage": { - "description": "StellarMessage is an XDR Union defined as:\n\n```text union StellarMessage switch (MessageType type) { case ERROR_MSG: Error error; case HELLO: Hello hello; case AUTH: Auth auth; case DONT_HAVE: DontHave dontHave; case PEERS: PeerAddress peers<100>;\n\ncase GET_TX_SET: uint256 txSetHash; case TX_SET: TransactionSet txSet; case GENERALIZED_TX_SET: GeneralizedTransactionSet generalizedTxSet;\n\ncase TRANSACTION: TransactionEnvelope transaction;\n\ncase TIME_SLICED_SURVEY_REQUEST: SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage;\n\ncase TIME_SLICED_SURVEY_RESPONSE: SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage;\n\ncase TIME_SLICED_SURVEY_START_COLLECTING: SignedTimeSlicedSurveyStartCollectingMessage signedTimeSlicedSurveyStartCollectingMessage;\n\ncase TIME_SLICED_SURVEY_STOP_COLLECTING: SignedTimeSlicedSurveyStopCollectingMessage signedTimeSlicedSurveyStopCollectingMessage;\n\n// SCP case GET_SCP_QUORUMSET: uint256 qSetHash; case SCP_QUORUMSET: SCPQuorumSet qSet; case SCP_MESSAGE: SCPEnvelope envelope; case GET_SCP_STATE: uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest case SEND_MORE: SendMore sendMoreMessage; case SEND_MORE_EXTENDED: SendMoreExtended sendMoreExtendedMessage; // Pull mode case FLOOD_ADVERT: FloodAdvert floodAdvert; case FLOOD_DEMAND: FloodDemand floodDemand; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "error_msg" - ], - "properties": { - "error_msg": { - "$ref": "#/definitions/SError" - } - } - }, - { - "type": "object", - "required": [ - "hello" - ], - "properties": { - "hello": { - "$ref": "#/definitions/Hello" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/Auth" - } - } - }, - { - "type": "object", - "required": [ - "dont_have" - ], - "properties": { - "dont_have": { - "$ref": "#/definitions/DontHave" - } - } - }, - { - "type": "object", - "required": [ - "peers" - ], - "properties": { - "peers": { - "type": "array", - "items": { - "$ref": "#/definitions/PeerAddress" - }, - "maxItems": 100 - } - } - }, - { - "type": "object", - "required": [ - "get_tx_set" - ], - "properties": { - "get_tx_set": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "tx_set" - ], - "properties": { - "tx_set": { - "$ref": "#/definitions/TransactionSet" - } - } - }, - { - "type": "object", - "required": [ - "generalized_tx_set" - ], - "properties": { - "generalized_tx_set": { - "$ref": "#/definitions/GeneralizedTransactionSet" - } - } - }, - { - "type": "object", - "required": [ - "transaction" - ], - "properties": { - "transaction": { - "$ref": "#/definitions/TransactionEnvelope" - } - } - }, - { - "type": "object", - "required": [ - "time_sliced_survey_request" - ], - "properties": { - "time_sliced_survey_request": { - "$ref": "#/definitions/SignedTimeSlicedSurveyRequestMessage" - } - } - }, - { - "type": "object", - "required": [ - "time_sliced_survey_response" - ], - "properties": { - "time_sliced_survey_response": { - "$ref": "#/definitions/SignedTimeSlicedSurveyResponseMessage" - } - } - }, - { - "type": "object", - "required": [ - "time_sliced_survey_start_collecting" - ], - "properties": { - "time_sliced_survey_start_collecting": { - "$ref": "#/definitions/SignedTimeSlicedSurveyStartCollectingMessage" - } - } - }, - { - "type": "object", - "required": [ - "time_sliced_survey_stop_collecting" - ], - "properties": { - "time_sliced_survey_stop_collecting": { - "$ref": "#/definitions/SignedTimeSlicedSurveyStopCollectingMessage" - } - } - }, - { - "type": "object", - "required": [ - "get_scp_quorumset" - ], - "properties": { - "get_scp_quorumset": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "scp_quorumset" - ], - "properties": { - "scp_quorumset": { - "$ref": "#/definitions/ScpQuorumSet" - } - } - }, - { - "type": "object", - "required": [ - "scp_message" - ], - "properties": { - "scp_message": { - "$ref": "#/definitions/ScpEnvelope" - } - } - }, - { - "type": "object", - "required": [ - "get_scp_state" - ], - "properties": { - "get_scp_state": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "send_more" - ], - "properties": { - "send_more": { - "$ref": "#/definitions/SendMore" - } - } - }, - { - "type": "object", - "required": [ - "send_more_extended" - ], - "properties": { - "send_more_extended": { - "$ref": "#/definitions/SendMoreExtended" - } - } - }, - { - "type": "object", - "required": [ - "flood_advert" - ], - "properties": { - "flood_advert": { - "$ref": "#/definitions/FloodAdvert" - } - } - }, - { - "type": "object", - "required": [ - "flood_demand" - ], - "properties": { - "flood_demand": { - "$ref": "#/definitions/FloodDemand" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<100>": { - "type": "string", - "maxLength": 100 - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "SurveyMessageCommandType": { - "description": "SurveyMessageCommandType is an XDR Enum defined as:\n\n```text enum SurveyMessageCommandType { TIME_SLICED_SURVEY_TOPOLOGY = 1 }; ```", - "type": "string", - "enum": [ - "time_sliced_survey_topology" - ] - }, - "SurveyRequestMessage": { - "description": "SurveyRequestMessage is an XDR Struct defined as:\n\n```text struct SurveyRequestMessage { NodeID surveyorPeerID; NodeID surveyedPeerID; uint32 ledgerNum; Curve25519Public encryptionKey; SurveyMessageCommandType commandType; }; ```", - "type": "object", - "required": [ - "command_type", - "encryption_key", - "ledger_num", - "surveyed_peer_id", - "surveyor_peer_id" - ], - "properties": { - "command_type": { - "$ref": "#/definitions/SurveyMessageCommandType" - }, - "encryption_key": { - "$ref": "#/definitions/Curve25519Public" - }, - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyed_peer_id": { - "$ref": "#/definitions/NodeId" - }, - "surveyor_peer_id": { - "$ref": "#/definitions/NodeId" - } - } - }, - "SurveyResponseMessage": { - "description": "SurveyResponseMessage is an XDR Struct defined as:\n\n```text struct SurveyResponseMessage { NodeID surveyorPeerID; NodeID surveyedPeerID; uint32 ledgerNum; SurveyMessageCommandType commandType; EncryptedBody encryptedBody; }; ```", - "type": "object", - "required": [ - "command_type", - "encrypted_body", - "ledger_num", - "surveyed_peer_id", - "surveyor_peer_id" - ], - "properties": { - "command_type": { - "$ref": "#/definitions/SurveyMessageCommandType" - }, - "encrypted_body": { - "$ref": "#/definitions/EncryptedBody" - }, - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyed_peer_id": { - "$ref": "#/definitions/NodeId" - }, - "surveyor_peer_id": { - "$ref": "#/definitions/NodeId" - } - } - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TimeSlicedSurveyRequestMessage": { - "description": "TimeSlicedSurveyRequestMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyRequestMessage { SurveyRequestMessage request; uint32 nonce; uint32 inboundPeersIndex; uint32 outboundPeersIndex; }; ```", - "type": "object", - "required": [ - "inbound_peers_index", - "nonce", - "outbound_peers_index", - "request" - ], - "properties": { - "inbound_peers_index": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "outbound_peers_index": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "request": { - "$ref": "#/definitions/SurveyRequestMessage" - } - } - }, - "TimeSlicedSurveyResponseMessage": { - "description": "TimeSlicedSurveyResponseMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyResponseMessage { SurveyResponseMessage response; uint32 nonce; }; ```", - "type": "object", - "required": [ - "nonce", - "response" - ], - "properties": { - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "response": { - "$ref": "#/definitions/SurveyResponseMessage" - } - } - }, - "TimeSlicedSurveyStartCollectingMessage": { - "description": "TimeSlicedSurveyStartCollectingMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyStartCollectingMessage { NodeID surveyorID; uint32 nonce; uint32 ledgerNum; }; ```", - "type": "object", - "required": [ - "ledger_num", - "nonce", - "surveyor_id" - ], - "properties": { - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyor_id": { - "$ref": "#/definitions/NodeId" - } - } - }, - "TimeSlicedSurveyStopCollectingMessage": { - "description": "TimeSlicedSurveyStopCollectingMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyStopCollectingMessage { NodeID surveyorID; uint32 nonce; uint32 ledgerNum; }; ```", - "type": "object", - "required": [ - "ledger_num", - "nonce", - "surveyor_id" - ], - "properties": { - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyor_id": { - "$ref": "#/definitions/NodeId" - } - } - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionSet": { - "description": "TransactionSet is an XDR Struct defined as:\n\n```text struct TransactionSet { Hash previousLedgerHash; TransactionEnvelope txs<>; }; ```", - "type": "object", - "required": [ - "previous_ledger_hash", - "txs" - ], - "properties": { - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "TransactionSetV1": { - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TxAdvertVector": { - "description": "TxAdvertVector is an XDR Typedef defined as:\n\n```text typedef Hash TxAdvertVector; ```", - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 1000 - }, - "TxDemandVector": { - "description": "TxDemandVector is an XDR Typedef defined as:\n\n```text typedef Hash TxDemandVector; ```", - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 1000 - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/AuthenticatedMessageV0.json b/xdr-json/next/AuthenticatedMessageV0.json deleted file mode 100644 index c8e8951a..00000000 --- a/xdr-json/next/AuthenticatedMessageV0.json +++ /dev/null @@ -1,4331 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AuthenticatedMessageV0", - "description": "AuthenticatedMessageV0 is an XDR NestedStruct defined as:\n\n```text struct { uint64 sequence; StellarMessage message; HmacSha256Mac mac; } ```", - "type": "object", - "required": [ - "mac", - "message", - "sequence" - ], - "properties": { - "$schema": { - "type": "string" - }, - "mac": { - "$ref": "#/definitions/HmacSha256Mac" - }, - "message": { - "$ref": "#/definitions/StellarMessage" - }, - "sequence": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "Auth": { - "description": "Auth is an XDR Struct defined as:\n\n```text struct Auth { int flags; }; ```", - "type": "object", - "required": [ - "flags" - ], - "properties": { - "flags": { - "type": "integer", - "format": "int32" - } - } - }, - "AuthCert": { - "description": "AuthCert is an XDR Struct defined as:\n\n```text struct AuthCert { Curve25519Public pubkey; uint64 expiration; Signature sig; }; ```", - "type": "object", - "required": [ - "expiration", - "pubkey", - "sig" - ], - "properties": { - "expiration": { - "type": "string" - }, - "pubkey": { - "$ref": "#/definitions/Curve25519Public" - }, - "sig": { - "$ref": "#/definitions/Signature" - } - } - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Curve25519Public": { - "description": "Curve25519Public is an XDR Struct defined as:\n\n```text struct Curve25519Public { opaque key[32]; }; ```", - "type": "object", - "required": [ - "key" - ], - "properties": { - "key": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 32, - "minItems": 32 - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "DontHave": { - "description": "DontHave is an XDR Struct defined as:\n\n```text struct DontHave { MessageType type; uint256 reqHash; }; ```", - "type": "object", - "required": [ - "req_hash", - "type_" - ], - "properties": { - "req_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "type_": { - "$ref": "#/definitions/MessageType" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncryptedBody": { - "description": "EncryptedBody is an XDR Typedef defined as:\n\n```text typedef opaque EncryptedBody<64000>; ```", - "type": "string", - "maxLength": 128000, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ErrorCode": { - "description": "ErrorCode is an XDR Enum defined as:\n\n```text enum ErrorCode { ERR_MISC = 0, // Unspecific error ERR_DATA = 1, // Malformed data ERR_CONF = 2, // Misconfiguration error ERR_AUTH = 3, // Authentication failure ERR_LOAD = 4 // System overloaded }; ```", - "type": "string", - "enum": [ - "misc", - "data", - "conf", - "auth", - "load" - ] - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "FloodAdvert": { - "description": "FloodAdvert is an XDR Struct defined as:\n\n```text struct FloodAdvert { TxAdvertVector txHashes; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "$ref": "#/definitions/TxAdvertVector" - } - } - }, - "FloodDemand": { - "description": "FloodDemand is an XDR Struct defined as:\n\n```text struct FloodDemand { TxDemandVector txHashes; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "$ref": "#/definitions/TxDemandVector" - } - } - }, - "GeneralizedTransactionSet": { - "description": "GeneralizedTransactionSet is an XDR Union defined as:\n\n```text union GeneralizedTransactionSet switch (int v) { // We consider the legacy TransactionSet to be v0. case 1: TransactionSetV1 v1TxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionSetV1" - } - } - } - ] - }, - "Hello": { - "description": "Hello is an XDR Struct defined as:\n\n```text struct Hello { uint32 ledgerVersion; uint32 overlayVersion; uint32 overlayMinVersion; Hash networkID; string versionStr<100>; int listeningPort; NodeID peerID; AuthCert cert; uint256 nonce; }; ```", - "type": "object", - "required": [ - "cert", - "ledger_version", - "listening_port", - "network_id", - "nonce", - "overlay_min_version", - "overlay_version", - "peer_id", - "version_str" - ], - "properties": { - "cert": { - "$ref": "#/definitions/AuthCert" - }, - "ledger_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "listening_port": { - "type": "integer", - "format": "int32" - }, - "network_id": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "nonce": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "overlay_min_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "overlay_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "peer_id": { - "$ref": "#/definitions/NodeId" - }, - "version_str": { - "$ref": "#/definitions/StringM<100>" - } - } - }, - "HmacSha256Mac": { - "description": "HmacSha256Mac is an XDR Struct defined as:\n\n```text struct HmacSha256Mac { opaque mac[32]; }; ```", - "type": "object", - "required": [ - "mac" - ], - "properties": { - "mac": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 32, - "minItems": 32 - } - } - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MessageType": { - "description": "MessageType is an XDR Enum defined as:\n\n```text enum MessageType { ERROR_MSG = 0, AUTH = 2, DONT_HAVE = 3, // GET_PEERS (4) is deprecated\n\nPEERS = 5,\n\nGET_TX_SET = 6, // gets a particular txset by hash TX_SET = 7, GENERALIZED_TX_SET = 17,\n\nTRANSACTION = 8, // pass on a tx you have heard about\n\n// SCP GET_SCP_QUORUMSET = 9, SCP_QUORUMSET = 10, SCP_MESSAGE = 11, GET_SCP_STATE = 12,\n\n// new messages HELLO = 13,\n\n// SURVEY_REQUEST (14) removed and replaced by TIME_SLICED_SURVEY_REQUEST // SURVEY_RESPONSE (15) removed and replaced by TIME_SLICED_SURVEY_RESPONSE\n\nSEND_MORE = 16, SEND_MORE_EXTENDED = 20,\n\nFLOOD_ADVERT = 18, FLOOD_DEMAND = 19,\n\nTIME_SLICED_SURVEY_REQUEST = 21, TIME_SLICED_SURVEY_RESPONSE = 22, TIME_SLICED_SURVEY_START_COLLECTING = 23, TIME_SLICED_SURVEY_STOP_COLLECTING = 24 }; ```", - "type": "string", - "enum": [ - "error_msg", - "auth", - "dont_have", - "peers", - "get_tx_set", - "tx_set", - "generalized_tx_set", - "transaction", - "get_scp_quorumset", - "scp_quorumset", - "scp_message", - "get_scp_state", - "hello", - "send_more", - "send_more_extended", - "flood_advert", - "flood_demand", - "time_sliced_survey_request", - "time_sliced_survey_response", - "time_sliced_survey_start_collecting", - "time_sliced_survey_stop_collecting" - ] - }, - "MuxedAccount": { - "type": "string" - }, - "NodeId": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PeerAddress": { - "description": "PeerAddress is an XDR Struct defined as:\n\n```text struct PeerAddress { union switch (IPAddrType type) { case IPv4: opaque ipv4[4]; case IPv6: opaque ipv6[16]; } ip; uint32 port; uint32 numFailures; }; ```", - "type": "object", - "required": [ - "ip", - "num_failures", - "port" - ], - "properties": { - "ip": { - "$ref": "#/definitions/PeerAddressIp" - }, - "num_failures": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "port": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "PeerAddressIp": { - "description": "PeerAddressIp is an XDR NestedUnion defined as:\n\n```text union switch (IPAddrType type) { case IPv4: opaque ipv4[4]; case IPv6: opaque ipv6[16]; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "i_pv4" - ], - "properties": { - "i_pv4": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 4, - "minItems": 4 - } - } - }, - { - "type": "object", - "required": [ - "i_pv6" - ], - "properties": { - "i_pv6": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 16, - "minItems": 16 - } - } - } - ] - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "SError": { - "description": "SError is an XDR Struct defined as:\n\n```text struct Error { ErrorCode code; string msg<100>; }; ```", - "type": "object", - "required": [ - "code", - "msg" - ], - "properties": { - "code": { - "$ref": "#/definitions/ErrorCode" - }, - "msg": { - "$ref": "#/definitions/StringM<100>" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpEnvelope": { - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpQuorumSet": { - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "SendMore": { - "description": "SendMore is an XDR Struct defined as:\n\n```text struct SendMore { uint32 numMessages; }; ```", - "type": "object", - "required": [ - "num_messages" - ], - "properties": { - "num_messages": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SendMoreExtended": { - "description": "SendMoreExtended is an XDR Struct defined as:\n\n```text struct SendMoreExtended { uint32 numMessages; uint32 numBytes; }; ```", - "type": "object", - "required": [ - "num_bytes", - "num_messages" - ], - "properties": { - "num_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_messages": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "SignedTimeSlicedSurveyRequestMessage": { - "description": "SignedTimeSlicedSurveyRequestMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyRequestMessage { Signature requestSignature; TimeSlicedSurveyRequestMessage request; }; ```", - "type": "object", - "required": [ - "request", - "request_signature" - ], - "properties": { - "request": { - "$ref": "#/definitions/TimeSlicedSurveyRequestMessage" - }, - "request_signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "SignedTimeSlicedSurveyResponseMessage": { - "description": "SignedTimeSlicedSurveyResponseMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyResponseMessage { Signature responseSignature; TimeSlicedSurveyResponseMessage response; }; ```", - "type": "object", - "required": [ - "response", - "response_signature" - ], - "properties": { - "response": { - "$ref": "#/definitions/TimeSlicedSurveyResponseMessage" - }, - "response_signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "SignedTimeSlicedSurveyStartCollectingMessage": { - "description": "SignedTimeSlicedSurveyStartCollectingMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyStartCollectingMessage { Signature signature; TimeSlicedSurveyStartCollectingMessage startCollecting; }; ```", - "type": "object", - "required": [ - "signature", - "start_collecting" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "start_collecting": { - "$ref": "#/definitions/TimeSlicedSurveyStartCollectingMessage" - } - } - }, - "SignedTimeSlicedSurveyStopCollectingMessage": { - "description": "SignedTimeSlicedSurveyStopCollectingMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyStopCollectingMessage { Signature signature; TimeSlicedSurveyStopCollectingMessage stopCollecting; }; ```", - "type": "object", - "required": [ - "signature", - "stop_collecting" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "stop_collecting": { - "$ref": "#/definitions/TimeSlicedSurveyStopCollectingMessage" - } - } - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "StellarMessage": { - "description": "StellarMessage is an XDR Union defined as:\n\n```text union StellarMessage switch (MessageType type) { case ERROR_MSG: Error error; case HELLO: Hello hello; case AUTH: Auth auth; case DONT_HAVE: DontHave dontHave; case PEERS: PeerAddress peers<100>;\n\ncase GET_TX_SET: uint256 txSetHash; case TX_SET: TransactionSet txSet; case GENERALIZED_TX_SET: GeneralizedTransactionSet generalizedTxSet;\n\ncase TRANSACTION: TransactionEnvelope transaction;\n\ncase TIME_SLICED_SURVEY_REQUEST: SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage;\n\ncase TIME_SLICED_SURVEY_RESPONSE: SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage;\n\ncase TIME_SLICED_SURVEY_START_COLLECTING: SignedTimeSlicedSurveyStartCollectingMessage signedTimeSlicedSurveyStartCollectingMessage;\n\ncase TIME_SLICED_SURVEY_STOP_COLLECTING: SignedTimeSlicedSurveyStopCollectingMessage signedTimeSlicedSurveyStopCollectingMessage;\n\n// SCP case GET_SCP_QUORUMSET: uint256 qSetHash; case SCP_QUORUMSET: SCPQuorumSet qSet; case SCP_MESSAGE: SCPEnvelope envelope; case GET_SCP_STATE: uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest case SEND_MORE: SendMore sendMoreMessage; case SEND_MORE_EXTENDED: SendMoreExtended sendMoreExtendedMessage; // Pull mode case FLOOD_ADVERT: FloodAdvert floodAdvert; case FLOOD_DEMAND: FloodDemand floodDemand; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "error_msg" - ], - "properties": { - "error_msg": { - "$ref": "#/definitions/SError" - } - } - }, - { - "type": "object", - "required": [ - "hello" - ], - "properties": { - "hello": { - "$ref": "#/definitions/Hello" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/Auth" - } - } - }, - { - "type": "object", - "required": [ - "dont_have" - ], - "properties": { - "dont_have": { - "$ref": "#/definitions/DontHave" - } - } - }, - { - "type": "object", - "required": [ - "peers" - ], - "properties": { - "peers": { - "type": "array", - "items": { - "$ref": "#/definitions/PeerAddress" - }, - "maxItems": 100 - } - } - }, - { - "type": "object", - "required": [ - "get_tx_set" - ], - "properties": { - "get_tx_set": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "tx_set" - ], - "properties": { - "tx_set": { - "$ref": "#/definitions/TransactionSet" - } - } - }, - { - "type": "object", - "required": [ - "generalized_tx_set" - ], - "properties": { - "generalized_tx_set": { - "$ref": "#/definitions/GeneralizedTransactionSet" - } - } - }, - { - "type": "object", - "required": [ - "transaction" - ], - "properties": { - "transaction": { - "$ref": "#/definitions/TransactionEnvelope" - } - } - }, - { - "type": "object", - "required": [ - "time_sliced_survey_request" - ], - "properties": { - "time_sliced_survey_request": { - "$ref": "#/definitions/SignedTimeSlicedSurveyRequestMessage" - } - } - }, - { - "type": "object", - "required": [ - "time_sliced_survey_response" - ], - "properties": { - "time_sliced_survey_response": { - "$ref": "#/definitions/SignedTimeSlicedSurveyResponseMessage" - } - } - }, - { - "type": "object", - "required": [ - "time_sliced_survey_start_collecting" - ], - "properties": { - "time_sliced_survey_start_collecting": { - "$ref": "#/definitions/SignedTimeSlicedSurveyStartCollectingMessage" - } - } - }, - { - "type": "object", - "required": [ - "time_sliced_survey_stop_collecting" - ], - "properties": { - "time_sliced_survey_stop_collecting": { - "$ref": "#/definitions/SignedTimeSlicedSurveyStopCollectingMessage" - } - } - }, - { - "type": "object", - "required": [ - "get_scp_quorumset" - ], - "properties": { - "get_scp_quorumset": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "scp_quorumset" - ], - "properties": { - "scp_quorumset": { - "$ref": "#/definitions/ScpQuorumSet" - } - } - }, - { - "type": "object", - "required": [ - "scp_message" - ], - "properties": { - "scp_message": { - "$ref": "#/definitions/ScpEnvelope" - } - } - }, - { - "type": "object", - "required": [ - "get_scp_state" - ], - "properties": { - "get_scp_state": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "send_more" - ], - "properties": { - "send_more": { - "$ref": "#/definitions/SendMore" - } - } - }, - { - "type": "object", - "required": [ - "send_more_extended" - ], - "properties": { - "send_more_extended": { - "$ref": "#/definitions/SendMoreExtended" - } - } - }, - { - "type": "object", - "required": [ - "flood_advert" - ], - "properties": { - "flood_advert": { - "$ref": "#/definitions/FloodAdvert" - } - } - }, - { - "type": "object", - "required": [ - "flood_demand" - ], - "properties": { - "flood_demand": { - "$ref": "#/definitions/FloodDemand" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<100>": { - "type": "string", - "maxLength": 100 - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "SurveyMessageCommandType": { - "description": "SurveyMessageCommandType is an XDR Enum defined as:\n\n```text enum SurveyMessageCommandType { TIME_SLICED_SURVEY_TOPOLOGY = 1 }; ```", - "type": "string", - "enum": [ - "time_sliced_survey_topology" - ] - }, - "SurveyRequestMessage": { - "description": "SurveyRequestMessage is an XDR Struct defined as:\n\n```text struct SurveyRequestMessage { NodeID surveyorPeerID; NodeID surveyedPeerID; uint32 ledgerNum; Curve25519Public encryptionKey; SurveyMessageCommandType commandType; }; ```", - "type": "object", - "required": [ - "command_type", - "encryption_key", - "ledger_num", - "surveyed_peer_id", - "surveyor_peer_id" - ], - "properties": { - "command_type": { - "$ref": "#/definitions/SurveyMessageCommandType" - }, - "encryption_key": { - "$ref": "#/definitions/Curve25519Public" - }, - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyed_peer_id": { - "$ref": "#/definitions/NodeId" - }, - "surveyor_peer_id": { - "$ref": "#/definitions/NodeId" - } - } - }, - "SurveyResponseMessage": { - "description": "SurveyResponseMessage is an XDR Struct defined as:\n\n```text struct SurveyResponseMessage { NodeID surveyorPeerID; NodeID surveyedPeerID; uint32 ledgerNum; SurveyMessageCommandType commandType; EncryptedBody encryptedBody; }; ```", - "type": "object", - "required": [ - "command_type", - "encrypted_body", - "ledger_num", - "surveyed_peer_id", - "surveyor_peer_id" - ], - "properties": { - "command_type": { - "$ref": "#/definitions/SurveyMessageCommandType" - }, - "encrypted_body": { - "$ref": "#/definitions/EncryptedBody" - }, - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyed_peer_id": { - "$ref": "#/definitions/NodeId" - }, - "surveyor_peer_id": { - "$ref": "#/definitions/NodeId" - } - } - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TimeSlicedSurveyRequestMessage": { - "description": "TimeSlicedSurveyRequestMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyRequestMessage { SurveyRequestMessage request; uint32 nonce; uint32 inboundPeersIndex; uint32 outboundPeersIndex; }; ```", - "type": "object", - "required": [ - "inbound_peers_index", - "nonce", - "outbound_peers_index", - "request" - ], - "properties": { - "inbound_peers_index": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "outbound_peers_index": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "request": { - "$ref": "#/definitions/SurveyRequestMessage" - } - } - }, - "TimeSlicedSurveyResponseMessage": { - "description": "TimeSlicedSurveyResponseMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyResponseMessage { SurveyResponseMessage response; uint32 nonce; }; ```", - "type": "object", - "required": [ - "nonce", - "response" - ], - "properties": { - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "response": { - "$ref": "#/definitions/SurveyResponseMessage" - } - } - }, - "TimeSlicedSurveyStartCollectingMessage": { - "description": "TimeSlicedSurveyStartCollectingMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyStartCollectingMessage { NodeID surveyorID; uint32 nonce; uint32 ledgerNum; }; ```", - "type": "object", - "required": [ - "ledger_num", - "nonce", - "surveyor_id" - ], - "properties": { - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyor_id": { - "$ref": "#/definitions/NodeId" - } - } - }, - "TimeSlicedSurveyStopCollectingMessage": { - "description": "TimeSlicedSurveyStopCollectingMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyStopCollectingMessage { NodeID surveyorID; uint32 nonce; uint32 ledgerNum; }; ```", - "type": "object", - "required": [ - "ledger_num", - "nonce", - "surveyor_id" - ], - "properties": { - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyor_id": { - "$ref": "#/definitions/NodeId" - } - } - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionSet": { - "description": "TransactionSet is an XDR Struct defined as:\n\n```text struct TransactionSet { Hash previousLedgerHash; TransactionEnvelope txs<>; }; ```", - "type": "object", - "required": [ - "previous_ledger_hash", - "txs" - ], - "properties": { - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "TransactionSetV1": { - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TxAdvertVector": { - "description": "TxAdvertVector is an XDR Typedef defined as:\n\n```text typedef Hash TxAdvertVector; ```", - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 1000 - }, - "TxDemandVector": { - "description": "TxDemandVector is an XDR Typedef defined as:\n\n```text typedef Hash TxDemandVector; ```", - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 1000 - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/BeginSponsoringFutureReservesOp.json b/xdr-json/next/BeginSponsoringFutureReservesOp.json deleted file mode 100644 index a346027d..00000000 --- a/xdr-json/next/BeginSponsoringFutureReservesOp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "BeginSponsoringFutureReservesOp", - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/BeginSponsoringFutureReservesResult.json b/xdr-json/next/BeginSponsoringFutureReservesResult.json deleted file mode 100644 index e0a46e8d..00000000 --- a/xdr-json/next/BeginSponsoringFutureReservesResult.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "BeginSponsoringFutureReservesResult", - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] -} \ No newline at end of file diff --git a/xdr-json/next/BeginSponsoringFutureReservesResultCode.json b/xdr-json/next/BeginSponsoringFutureReservesResultCode.json deleted file mode 100644 index 25f4758c..00000000 --- a/xdr-json/next/BeginSponsoringFutureReservesResultCode.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "BeginSponsoringFutureReservesResultCode", - "description": "BeginSponsoringFutureReservesResultCode is an XDR Enum defined as:\n\n```text enum BeginSponsoringFutureReservesResultCode { // codes considered as \"success\" for the operation BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS = 0,\n\n// codes considered as \"failure\" for the operation BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED = -1, BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED = -2, BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE = -3 }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] -} \ No newline at end of file diff --git a/xdr-json/next/BinaryFuseFilterType.json b/xdr-json/next/BinaryFuseFilterType.json deleted file mode 100644 index 42d95c64..00000000 --- a/xdr-json/next/BinaryFuseFilterType.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "BinaryFuseFilterType", - "description": "BinaryFuseFilterType is an XDR Enum defined as:\n\n```text enum BinaryFuseFilterType { BINARY_FUSE_FILTER_8_BIT = 0, BINARY_FUSE_FILTER_16_BIT = 1, BINARY_FUSE_FILTER_32_BIT = 2 }; ```", - "type": "string", - "enum": [ - "b8_bit", - "b16_bit", - "b32_bit" - ] -} \ No newline at end of file diff --git a/xdr-json/next/BucketEntry.json b/xdr-json/next/BucketEntry.json deleted file mode 100644 index a7387719..00000000 --- a/xdr-json/next/BucketEntry.json +++ /dev/null @@ -1,2893 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "BucketEntry", - "description": "BucketEntry is an XDR Union defined as:\n\n```text union BucketEntry switch (BucketEntryType type) { case LIVEENTRY: case INITENTRY: LedgerEntry liveEntry;\n\ncase DEADENTRY: LedgerKey deadEntry; case METAENTRY: BucketMetadata metaEntry; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liveentry" - ], - "properties": { - "liveentry": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "initentry" - ], - "properties": { - "initentry": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "deadentry" - ], - "properties": { - "deadentry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "metaentry" - ], - "properties": { - "metaentry": { - "$ref": "#/definitions/BucketMetadata" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BucketListType": { - "description": "BucketListType is an XDR Enum defined as:\n\n```text enum BucketListType { LIVE = 0, HOT_ARCHIVE = 1 }; ```", - "type": "string", - "enum": [ - "live", - "hot_archive" - ] - }, - "BucketMetadata": { - "description": "BucketMetadata is an XDR Struct defined as:\n\n```text struct BucketMetadata { // Indicates the protocol version used to create / merge this bucket. uint32 ledgerVersion;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: BucketListType bucketListType; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "ledger_version" - ], - "properties": { - "ext": { - "$ref": "#/definitions/BucketMetadataExt" - }, - "ledger_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "BucketMetadataExt": { - "description": "BucketMetadataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: BucketListType bucketListType; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/BucketListType" - } - } - } - ] - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/BucketEntryType.json b/xdr-json/next/BucketEntryType.json deleted file mode 100644 index 562d2ae4..00000000 --- a/xdr-json/next/BucketEntryType.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "BucketEntryType", - "description": "BucketEntryType is an XDR Enum defined as:\n\n```text enum BucketEntryType { METAENTRY = -1, // At-and-after protocol 11: bucket metadata, should come first. LIVEENTRY = 0, // Before protocol 11: created-or-updated; // At-and-after protocol 11: only updated. DEADENTRY = 1, INITENTRY = 2 // At-and-after protocol 11: only created. }; ```", - "type": "string", - "enum": [ - "metaentry", - "liveentry", - "deadentry", - "initentry" - ] -} \ No newline at end of file diff --git a/xdr-json/next/BucketListType.json b/xdr-json/next/BucketListType.json deleted file mode 100644 index 40080a76..00000000 --- a/xdr-json/next/BucketListType.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "BucketListType", - "description": "BucketListType is an XDR Enum defined as:\n\n```text enum BucketListType { LIVE = 0, HOT_ARCHIVE = 1 }; ```", - "type": "string", - "enum": [ - "live", - "hot_archive" - ] -} \ No newline at end of file diff --git a/xdr-json/next/BucketMetadata.json b/xdr-json/next/BucketMetadata.json deleted file mode 100644 index 07ad7944..00000000 --- a/xdr-json/next/BucketMetadata.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "BucketMetadata", - "description": "BucketMetadata is an XDR Struct defined as:\n\n```text struct BucketMetadata { // Indicates the protocol version used to create / merge this bucket. uint32 ledgerVersion;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: BucketListType bucketListType; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "ledger_version" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/BucketMetadataExt" - }, - "ledger_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "BucketListType": { - "description": "BucketListType is an XDR Enum defined as:\n\n```text enum BucketListType { LIVE = 0, HOT_ARCHIVE = 1 }; ```", - "type": "string", - "enum": [ - "live", - "hot_archive" - ] - }, - "BucketMetadataExt": { - "description": "BucketMetadataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: BucketListType bucketListType; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/BucketListType" - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/BucketMetadataExt.json b/xdr-json/next/BucketMetadataExt.json deleted file mode 100644 index ef3ebb22..00000000 --- a/xdr-json/next/BucketMetadataExt.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "BucketMetadataExt", - "description": "BucketMetadataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: BucketListType bucketListType; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/BucketListType" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "BucketListType": { - "description": "BucketListType is an XDR Enum defined as:\n\n```text enum BucketListType { LIVE = 0, HOT_ARCHIVE = 1 }; ```", - "type": "string", - "enum": [ - "live", - "hot_archive" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/BumpSequenceOp.json b/xdr-json/next/BumpSequenceOp.json deleted file mode 100644 index fed224a2..00000000 --- a/xdr-json/next/BumpSequenceOp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "BumpSequenceOp", - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "$schema": { - "type": "string" - }, - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - }, - "unevaluatedProperties": false, - "definitions": { - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/BumpSequenceResult.json b/xdr-json/next/BumpSequenceResult.json deleted file mode 100644 index a10fb745..00000000 --- a/xdr-json/next/BumpSequenceResult.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "BumpSequenceResult", - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] -} \ No newline at end of file diff --git a/xdr-json/next/BumpSequenceResultCode.json b/xdr-json/next/BumpSequenceResultCode.json deleted file mode 100644 index b5a1780a..00000000 --- a/xdr-json/next/BumpSequenceResultCode.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "BumpSequenceResultCode", - "description": "BumpSequenceResultCode is an XDR Enum defined as:\n\n```text enum BumpSequenceResultCode { // codes considered as \"success\" for the operation BUMP_SEQUENCE_SUCCESS = 0, // codes considered as \"failure\" for the operation BUMP_SEQUENCE_BAD_SEQ = -1 // `bumpTo` is not within bounds }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ChangeTrustAsset.json b/xdr-json/next/ChangeTrustAsset.json deleted file mode 100644 index 7fa51360..00000000 --- a/xdr-json/next/ChangeTrustAsset.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ChangeTrustAsset", - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ChangeTrustOp.json b/xdr-json/next/ChangeTrustOp.json deleted file mode 100644 index 2015f6f4..00000000 --- a/xdr-json/next/ChangeTrustOp.json +++ /dev/null @@ -1,179 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ChangeTrustOp", - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "$schema": { - "type": "string" - }, - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ChangeTrustResult.json b/xdr-json/next/ChangeTrustResult.json deleted file mode 100644 index 869df49b..00000000 --- a/xdr-json/next/ChangeTrustResult.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ChangeTrustResult", - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ChangeTrustResultCode.json b/xdr-json/next/ChangeTrustResultCode.json deleted file mode 100644 index 6d13d354..00000000 --- a/xdr-json/next/ChangeTrustResultCode.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ChangeTrustResultCode", - "description": "ChangeTrustResultCode is an XDR Enum defined as:\n\n```text enum ChangeTrustResultCode { // codes considered as \"success\" for the operation CHANGE_TRUST_SUCCESS = 0, // codes considered as \"failure\" for the operation CHANGE_TRUST_MALFORMED = -1, // bad input CHANGE_TRUST_NO_ISSUER = -2, // could not find issuer CHANGE_TRUST_INVALID_LIMIT = -3, // cannot drop limit below balance // cannot create with a limit of 0 CHANGE_TRUST_LOW_RESERVE = -4, // not enough funds to create a new trust line, CHANGE_TRUST_SELF_NOT_ALLOWED = -5, // trusting self is not allowed CHANGE_TRUST_TRUST_LINE_MISSING = -6, // Asset trustline is missing for pool CHANGE_TRUST_CANNOT_DELETE = -7, // Asset trustline is still referenced in a pool CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES = -8 // Asset trustline is deauthorized }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ClaimAtom.json b/xdr-json/next/ClaimAtom.json deleted file mode 100644 index b8495dc1..00000000 --- a/xdr-json/next/ClaimAtom.json +++ /dev/null @@ -1,221 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimAtom", - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "PoolId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ClaimAtomType.json b/xdr-json/next/ClaimAtomType.json deleted file mode 100644 index 3ceaa19b..00000000 --- a/xdr-json/next/ClaimAtomType.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimAtomType", - "description": "ClaimAtomType is an XDR Enum defined as:\n\n```text enum ClaimAtomType { CLAIM_ATOM_TYPE_V0 = 0, CLAIM_ATOM_TYPE_ORDER_BOOK = 1, CLAIM_ATOM_TYPE_LIQUIDITY_POOL = 2 }; ```", - "type": "string", - "enum": [ - "v0", - "order_book", - "liquidity_pool" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ClaimClaimableBalanceOp.json b/xdr-json/next/ClaimClaimableBalanceOp.json deleted file mode 100644 index a7caf3a2..00000000 --- a/xdr-json/next/ClaimClaimableBalanceOp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimClaimableBalanceOp", - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ClaimableBalanceId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ClaimClaimableBalanceResult.json b/xdr-json/next/ClaimClaimableBalanceResult.json deleted file mode 100644 index 617e20fc..00000000 --- a/xdr-json/next/ClaimClaimableBalanceResult.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimClaimableBalanceResult", - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ClaimClaimableBalanceResultCode.json b/xdr-json/next/ClaimClaimableBalanceResultCode.json deleted file mode 100644 index 6b388806..00000000 --- a/xdr-json/next/ClaimClaimableBalanceResultCode.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimClaimableBalanceResultCode", - "description": "ClaimClaimableBalanceResultCode is an XDR Enum defined as:\n\n```text enum ClaimClaimableBalanceResultCode { CLAIM_CLAIMABLE_BALANCE_SUCCESS = 0, CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST = -1, CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM = -2, CLAIM_CLAIMABLE_BALANCE_LINE_FULL = -3, CLAIM_CLAIMABLE_BALANCE_NO_TRUST = -4, CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED = -5, CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN = -6 }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ClaimLiquidityAtom.json b/xdr-json/next/ClaimLiquidityAtom.json deleted file mode 100644 index 6b70603a..00000000 --- a/xdr-json/next/ClaimLiquidityAtom.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimLiquidityAtom", - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "PoolId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ClaimOfferAtom.json b/xdr-json/next/ClaimOfferAtom.json deleted file mode 100644 index 9fd60f32..00000000 --- a/xdr-json/next/ClaimOfferAtom.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimOfferAtom", - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ClaimOfferAtomV0.json b/xdr-json/next/ClaimOfferAtomV0.json deleted file mode 100644 index d19b86c3..00000000 --- a/xdr-json/next/ClaimOfferAtomV0.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimOfferAtomV0", - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "$schema": { - "type": "string" - }, - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ClaimPredicate.json b/xdr-json/next/ClaimPredicate.json deleted file mode 100644 index e0e21654..00000000 --- a/xdr-json/next/ClaimPredicate.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimPredicate", - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ClaimPredicateType.json b/xdr-json/next/ClaimPredicateType.json deleted file mode 100644 index c0995cc9..00000000 --- a/xdr-json/next/ClaimPredicateType.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimPredicateType", - "description": "ClaimPredicateType is an XDR Enum defined as:\n\n```text enum ClaimPredicateType { CLAIM_PREDICATE_UNCONDITIONAL = 0, CLAIM_PREDICATE_AND = 1, CLAIM_PREDICATE_OR = 2, CLAIM_PREDICATE_NOT = 3, CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME = 4, CLAIM_PREDICATE_BEFORE_RELATIVE_TIME = 5 }; ```", - "type": "string", - "enum": [ - "unconditional", - "and", - "or", - "not", - "before_absolute_time", - "before_relative_time" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ClaimableBalanceEntry.json b/xdr-json/next/ClaimableBalanceEntry.json deleted file mode 100644 index 31440da8..00000000 --- a/xdr-json/next/ClaimableBalanceEntry.json +++ /dev/null @@ -1,277 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimableBalanceEntry", - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "$schema": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ClaimableBalanceEntryExt.json b/xdr-json/next/ClaimableBalanceEntryExt.json deleted file mode 100644 index 675ed80d..00000000 --- a/xdr-json/next/ClaimableBalanceEntryExt.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimableBalanceEntryExt", - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ClaimableBalanceEntryExtensionV1.json b/xdr-json/next/ClaimableBalanceEntryExtensionV1.json deleted file mode 100644 index 12013cd7..00000000 --- a/xdr-json/next/ClaimableBalanceEntryExtensionV1.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimableBalanceEntryExtensionV1", - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ClaimableBalanceEntryExtensionV1Ext.json b/xdr-json/next/ClaimableBalanceEntryExtensionV1Ext.json deleted file mode 100644 index 20c7f705..00000000 --- a/xdr-json/next/ClaimableBalanceEntryExtensionV1Ext.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimableBalanceEntryExtensionV1Ext", - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ClaimableBalanceFlags.json b/xdr-json/next/ClaimableBalanceFlags.json deleted file mode 100644 index 8925cc1b..00000000 --- a/xdr-json/next/ClaimableBalanceFlags.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimableBalanceFlags", - "description": "ClaimableBalanceFlags is an XDR Enum defined as:\n\n```text enum ClaimableBalanceFlags { // If set, the issuer account of the asset held by the claimable balance may // clawback the claimable balance CLAIMABLE_BALANCE_CLAWBACK_ENABLED_FLAG = 0x1 }; ```", - "type": "string", - "enum": [ - "claimable_balance_clawback_enabled_flag" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ClaimableBalanceId.json b/xdr-json/next/ClaimableBalanceId.json deleted file mode 100644 index dd6e65e6..00000000 --- a/xdr-json/next/ClaimableBalanceId.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimableBalanceId", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/ClaimableBalanceIdType.json b/xdr-json/next/ClaimableBalanceIdType.json deleted file mode 100644 index 6af2a3ff..00000000 --- a/xdr-json/next/ClaimableBalanceIdType.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimableBalanceIdType", - "description": "ClaimableBalanceIdType is an XDR Enum defined as:\n\n```text enum ClaimableBalanceIDType { CLAIMABLE_BALANCE_ID_TYPE_V0 = 0 }; ```", - "type": "string", - "enum": [ - "claimable_balance_id_type_v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/Claimant.json b/xdr-json/next/Claimant.json deleted file mode 100644 index 3e4e7c2c..00000000 --- a/xdr-json/next/Claimant.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Claimant", - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ClaimantType.json b/xdr-json/next/ClaimantType.json deleted file mode 100644 index 98fe793e..00000000 --- a/xdr-json/next/ClaimantType.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimantType", - "description": "ClaimantType is an XDR Enum defined as:\n\n```text enum ClaimantType { CLAIMANT_TYPE_V0 = 0 }; ```", - "type": "string", - "enum": [ - "claimant_type_v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ClaimantV0.json b/xdr-json/next/ClaimantV0.json deleted file mode 100644 index 0852b3d4..00000000 --- a/xdr-json/next/ClaimantV0.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClaimantV0", - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "$schema": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ClawbackClaimableBalanceOp.json b/xdr-json/next/ClawbackClaimableBalanceOp.json deleted file mode 100644 index 337e66f7..00000000 --- a/xdr-json/next/ClawbackClaimableBalanceOp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClawbackClaimableBalanceOp", - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ClaimableBalanceId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ClawbackClaimableBalanceResult.json b/xdr-json/next/ClawbackClaimableBalanceResult.json deleted file mode 100644 index 9f53c776..00000000 --- a/xdr-json/next/ClawbackClaimableBalanceResult.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClawbackClaimableBalanceResult", - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ClawbackClaimableBalanceResultCode.json b/xdr-json/next/ClawbackClaimableBalanceResultCode.json deleted file mode 100644 index e58d2420..00000000 --- a/xdr-json/next/ClawbackClaimableBalanceResultCode.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClawbackClaimableBalanceResultCode", - "description": "ClawbackClaimableBalanceResultCode is an XDR Enum defined as:\n\n```text enum ClawbackClaimableBalanceResultCode { // codes considered as \"success\" for the operation CLAWBACK_CLAIMABLE_BALANCE_SUCCESS = 0,\n\n// codes considered as \"failure\" for the operation CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST = -1, CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER = -2, CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED = -3 }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ClawbackOp.json b/xdr-json/next/ClawbackOp.json deleted file mode 100644 index 128dfc89..00000000 --- a/xdr-json/next/ClawbackOp.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClawbackOp", - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "$schema": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "MuxedAccount": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ClawbackResult.json b/xdr-json/next/ClawbackResult.json deleted file mode 100644 index 8be60d45..00000000 --- a/xdr-json/next/ClawbackResult.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClawbackResult", - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ClawbackResultCode.json b/xdr-json/next/ClawbackResultCode.json deleted file mode 100644 index 51c1cf86..00000000 --- a/xdr-json/next/ClawbackResultCode.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ClawbackResultCode", - "description": "ClawbackResultCode is an XDR Enum defined as:\n\n```text enum ClawbackResultCode { // codes considered as \"success\" for the operation CLAWBACK_SUCCESS = 0,\n\n// codes considered as \"failure\" for the operation CLAWBACK_MALFORMED = -1, CLAWBACK_NOT_CLAWBACK_ENABLED = -2, CLAWBACK_NO_TRUST = -3, CLAWBACK_UNDERFUNDED = -4 }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ConfigSettingContractBandwidthV0.json b/xdr-json/next/ConfigSettingContractBandwidthV0.json deleted file mode 100644 index 6bc45285..00000000 --- a/xdr-json/next/ConfigSettingContractBandwidthV0.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ConfigSettingContractBandwidthV0", - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "$schema": { - "type": "string" - }, - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/ConfigSettingContractComputeV0.json b/xdr-json/next/ConfigSettingContractComputeV0.json deleted file mode 100644 index bfba9124..00000000 --- a/xdr-json/next/ConfigSettingContractComputeV0.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ConfigSettingContractComputeV0", - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "$schema": { - "type": "string" - }, - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/ConfigSettingContractEventsV0.json b/xdr-json/next/ConfigSettingContractEventsV0.json deleted file mode 100644 index f02d0b3a..00000000 --- a/xdr-json/next/ConfigSettingContractEventsV0.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ConfigSettingContractEventsV0", - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "$schema": { - "type": "string" - }, - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/ConfigSettingContractExecutionLanesV0.json b/xdr-json/next/ConfigSettingContractExecutionLanesV0.json deleted file mode 100644 index 41166cc4..00000000 --- a/xdr-json/next/ConfigSettingContractExecutionLanesV0.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ConfigSettingContractExecutionLanesV0", - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/ConfigSettingContractHistoricalDataV0.json b/xdr-json/next/ConfigSettingContractHistoricalDataV0.json deleted file mode 100644 index 01370c87..00000000 --- a/xdr-json/next/ConfigSettingContractHistoricalDataV0.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ConfigSettingContractHistoricalDataV0", - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "$schema": { - "type": "string" - }, - "fee_historical1_kb": { - "type": "string" - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/ConfigSettingContractLedgerCostExtV0.json b/xdr-json/next/ConfigSettingContractLedgerCostExtV0.json deleted file mode 100644 index 73a4b4d2..00000000 --- a/xdr-json/next/ConfigSettingContractLedgerCostExtV0.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ConfigSettingContractLedgerCostExtV0", - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "$schema": { - "type": "string" - }, - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/ConfigSettingContractLedgerCostV0.json b/xdr-json/next/ConfigSettingContractLedgerCostV0.json deleted file mode 100644 index 6caee829..00000000 --- a/xdr-json/next/ConfigSettingContractLedgerCostV0.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ConfigSettingContractLedgerCostV0", - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "$schema": { - "type": "string" - }, - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/ConfigSettingContractParallelComputeV0.json b/xdr-json/next/ConfigSettingContractParallelComputeV0.json deleted file mode 100644 index 2815c713..00000000 --- a/xdr-json/next/ConfigSettingContractParallelComputeV0.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ConfigSettingContractParallelComputeV0", - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/ConfigSettingEntry.json b/xdr-json/next/ConfigSettingEntry.json deleted file mode 100644 index 6f3a86dd..00000000 --- a/xdr-json/next/ConfigSettingEntry.json +++ /dev/null @@ -1,725 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ConfigSettingEntry", - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ConfigSettingId.json b/xdr-json/next/ConfigSettingId.json deleted file mode 100644 index 4d0cc824..00000000 --- a/xdr-json/next/ConfigSettingId.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ConfigSettingId", - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ConfigSettingScpTiming.json b/xdr-json/next/ConfigSettingScpTiming.json deleted file mode 100644 index eee7a8c8..00000000 --- a/xdr-json/next/ConfigSettingScpTiming.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ConfigSettingScpTiming", - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/ConfigUpgradeSet.json b/xdr-json/next/ConfigUpgradeSet.json deleted file mode 100644 index 85da2c6e..00000000 --- a/xdr-json/next/ConfigUpgradeSet.json +++ /dev/null @@ -1,739 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ConfigUpgradeSet", - "description": "ConfigUpgradeSet is an XDR Struct defined as:\n\n```text struct ConfigUpgradeSet { ConfigSettingEntry updatedEntry<>; }; ```", - "type": "object", - "required": [ - "updated_entry" - ], - "properties": { - "$schema": { - "type": "string" - }, - "updated_entry": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigSettingEntry" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ConfigUpgradeSetKey.json b/xdr-json/next/ConfigUpgradeSetKey.json deleted file mode 100644 index 95768512..00000000 --- a/xdr-json/next/ConfigUpgradeSetKey.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ConfigUpgradeSetKey", - "description": "ConfigUpgradeSetKey is an XDR Struct defined as:\n\n```text struct ConfigUpgradeSetKey { ContractID contractID; Hash contentHash; }; ```", - "type": "object", - "required": [ - "content_hash", - "contract_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "content_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "contract_id": { - "$ref": "#/definitions/ContractId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ContractCodeCostInputs.json b/xdr-json/next/ContractCodeCostInputs.json deleted file mode 100644 index 6a118cde..00000000 --- a/xdr-json/next/ContractCodeCostInputs.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractCodeCostInputs", - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ContractCodeEntry.json b/xdr-json/next/ContractCodeEntry.json deleted file mode 100644 index 3c535720..00000000 --- a/xdr-json/next/ContractCodeEntry.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractCodeEntry", - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "$schema": { - "type": "string" - }, - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ContractCodeEntryExt.json b/xdr-json/next/ContractCodeEntryExt.json deleted file mode 100644 index 6af21c8e..00000000 --- a/xdr-json/next/ContractCodeEntryExt.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractCodeEntryExt", - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ContractCodeEntryV1.json b/xdr-json/next/ContractCodeEntryV1.json deleted file mode 100644 index d1bd9f94..00000000 --- a/xdr-json/next/ContractCodeEntryV1.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractCodeEntryV1", - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "$schema": { - "type": "string" - }, - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ContractCostParamEntry.json b/xdr-json/next/ContractCostParamEntry.json deleted file mode 100644 index e4eac840..00000000 --- a/xdr-json/next/ContractCostParamEntry.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractCostParamEntry", - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "$schema": { - "type": "string" - }, - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ContractCostParams.json b/xdr-json/next/ContractCostParams.json deleted file mode 100644 index ad5b0edc..00000000 --- a/xdr-json/next/ContractCostParams.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractCostParams", - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024, - "definitions": { - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ContractCostType.json b/xdr-json/next/ContractCostType.json deleted file mode 100644 index 7e4faa0d..00000000 --- a/xdr-json/next/ContractCostType.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractCostType", - "description": "ContractCostType is an XDR Enum defined as:\n\n```text enum ContractCostType { // Cost of running 1 wasm instruction WasmInsnExec = 0, // Cost of allocating a slice of memory (in bytes) MemAlloc = 1, // Cost of copying a slice of bytes into a pre-allocated memory MemCpy = 2, // Cost of comparing two slices of memory MemCmp = 3, // Cost of a host function dispatch, not including the actual work done by // the function nor the cost of VM invocation machinary DispatchHostFunction = 4, // Cost of visiting a host object from the host object storage. Exists to // make sure some baseline cost coverage, i.e. repeatly visiting objects // by the guest will always incur some charges. VisitObject = 5, // Cost of serializing an xdr object to bytes ValSer = 6, // Cost of deserializing an xdr object from bytes ValDeser = 7, // Cost of computing the sha256 hash from bytes ComputeSha256Hash = 8, // Cost of computing the ed25519 pubkey from bytes ComputeEd25519PubKey = 9, // Cost of verifying ed25519 signature of a payload. VerifyEd25519Sig = 10, // Cost of instantiation a VM from wasm bytes code. VmInstantiation = 11, // Cost of instantiation a VM from a cached state. VmCachedInstantiation = 12, // Cost of invoking a function on the VM. If the function is a host function, // additional cost will be covered by `DispatchHostFunction`. InvokeVmFunction = 13, // Cost of computing a keccak256 hash from bytes. ComputeKeccak256Hash = 14, // Cost of decoding an ECDSA signature computed from a 256-bit prime modulus // curve (e.g. secp256k1 and secp256r1) DecodeEcdsaCurve256Sig = 15, // Cost of recovering an ECDSA secp256k1 key from a signature. RecoverEcdsaSecp256k1Key = 16, // Cost of int256 addition (`+`) and subtraction (`-`) operations Int256AddSub = 17, // Cost of int256 multiplication (`*`) operation Int256Mul = 18, // Cost of int256 division (`/`) operation Int256Div = 19, // Cost of int256 power (`exp`) operation Int256Pow = 20, // Cost of int256 shift (`shl`, `shr`) operation Int256Shift = 21, // Cost of drawing random bytes using a ChaCha20 PRNG ChaCha20DrawBytes = 22,\n\n// Cost of parsing wasm bytes that only encode instructions. ParseWasmInstructions = 23, // Cost of parsing a known number of wasm functions. ParseWasmFunctions = 24, // Cost of parsing a known number of wasm globals. ParseWasmGlobals = 25, // Cost of parsing a known number of wasm table entries. ParseWasmTableEntries = 26, // Cost of parsing a known number of wasm types. ParseWasmTypes = 27, // Cost of parsing a known number of wasm data segments. ParseWasmDataSegments = 28, // Cost of parsing a known number of wasm element segments. ParseWasmElemSegments = 29, // Cost of parsing a known number of wasm imports. ParseWasmImports = 30, // Cost of parsing a known number of wasm exports. ParseWasmExports = 31, // Cost of parsing a known number of data segment bytes. ParseWasmDataSegmentBytes = 32,\n\n// Cost of instantiating wasm bytes that only encode instructions. InstantiateWasmInstructions = 33, // Cost of instantiating a known number of wasm functions. InstantiateWasmFunctions = 34, // Cost of instantiating a known number of wasm globals. InstantiateWasmGlobals = 35, // Cost of instantiating a known number of wasm table entries. InstantiateWasmTableEntries = 36, // Cost of instantiating a known number of wasm types. InstantiateWasmTypes = 37, // Cost of instantiating a known number of wasm data segments. InstantiateWasmDataSegments = 38, // Cost of instantiating a known number of wasm element segments. InstantiateWasmElemSegments = 39, // Cost of instantiating a known number of wasm imports. InstantiateWasmImports = 40, // Cost of instantiating a known number of wasm exports. InstantiateWasmExports = 41, // Cost of instantiating a known number of data segment bytes. InstantiateWasmDataSegmentBytes = 42,\n\n// Cost of decoding a bytes array representing an uncompressed SEC-1 encoded // point on a 256-bit elliptic curve Sec1DecodePointUncompressed = 43, // Cost of verifying an ECDSA Secp256r1 signature VerifyEcdsaSecp256r1Sig = 44,\n\n// Cost of encoding a BLS12-381 Fp (base field element) Bls12381EncodeFp = 45, // Cost of decoding a BLS12-381 Fp (base field element) Bls12381DecodeFp = 46, // Cost of checking a G1 point lies on the curve Bls12381G1CheckPointOnCurve = 47, // Cost of checking a G1 point belongs to the correct subgroup Bls12381G1CheckPointInSubgroup = 48, // Cost of checking a G2 point lies on the curve Bls12381G2CheckPointOnCurve = 49, // Cost of checking a G2 point belongs to the correct subgroup Bls12381G2CheckPointInSubgroup = 50, // Cost of converting a BLS12-381 G1 point from projective to affine coordinates Bls12381G1ProjectiveToAffine = 51, // Cost of converting a BLS12-381 G2 point from projective to affine coordinates Bls12381G2ProjectiveToAffine = 52, // Cost of performing BLS12-381 G1 point addition Bls12381G1Add = 53, // Cost of performing BLS12-381 G1 scalar multiplication Bls12381G1Mul = 54, // Cost of performing BLS12-381 G1 multi-scalar multiplication (MSM) Bls12381G1Msm = 55, // Cost of mapping a BLS12-381 Fp field element to a G1 point Bls12381MapFpToG1 = 56, // Cost of hashing to a BLS12-381 G1 point Bls12381HashToG1 = 57, // Cost of performing BLS12-381 G2 point addition Bls12381G2Add = 58, // Cost of performing BLS12-381 G2 scalar multiplication Bls12381G2Mul = 59, // Cost of performing BLS12-381 G2 multi-scalar multiplication (MSM) Bls12381G2Msm = 60, // Cost of mapping a BLS12-381 Fp2 field element to a G2 point Bls12381MapFp2ToG2 = 61, // Cost of hashing to a BLS12-381 G2 point Bls12381HashToG2 = 62, // Cost of performing BLS12-381 pairing operation Bls12381Pairing = 63, // Cost of converting a BLS12-381 scalar element from U256 Bls12381FrFromU256 = 64, // Cost of converting a BLS12-381 scalar element to U256 Bls12381FrToU256 = 65, // Cost of performing BLS12-381 scalar element addition/subtraction Bls12381FrAddSub = 66, // Cost of performing BLS12-381 scalar element multiplication Bls12381FrMul = 67, // Cost of performing BLS12-381 scalar element exponentiation Bls12381FrPow = 68, // Cost of performing BLS12-381 scalar element inversion Bls12381FrInv = 69,\n\n// Cost of encoding a BN254 Fp (base field element) Bn254EncodeFp = 70, // Cost of decoding a BN254 Fp (base field element) Bn254DecodeFp = 71, // Cost of checking a G1 point lies on the curve Bn254G1CheckPointOnCurve = 72, // Cost of checking a G2 point lies on the curve Bn254G2CheckPointOnCurve = 73, // Cost of checking a G2 point belongs to the correct subgroup Bn254G2CheckPointInSubgroup = 74, // Cost of converting a BN254 G1 point from projective to affine coordinates Bn254G1ProjectiveToAffine = 75, // Cost of performing BN254 G1 point addition Bn254G1Add = 76, // Cost of performing BN254 G1 scalar multiplication Bn254G1Mul = 77, // Cost of performing BN254 pairing operation Bn254Pairing = 78, // Cost of converting a BN254 scalar element from U256 Bn254FrFromU256 = 79, // Cost of converting a BN254 scalar element to U256 Bn254FrToU256 = 80, // // Cost of performing BN254 scalar element addition/subtraction Bn254FrAddSub = 81, // Cost of performing BN254 scalar element multiplication Bn254FrMul = 82, // Cost of performing BN254 scalar element exponentiation Bn254FrPow = 83, // Cost of performing BN254 scalar element inversion Bn254FrInv = 84, // Cost of performing BN254 G1 multi-scalar multiplication (MSM) Bn254G1Msm = 85 }; ```", - "type": "string", - "enum": [ - "wasm_insn_exec", - "mem_alloc", - "mem_cpy", - "mem_cmp", - "dispatch_host_function", - "visit_object", - "val_ser", - "val_deser", - "compute_sha256_hash", - "compute_ed25519_pub_key", - "verify_ed25519_sig", - "vm_instantiation", - "vm_cached_instantiation", - "invoke_vm_function", - "compute_keccak256_hash", - "decode_ecdsa_curve256_sig", - "recover_ecdsa_secp256k1_key", - "int256_add_sub", - "int256_mul", - "int256_div", - "int256_pow", - "int256_shift", - "cha_cha20_draw_bytes", - "parse_wasm_instructions", - "parse_wasm_functions", - "parse_wasm_globals", - "parse_wasm_table_entries", - "parse_wasm_types", - "parse_wasm_data_segments", - "parse_wasm_elem_segments", - "parse_wasm_imports", - "parse_wasm_exports", - "parse_wasm_data_segment_bytes", - "instantiate_wasm_instructions", - "instantiate_wasm_functions", - "instantiate_wasm_globals", - "instantiate_wasm_table_entries", - "instantiate_wasm_types", - "instantiate_wasm_data_segments", - "instantiate_wasm_elem_segments", - "instantiate_wasm_imports", - "instantiate_wasm_exports", - "instantiate_wasm_data_segment_bytes", - "sec1_decode_point_uncompressed", - "verify_ecdsa_secp256r1_sig", - "bls12381_encode_fp", - "bls12381_decode_fp", - "bls12381_g1_check_point_on_curve", - "bls12381_g1_check_point_in_subgroup", - "bls12381_g2_check_point_on_curve", - "bls12381_g2_check_point_in_subgroup", - "bls12381_g1_projective_to_affine", - "bls12381_g2_projective_to_affine", - "bls12381_g1_add", - "bls12381_g1_mul", - "bls12381_g1_msm", - "bls12381_map_fp_to_g1", - "bls12381_hash_to_g1", - "bls12381_g2_add", - "bls12381_g2_mul", - "bls12381_g2_msm", - "bls12381_map_fp2_to_g2", - "bls12381_hash_to_g2", - "bls12381_pairing", - "bls12381_fr_from_u256", - "bls12381_fr_to_u256", - "bls12381_fr_add_sub", - "bls12381_fr_mul", - "bls12381_fr_pow", - "bls12381_fr_inv", - "bn254_encode_fp", - "bn254_decode_fp", - "bn254_g1_check_point_on_curve", - "bn254_g2_check_point_on_curve", - "bn254_g2_check_point_in_subgroup", - "bn254_g1_projective_to_affine", - "bn254_g1_add", - "bn254_g1_mul", - "bn254_pairing", - "bn254_fr_from_u256", - "bn254_fr_to_u256", - "bn254_fr_add_sub", - "bn254_fr_mul", - "bn254_fr_pow", - "bn254_fr_inv", - "bn254_g1_msm" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ContractDataDurability.json b/xdr-json/next/ContractDataDurability.json deleted file mode 100644 index c9328290..00000000 --- a/xdr-json/next/ContractDataDurability.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractDataDurability", - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ContractDataEntry.json b/xdr-json/next/ContractDataEntry.json deleted file mode 100644 index f3b5e1b1..00000000 --- a/xdr-json/next/ContractDataEntry.json +++ /dev/null @@ -1,570 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractDataEntry", - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "$schema": { - "type": "string" - }, - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ContractEvent.json b/xdr-json/next/ContractEvent.json deleted file mode 100644 index 29ddd73c..00000000 --- a/xdr-json/next/ContractEvent.json +++ /dev/null @@ -1,612 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractEvent", - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "$schema": { - "type": "string" - }, - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ContractEventBody.json b/xdr-json/next/ContractEventBody.json deleted file mode 100644 index 23fef712..00000000 --- a/xdr-json/next/ContractEventBody.json +++ /dev/null @@ -1,565 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractEventBody", - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ContractEventType.json b/xdr-json/next/ContractEventType.json deleted file mode 100644 index dadd2eb1..00000000 --- a/xdr-json/next/ContractEventType.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractEventType", - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ContractEventV0.json b/xdr-json/next/ContractEventV0.json deleted file mode 100644 index 9a7ca580..00000000 --- a/xdr-json/next/ContractEventV0.json +++ /dev/null @@ -1,547 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractEventV0", - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "$schema": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ContractExecutable.json b/xdr-json/next/ContractExecutable.json deleted file mode 100644 index 9b14f760..00000000 --- a/xdr-json/next/ContractExecutable.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractExecutable", - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/ContractExecutableType.json b/xdr-json/next/ContractExecutableType.json deleted file mode 100644 index 95dc0b08..00000000 --- a/xdr-json/next/ContractExecutableType.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractExecutableType", - "description": "ContractExecutableType is an XDR Enum defined as:\n\n```text enum ContractExecutableType { CONTRACT_EXECUTABLE_WASM = 0, CONTRACT_EXECUTABLE_STELLAR_ASSET = 1 }; ```", - "type": "string", - "enum": [ - "wasm", - "stellar_asset" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ContractId.json b/xdr-json/next/ContractId.json deleted file mode 100644 index 92c9fb49..00000000 --- a/xdr-json/next/ContractId.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractId", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/ContractIdPreimage.json b/xdr-json/next/ContractIdPreimage.json deleted file mode 100644 index 21cef03a..00000000 --- a/xdr-json/next/ContractIdPreimage.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractIdPreimage", - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScAddress": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ContractIdPreimageFromAddress.json b/xdr-json/next/ContractIdPreimageFromAddress.json deleted file mode 100644 index c1f333fe..00000000 --- a/xdr-json/next/ContractIdPreimageFromAddress.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractIdPreimageFromAddress", - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "$schema": { - "type": "string" - }, - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScAddress": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ContractIdPreimageType.json b/xdr-json/next/ContractIdPreimageType.json deleted file mode 100644 index 3772e202..00000000 --- a/xdr-json/next/ContractIdPreimageType.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ContractIdPreimageType", - "description": "ContractIdPreimageType is an XDR Enum defined as:\n\n```text enum ContractIDPreimageType { CONTRACT_ID_PREIMAGE_FROM_ADDRESS = 0, CONTRACT_ID_PREIMAGE_FROM_ASSET = 1 }; ```", - "type": "string", - "enum": [ - "address", - "asset" - ] -} \ No newline at end of file diff --git a/xdr-json/next/CreateAccountOp.json b/xdr-json/next/CreateAccountOp.json deleted file mode 100644 index 017ba5cd..00000000 --- a/xdr-json/next/CreateAccountOp.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "CreateAccountOp", - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "$schema": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/CreateAccountResult.json b/xdr-json/next/CreateAccountResult.json deleted file mode 100644 index ea06c188..00000000 --- a/xdr-json/next/CreateAccountResult.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "CreateAccountResult", - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] -} \ No newline at end of file diff --git a/xdr-json/next/CreateAccountResultCode.json b/xdr-json/next/CreateAccountResultCode.json deleted file mode 100644 index 26056a1b..00000000 --- a/xdr-json/next/CreateAccountResultCode.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "CreateAccountResultCode", - "description": "CreateAccountResultCode is an XDR Enum defined as:\n\n```text enum CreateAccountResultCode { // codes considered as \"success\" for the operation CREATE_ACCOUNT_SUCCESS = 0, // account was created\n\n// codes considered as \"failure\" for the operation CREATE_ACCOUNT_MALFORMED = -1, // invalid destination CREATE_ACCOUNT_UNDERFUNDED = -2, // not enough funds in source account CREATE_ACCOUNT_LOW_RESERVE = -3, // would create an account below the min reserve CREATE_ACCOUNT_ALREADY_EXIST = -4 // account already exists }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] -} \ No newline at end of file diff --git a/xdr-json/next/CreateClaimableBalanceOp.json b/xdr-json/next/CreateClaimableBalanceOp.json deleted file mode 100644 index 76a93a81..00000000 --- a/xdr-json/next/CreateClaimableBalanceOp.json +++ /dev/null @@ -1,219 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "CreateClaimableBalanceOp", - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "$schema": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/CreateClaimableBalanceResult.json b/xdr-json/next/CreateClaimableBalanceResult.json deleted file mode 100644 index 1b4cbce5..00000000 --- a/xdr-json/next/CreateClaimableBalanceResult.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "CreateClaimableBalanceResult", - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ClaimableBalanceId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/CreateClaimableBalanceResultCode.json b/xdr-json/next/CreateClaimableBalanceResultCode.json deleted file mode 100644 index 511e3a8b..00000000 --- a/xdr-json/next/CreateClaimableBalanceResultCode.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "CreateClaimableBalanceResultCode", - "description": "CreateClaimableBalanceResultCode is an XDR Enum defined as:\n\n```text enum CreateClaimableBalanceResultCode { CREATE_CLAIMABLE_BALANCE_SUCCESS = 0, CREATE_CLAIMABLE_BALANCE_MALFORMED = -1, CREATE_CLAIMABLE_BALANCE_LOW_RESERVE = -2, CREATE_CLAIMABLE_BALANCE_NO_TRUST = -3, CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED = -4, CREATE_CLAIMABLE_BALANCE_UNDERFUNDED = -5 }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] -} \ No newline at end of file diff --git a/xdr-json/next/CreateContractArgs.json b/xdr-json/next/CreateContractArgs.json deleted file mode 100644 index 13b13adc..00000000 --- a/xdr-json/next/CreateContractArgs.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "CreateContractArgs", - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "$schema": { - "type": "string" - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScAddress": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/CreateContractArgsV2.json b/xdr-json/next/CreateContractArgsV2.json deleted file mode 100644 index c0bd0ab7..00000000 --- a/xdr-json/next/CreateContractArgsV2.json +++ /dev/null @@ -1,672 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "CreateContractArgsV2", - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "$schema": { - "type": "string" - }, - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/CreatePassiveSellOfferOp.json b/xdr-json/next/CreatePassiveSellOfferOp.json deleted file mode 100644 index 6016945c..00000000 --- a/xdr-json/next/CreatePassiveSellOfferOp.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "CreatePassiveSellOfferOp", - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "$schema": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/CryptoKeyType.json b/xdr-json/next/CryptoKeyType.json deleted file mode 100644 index a62feba8..00000000 --- a/xdr-json/next/CryptoKeyType.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "CryptoKeyType", - "description": "CryptoKeyType is an XDR Enum defined as:\n\n```text enum CryptoKeyType { KEY_TYPE_ED25519 = 0, KEY_TYPE_PRE_AUTH_TX = 1, KEY_TYPE_HASH_X = 2, KEY_TYPE_ED25519_SIGNED_PAYLOAD = 3, // MUXED enum values for supported type are derived from the enum values // above by ORing them with 0x100 KEY_TYPE_MUXED_ED25519 = 0x100 }; ```", - "type": "string", - "enum": [ - "ed25519", - "pre_auth_tx", - "hash_x", - "ed25519_signed_payload", - "muxed_ed25519" - ] -} \ No newline at end of file diff --git a/xdr-json/next/Curve25519Public.json b/xdr-json/next/Curve25519Public.json deleted file mode 100644 index a0113aa3..00000000 --- a/xdr-json/next/Curve25519Public.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Curve25519Public", - "description": "Curve25519Public is an XDR Struct defined as:\n\n```text struct Curve25519Public { opaque key[32]; }; ```", - "type": "object", - "required": [ - "key" - ], - "properties": { - "$schema": { - "type": "string" - }, - "key": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 32, - "minItems": 32 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/Curve25519Secret.json b/xdr-json/next/Curve25519Secret.json deleted file mode 100644 index 05bf3a5f..00000000 --- a/xdr-json/next/Curve25519Secret.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Curve25519Secret", - "description": "Curve25519Secret is an XDR Struct defined as:\n\n```text struct Curve25519Secret { opaque key[32]; }; ```", - "type": "object", - "required": [ - "key" - ], - "properties": { - "$schema": { - "type": "string" - }, - "key": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 32, - "minItems": 32 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/DataEntry.json b/xdr-json/next/DataEntry.json deleted file mode 100644 index 272bd1aa..00000000 --- a/xdr-json/next/DataEntry.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "DataEntry", - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "$schema": { - "type": "string" - }, - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/DataEntryExt.json b/xdr-json/next/DataEntryExt.json deleted file mode 100644 index a9e130e4..00000000 --- a/xdr-json/next/DataEntryExt.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "DataEntryExt", - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/DataValue.json b/xdr-json/next/DataValue.json deleted file mode 100644 index 07015c43..00000000 --- a/xdr-json/next/DataValue.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "DataValue", - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" -} \ No newline at end of file diff --git a/xdr-json/next/DecoratedSignature.json b/xdr-json/next/DecoratedSignature.json deleted file mode 100644 index c8512bc8..00000000 --- a/xdr-json/next/DecoratedSignature.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "DecoratedSignature", - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "$schema": { - "type": "string" - }, - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - }, - "unevaluatedProperties": false, - "definitions": { - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/DependentTxCluster.json b/xdr-json/next/DependentTxCluster.json deleted file mode 100644 index fa98106a..00000000 --- a/xdr-json/next/DependentTxCluster.json +++ /dev/null @@ -1,3013 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "DependentTxCluster", - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/DiagnosticEvent.json b/xdr-json/next/DiagnosticEvent.json deleted file mode 100644 index 17687a36..00000000 --- a/xdr-json/next/DiagnosticEvent.json +++ /dev/null @@ -1,628 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "DiagnosticEvent", - "description": "DiagnosticEvent is an XDR Struct defined as:\n\n```text struct DiagnosticEvent { bool inSuccessfulContractCall; ContractEvent event; }; ```", - "type": "object", - "required": [ - "event", - "in_successful_contract_call" - ], - "properties": { - "$schema": { - "type": "string" - }, - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "in_successful_contract_call": { - "type": "boolean" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/DontHave.json b/xdr-json/next/DontHave.json deleted file mode 100644 index 671608ed..00000000 --- a/xdr-json/next/DontHave.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "DontHave", - "description": "DontHave is an XDR Struct defined as:\n\n```text struct DontHave { MessageType type; uint256 reqHash; }; ```", - "type": "object", - "required": [ - "req_hash", - "type_" - ], - "properties": { - "$schema": { - "type": "string" - }, - "req_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "type_": { - "$ref": "#/definitions/MessageType" - } - }, - "unevaluatedProperties": false, - "definitions": { - "MessageType": { - "description": "MessageType is an XDR Enum defined as:\n\n```text enum MessageType { ERROR_MSG = 0, AUTH = 2, DONT_HAVE = 3, // GET_PEERS (4) is deprecated\n\nPEERS = 5,\n\nGET_TX_SET = 6, // gets a particular txset by hash TX_SET = 7, GENERALIZED_TX_SET = 17,\n\nTRANSACTION = 8, // pass on a tx you have heard about\n\n// SCP GET_SCP_QUORUMSET = 9, SCP_QUORUMSET = 10, SCP_MESSAGE = 11, GET_SCP_STATE = 12,\n\n// new messages HELLO = 13,\n\n// SURVEY_REQUEST (14) removed and replaced by TIME_SLICED_SURVEY_REQUEST // SURVEY_RESPONSE (15) removed and replaced by TIME_SLICED_SURVEY_RESPONSE\n\nSEND_MORE = 16, SEND_MORE_EXTENDED = 20,\n\nFLOOD_ADVERT = 18, FLOOD_DEMAND = 19,\n\nTIME_SLICED_SURVEY_REQUEST = 21, TIME_SLICED_SURVEY_RESPONSE = 22, TIME_SLICED_SURVEY_START_COLLECTING = 23, TIME_SLICED_SURVEY_STOP_COLLECTING = 24 }; ```", - "type": "string", - "enum": [ - "error_msg", - "auth", - "dont_have", - "peers", - "get_tx_set", - "tx_set", - "generalized_tx_set", - "transaction", - "get_scp_quorumset", - "scp_quorumset", - "scp_message", - "get_scp_state", - "hello", - "send_more", - "send_more_extended", - "flood_advert", - "flood_demand", - "time_sliced_survey_request", - "time_sliced_survey_response", - "time_sliced_survey_start_collecting", - "time_sliced_survey_stop_collecting" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/Duration.json b/xdr-json/next/Duration.json deleted file mode 100644 index 9e1c9b4b..00000000 --- a/xdr-json/next/Duration.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Duration", - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/EncodedLedgerKey.json b/xdr-json/next/EncodedLedgerKey.json deleted file mode 100644 index f4a4c77d..00000000 --- a/xdr-json/next/EncodedLedgerKey.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "EncodedLedgerKey", - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" -} \ No newline at end of file diff --git a/xdr-json/next/EncryptedBody.json b/xdr-json/next/EncryptedBody.json deleted file mode 100644 index 525b49a0..00000000 --- a/xdr-json/next/EncryptedBody.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "EncryptedBody", - "description": "EncryptedBody is an XDR Typedef defined as:\n\n```text typedef opaque EncryptedBody<64000>; ```", - "type": "string", - "maxLength": 128000, - "contentEncoding": "hex", - "contentMediaType": "application/binary" -} \ No newline at end of file diff --git a/xdr-json/next/EndSponsoringFutureReservesResult.json b/xdr-json/next/EndSponsoringFutureReservesResult.json deleted file mode 100644 index be801c0b..00000000 --- a/xdr-json/next/EndSponsoringFutureReservesResult.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "EndSponsoringFutureReservesResult", - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] -} \ No newline at end of file diff --git a/xdr-json/next/EndSponsoringFutureReservesResultCode.json b/xdr-json/next/EndSponsoringFutureReservesResultCode.json deleted file mode 100644 index 2ad5ba94..00000000 --- a/xdr-json/next/EndSponsoringFutureReservesResultCode.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "EndSponsoringFutureReservesResultCode", - "description": "EndSponsoringFutureReservesResultCode is an XDR Enum defined as:\n\n```text enum EndSponsoringFutureReservesResultCode { // codes considered as \"success\" for the operation END_SPONSORING_FUTURE_RESERVES_SUCCESS = 0,\n\n// codes considered as \"failure\" for the operation END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED = -1 }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] -} \ No newline at end of file diff --git a/xdr-json/next/EnvelopeType.json b/xdr-json/next/EnvelopeType.json deleted file mode 100644 index 6bcc1947..00000000 --- a/xdr-json/next/EnvelopeType.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "EnvelopeType", - "description": "EnvelopeType is an XDR Enum defined as:\n\n```text enum EnvelopeType { ENVELOPE_TYPE_TX_V0 = 0, ENVELOPE_TYPE_SCP = 1, ENVELOPE_TYPE_TX = 2, ENVELOPE_TYPE_AUTH = 3, ENVELOPE_TYPE_SCPVALUE = 4, ENVELOPE_TYPE_TX_FEE_BUMP = 5, ENVELOPE_TYPE_OP_ID = 6, ENVELOPE_TYPE_POOL_REVOKE_OP_ID = 7, ENVELOPE_TYPE_CONTRACT_ID = 8, ENVELOPE_TYPE_SOROBAN_AUTHORIZATION = 9 }; ```", - "type": "string", - "enum": [ - "tx_v0", - "scp", - "tx", - "auth", - "scpvalue", - "tx_fee_bump", - "op_id", - "pool_revoke_op_id", - "contract_id", - "soroban_authorization" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ErrorCode.json b/xdr-json/next/ErrorCode.json deleted file mode 100644 index 81884814..00000000 --- a/xdr-json/next/ErrorCode.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ErrorCode", - "description": "ErrorCode is an XDR Enum defined as:\n\n```text enum ErrorCode { ERR_MISC = 0, // Unspecific error ERR_DATA = 1, // Malformed data ERR_CONF = 2, // Misconfiguration error ERR_AUTH = 3, // Authentication failure ERR_LOAD = 4 // System overloaded }; ```", - "type": "string", - "enum": [ - "misc", - "data", - "conf", - "auth", - "load" - ] -} \ No newline at end of file diff --git a/xdr-json/next/EvictionIterator.json b/xdr-json/next/EvictionIterator.json deleted file mode 100644 index ccc46dcb..00000000 --- a/xdr-json/next/EvictionIterator.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "EvictionIterator", - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "$schema": { - "type": "string" - }, - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/ExtendFootprintTtlOp.json b/xdr-json/next/ExtendFootprintTtlOp.json deleted file mode 100644 index 446a9175..00000000 --- a/xdr-json/next/ExtendFootprintTtlOp.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ExtendFootprintTtlOp", - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ExtendFootprintTtlResult.json b/xdr-json/next/ExtendFootprintTtlResult.json deleted file mode 100644 index 08d3b769..00000000 --- a/xdr-json/next/ExtendFootprintTtlResult.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ExtendFootprintTtlResult", - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ExtendFootprintTtlResultCode.json b/xdr-json/next/ExtendFootprintTtlResultCode.json deleted file mode 100644 index fcfc6f6f..00000000 --- a/xdr-json/next/ExtendFootprintTtlResultCode.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ExtendFootprintTtlResultCode", - "description": "ExtendFootprintTtlResultCode is an XDR Enum defined as:\n\n```text enum ExtendFootprintTTLResultCode { // codes considered as \"success\" for the operation EXTEND_FOOTPRINT_TTL_SUCCESS = 0,\n\n// codes considered as \"failure\" for the operation EXTEND_FOOTPRINT_TTL_MALFORMED = -1, EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED = -2, EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE = -3 }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ExtensionPoint.json b/xdr-json/next/ExtensionPoint.json deleted file mode 100644 index 34c243a2..00000000 --- a/xdr-json/next/ExtensionPoint.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ExtensionPoint", - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/FeeBumpTransaction.json b/xdr-json/next/FeeBumpTransaction.json deleted file mode 100644 index 386a0530..00000000 --- a/xdr-json/next/FeeBumpTransaction.json +++ /dev/null @@ -1,2872 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "FeeBumpTransaction", - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/FeeBumpTransactionEnvelope.json b/xdr-json/next/FeeBumpTransactionEnvelope.json deleted file mode 100644 index 63afaa48..00000000 --- a/xdr-json/next/FeeBumpTransactionEnvelope.json +++ /dev/null @@ -1,2892 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "FeeBumpTransactionEnvelope", - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "$schema": { - "type": "string" - }, - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/FeeBumpTransactionExt.json b/xdr-json/next/FeeBumpTransactionExt.json deleted file mode 100644 index ff430326..00000000 --- a/xdr-json/next/FeeBumpTransactionExt.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "FeeBumpTransactionExt", - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/FeeBumpTransactionInnerTx.json b/xdr-json/next/FeeBumpTransactionInnerTx.json deleted file mode 100644 index 92ef359e..00000000 --- a/xdr-json/next/FeeBumpTransactionInnerTx.json +++ /dev/null @@ -1,2843 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "FeeBumpTransactionInnerTx", - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/FloodAdvert.json b/xdr-json/next/FloodAdvert.json deleted file mode 100644 index 53b3d8b8..00000000 --- a/xdr-json/next/FloodAdvert.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "FloodAdvert", - "description": "FloodAdvert is an XDR Struct defined as:\n\n```text struct FloodAdvert { TxAdvertVector txHashes; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "$schema": { - "type": "string" - }, - "tx_hashes": { - "$ref": "#/definitions/TxAdvertVector" - } - }, - "unevaluatedProperties": false, - "definitions": { - "TxAdvertVector": { - "description": "TxAdvertVector is an XDR Typedef defined as:\n\n```text typedef Hash TxAdvertVector; ```", - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 1000 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/FloodDemand.json b/xdr-json/next/FloodDemand.json deleted file mode 100644 index 9aca5477..00000000 --- a/xdr-json/next/FloodDemand.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "FloodDemand", - "description": "FloodDemand is an XDR Struct defined as:\n\n```text struct FloodDemand { TxDemandVector txHashes; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "$schema": { - "type": "string" - }, - "tx_hashes": { - "$ref": "#/definitions/TxDemandVector" - } - }, - "unevaluatedProperties": false, - "definitions": { - "TxDemandVector": { - "description": "TxDemandVector is an XDR Typedef defined as:\n\n```text typedef Hash TxDemandVector; ```", - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 1000 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/FreezeBypassTxs.json b/xdr-json/next/FreezeBypassTxs.json deleted file mode 100644 index e061fe92..00000000 --- a/xdr-json/next/FreezeBypassTxs.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "FreezeBypassTxs", - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "$schema": { - "type": "string" - }, - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/FreezeBypassTxsDelta.json b/xdr-json/next/FreezeBypassTxsDelta.json deleted file mode 100644 index 248ffdc3..00000000 --- a/xdr-json/next/FreezeBypassTxsDelta.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "FreezeBypassTxsDelta", - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "$schema": { - "type": "string" - }, - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/FrozenLedgerKeys.json b/xdr-json/next/FrozenLedgerKeys.json deleted file mode 100644 index e168304d..00000000 --- a/xdr-json/next/FrozenLedgerKeys.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "FrozenLedgerKeys", - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "$schema": { - "type": "string" - }, - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/FrozenLedgerKeysDelta.json b/xdr-json/next/FrozenLedgerKeysDelta.json deleted file mode 100644 index 27a6c336..00000000 --- a/xdr-json/next/FrozenLedgerKeysDelta.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "FrozenLedgerKeysDelta", - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "$schema": { - "type": "string" - }, - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/GeneralizedTransactionSet.json b/xdr-json/next/GeneralizedTransactionSet.json deleted file mode 100644 index f0f6fa55..00000000 --- a/xdr-json/next/GeneralizedTransactionSet.json +++ /dev/null @@ -1,3160 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "GeneralizedTransactionSet", - "description": "GeneralizedTransactionSet is an XDR Union defined as:\n\n```text union GeneralizedTransactionSet switch (int v) { // We consider the legacy TransactionSet to be v0. case 1: TransactionSetV1 v1TxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionSetV1" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionSetV1": { - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/Hash.json b/xdr-json/next/Hash.json deleted file mode 100644 index b980696e..00000000 --- a/xdr-json/next/Hash.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Hash", - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" -} \ No newline at end of file diff --git a/xdr-json/next/HashIdPreimage.json b/xdr-json/next/HashIdPreimage.json deleted file mode 100644 index e3a30f39..00000000 --- a/xdr-json/next/HashIdPreimage.json +++ /dev/null @@ -1,930 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HashIdPreimage", - "description": "HashIdPreimage is an XDR Union defined as:\n\n```text union HashIDPreimage switch (EnvelopeType type) { case ENVELOPE_TYPE_OP_ID: struct { AccountID sourceAccount; SequenceNumber seqNum; uint32 opNum; } operationID; case ENVELOPE_TYPE_POOL_REVOKE_OP_ID: struct { AccountID sourceAccount; SequenceNumber seqNum; uint32 opNum; PoolID liquidityPoolID; Asset asset; } revokeID; case ENVELOPE_TYPE_CONTRACT_ID: struct { Hash networkID; ContractIDPreimage contractIDPreimage; } contractID; case ENVELOPE_TYPE_SOROBAN_AUTHORIZATION: struct { Hash networkID; int64 nonce; uint32 signatureExpirationLedger; SorobanAuthorizedInvocation invocation; } sorobanAuthorization; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "op_id" - ], - "properties": { - "op_id": { - "$ref": "#/definitions/HashIdPreimageOperationId" - } - } - }, - { - "type": "object", - "required": [ - "pool_revoke_op_id" - ], - "properties": { - "pool_revoke_op_id": { - "$ref": "#/definitions/HashIdPreimageRevokeId" - } - } - }, - { - "type": "object", - "required": [ - "contract_id" - ], - "properties": { - "contract_id": { - "$ref": "#/definitions/HashIdPreimageContractId" - } - } - }, - { - "type": "object", - "required": [ - "soroban_authorization" - ], - "properties": { - "soroban_authorization": { - "$ref": "#/definitions/HashIdPreimageSorobanAuthorization" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "HashIdPreimageContractId": { - "description": "HashIdPreimageContractId is an XDR NestedStruct defined as:\n\n```text struct { Hash networkID; ContractIDPreimage contractIDPreimage; } ```", - "type": "object", - "required": [ - "contract_id_preimage", - "network_id" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "network_id": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "HashIdPreimageOperationId": { - "description": "HashIdPreimageOperationId is an XDR NestedStruct defined as:\n\n```text struct { AccountID sourceAccount; SequenceNumber seqNum; uint32 opNum; } ```", - "type": "object", - "required": [ - "op_num", - "seq_num", - "source_account" - ], - "properties": { - "op_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/AccountId" - } - } - }, - "HashIdPreimageRevokeId": { - "description": "HashIdPreimageRevokeId is an XDR NestedStruct defined as:\n\n```text struct { AccountID sourceAccount; SequenceNumber seqNum; uint32 opNum; PoolID liquidityPoolID; Asset asset; } ```", - "type": "object", - "required": [ - "asset", - "liquidity_pool_id", - "op_num", - "seq_num", - "source_account" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "op_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/AccountId" - } - } - }, - "HashIdPreimageSorobanAuthorization": { - "description": "HashIdPreimageSorobanAuthorization is an XDR NestedStruct defined as:\n\n```text struct { Hash networkID; int64 nonce; uint32 signatureExpirationLedger; SorobanAuthorizedInvocation invocation; } ```", - "type": "object", - "required": [ - "invocation", - "network_id", - "nonce", - "signature_expiration_ledger" - ], - "properties": { - "invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "network_id": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "nonce": { - "type": "string" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "PoolId": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/HashIdPreimageContractId.json b/xdr-json/next/HashIdPreimageContractId.json deleted file mode 100644 index 93c6bd6d..00000000 --- a/xdr-json/next/HashIdPreimageContractId.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HashIdPreimageContractId", - "description": "HashIdPreimageContractId is an XDR NestedStruct defined as:\n\n```text struct { Hash networkID; ContractIDPreimage contractIDPreimage; } ```", - "type": "object", - "required": [ - "contract_id_preimage", - "network_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "network_id": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScAddress": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/HashIdPreimageOperationId.json b/xdr-json/next/HashIdPreimageOperationId.json deleted file mode 100644 index 7b08bb37..00000000 --- a/xdr-json/next/HashIdPreimageOperationId.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HashIdPreimageOperationId", - "description": "HashIdPreimageOperationId is an XDR NestedStruct defined as:\n\n```text struct { AccountID sourceAccount; SequenceNumber seqNum; uint32 opNum; } ```", - "type": "object", - "required": [ - "op_num", - "seq_num", - "source_account" - ], - "properties": { - "$schema": { - "type": "string" - }, - "op_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/AccountId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/HashIdPreimageRevokeId.json b/xdr-json/next/HashIdPreimageRevokeId.json deleted file mode 100644 index 431620d9..00000000 --- a/xdr-json/next/HashIdPreimageRevokeId.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HashIdPreimageRevokeId", - "description": "HashIdPreimageRevokeId is an XDR NestedStruct defined as:\n\n```text struct { AccountID sourceAccount; SequenceNumber seqNum; uint32 opNum; PoolID liquidityPoolID; Asset asset; } ```", - "type": "object", - "required": [ - "asset", - "liquidity_pool_id", - "op_num", - "seq_num", - "source_account" - ], - "properties": { - "$schema": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "op_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/AccountId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "PoolId": { - "type": "string" - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/HashIdPreimageSorobanAuthorization.json b/xdr-json/next/HashIdPreimageSorobanAuthorization.json deleted file mode 100644 index 751a8a21..00000000 --- a/xdr-json/next/HashIdPreimageSorobanAuthorization.json +++ /dev/null @@ -1,800 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HashIdPreimageSorobanAuthorization", - "description": "HashIdPreimageSorobanAuthorization is an XDR NestedStruct defined as:\n\n```text struct { Hash networkID; int64 nonce; uint32 signatureExpirationLedger; SorobanAuthorizedInvocation invocation; } ```", - "type": "object", - "required": [ - "invocation", - "network_id", - "nonce", - "signature_expiration_ledger" - ], - "properties": { - "$schema": { - "type": "string" - }, - "invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "network_id": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "nonce": { - "type": "string" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/Hello.json b/xdr-json/next/Hello.json deleted file mode 100644 index 8ab6c0b9..00000000 --- a/xdr-json/next/Hello.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Hello", - "description": "Hello is an XDR Struct defined as:\n\n```text struct Hello { uint32 ledgerVersion; uint32 overlayVersion; uint32 overlayMinVersion; Hash networkID; string versionStr<100>; int listeningPort; NodeID peerID; AuthCert cert; uint256 nonce; }; ```", - "type": "object", - "required": [ - "cert", - "ledger_version", - "listening_port", - "network_id", - "nonce", - "overlay_min_version", - "overlay_version", - "peer_id", - "version_str" - ], - "properties": { - "$schema": { - "type": "string" - }, - "cert": { - "$ref": "#/definitions/AuthCert" - }, - "ledger_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "listening_port": { - "type": "integer", - "format": "int32" - }, - "network_id": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "nonce": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "overlay_min_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "overlay_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "peer_id": { - "$ref": "#/definitions/NodeId" - }, - "version_str": { - "$ref": "#/definitions/StringM<100>" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AuthCert": { - "description": "AuthCert is an XDR Struct defined as:\n\n```text struct AuthCert { Curve25519Public pubkey; uint64 expiration; Signature sig; }; ```", - "type": "object", - "required": [ - "expiration", - "pubkey", - "sig" - ], - "properties": { - "expiration": { - "type": "string" - }, - "pubkey": { - "$ref": "#/definitions/Curve25519Public" - }, - "sig": { - "$ref": "#/definitions/Signature" - } - } - }, - "Curve25519Public": { - "description": "Curve25519Public is an XDR Struct defined as:\n\n```text struct Curve25519Public { opaque key[32]; }; ```", - "type": "object", - "required": [ - "key" - ], - "properties": { - "key": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 32, - "minItems": 32 - } - } - }, - "NodeId": { - "type": "string" - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "StringM<100>": { - "type": "string", - "maxLength": 100 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/HmacSha256Key.json b/xdr-json/next/HmacSha256Key.json deleted file mode 100644 index 1843d972..00000000 --- a/xdr-json/next/HmacSha256Key.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HmacSha256Key", - "description": "HmacSha256Key is an XDR Struct defined as:\n\n```text struct HmacSha256Key { opaque key[32]; }; ```", - "type": "object", - "required": [ - "key" - ], - "properties": { - "$schema": { - "type": "string" - }, - "key": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 32, - "minItems": 32 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/HmacSha256Mac.json b/xdr-json/next/HmacSha256Mac.json deleted file mode 100644 index dc19dd2b..00000000 --- a/xdr-json/next/HmacSha256Mac.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HmacSha256Mac", - "description": "HmacSha256Mac is an XDR Struct defined as:\n\n```text struct HmacSha256Mac { opaque mac[32]; }; ```", - "type": "object", - "required": [ - "mac" - ], - "properties": { - "$schema": { - "type": "string" - }, - "mac": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 32, - "minItems": 32 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/HostFunction.json b/xdr-json/next/HostFunction.json deleted file mode 100644 index 853a93b2..00000000 --- a/xdr-json/next/HostFunction.json +++ /dev/null @@ -1,765 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HostFunction", - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/HostFunctionType.json b/xdr-json/next/HostFunctionType.json deleted file mode 100644 index a7b1acf7..00000000 --- a/xdr-json/next/HostFunctionType.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HostFunctionType", - "description": "HostFunctionType is an XDR Enum defined as:\n\n```text enum HostFunctionType { HOST_FUNCTION_TYPE_INVOKE_CONTRACT = 0, HOST_FUNCTION_TYPE_CREATE_CONTRACT = 1, HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2, HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2 = 3 }; ```", - "type": "string", - "enum": [ - "invoke_contract", - "create_contract", - "upload_contract_wasm", - "create_contract_v2" - ] -} \ No newline at end of file diff --git a/xdr-json/next/HotArchiveBucketEntry.json b/xdr-json/next/HotArchiveBucketEntry.json deleted file mode 100644 index eab281f0..00000000 --- a/xdr-json/next/HotArchiveBucketEntry.json +++ /dev/null @@ -1,2882 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HotArchiveBucketEntry", - "description": "HotArchiveBucketEntry is an XDR Union defined as:\n\n```text union HotArchiveBucketEntry switch (HotArchiveBucketEntryType type) { case HOT_ARCHIVE_ARCHIVED: LedgerEntry archivedEntry;\n\ncase HOT_ARCHIVE_LIVE: LedgerKey key; case HOT_ARCHIVE_METAENTRY: BucketMetadata metaEntry; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "archived" - ], - "properties": { - "archived": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "live" - ], - "properties": { - "live": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "metaentry" - ], - "properties": { - "metaentry": { - "$ref": "#/definitions/BucketMetadata" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BucketListType": { - "description": "BucketListType is an XDR Enum defined as:\n\n```text enum BucketListType { LIVE = 0, HOT_ARCHIVE = 1 }; ```", - "type": "string", - "enum": [ - "live", - "hot_archive" - ] - }, - "BucketMetadata": { - "description": "BucketMetadata is an XDR Struct defined as:\n\n```text struct BucketMetadata { // Indicates the protocol version used to create / merge this bucket. uint32 ledgerVersion;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: BucketListType bucketListType; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "ledger_version" - ], - "properties": { - "ext": { - "$ref": "#/definitions/BucketMetadataExt" - }, - "ledger_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "BucketMetadataExt": { - "description": "BucketMetadataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: BucketListType bucketListType; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/BucketListType" - } - } - } - ] - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/HotArchiveBucketEntryType.json b/xdr-json/next/HotArchiveBucketEntryType.json deleted file mode 100644 index a6a25d8c..00000000 --- a/xdr-json/next/HotArchiveBucketEntryType.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HotArchiveBucketEntryType", - "description": "HotArchiveBucketEntryType is an XDR Enum defined as:\n\n```text enum HotArchiveBucketEntryType { HOT_ARCHIVE_METAENTRY = -1, // Bucket metadata, should come first. HOT_ARCHIVE_ARCHIVED = 0, // Entry is Archived HOT_ARCHIVE_LIVE = 1 // Entry was previously HOT_ARCHIVE_ARCHIVED, but // has been added back to the live BucketList. // Does not need to be persisted. }; ```", - "type": "string", - "enum": [ - "metaentry", - "archived", - "live" - ] -} \ No newline at end of file diff --git a/xdr-json/next/InflationPayout.json b/xdr-json/next/InflationPayout.json deleted file mode 100644 index 12e49d0d..00000000 --- a/xdr-json/next/InflationPayout.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "InflationPayout", - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "$schema": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/InflationResult.json b/xdr-json/next/InflationResult.json deleted file mode 100644 index e7188b3e..00000000 --- a/xdr-json/next/InflationResult.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "InflationResult", - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/InflationResultCode.json b/xdr-json/next/InflationResultCode.json deleted file mode 100644 index 52ba3439..00000000 --- a/xdr-json/next/InflationResultCode.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "InflationResultCode", - "description": "InflationResultCode is an XDR Enum defined as:\n\n```text enum InflationResultCode { // codes considered as \"success\" for the operation INFLATION_SUCCESS = 0, // codes considered as \"failure\" for the operation INFLATION_NOT_TIME = -1 }; ```", - "type": "string", - "enum": [ - "success", - "not_time" - ] -} \ No newline at end of file diff --git a/xdr-json/next/InnerTransactionResult.json b/xdr-json/next/InnerTransactionResult.json deleted file mode 100644 index 771aa651..00000000 --- a/xdr-json/next/InnerTransactionResult.json +++ /dev/null @@ -1,1307 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "InnerTransactionResult", - "description": "InnerTransactionResult is an XDR Struct defined as:\n\n```text struct InnerTransactionResult { // Always 0. Here for binary compatibility. int64 feeCharged;\n\nunion switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/InnerTransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResultResult" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InnerTransactionResultExt": { - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "InnerTransactionResultResult": { - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/InnerTransactionResultExt.json b/xdr-json/next/InnerTransactionResultExt.json deleted file mode 100644 index 424f576c..00000000 --- a/xdr-json/next/InnerTransactionResultExt.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "InnerTransactionResultExt", - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/InnerTransactionResultPair.json b/xdr-json/next/InnerTransactionResultPair.json deleted file mode 100644 index 3cca35e2..00000000 --- a/xdr-json/next/InnerTransactionResultPair.json +++ /dev/null @@ -1,1327 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "InnerTransactionResultPair", - "description": "InnerTransactionResultPair is an XDR Struct defined as:\n\n```text struct InnerTransactionResultPair { Hash transactionHash; // hash of the inner transaction InnerTransactionResult result; // result for the inner transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "$schema": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InnerTransactionResult": { - "description": "InnerTransactionResult is an XDR Struct defined as:\n\n```text struct InnerTransactionResult { // Always 0. Here for binary compatibility. int64 feeCharged;\n\nunion switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/InnerTransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResultResult" - } - } - }, - "InnerTransactionResultExt": { - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "InnerTransactionResultResult": { - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/InnerTransactionResultResult.json b/xdr-json/next/InnerTransactionResultResult.json deleted file mode 100644 index bda7738b..00000000 --- a/xdr-json/next/InnerTransactionResultResult.json +++ /dev/null @@ -1,1282 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "InnerTransactionResultResult", - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/Int128Parts.json b/xdr-json/next/Int128Parts.json deleted file mode 100644 index e0179f85..00000000 --- a/xdr-json/next/Int128Parts.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Int128Parts", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/Int256Parts.json b/xdr-json/next/Int256Parts.json deleted file mode 100644 index 2ce4813a..00000000 --- a/xdr-json/next/Int256Parts.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Int256Parts", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/Int32.json b/xdr-json/next/Int32.json deleted file mode 100644 index 1934f6f2..00000000 --- a/xdr-json/next/Int32.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "int32", - "type": "integer", - "format": "int32" -} \ No newline at end of file diff --git a/xdr-json/next/Int64.json b/xdr-json/next/Int64.json deleted file mode 100644 index 335629b3..00000000 --- a/xdr-json/next/Int64.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "int64", - "type": "integer", - "format": "int64" -} \ No newline at end of file diff --git a/xdr-json/next/InvokeContractArgs.json b/xdr-json/next/InvokeContractArgs.json deleted file mode 100644 index 00b072e7..00000000 --- a/xdr-json/next/InvokeContractArgs.json +++ /dev/null @@ -1,551 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "InvokeContractArgs", - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "$schema": { - "type": "string" - }, - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/InvokeHostFunctionOp.json b/xdr-json/next/InvokeHostFunctionOp.json deleted file mode 100644 index 13828fe8..00000000 --- a/xdr-json/next/InvokeHostFunctionOp.json +++ /dev/null @@ -1,905 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "InvokeHostFunctionOp", - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "$schema": { - "type": "string" - }, - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/InvokeHostFunctionResult.json b/xdr-json/next/InvokeHostFunctionResult.json deleted file mode 100644 index d610b175..00000000 --- a/xdr-json/next/InvokeHostFunctionResult.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "InvokeHostFunctionResult", - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/InvokeHostFunctionResultCode.json b/xdr-json/next/InvokeHostFunctionResultCode.json deleted file mode 100644 index e28bcbf2..00000000 --- a/xdr-json/next/InvokeHostFunctionResultCode.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "InvokeHostFunctionResultCode", - "description": "InvokeHostFunctionResultCode is an XDR Enum defined as:\n\n```text enum InvokeHostFunctionResultCode { // codes considered as \"success\" for the operation INVOKE_HOST_FUNCTION_SUCCESS = 0,\n\n// codes considered as \"failure\" for the operation INVOKE_HOST_FUNCTION_MALFORMED = -1, INVOKE_HOST_FUNCTION_TRAPPED = -2, INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED = -3, INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED = -4, INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE = -5 }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] -} \ No newline at end of file diff --git a/xdr-json/next/InvokeHostFunctionSuccessPreImage.json b/xdr-json/next/InvokeHostFunctionSuccessPreImage.json deleted file mode 100644 index e1011d86..00000000 --- a/xdr-json/next/InvokeHostFunctionSuccessPreImage.json +++ /dev/null @@ -1,632 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "InvokeHostFunctionSuccessPreImage", - "description": "InvokeHostFunctionSuccessPreImage is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionSuccessPreImage { SCVal returnValue; ContractEvent events<>; }; ```", - "type": "object", - "required": [ - "events", - "return_value" - ], - "properties": { - "$schema": { - "type": "string" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "return_value": { - "$ref": "#/definitions/ScVal" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/IpAddrType.json b/xdr-json/next/IpAddrType.json deleted file mode 100644 index 9bde3cad..00000000 --- a/xdr-json/next/IpAddrType.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "IpAddrType", - "description": "IpAddrType is an XDR Enum defined as:\n\n```text enum IPAddrType { IPv4 = 0, IPv6 = 1 }; ```", - "type": "string", - "enum": [ - "i_pv4", - "i_pv6" - ] -} \ No newline at end of file diff --git a/xdr-json/next/LedgerBounds.json b/xdr-json/next/LedgerBounds.json deleted file mode 100644 index 50e18f70..00000000 --- a/xdr-json/next/LedgerBounds.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerBounds", - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "$schema": { - "type": "string" - }, - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/LedgerCloseMeta.json b/xdr-json/next/LedgerCloseMeta.json deleted file mode 100644 index 4ef8933f..00000000 --- a/xdr-json/next/LedgerCloseMeta.json +++ /dev/null @@ -1,7664 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerCloseMeta", - "description": "LedgerCloseMeta is an XDR Union defined as:\n\n```text union LedgerCloseMeta switch (int v) { case 0: LedgerCloseMetaV0 v0; case 1: LedgerCloseMetaV1 v1; case 2: LedgerCloseMetaV2 v2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/LedgerCloseMetaV0" - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerCloseMetaV1" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/LedgerCloseMetaV2" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigUpgradeSetKey": { - "description": "ConfigUpgradeSetKey is an XDR Struct defined as:\n\n```text struct ConfigUpgradeSetKey { ContractID contractID; Hash contentHash; }; ```", - "type": "object", - "required": [ - "content_hash", - "contract_id" - ], - "properties": { - "content_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "contract_id": { - "$ref": "#/definitions/ContractId" - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "DiagnosticEvent": { - "description": "DiagnosticEvent is an XDR Struct defined as:\n\n```text struct DiagnosticEvent { bool inSuccessfulContractCall; ContractEvent event; }; ```", - "type": "object", - "required": [ - "event", - "in_successful_contract_call" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "in_successful_contract_call": { - "type": "boolean" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "GeneralizedTransactionSet": { - "description": "GeneralizedTransactionSet is an XDR Union defined as:\n\n```text union GeneralizedTransactionSet switch (int v) { // We consider the legacy TransactionSet to be v0. case 1: TransactionSetV1 v1TxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionSetV1" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InnerTransactionResult": { - "description": "InnerTransactionResult is an XDR Struct defined as:\n\n```text struct InnerTransactionResult { // Always 0. Here for binary compatibility. int64 feeCharged;\n\nunion switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/InnerTransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResultResult" - } - } - }, - "InnerTransactionResultExt": { - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "InnerTransactionResultPair": { - "description": "InnerTransactionResultPair is an XDR Struct defined as:\n\n```text struct InnerTransactionResultPair { Hash transactionHash; // hash of the inner transaction InnerTransactionResult result; // result for the inner transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/InnerTransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "InnerTransactionResultResult": { - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerCloseMetaExt": { - "description": "LedgerCloseMetaExt is an XDR Union defined as:\n\n```text union LedgerCloseMetaExt switch (int v) { case 0: void; case 1: LedgerCloseMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerCloseMetaExtV1" - } - } - } - ] - }, - "LedgerCloseMetaExtV1": { - "description": "LedgerCloseMetaExtV1 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaExtV1 { ExtensionPoint ext; int64 sorobanFeeWrite1KB; }; ```", - "type": "object", - "required": [ - "ext", - "soroban_fee_write1_kb" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "soroban_fee_write1_kb": { - "type": "string" - } - } - }, - "LedgerCloseMetaV0": { - "description": "LedgerCloseMetaV0 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaV0 { LedgerHeaderHistoryEntry ledgerHeader; // NB: txSet is sorted in \"Hash order\" TransactionSet txSet;\n\n// NB: transactions are sorted in apply order here // fees for all transactions are processed first // followed by applying transactions TransactionResultMeta txProcessing<>;\n\n// upgrades are applied last UpgradeEntryMeta upgradesProcessing<>;\n\n// other misc information attached to the ledger close SCPHistoryEntry scpInfo<>; }; ```", - "type": "object", - "required": [ - "ledger_header", - "scp_info", - "tx_processing", - "tx_set", - "upgrades_processing" - ], - "properties": { - "ledger_header": { - "$ref": "#/definitions/LedgerHeaderHistoryEntry" - }, - "scp_info": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpHistoryEntry" - }, - "maxItems": 4294967295 - }, - "tx_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionResultMeta" - }, - "maxItems": 4294967295 - }, - "tx_set": { - "$ref": "#/definitions/TransactionSet" - }, - "upgrades_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeEntryMeta" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerCloseMetaV1": { - "description": "LedgerCloseMetaV1 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaV1 { LedgerCloseMetaExt ext;\n\nLedgerHeaderHistoryEntry ledgerHeader;\n\nGeneralizedTransactionSet txSet;\n\n// NB: transactions are sorted in apply order here // fees for all transactions are processed first // followed by applying transactions TransactionResultMeta txProcessing<>;\n\n// upgrades are applied last UpgradeEntryMeta upgradesProcessing<>;\n\n// other misc information attached to the ledger close SCPHistoryEntry scpInfo<>;\n\n// Size in bytes of live Soroban state, to support downstream // systems calculating storage fees correctly. uint64 totalByteSizeOfLiveSorobanState;\n\n// TTL and data/code keys that have been evicted at this ledger. LedgerKey evictedKeys<>;\n\n// Maintained for backwards compatibility, should never be populated. LedgerEntry unused<>; }; ```", - "type": "object", - "required": [ - "evicted_keys", - "ext", - "ledger_header", - "scp_info", - "total_byte_size_of_live_soroban_state", - "tx_processing", - "tx_set", - "unused", - "upgrades_processing" - ], - "properties": { - "evicted_keys": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/LedgerCloseMetaExt" - }, - "ledger_header": { - "$ref": "#/definitions/LedgerHeaderHistoryEntry" - }, - "scp_info": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpHistoryEntry" - }, - "maxItems": 4294967295 - }, - "total_byte_size_of_live_soroban_state": { - "type": "string" - }, - "tx_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionResultMeta" - }, - "maxItems": 4294967295 - }, - "tx_set": { - "$ref": "#/definitions/GeneralizedTransactionSet" - }, - "unused": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntry" - }, - "maxItems": 4294967295 - }, - "upgrades_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeEntryMeta" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerCloseMetaV2": { - "description": "LedgerCloseMetaV2 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaV2 { LedgerCloseMetaExt ext;\n\nLedgerHeaderHistoryEntry ledgerHeader;\n\nGeneralizedTransactionSet txSet;\n\n// NB: transactions are sorted in apply order here // fees for all transactions are processed first // followed by applying transactions TransactionResultMetaV1 txProcessing<>;\n\n// upgrades are applied last UpgradeEntryMeta upgradesProcessing<>;\n\n// other misc information attached to the ledger close SCPHistoryEntry scpInfo<>;\n\n// Size in bytes of live Soroban state, to support downstream // systems calculating storage fees correctly. uint64 totalByteSizeOfLiveSorobanState;\n\n// TTL and data/code keys that have been evicted at this ledger. LedgerKey evictedKeys<>; }; ```", - "type": "object", - "required": [ - "evicted_keys", - "ext", - "ledger_header", - "scp_info", - "total_byte_size_of_live_soroban_state", - "tx_processing", - "tx_set", - "upgrades_processing" - ], - "properties": { - "evicted_keys": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/LedgerCloseMetaExt" - }, - "ledger_header": { - "$ref": "#/definitions/LedgerHeaderHistoryEntry" - }, - "scp_info": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpHistoryEntry" - }, - "maxItems": 4294967295 - }, - "total_byte_size_of_live_soroban_state": { - "type": "string" - }, - "tx_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionResultMetaV1" - }, - "maxItems": 4294967295 - }, - "tx_set": { - "$ref": "#/definitions/GeneralizedTransactionSet" - }, - "upgrades_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeEntryMeta" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerCloseValueSignature": { - "description": "LedgerCloseValueSignature is an XDR Struct defined as:\n\n```text struct LedgerCloseValueSignature { NodeID nodeID; // which node introduced the value Signature signature; // nodeID's signature }; ```", - "type": "object", - "required": [ - "node_id", - "signature" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerHeader": { - "description": "LedgerHeader is an XDR Struct defined as:\n\n```text struct LedgerHeader { uint32 ledgerVersion; // the protocol version of the ledger Hash previousLedgerHash; // hash of the previous ledger header StellarValue scpValue; // what consensus agreed to Hash txSetResultHash; // the TransactionResultSet that led to this ledger Hash bucketListHash; // hash of the ledger state\n\nuint32 ledgerSeq; // sequence number of this ledger\n\nint64 totalCoins; // total number of stroops in existence. // 10,000,000 stroops in 1 XLM\n\nint64 feePool; // fees burned since last inflation run uint32 inflationSeq; // inflation sequence number\n\nuint64 idPool; // last used global ID, used for generating objects\n\nuint32 baseFee; // base fee per operation in stroops uint32 baseReserve; // account base reserve in stroops\n\nuint32 maxTxSetSize; // maximum size a transaction set can be\n\nHash skipList[4]; // hashes of ledgers in the past. allows you to jump back // in time without walking the chain back ledger by ledger // each slot contains the oldest ledger that is mod of // either 50 5000 50000 or 500000 depending on index // skipList[0] mod(50), skipList[1] mod(5000), etc\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "base_fee", - "base_reserve", - "bucket_list_hash", - "ext", - "fee_pool", - "id_pool", - "inflation_seq", - "ledger_seq", - "ledger_version", - "max_tx_set_size", - "previous_ledger_hash", - "scp_value", - "skip_list", - "total_coins", - "tx_set_result_hash" - ], - "properties": { - "base_fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "base_reserve": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "bucket_list_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/LedgerHeaderExt" - }, - "fee_pool": { - "type": "string" - }, - "id_pool": { - "type": "string" - }, - "inflation_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "scp_value": { - "$ref": "#/definitions/StellarValue" - }, - "skip_list": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4, - "minItems": 4 - }, - "total_coins": { - "type": "string" - }, - "tx_set_result_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerHeaderExt": { - "description": "LedgerHeaderExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerHeaderExtensionV1" - } - } - } - ] - }, - "LedgerHeaderExtensionV1": { - "description": "LedgerHeaderExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerHeaderExtensionV1 { uint32 flags; // LedgerHeaderFlags\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerHeaderExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerHeaderExtensionV1Ext": { - "description": "LedgerHeaderExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerHeaderHistoryEntry": { - "description": "LedgerHeaderHistoryEntry is an XDR Struct defined as:\n\n```text struct LedgerHeaderHistoryEntry { Hash hash; LedgerHeader header;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "hash", - "header" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerHeaderHistoryEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "header": { - "$ref": "#/definitions/LedgerHeader" - } - } - }, - "LedgerHeaderHistoryEntryExt": { - "description": "LedgerHeaderHistoryEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerScpMessages": { - "description": "LedgerScpMessages is an XDR Struct defined as:\n\n```text struct LedgerSCPMessages { uint32 ledgerSeq; SCPEnvelope messages<>; }; ```", - "type": "object", - "required": [ - "ledger_seq", - "messages" - ], - "properties": { - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerUpgrade": { - "description": "LedgerUpgrade is an XDR Union defined as:\n\n```text union LedgerUpgrade switch (LedgerUpgradeType type) { case LEDGER_UPGRADE_VERSION: uint32 newLedgerVersion; // update ledgerVersion case LEDGER_UPGRADE_BASE_FEE: uint32 newBaseFee; // update baseFee case LEDGER_UPGRADE_MAX_TX_SET_SIZE: uint32 newMaxTxSetSize; // update maxTxSetSize case LEDGER_UPGRADE_BASE_RESERVE: uint32 newBaseReserve; // update baseReserve case LEDGER_UPGRADE_FLAGS: uint32 newFlags; // update flags case LEDGER_UPGRADE_CONFIG: // Update arbitrary `ConfigSetting` entries identified by the key. ConfigUpgradeSetKey newConfig; case LEDGER_UPGRADE_MAX_SOROBAN_TX_SET_SIZE: // Update ConfigSettingContractExecutionLanesV0.ledgerMaxTxCount without // using `LEDGER_UPGRADE_CONFIG`. uint32 newMaxSorobanTxSetSize; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "base_fee" - ], - "properties": { - "base_fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "max_tx_set_size" - ], - "properties": { - "max_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "base_reserve" - ], - "properties": { - "base_reserve": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "flags" - ], - "properties": { - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "config" - ], - "properties": { - "config": { - "$ref": "#/definitions/ConfigUpgradeSetKey" - } - } - }, - { - "type": "object", - "required": [ - "max_soroban_tx_set_size" - ], - "properties": { - "max_soroban_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - } - ] - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "NodeId": { - "type": "string" - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "OperationMeta": { - "description": "OperationMeta is an XDR Struct defined as:\n\n```text struct OperationMeta { LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "OperationMetaV2": { - "description": "OperationMetaV2 is an XDR Struct defined as:\n\n```text struct OperationMetaV2 { ExtensionPoint ext;\n\nLedgerEntryChanges changes;\n\nContractEvent events<>; }; ```", - "type": "object", - "required": [ - "changes", - "events", - "ext" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpEnvelope": { - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - } - }, - "ScpHistoryEntry": { - "description": "ScpHistoryEntry is an XDR Union defined as:\n\n```text union SCPHistoryEntry switch (int v) { case 0: SCPHistoryEntryV0 v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ScpHistoryEntryV0" - } - } - } - ] - }, - "ScpHistoryEntryV0": { - "description": "ScpHistoryEntryV0 is an XDR Struct defined as:\n\n```text struct SCPHistoryEntryV0 { SCPQuorumSet quorumSets<>; // additional quorum sets used by ledgerMessages LedgerSCPMessages ledgerMessages; }; ```", - "type": "object", - "required": [ - "ledger_messages", - "quorum_sets" - ], - "properties": { - "ledger_messages": { - "$ref": "#/definitions/LedgerScpMessages" - }, - "quorum_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpQuorumSet": { - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "SorobanTransactionMeta": { - "description": "SorobanTransactionMeta is an XDR Struct defined as:\n\n```text struct SorobanTransactionMeta { SorobanTransactionMetaExt ext;\n\nContractEvent events<>; // custom events populated by the // contracts themselves. SCVal returnValue; // return value of the host fn invocation\n\n// Diagnostics events that are not hashed. // This will contain all contract and diagnostic events. Even ones // that were emitted in a failed contract call. DiagnosticEvent diagnosticEvents<>; }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "return_value" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "$ref": "#/definitions/ScVal" - } - } - }, - "SorobanTransactionMetaExt": { - "description": "SorobanTransactionMetaExt is an XDR Union defined as:\n\n```text union SorobanTransactionMetaExt switch (int v) { case 0: void; case 1: SorobanTransactionMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionMetaExtV1" - } - } - } - ] - }, - "SorobanTransactionMetaExtV1": { - "description": "SorobanTransactionMetaExtV1 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaExtV1 { ExtensionPoint ext;\n\n// The following are the components of the overall Soroban resource fee // charged for the transaction. // The following relation holds: // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` // where `resourceFeeCharged` is the overall fee charged for the // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` // i.e.we never charge more than the declared resource fee. // The inclusion fee for charged the Soroban transaction can be found using // the following equation: // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.\n\n// Total amount (in stroops) that has been charged for non-refundable // Soroban resources. // Non-refundable resources are charged based on the usage declared in // the transaction envelope (such as `instructions`, `readBytes` etc.) and // is charged regardless of the success of the transaction. int64 totalNonRefundableResourceFeeCharged; // Total amount (in stroops) that has been charged for refundable // Soroban resource fees. // Currently this comprises the rent fee (`rentFeeCharged`) and the // fee for the events and return value. // Refundable resources are charged based on the actual resources usage. // Since currently refundable resources are only used for the successful // transactions, this will be `0` for failed transactions. int64 totalRefundableResourceFeeCharged; // Amount (in stroops) that has been charged for rent. // This is a part of `totalNonRefundableResourceFeeCharged`. int64 rentFeeCharged; }; ```", - "type": "object", - "required": [ - "ext", - "rent_fee_charged", - "total_non_refundable_resource_fee_charged", - "total_refundable_resource_fee_charged" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "rent_fee_charged": { - "type": "string" - }, - "total_non_refundable_resource_fee_charged": { - "type": "string" - }, - "total_refundable_resource_fee_charged": { - "type": "string" - } - } - }, - "SorobanTransactionMetaV2": { - "description": "SorobanTransactionMetaV2 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaV2 { SorobanTransactionMetaExt ext;\n\nSCVal* returnValue; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "anyOf": [ - { - "$ref": "#/definitions/ScVal" - }, - { - "type": "null" - } - ] - } - } - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "StellarValue": { - "description": "StellarValue is an XDR Struct defined as:\n\n```text struct StellarValue { Hash txSetHash; // transaction set to apply to previous ledger TimePoint closeTime; // network close time\n\n// upgrades to apply to the previous ledger (usually empty) // this is a vector of encoded 'LedgerUpgrade' so that nodes can drop // unknown steps during consensus if needed. // see notes below on 'LedgerUpgrade' for more detail // max size is dictated by number of upgrade types (+ room for future) UpgradeType upgrades<6>;\n\n// reserved for future use union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ext; }; ```", - "type": "object", - "required": [ - "close_time", - "ext", - "tx_set_hash", - "upgrades" - ], - "properties": { - "close_time": { - "$ref": "#/definitions/TimePoint" - }, - "ext": { - "$ref": "#/definitions/StellarValueExt" - }, - "tx_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "upgrades": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeType" - }, - "maxItems": 6 - } - } - }, - "StellarValueExt": { - "description": "StellarValueExt is an XDR NestedUnion defined as:\n\n```text union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "basic" - ] - }, - { - "type": "object", - "required": [ - "signed" - ], - "properties": { - "signed": { - "$ref": "#/definitions/LedgerCloseValueSignature" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionEvent": { - "description": "TransactionEvent is an XDR Struct defined as:\n\n```text struct TransactionEvent { TransactionEventStage stage; // Stage at which an event has occurred. ContractEvent event; // The contract event that has occurred. }; ```", - "type": "object", - "required": [ - "event", - "stage" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "stage": { - "$ref": "#/definitions/TransactionEventStage" - } - } - }, - "TransactionEventStage": { - "description": "TransactionEventStage is an XDR Enum defined as:\n\n```text enum TransactionEventStage { // The event has happened before any one of the transactions has its // operations applied. TRANSACTION_EVENT_STAGE_BEFORE_ALL_TXS = 0, // The event has happened immediately after operations of the transaction // have been applied. TRANSACTION_EVENT_STAGE_AFTER_TX = 1, // The event has happened after every transaction had its operations // applied. TRANSACTION_EVENT_STAGE_AFTER_ALL_TXS = 2 }; ```", - "type": "string", - "enum": [ - "before_all_txs", - "after_tx", - "after_all_txs" - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionMeta": { - "description": "TransactionMeta is an XDR Union defined as:\n\n```text union TransactionMeta switch (int v) { case 0: OperationMeta operations<>; case 1: TransactionMetaV1 v1; case 2: TransactionMetaV2 v2; case 3: TransactionMetaV3 v3; case 4: TransactionMetaV4 v4; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionMetaV1" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TransactionMetaV2" - } - } - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/TransactionMetaV3" - } - } - }, - { - "type": "object", - "required": [ - "v4" - ], - "properties": { - "v4": { - "$ref": "#/definitions/TransactionMetaV4" - } - } - } - ] - }, - "TransactionMetaV1": { - "description": "TransactionMetaV1 is an XDR Struct defined as:\n\n```text struct TransactionMetaV1 { LedgerEntryChanges txChanges; // tx level changes if any OperationMeta operations<>; // meta for each operation }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV2": { - "description": "TransactionMetaV2 is an XDR Struct defined as:\n\n```text struct TransactionMetaV2 { LedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV3": { - "description": "TransactionMetaV3 is an XDR Struct defined as:\n\n```text struct TransactionMetaV3 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMeta* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions). }; ```", - "type": "object", - "required": [ - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMeta" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV4": { - "description": "TransactionMetaV4 is an XDR Struct defined as:\n\n```text struct TransactionMetaV4 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMetaV2 operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMetaV2* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions).\n\nTransactionEvent events<>; // Used for transaction-level events (like fee payment) DiagnosticEvent diagnosticEvents<>; // Used for all diagnostic information }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMetaV2" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMetaV2" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionResult": { - "description": "TransactionResult is an XDR Struct defined as:\n\n```text struct TransactionResult { int64 feeCharged; // actual fee charged for the transaction\n\nunion switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/TransactionResultResult" - } - } - }, - "TransactionResultExt": { - "description": "TransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionResultMeta": { - "description": "TransactionResultMeta is an XDR Struct defined as:\n\n```text struct TransactionResultMeta { TransactionResultPair result; LedgerEntryChanges feeProcessing; TransactionMeta txApplyProcessing; }; ```", - "type": "object", - "required": [ - "fee_processing", - "result", - "tx_apply_processing" - ], - "properties": { - "fee_processing": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "result": { - "$ref": "#/definitions/TransactionResultPair" - }, - "tx_apply_processing": { - "$ref": "#/definitions/TransactionMeta" - } - } - }, - "TransactionResultMetaV1": { - "description": "TransactionResultMetaV1 is an XDR Struct defined as:\n\n```text struct TransactionResultMetaV1 { ExtensionPoint ext;\n\nTransactionResultPair result; LedgerEntryChanges feeProcessing; TransactionMeta txApplyProcessing;\n\nLedgerEntryChanges postTxApplyFeeProcessing; }; ```", - "type": "object", - "required": [ - "ext", - "fee_processing", - "post_tx_apply_fee_processing", - "result", - "tx_apply_processing" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "fee_processing": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "post_tx_apply_fee_processing": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "result": { - "$ref": "#/definitions/TransactionResultPair" - }, - "tx_apply_processing": { - "$ref": "#/definitions/TransactionMeta" - } - } - }, - "TransactionResultPair": { - "description": "TransactionResultPair is an XDR Struct defined as:\n\n```text struct TransactionResultPair { Hash transactionHash; TransactionResult result; // result for the transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/TransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionResultResult": { - "description": "TransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_success" - ], - "properties": { - "tx_fee_bump_inner_success": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_failed" - ], - "properties": { - "tx_fee_bump_inner_failed": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "TransactionSet": { - "description": "TransactionSet is an XDR Struct defined as:\n\n```text struct TransactionSet { Hash previousLedgerHash; TransactionEnvelope txs<>; }; ```", - "type": "object", - "required": [ - "previous_ledger_hash", - "txs" - ], - "properties": { - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "TransactionSetV1": { - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - }, - "UpgradeEntryMeta": { - "description": "UpgradeEntryMeta is an XDR Struct defined as:\n\n```text struct UpgradeEntryMeta { LedgerUpgrade upgrade; LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes", - "upgrade" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "upgrade": { - "$ref": "#/definitions/LedgerUpgrade" - } - } - }, - "UpgradeType": { - "description": "UpgradeType is an XDR Typedef defined as:\n\n```text typedef opaque UpgradeType<128>; ```", - "type": "string", - "maxLength": 256, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerCloseMetaBatch.json b/xdr-json/next/LedgerCloseMetaBatch.json deleted file mode 100644 index d030dffd..00000000 --- a/xdr-json/next/LedgerCloseMetaBatch.json +++ /dev/null @@ -1,7690 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerCloseMetaBatch", - "description": "LedgerCloseMetaBatch is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaBatch { // starting ledger sequence number in the batch uint32 startSequence;\n\n// ending ledger sequence number in the batch uint32 endSequence;\n\n// Ledger close meta for each ledger within the batch LedgerCloseMeta ledgerCloseMetas<>; }; ```", - "type": "object", - "required": [ - "end_sequence", - "ledger_close_metas", - "start_sequence" - ], - "properties": { - "$schema": { - "type": "string" - }, - "end_sequence": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_close_metas": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerCloseMeta" - }, - "maxItems": 4294967295 - }, - "start_sequence": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigUpgradeSetKey": { - "description": "ConfigUpgradeSetKey is an XDR Struct defined as:\n\n```text struct ConfigUpgradeSetKey { ContractID contractID; Hash contentHash; }; ```", - "type": "object", - "required": [ - "content_hash", - "contract_id" - ], - "properties": { - "content_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "contract_id": { - "$ref": "#/definitions/ContractId" - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "DiagnosticEvent": { - "description": "DiagnosticEvent is an XDR Struct defined as:\n\n```text struct DiagnosticEvent { bool inSuccessfulContractCall; ContractEvent event; }; ```", - "type": "object", - "required": [ - "event", - "in_successful_contract_call" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "in_successful_contract_call": { - "type": "boolean" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "GeneralizedTransactionSet": { - "description": "GeneralizedTransactionSet is an XDR Union defined as:\n\n```text union GeneralizedTransactionSet switch (int v) { // We consider the legacy TransactionSet to be v0. case 1: TransactionSetV1 v1TxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionSetV1" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InnerTransactionResult": { - "description": "InnerTransactionResult is an XDR Struct defined as:\n\n```text struct InnerTransactionResult { // Always 0. Here for binary compatibility. int64 feeCharged;\n\nunion switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/InnerTransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResultResult" - } - } - }, - "InnerTransactionResultExt": { - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "InnerTransactionResultPair": { - "description": "InnerTransactionResultPair is an XDR Struct defined as:\n\n```text struct InnerTransactionResultPair { Hash transactionHash; // hash of the inner transaction InnerTransactionResult result; // result for the inner transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/InnerTransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "InnerTransactionResultResult": { - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerCloseMeta": { - "description": "LedgerCloseMeta is an XDR Union defined as:\n\n```text union LedgerCloseMeta switch (int v) { case 0: LedgerCloseMetaV0 v0; case 1: LedgerCloseMetaV1 v1; case 2: LedgerCloseMetaV2 v2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/LedgerCloseMetaV0" - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerCloseMetaV1" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/LedgerCloseMetaV2" - } - } - } - ] - }, - "LedgerCloseMetaExt": { - "description": "LedgerCloseMetaExt is an XDR Union defined as:\n\n```text union LedgerCloseMetaExt switch (int v) { case 0: void; case 1: LedgerCloseMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerCloseMetaExtV1" - } - } - } - ] - }, - "LedgerCloseMetaExtV1": { - "description": "LedgerCloseMetaExtV1 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaExtV1 { ExtensionPoint ext; int64 sorobanFeeWrite1KB; }; ```", - "type": "object", - "required": [ - "ext", - "soroban_fee_write1_kb" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "soroban_fee_write1_kb": { - "type": "string" - } - } - }, - "LedgerCloseMetaV0": { - "description": "LedgerCloseMetaV0 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaV0 { LedgerHeaderHistoryEntry ledgerHeader; // NB: txSet is sorted in \"Hash order\" TransactionSet txSet;\n\n// NB: transactions are sorted in apply order here // fees for all transactions are processed first // followed by applying transactions TransactionResultMeta txProcessing<>;\n\n// upgrades are applied last UpgradeEntryMeta upgradesProcessing<>;\n\n// other misc information attached to the ledger close SCPHistoryEntry scpInfo<>; }; ```", - "type": "object", - "required": [ - "ledger_header", - "scp_info", - "tx_processing", - "tx_set", - "upgrades_processing" - ], - "properties": { - "ledger_header": { - "$ref": "#/definitions/LedgerHeaderHistoryEntry" - }, - "scp_info": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpHistoryEntry" - }, - "maxItems": 4294967295 - }, - "tx_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionResultMeta" - }, - "maxItems": 4294967295 - }, - "tx_set": { - "$ref": "#/definitions/TransactionSet" - }, - "upgrades_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeEntryMeta" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerCloseMetaV1": { - "description": "LedgerCloseMetaV1 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaV1 { LedgerCloseMetaExt ext;\n\nLedgerHeaderHistoryEntry ledgerHeader;\n\nGeneralizedTransactionSet txSet;\n\n// NB: transactions are sorted in apply order here // fees for all transactions are processed first // followed by applying transactions TransactionResultMeta txProcessing<>;\n\n// upgrades are applied last UpgradeEntryMeta upgradesProcessing<>;\n\n// other misc information attached to the ledger close SCPHistoryEntry scpInfo<>;\n\n// Size in bytes of live Soroban state, to support downstream // systems calculating storage fees correctly. uint64 totalByteSizeOfLiveSorobanState;\n\n// TTL and data/code keys that have been evicted at this ledger. LedgerKey evictedKeys<>;\n\n// Maintained for backwards compatibility, should never be populated. LedgerEntry unused<>; }; ```", - "type": "object", - "required": [ - "evicted_keys", - "ext", - "ledger_header", - "scp_info", - "total_byte_size_of_live_soroban_state", - "tx_processing", - "tx_set", - "unused", - "upgrades_processing" - ], - "properties": { - "evicted_keys": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/LedgerCloseMetaExt" - }, - "ledger_header": { - "$ref": "#/definitions/LedgerHeaderHistoryEntry" - }, - "scp_info": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpHistoryEntry" - }, - "maxItems": 4294967295 - }, - "total_byte_size_of_live_soroban_state": { - "type": "string" - }, - "tx_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionResultMeta" - }, - "maxItems": 4294967295 - }, - "tx_set": { - "$ref": "#/definitions/GeneralizedTransactionSet" - }, - "unused": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntry" - }, - "maxItems": 4294967295 - }, - "upgrades_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeEntryMeta" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerCloseMetaV2": { - "description": "LedgerCloseMetaV2 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaV2 { LedgerCloseMetaExt ext;\n\nLedgerHeaderHistoryEntry ledgerHeader;\n\nGeneralizedTransactionSet txSet;\n\n// NB: transactions are sorted in apply order here // fees for all transactions are processed first // followed by applying transactions TransactionResultMetaV1 txProcessing<>;\n\n// upgrades are applied last UpgradeEntryMeta upgradesProcessing<>;\n\n// other misc information attached to the ledger close SCPHistoryEntry scpInfo<>;\n\n// Size in bytes of live Soroban state, to support downstream // systems calculating storage fees correctly. uint64 totalByteSizeOfLiveSorobanState;\n\n// TTL and data/code keys that have been evicted at this ledger. LedgerKey evictedKeys<>; }; ```", - "type": "object", - "required": [ - "evicted_keys", - "ext", - "ledger_header", - "scp_info", - "total_byte_size_of_live_soroban_state", - "tx_processing", - "tx_set", - "upgrades_processing" - ], - "properties": { - "evicted_keys": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/LedgerCloseMetaExt" - }, - "ledger_header": { - "$ref": "#/definitions/LedgerHeaderHistoryEntry" - }, - "scp_info": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpHistoryEntry" - }, - "maxItems": 4294967295 - }, - "total_byte_size_of_live_soroban_state": { - "type": "string" - }, - "tx_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionResultMetaV1" - }, - "maxItems": 4294967295 - }, - "tx_set": { - "$ref": "#/definitions/GeneralizedTransactionSet" - }, - "upgrades_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeEntryMeta" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerCloseValueSignature": { - "description": "LedgerCloseValueSignature is an XDR Struct defined as:\n\n```text struct LedgerCloseValueSignature { NodeID nodeID; // which node introduced the value Signature signature; // nodeID's signature }; ```", - "type": "object", - "required": [ - "node_id", - "signature" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerHeader": { - "description": "LedgerHeader is an XDR Struct defined as:\n\n```text struct LedgerHeader { uint32 ledgerVersion; // the protocol version of the ledger Hash previousLedgerHash; // hash of the previous ledger header StellarValue scpValue; // what consensus agreed to Hash txSetResultHash; // the TransactionResultSet that led to this ledger Hash bucketListHash; // hash of the ledger state\n\nuint32 ledgerSeq; // sequence number of this ledger\n\nint64 totalCoins; // total number of stroops in existence. // 10,000,000 stroops in 1 XLM\n\nint64 feePool; // fees burned since last inflation run uint32 inflationSeq; // inflation sequence number\n\nuint64 idPool; // last used global ID, used for generating objects\n\nuint32 baseFee; // base fee per operation in stroops uint32 baseReserve; // account base reserve in stroops\n\nuint32 maxTxSetSize; // maximum size a transaction set can be\n\nHash skipList[4]; // hashes of ledgers in the past. allows you to jump back // in time without walking the chain back ledger by ledger // each slot contains the oldest ledger that is mod of // either 50 5000 50000 or 500000 depending on index // skipList[0] mod(50), skipList[1] mod(5000), etc\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "base_fee", - "base_reserve", - "bucket_list_hash", - "ext", - "fee_pool", - "id_pool", - "inflation_seq", - "ledger_seq", - "ledger_version", - "max_tx_set_size", - "previous_ledger_hash", - "scp_value", - "skip_list", - "total_coins", - "tx_set_result_hash" - ], - "properties": { - "base_fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "base_reserve": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "bucket_list_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/LedgerHeaderExt" - }, - "fee_pool": { - "type": "string" - }, - "id_pool": { - "type": "string" - }, - "inflation_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "scp_value": { - "$ref": "#/definitions/StellarValue" - }, - "skip_list": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4, - "minItems": 4 - }, - "total_coins": { - "type": "string" - }, - "tx_set_result_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerHeaderExt": { - "description": "LedgerHeaderExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerHeaderExtensionV1" - } - } - } - ] - }, - "LedgerHeaderExtensionV1": { - "description": "LedgerHeaderExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerHeaderExtensionV1 { uint32 flags; // LedgerHeaderFlags\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerHeaderExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerHeaderExtensionV1Ext": { - "description": "LedgerHeaderExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerHeaderHistoryEntry": { - "description": "LedgerHeaderHistoryEntry is an XDR Struct defined as:\n\n```text struct LedgerHeaderHistoryEntry { Hash hash; LedgerHeader header;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "hash", - "header" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerHeaderHistoryEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "header": { - "$ref": "#/definitions/LedgerHeader" - } - } - }, - "LedgerHeaderHistoryEntryExt": { - "description": "LedgerHeaderHistoryEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerScpMessages": { - "description": "LedgerScpMessages is an XDR Struct defined as:\n\n```text struct LedgerSCPMessages { uint32 ledgerSeq; SCPEnvelope messages<>; }; ```", - "type": "object", - "required": [ - "ledger_seq", - "messages" - ], - "properties": { - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerUpgrade": { - "description": "LedgerUpgrade is an XDR Union defined as:\n\n```text union LedgerUpgrade switch (LedgerUpgradeType type) { case LEDGER_UPGRADE_VERSION: uint32 newLedgerVersion; // update ledgerVersion case LEDGER_UPGRADE_BASE_FEE: uint32 newBaseFee; // update baseFee case LEDGER_UPGRADE_MAX_TX_SET_SIZE: uint32 newMaxTxSetSize; // update maxTxSetSize case LEDGER_UPGRADE_BASE_RESERVE: uint32 newBaseReserve; // update baseReserve case LEDGER_UPGRADE_FLAGS: uint32 newFlags; // update flags case LEDGER_UPGRADE_CONFIG: // Update arbitrary `ConfigSetting` entries identified by the key. ConfigUpgradeSetKey newConfig; case LEDGER_UPGRADE_MAX_SOROBAN_TX_SET_SIZE: // Update ConfigSettingContractExecutionLanesV0.ledgerMaxTxCount without // using `LEDGER_UPGRADE_CONFIG`. uint32 newMaxSorobanTxSetSize; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "base_fee" - ], - "properties": { - "base_fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "max_tx_set_size" - ], - "properties": { - "max_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "base_reserve" - ], - "properties": { - "base_reserve": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "flags" - ], - "properties": { - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "config" - ], - "properties": { - "config": { - "$ref": "#/definitions/ConfigUpgradeSetKey" - } - } - }, - { - "type": "object", - "required": [ - "max_soroban_tx_set_size" - ], - "properties": { - "max_soroban_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - } - ] - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "NodeId": { - "type": "string" - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "OperationMeta": { - "description": "OperationMeta is an XDR Struct defined as:\n\n```text struct OperationMeta { LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "OperationMetaV2": { - "description": "OperationMetaV2 is an XDR Struct defined as:\n\n```text struct OperationMetaV2 { ExtensionPoint ext;\n\nLedgerEntryChanges changes;\n\nContractEvent events<>; }; ```", - "type": "object", - "required": [ - "changes", - "events", - "ext" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpEnvelope": { - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - } - }, - "ScpHistoryEntry": { - "description": "ScpHistoryEntry is an XDR Union defined as:\n\n```text union SCPHistoryEntry switch (int v) { case 0: SCPHistoryEntryV0 v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ScpHistoryEntryV0" - } - } - } - ] - }, - "ScpHistoryEntryV0": { - "description": "ScpHistoryEntryV0 is an XDR Struct defined as:\n\n```text struct SCPHistoryEntryV0 { SCPQuorumSet quorumSets<>; // additional quorum sets used by ledgerMessages LedgerSCPMessages ledgerMessages; }; ```", - "type": "object", - "required": [ - "ledger_messages", - "quorum_sets" - ], - "properties": { - "ledger_messages": { - "$ref": "#/definitions/LedgerScpMessages" - }, - "quorum_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpQuorumSet": { - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "SorobanTransactionMeta": { - "description": "SorobanTransactionMeta is an XDR Struct defined as:\n\n```text struct SorobanTransactionMeta { SorobanTransactionMetaExt ext;\n\nContractEvent events<>; // custom events populated by the // contracts themselves. SCVal returnValue; // return value of the host fn invocation\n\n// Diagnostics events that are not hashed. // This will contain all contract and diagnostic events. Even ones // that were emitted in a failed contract call. DiagnosticEvent diagnosticEvents<>; }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "return_value" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "$ref": "#/definitions/ScVal" - } - } - }, - "SorobanTransactionMetaExt": { - "description": "SorobanTransactionMetaExt is an XDR Union defined as:\n\n```text union SorobanTransactionMetaExt switch (int v) { case 0: void; case 1: SorobanTransactionMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionMetaExtV1" - } - } - } - ] - }, - "SorobanTransactionMetaExtV1": { - "description": "SorobanTransactionMetaExtV1 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaExtV1 { ExtensionPoint ext;\n\n// The following are the components of the overall Soroban resource fee // charged for the transaction. // The following relation holds: // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` // where `resourceFeeCharged` is the overall fee charged for the // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` // i.e.we never charge more than the declared resource fee. // The inclusion fee for charged the Soroban transaction can be found using // the following equation: // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.\n\n// Total amount (in stroops) that has been charged for non-refundable // Soroban resources. // Non-refundable resources are charged based on the usage declared in // the transaction envelope (such as `instructions`, `readBytes` etc.) and // is charged regardless of the success of the transaction. int64 totalNonRefundableResourceFeeCharged; // Total amount (in stroops) that has been charged for refundable // Soroban resource fees. // Currently this comprises the rent fee (`rentFeeCharged`) and the // fee for the events and return value. // Refundable resources are charged based on the actual resources usage. // Since currently refundable resources are only used for the successful // transactions, this will be `0` for failed transactions. int64 totalRefundableResourceFeeCharged; // Amount (in stroops) that has been charged for rent. // This is a part of `totalNonRefundableResourceFeeCharged`. int64 rentFeeCharged; }; ```", - "type": "object", - "required": [ - "ext", - "rent_fee_charged", - "total_non_refundable_resource_fee_charged", - "total_refundable_resource_fee_charged" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "rent_fee_charged": { - "type": "string" - }, - "total_non_refundable_resource_fee_charged": { - "type": "string" - }, - "total_refundable_resource_fee_charged": { - "type": "string" - } - } - }, - "SorobanTransactionMetaV2": { - "description": "SorobanTransactionMetaV2 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaV2 { SorobanTransactionMetaExt ext;\n\nSCVal* returnValue; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "anyOf": [ - { - "$ref": "#/definitions/ScVal" - }, - { - "type": "null" - } - ] - } - } - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "StellarValue": { - "description": "StellarValue is an XDR Struct defined as:\n\n```text struct StellarValue { Hash txSetHash; // transaction set to apply to previous ledger TimePoint closeTime; // network close time\n\n// upgrades to apply to the previous ledger (usually empty) // this is a vector of encoded 'LedgerUpgrade' so that nodes can drop // unknown steps during consensus if needed. // see notes below on 'LedgerUpgrade' for more detail // max size is dictated by number of upgrade types (+ room for future) UpgradeType upgrades<6>;\n\n// reserved for future use union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ext; }; ```", - "type": "object", - "required": [ - "close_time", - "ext", - "tx_set_hash", - "upgrades" - ], - "properties": { - "close_time": { - "$ref": "#/definitions/TimePoint" - }, - "ext": { - "$ref": "#/definitions/StellarValueExt" - }, - "tx_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "upgrades": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeType" - }, - "maxItems": 6 - } - } - }, - "StellarValueExt": { - "description": "StellarValueExt is an XDR NestedUnion defined as:\n\n```text union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "basic" - ] - }, - { - "type": "object", - "required": [ - "signed" - ], - "properties": { - "signed": { - "$ref": "#/definitions/LedgerCloseValueSignature" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionEvent": { - "description": "TransactionEvent is an XDR Struct defined as:\n\n```text struct TransactionEvent { TransactionEventStage stage; // Stage at which an event has occurred. ContractEvent event; // The contract event that has occurred. }; ```", - "type": "object", - "required": [ - "event", - "stage" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "stage": { - "$ref": "#/definitions/TransactionEventStage" - } - } - }, - "TransactionEventStage": { - "description": "TransactionEventStage is an XDR Enum defined as:\n\n```text enum TransactionEventStage { // The event has happened before any one of the transactions has its // operations applied. TRANSACTION_EVENT_STAGE_BEFORE_ALL_TXS = 0, // The event has happened immediately after operations of the transaction // have been applied. TRANSACTION_EVENT_STAGE_AFTER_TX = 1, // The event has happened after every transaction had its operations // applied. TRANSACTION_EVENT_STAGE_AFTER_ALL_TXS = 2 }; ```", - "type": "string", - "enum": [ - "before_all_txs", - "after_tx", - "after_all_txs" - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionMeta": { - "description": "TransactionMeta is an XDR Union defined as:\n\n```text union TransactionMeta switch (int v) { case 0: OperationMeta operations<>; case 1: TransactionMetaV1 v1; case 2: TransactionMetaV2 v2; case 3: TransactionMetaV3 v3; case 4: TransactionMetaV4 v4; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionMetaV1" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TransactionMetaV2" - } - } - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/TransactionMetaV3" - } - } - }, - { - "type": "object", - "required": [ - "v4" - ], - "properties": { - "v4": { - "$ref": "#/definitions/TransactionMetaV4" - } - } - } - ] - }, - "TransactionMetaV1": { - "description": "TransactionMetaV1 is an XDR Struct defined as:\n\n```text struct TransactionMetaV1 { LedgerEntryChanges txChanges; // tx level changes if any OperationMeta operations<>; // meta for each operation }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV2": { - "description": "TransactionMetaV2 is an XDR Struct defined as:\n\n```text struct TransactionMetaV2 { LedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV3": { - "description": "TransactionMetaV3 is an XDR Struct defined as:\n\n```text struct TransactionMetaV3 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMeta* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions). }; ```", - "type": "object", - "required": [ - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMeta" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV4": { - "description": "TransactionMetaV4 is an XDR Struct defined as:\n\n```text struct TransactionMetaV4 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMetaV2 operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMetaV2* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions).\n\nTransactionEvent events<>; // Used for transaction-level events (like fee payment) DiagnosticEvent diagnosticEvents<>; // Used for all diagnostic information }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMetaV2" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMetaV2" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionResult": { - "description": "TransactionResult is an XDR Struct defined as:\n\n```text struct TransactionResult { int64 feeCharged; // actual fee charged for the transaction\n\nunion switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/TransactionResultResult" - } - } - }, - "TransactionResultExt": { - "description": "TransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionResultMeta": { - "description": "TransactionResultMeta is an XDR Struct defined as:\n\n```text struct TransactionResultMeta { TransactionResultPair result; LedgerEntryChanges feeProcessing; TransactionMeta txApplyProcessing; }; ```", - "type": "object", - "required": [ - "fee_processing", - "result", - "tx_apply_processing" - ], - "properties": { - "fee_processing": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "result": { - "$ref": "#/definitions/TransactionResultPair" - }, - "tx_apply_processing": { - "$ref": "#/definitions/TransactionMeta" - } - } - }, - "TransactionResultMetaV1": { - "description": "TransactionResultMetaV1 is an XDR Struct defined as:\n\n```text struct TransactionResultMetaV1 { ExtensionPoint ext;\n\nTransactionResultPair result; LedgerEntryChanges feeProcessing; TransactionMeta txApplyProcessing;\n\nLedgerEntryChanges postTxApplyFeeProcessing; }; ```", - "type": "object", - "required": [ - "ext", - "fee_processing", - "post_tx_apply_fee_processing", - "result", - "tx_apply_processing" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "fee_processing": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "post_tx_apply_fee_processing": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "result": { - "$ref": "#/definitions/TransactionResultPair" - }, - "tx_apply_processing": { - "$ref": "#/definitions/TransactionMeta" - } - } - }, - "TransactionResultPair": { - "description": "TransactionResultPair is an XDR Struct defined as:\n\n```text struct TransactionResultPair { Hash transactionHash; TransactionResult result; // result for the transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/TransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionResultResult": { - "description": "TransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_success" - ], - "properties": { - "tx_fee_bump_inner_success": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_failed" - ], - "properties": { - "tx_fee_bump_inner_failed": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "TransactionSet": { - "description": "TransactionSet is an XDR Struct defined as:\n\n```text struct TransactionSet { Hash previousLedgerHash; TransactionEnvelope txs<>; }; ```", - "type": "object", - "required": [ - "previous_ledger_hash", - "txs" - ], - "properties": { - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "TransactionSetV1": { - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - }, - "UpgradeEntryMeta": { - "description": "UpgradeEntryMeta is an XDR Struct defined as:\n\n```text struct UpgradeEntryMeta { LedgerUpgrade upgrade; LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes", - "upgrade" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "upgrade": { - "$ref": "#/definitions/LedgerUpgrade" - } - } - }, - "UpgradeType": { - "description": "UpgradeType is an XDR Typedef defined as:\n\n```text typedef opaque UpgradeType<128>; ```", - "type": "string", - "maxLength": 256, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerCloseMetaExt.json b/xdr-json/next/LedgerCloseMetaExt.json deleted file mode 100644 index 1f8dfee3..00000000 --- a/xdr-json/next/LedgerCloseMetaExt.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerCloseMetaExt", - "description": "LedgerCloseMetaExt is an XDR Union defined as:\n\n```text union LedgerCloseMetaExt switch (int v) { case 0: void; case 1: LedgerCloseMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerCloseMetaExtV1" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerCloseMetaExtV1": { - "description": "LedgerCloseMetaExtV1 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaExtV1 { ExtensionPoint ext; int64 sorobanFeeWrite1KB; }; ```", - "type": "object", - "required": [ - "ext", - "soroban_fee_write1_kb" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "soroban_fee_write1_kb": { - "type": "string" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerCloseMetaExtV1.json b/xdr-json/next/LedgerCloseMetaExtV1.json deleted file mode 100644 index f3877574..00000000 --- a/xdr-json/next/LedgerCloseMetaExtV1.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerCloseMetaExtV1", - "description": "LedgerCloseMetaExtV1 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaExtV1 { ExtensionPoint ext; int64 sorobanFeeWrite1KB; }; ```", - "type": "object", - "required": [ - "ext", - "soroban_fee_write1_kb" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "soroban_fee_write1_kb": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerCloseMetaV0.json b/xdr-json/next/LedgerCloseMetaV0.json deleted file mode 100644 index 4a47cd8a..00000000 --- a/xdr-json/next/LedgerCloseMetaV0.json +++ /dev/null @@ -1,7289 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerCloseMetaV0", - "description": "LedgerCloseMetaV0 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaV0 { LedgerHeaderHistoryEntry ledgerHeader; // NB: txSet is sorted in \"Hash order\" TransactionSet txSet;\n\n// NB: transactions are sorted in apply order here // fees for all transactions are processed first // followed by applying transactions TransactionResultMeta txProcessing<>;\n\n// upgrades are applied last UpgradeEntryMeta upgradesProcessing<>;\n\n// other misc information attached to the ledger close SCPHistoryEntry scpInfo<>; }; ```", - "type": "object", - "required": [ - "ledger_header", - "scp_info", - "tx_processing", - "tx_set", - "upgrades_processing" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ledger_header": { - "$ref": "#/definitions/LedgerHeaderHistoryEntry" - }, - "scp_info": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpHistoryEntry" - }, - "maxItems": 4294967295 - }, - "tx_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionResultMeta" - }, - "maxItems": 4294967295 - }, - "tx_set": { - "$ref": "#/definitions/TransactionSet" - }, - "upgrades_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeEntryMeta" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigUpgradeSetKey": { - "description": "ConfigUpgradeSetKey is an XDR Struct defined as:\n\n```text struct ConfigUpgradeSetKey { ContractID contractID; Hash contentHash; }; ```", - "type": "object", - "required": [ - "content_hash", - "contract_id" - ], - "properties": { - "content_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "contract_id": { - "$ref": "#/definitions/ContractId" - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DiagnosticEvent": { - "description": "DiagnosticEvent is an XDR Struct defined as:\n\n```text struct DiagnosticEvent { bool inSuccessfulContractCall; ContractEvent event; }; ```", - "type": "object", - "required": [ - "event", - "in_successful_contract_call" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "in_successful_contract_call": { - "type": "boolean" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InnerTransactionResult": { - "description": "InnerTransactionResult is an XDR Struct defined as:\n\n```text struct InnerTransactionResult { // Always 0. Here for binary compatibility. int64 feeCharged;\n\nunion switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/InnerTransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResultResult" - } - } - }, - "InnerTransactionResultExt": { - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "InnerTransactionResultPair": { - "description": "InnerTransactionResultPair is an XDR Struct defined as:\n\n```text struct InnerTransactionResultPair { Hash transactionHash; // hash of the inner transaction InnerTransactionResult result; // result for the inner transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/InnerTransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "InnerTransactionResultResult": { - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerCloseValueSignature": { - "description": "LedgerCloseValueSignature is an XDR Struct defined as:\n\n```text struct LedgerCloseValueSignature { NodeID nodeID; // which node introduced the value Signature signature; // nodeID's signature }; ```", - "type": "object", - "required": [ - "node_id", - "signature" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerHeader": { - "description": "LedgerHeader is an XDR Struct defined as:\n\n```text struct LedgerHeader { uint32 ledgerVersion; // the protocol version of the ledger Hash previousLedgerHash; // hash of the previous ledger header StellarValue scpValue; // what consensus agreed to Hash txSetResultHash; // the TransactionResultSet that led to this ledger Hash bucketListHash; // hash of the ledger state\n\nuint32 ledgerSeq; // sequence number of this ledger\n\nint64 totalCoins; // total number of stroops in existence. // 10,000,000 stroops in 1 XLM\n\nint64 feePool; // fees burned since last inflation run uint32 inflationSeq; // inflation sequence number\n\nuint64 idPool; // last used global ID, used for generating objects\n\nuint32 baseFee; // base fee per operation in stroops uint32 baseReserve; // account base reserve in stroops\n\nuint32 maxTxSetSize; // maximum size a transaction set can be\n\nHash skipList[4]; // hashes of ledgers in the past. allows you to jump back // in time without walking the chain back ledger by ledger // each slot contains the oldest ledger that is mod of // either 50 5000 50000 or 500000 depending on index // skipList[0] mod(50), skipList[1] mod(5000), etc\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "base_fee", - "base_reserve", - "bucket_list_hash", - "ext", - "fee_pool", - "id_pool", - "inflation_seq", - "ledger_seq", - "ledger_version", - "max_tx_set_size", - "previous_ledger_hash", - "scp_value", - "skip_list", - "total_coins", - "tx_set_result_hash" - ], - "properties": { - "base_fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "base_reserve": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "bucket_list_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/LedgerHeaderExt" - }, - "fee_pool": { - "type": "string" - }, - "id_pool": { - "type": "string" - }, - "inflation_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "scp_value": { - "$ref": "#/definitions/StellarValue" - }, - "skip_list": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4, - "minItems": 4 - }, - "total_coins": { - "type": "string" - }, - "tx_set_result_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerHeaderExt": { - "description": "LedgerHeaderExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerHeaderExtensionV1" - } - } - } - ] - }, - "LedgerHeaderExtensionV1": { - "description": "LedgerHeaderExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerHeaderExtensionV1 { uint32 flags; // LedgerHeaderFlags\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerHeaderExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerHeaderExtensionV1Ext": { - "description": "LedgerHeaderExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerHeaderHistoryEntry": { - "description": "LedgerHeaderHistoryEntry is an XDR Struct defined as:\n\n```text struct LedgerHeaderHistoryEntry { Hash hash; LedgerHeader header;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "hash", - "header" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerHeaderHistoryEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "header": { - "$ref": "#/definitions/LedgerHeader" - } - } - }, - "LedgerHeaderHistoryEntryExt": { - "description": "LedgerHeaderHistoryEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerScpMessages": { - "description": "LedgerScpMessages is an XDR Struct defined as:\n\n```text struct LedgerSCPMessages { uint32 ledgerSeq; SCPEnvelope messages<>; }; ```", - "type": "object", - "required": [ - "ledger_seq", - "messages" - ], - "properties": { - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerUpgrade": { - "description": "LedgerUpgrade is an XDR Union defined as:\n\n```text union LedgerUpgrade switch (LedgerUpgradeType type) { case LEDGER_UPGRADE_VERSION: uint32 newLedgerVersion; // update ledgerVersion case LEDGER_UPGRADE_BASE_FEE: uint32 newBaseFee; // update baseFee case LEDGER_UPGRADE_MAX_TX_SET_SIZE: uint32 newMaxTxSetSize; // update maxTxSetSize case LEDGER_UPGRADE_BASE_RESERVE: uint32 newBaseReserve; // update baseReserve case LEDGER_UPGRADE_FLAGS: uint32 newFlags; // update flags case LEDGER_UPGRADE_CONFIG: // Update arbitrary `ConfigSetting` entries identified by the key. ConfigUpgradeSetKey newConfig; case LEDGER_UPGRADE_MAX_SOROBAN_TX_SET_SIZE: // Update ConfigSettingContractExecutionLanesV0.ledgerMaxTxCount without // using `LEDGER_UPGRADE_CONFIG`. uint32 newMaxSorobanTxSetSize; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "base_fee" - ], - "properties": { - "base_fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "max_tx_set_size" - ], - "properties": { - "max_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "base_reserve" - ], - "properties": { - "base_reserve": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "flags" - ], - "properties": { - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "config" - ], - "properties": { - "config": { - "$ref": "#/definitions/ConfigUpgradeSetKey" - } - } - }, - { - "type": "object", - "required": [ - "max_soroban_tx_set_size" - ], - "properties": { - "max_soroban_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - } - ] - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "NodeId": { - "type": "string" - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "OperationMeta": { - "description": "OperationMeta is an XDR Struct defined as:\n\n```text struct OperationMeta { LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "OperationMetaV2": { - "description": "OperationMetaV2 is an XDR Struct defined as:\n\n```text struct OperationMetaV2 { ExtensionPoint ext;\n\nLedgerEntryChanges changes;\n\nContractEvent events<>; }; ```", - "type": "object", - "required": [ - "changes", - "events", - "ext" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpEnvelope": { - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - } - }, - "ScpHistoryEntry": { - "description": "ScpHistoryEntry is an XDR Union defined as:\n\n```text union SCPHistoryEntry switch (int v) { case 0: SCPHistoryEntryV0 v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ScpHistoryEntryV0" - } - } - } - ] - }, - "ScpHistoryEntryV0": { - "description": "ScpHistoryEntryV0 is an XDR Struct defined as:\n\n```text struct SCPHistoryEntryV0 { SCPQuorumSet quorumSets<>; // additional quorum sets used by ledgerMessages LedgerSCPMessages ledgerMessages; }; ```", - "type": "object", - "required": [ - "ledger_messages", - "quorum_sets" - ], - "properties": { - "ledger_messages": { - "$ref": "#/definitions/LedgerScpMessages" - }, - "quorum_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpQuorumSet": { - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "SorobanTransactionMeta": { - "description": "SorobanTransactionMeta is an XDR Struct defined as:\n\n```text struct SorobanTransactionMeta { SorobanTransactionMetaExt ext;\n\nContractEvent events<>; // custom events populated by the // contracts themselves. SCVal returnValue; // return value of the host fn invocation\n\n// Diagnostics events that are not hashed. // This will contain all contract and diagnostic events. Even ones // that were emitted in a failed contract call. DiagnosticEvent diagnosticEvents<>; }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "return_value" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "$ref": "#/definitions/ScVal" - } - } - }, - "SorobanTransactionMetaExt": { - "description": "SorobanTransactionMetaExt is an XDR Union defined as:\n\n```text union SorobanTransactionMetaExt switch (int v) { case 0: void; case 1: SorobanTransactionMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionMetaExtV1" - } - } - } - ] - }, - "SorobanTransactionMetaExtV1": { - "description": "SorobanTransactionMetaExtV1 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaExtV1 { ExtensionPoint ext;\n\n// The following are the components of the overall Soroban resource fee // charged for the transaction. // The following relation holds: // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` // where `resourceFeeCharged` is the overall fee charged for the // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` // i.e.we never charge more than the declared resource fee. // The inclusion fee for charged the Soroban transaction can be found using // the following equation: // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.\n\n// Total amount (in stroops) that has been charged for non-refundable // Soroban resources. // Non-refundable resources are charged based on the usage declared in // the transaction envelope (such as `instructions`, `readBytes` etc.) and // is charged regardless of the success of the transaction. int64 totalNonRefundableResourceFeeCharged; // Total amount (in stroops) that has been charged for refundable // Soroban resource fees. // Currently this comprises the rent fee (`rentFeeCharged`) and the // fee for the events and return value. // Refundable resources are charged based on the actual resources usage. // Since currently refundable resources are only used for the successful // transactions, this will be `0` for failed transactions. int64 totalRefundableResourceFeeCharged; // Amount (in stroops) that has been charged for rent. // This is a part of `totalNonRefundableResourceFeeCharged`. int64 rentFeeCharged; }; ```", - "type": "object", - "required": [ - "ext", - "rent_fee_charged", - "total_non_refundable_resource_fee_charged", - "total_refundable_resource_fee_charged" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "rent_fee_charged": { - "type": "string" - }, - "total_non_refundable_resource_fee_charged": { - "type": "string" - }, - "total_refundable_resource_fee_charged": { - "type": "string" - } - } - }, - "SorobanTransactionMetaV2": { - "description": "SorobanTransactionMetaV2 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaV2 { SorobanTransactionMetaExt ext;\n\nSCVal* returnValue; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "anyOf": [ - { - "$ref": "#/definitions/ScVal" - }, - { - "type": "null" - } - ] - } - } - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "StellarValue": { - "description": "StellarValue is an XDR Struct defined as:\n\n```text struct StellarValue { Hash txSetHash; // transaction set to apply to previous ledger TimePoint closeTime; // network close time\n\n// upgrades to apply to the previous ledger (usually empty) // this is a vector of encoded 'LedgerUpgrade' so that nodes can drop // unknown steps during consensus if needed. // see notes below on 'LedgerUpgrade' for more detail // max size is dictated by number of upgrade types (+ room for future) UpgradeType upgrades<6>;\n\n// reserved for future use union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ext; }; ```", - "type": "object", - "required": [ - "close_time", - "ext", - "tx_set_hash", - "upgrades" - ], - "properties": { - "close_time": { - "$ref": "#/definitions/TimePoint" - }, - "ext": { - "$ref": "#/definitions/StellarValueExt" - }, - "tx_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "upgrades": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeType" - }, - "maxItems": 6 - } - } - }, - "StellarValueExt": { - "description": "StellarValueExt is an XDR NestedUnion defined as:\n\n```text union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "basic" - ] - }, - { - "type": "object", - "required": [ - "signed" - ], - "properties": { - "signed": { - "$ref": "#/definitions/LedgerCloseValueSignature" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionEvent": { - "description": "TransactionEvent is an XDR Struct defined as:\n\n```text struct TransactionEvent { TransactionEventStage stage; // Stage at which an event has occurred. ContractEvent event; // The contract event that has occurred. }; ```", - "type": "object", - "required": [ - "event", - "stage" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "stage": { - "$ref": "#/definitions/TransactionEventStage" - } - } - }, - "TransactionEventStage": { - "description": "TransactionEventStage is an XDR Enum defined as:\n\n```text enum TransactionEventStage { // The event has happened before any one of the transactions has its // operations applied. TRANSACTION_EVENT_STAGE_BEFORE_ALL_TXS = 0, // The event has happened immediately after operations of the transaction // have been applied. TRANSACTION_EVENT_STAGE_AFTER_TX = 1, // The event has happened after every transaction had its operations // applied. TRANSACTION_EVENT_STAGE_AFTER_ALL_TXS = 2 }; ```", - "type": "string", - "enum": [ - "before_all_txs", - "after_tx", - "after_all_txs" - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionMeta": { - "description": "TransactionMeta is an XDR Union defined as:\n\n```text union TransactionMeta switch (int v) { case 0: OperationMeta operations<>; case 1: TransactionMetaV1 v1; case 2: TransactionMetaV2 v2; case 3: TransactionMetaV3 v3; case 4: TransactionMetaV4 v4; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionMetaV1" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TransactionMetaV2" - } - } - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/TransactionMetaV3" - } - } - }, - { - "type": "object", - "required": [ - "v4" - ], - "properties": { - "v4": { - "$ref": "#/definitions/TransactionMetaV4" - } - } - } - ] - }, - "TransactionMetaV1": { - "description": "TransactionMetaV1 is an XDR Struct defined as:\n\n```text struct TransactionMetaV1 { LedgerEntryChanges txChanges; // tx level changes if any OperationMeta operations<>; // meta for each operation }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV2": { - "description": "TransactionMetaV2 is an XDR Struct defined as:\n\n```text struct TransactionMetaV2 { LedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV3": { - "description": "TransactionMetaV3 is an XDR Struct defined as:\n\n```text struct TransactionMetaV3 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMeta* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions). }; ```", - "type": "object", - "required": [ - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMeta" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV4": { - "description": "TransactionMetaV4 is an XDR Struct defined as:\n\n```text struct TransactionMetaV4 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMetaV2 operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMetaV2* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions).\n\nTransactionEvent events<>; // Used for transaction-level events (like fee payment) DiagnosticEvent diagnosticEvents<>; // Used for all diagnostic information }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMetaV2" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMetaV2" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionResult": { - "description": "TransactionResult is an XDR Struct defined as:\n\n```text struct TransactionResult { int64 feeCharged; // actual fee charged for the transaction\n\nunion switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/TransactionResultResult" - } - } - }, - "TransactionResultExt": { - "description": "TransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionResultMeta": { - "description": "TransactionResultMeta is an XDR Struct defined as:\n\n```text struct TransactionResultMeta { TransactionResultPair result; LedgerEntryChanges feeProcessing; TransactionMeta txApplyProcessing; }; ```", - "type": "object", - "required": [ - "fee_processing", - "result", - "tx_apply_processing" - ], - "properties": { - "fee_processing": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "result": { - "$ref": "#/definitions/TransactionResultPair" - }, - "tx_apply_processing": { - "$ref": "#/definitions/TransactionMeta" - } - } - }, - "TransactionResultPair": { - "description": "TransactionResultPair is an XDR Struct defined as:\n\n```text struct TransactionResultPair { Hash transactionHash; TransactionResult result; // result for the transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/TransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionResultResult": { - "description": "TransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_success" - ], - "properties": { - "tx_fee_bump_inner_success": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_failed" - ], - "properties": { - "tx_fee_bump_inner_failed": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "TransactionSet": { - "description": "TransactionSet is an XDR Struct defined as:\n\n```text struct TransactionSet { Hash previousLedgerHash; TransactionEnvelope txs<>; }; ```", - "type": "object", - "required": [ - "previous_ledger_hash", - "txs" - ], - "properties": { - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - }, - "UpgradeEntryMeta": { - "description": "UpgradeEntryMeta is an XDR Struct defined as:\n\n```text struct UpgradeEntryMeta { LedgerUpgrade upgrade; LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes", - "upgrade" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "upgrade": { - "$ref": "#/definitions/LedgerUpgrade" - } - } - }, - "UpgradeType": { - "description": "UpgradeType is an XDR Typedef defined as:\n\n```text typedef opaque UpgradeType<128>; ```", - "type": "string", - "maxLength": 256, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerCloseMetaV1.json b/xdr-json/next/LedgerCloseMetaV1.json deleted file mode 100644 index 454a3031..00000000 --- a/xdr-json/next/LedgerCloseMetaV1.json +++ /dev/null @@ -1,7476 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerCloseMetaV1", - "description": "LedgerCloseMetaV1 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaV1 { LedgerCloseMetaExt ext;\n\nLedgerHeaderHistoryEntry ledgerHeader;\n\nGeneralizedTransactionSet txSet;\n\n// NB: transactions are sorted in apply order here // fees for all transactions are processed first // followed by applying transactions TransactionResultMeta txProcessing<>;\n\n// upgrades are applied last UpgradeEntryMeta upgradesProcessing<>;\n\n// other misc information attached to the ledger close SCPHistoryEntry scpInfo<>;\n\n// Size in bytes of live Soroban state, to support downstream // systems calculating storage fees correctly. uint64 totalByteSizeOfLiveSorobanState;\n\n// TTL and data/code keys that have been evicted at this ledger. LedgerKey evictedKeys<>;\n\n// Maintained for backwards compatibility, should never be populated. LedgerEntry unused<>; }; ```", - "type": "object", - "required": [ - "evicted_keys", - "ext", - "ledger_header", - "scp_info", - "total_byte_size_of_live_soroban_state", - "tx_processing", - "tx_set", - "unused", - "upgrades_processing" - ], - "properties": { - "$schema": { - "type": "string" - }, - "evicted_keys": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/LedgerCloseMetaExt" - }, - "ledger_header": { - "$ref": "#/definitions/LedgerHeaderHistoryEntry" - }, - "scp_info": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpHistoryEntry" - }, - "maxItems": 4294967295 - }, - "total_byte_size_of_live_soroban_state": { - "type": "string" - }, - "tx_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionResultMeta" - }, - "maxItems": 4294967295 - }, - "tx_set": { - "$ref": "#/definitions/GeneralizedTransactionSet" - }, - "unused": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntry" - }, - "maxItems": 4294967295 - }, - "upgrades_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeEntryMeta" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigUpgradeSetKey": { - "description": "ConfigUpgradeSetKey is an XDR Struct defined as:\n\n```text struct ConfigUpgradeSetKey { ContractID contractID; Hash contentHash; }; ```", - "type": "object", - "required": [ - "content_hash", - "contract_id" - ], - "properties": { - "content_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "contract_id": { - "$ref": "#/definitions/ContractId" - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "DiagnosticEvent": { - "description": "DiagnosticEvent is an XDR Struct defined as:\n\n```text struct DiagnosticEvent { bool inSuccessfulContractCall; ContractEvent event; }; ```", - "type": "object", - "required": [ - "event", - "in_successful_contract_call" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "in_successful_contract_call": { - "type": "boolean" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "GeneralizedTransactionSet": { - "description": "GeneralizedTransactionSet is an XDR Union defined as:\n\n```text union GeneralizedTransactionSet switch (int v) { // We consider the legacy TransactionSet to be v0. case 1: TransactionSetV1 v1TxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionSetV1" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InnerTransactionResult": { - "description": "InnerTransactionResult is an XDR Struct defined as:\n\n```text struct InnerTransactionResult { // Always 0. Here for binary compatibility. int64 feeCharged;\n\nunion switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/InnerTransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResultResult" - } - } - }, - "InnerTransactionResultExt": { - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "InnerTransactionResultPair": { - "description": "InnerTransactionResultPair is an XDR Struct defined as:\n\n```text struct InnerTransactionResultPair { Hash transactionHash; // hash of the inner transaction InnerTransactionResult result; // result for the inner transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/InnerTransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "InnerTransactionResultResult": { - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerCloseMetaExt": { - "description": "LedgerCloseMetaExt is an XDR Union defined as:\n\n```text union LedgerCloseMetaExt switch (int v) { case 0: void; case 1: LedgerCloseMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerCloseMetaExtV1" - } - } - } - ] - }, - "LedgerCloseMetaExtV1": { - "description": "LedgerCloseMetaExtV1 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaExtV1 { ExtensionPoint ext; int64 sorobanFeeWrite1KB; }; ```", - "type": "object", - "required": [ - "ext", - "soroban_fee_write1_kb" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "soroban_fee_write1_kb": { - "type": "string" - } - } - }, - "LedgerCloseValueSignature": { - "description": "LedgerCloseValueSignature is an XDR Struct defined as:\n\n```text struct LedgerCloseValueSignature { NodeID nodeID; // which node introduced the value Signature signature; // nodeID's signature }; ```", - "type": "object", - "required": [ - "node_id", - "signature" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerHeader": { - "description": "LedgerHeader is an XDR Struct defined as:\n\n```text struct LedgerHeader { uint32 ledgerVersion; // the protocol version of the ledger Hash previousLedgerHash; // hash of the previous ledger header StellarValue scpValue; // what consensus agreed to Hash txSetResultHash; // the TransactionResultSet that led to this ledger Hash bucketListHash; // hash of the ledger state\n\nuint32 ledgerSeq; // sequence number of this ledger\n\nint64 totalCoins; // total number of stroops in existence. // 10,000,000 stroops in 1 XLM\n\nint64 feePool; // fees burned since last inflation run uint32 inflationSeq; // inflation sequence number\n\nuint64 idPool; // last used global ID, used for generating objects\n\nuint32 baseFee; // base fee per operation in stroops uint32 baseReserve; // account base reserve in stroops\n\nuint32 maxTxSetSize; // maximum size a transaction set can be\n\nHash skipList[4]; // hashes of ledgers in the past. allows you to jump back // in time without walking the chain back ledger by ledger // each slot contains the oldest ledger that is mod of // either 50 5000 50000 or 500000 depending on index // skipList[0] mod(50), skipList[1] mod(5000), etc\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "base_fee", - "base_reserve", - "bucket_list_hash", - "ext", - "fee_pool", - "id_pool", - "inflation_seq", - "ledger_seq", - "ledger_version", - "max_tx_set_size", - "previous_ledger_hash", - "scp_value", - "skip_list", - "total_coins", - "tx_set_result_hash" - ], - "properties": { - "base_fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "base_reserve": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "bucket_list_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/LedgerHeaderExt" - }, - "fee_pool": { - "type": "string" - }, - "id_pool": { - "type": "string" - }, - "inflation_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "scp_value": { - "$ref": "#/definitions/StellarValue" - }, - "skip_list": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4, - "minItems": 4 - }, - "total_coins": { - "type": "string" - }, - "tx_set_result_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerHeaderExt": { - "description": "LedgerHeaderExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerHeaderExtensionV1" - } - } - } - ] - }, - "LedgerHeaderExtensionV1": { - "description": "LedgerHeaderExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerHeaderExtensionV1 { uint32 flags; // LedgerHeaderFlags\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerHeaderExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerHeaderExtensionV1Ext": { - "description": "LedgerHeaderExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerHeaderHistoryEntry": { - "description": "LedgerHeaderHistoryEntry is an XDR Struct defined as:\n\n```text struct LedgerHeaderHistoryEntry { Hash hash; LedgerHeader header;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "hash", - "header" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerHeaderHistoryEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "header": { - "$ref": "#/definitions/LedgerHeader" - } - } - }, - "LedgerHeaderHistoryEntryExt": { - "description": "LedgerHeaderHistoryEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerScpMessages": { - "description": "LedgerScpMessages is an XDR Struct defined as:\n\n```text struct LedgerSCPMessages { uint32 ledgerSeq; SCPEnvelope messages<>; }; ```", - "type": "object", - "required": [ - "ledger_seq", - "messages" - ], - "properties": { - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerUpgrade": { - "description": "LedgerUpgrade is an XDR Union defined as:\n\n```text union LedgerUpgrade switch (LedgerUpgradeType type) { case LEDGER_UPGRADE_VERSION: uint32 newLedgerVersion; // update ledgerVersion case LEDGER_UPGRADE_BASE_FEE: uint32 newBaseFee; // update baseFee case LEDGER_UPGRADE_MAX_TX_SET_SIZE: uint32 newMaxTxSetSize; // update maxTxSetSize case LEDGER_UPGRADE_BASE_RESERVE: uint32 newBaseReserve; // update baseReserve case LEDGER_UPGRADE_FLAGS: uint32 newFlags; // update flags case LEDGER_UPGRADE_CONFIG: // Update arbitrary `ConfigSetting` entries identified by the key. ConfigUpgradeSetKey newConfig; case LEDGER_UPGRADE_MAX_SOROBAN_TX_SET_SIZE: // Update ConfigSettingContractExecutionLanesV0.ledgerMaxTxCount without // using `LEDGER_UPGRADE_CONFIG`. uint32 newMaxSorobanTxSetSize; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "base_fee" - ], - "properties": { - "base_fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "max_tx_set_size" - ], - "properties": { - "max_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "base_reserve" - ], - "properties": { - "base_reserve": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "flags" - ], - "properties": { - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "config" - ], - "properties": { - "config": { - "$ref": "#/definitions/ConfigUpgradeSetKey" - } - } - }, - { - "type": "object", - "required": [ - "max_soroban_tx_set_size" - ], - "properties": { - "max_soroban_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - } - ] - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "NodeId": { - "type": "string" - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "OperationMeta": { - "description": "OperationMeta is an XDR Struct defined as:\n\n```text struct OperationMeta { LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "OperationMetaV2": { - "description": "OperationMetaV2 is an XDR Struct defined as:\n\n```text struct OperationMetaV2 { ExtensionPoint ext;\n\nLedgerEntryChanges changes;\n\nContractEvent events<>; }; ```", - "type": "object", - "required": [ - "changes", - "events", - "ext" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpEnvelope": { - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - } - }, - "ScpHistoryEntry": { - "description": "ScpHistoryEntry is an XDR Union defined as:\n\n```text union SCPHistoryEntry switch (int v) { case 0: SCPHistoryEntryV0 v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ScpHistoryEntryV0" - } - } - } - ] - }, - "ScpHistoryEntryV0": { - "description": "ScpHistoryEntryV0 is an XDR Struct defined as:\n\n```text struct SCPHistoryEntryV0 { SCPQuorumSet quorumSets<>; // additional quorum sets used by ledgerMessages LedgerSCPMessages ledgerMessages; }; ```", - "type": "object", - "required": [ - "ledger_messages", - "quorum_sets" - ], - "properties": { - "ledger_messages": { - "$ref": "#/definitions/LedgerScpMessages" - }, - "quorum_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpQuorumSet": { - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "SorobanTransactionMeta": { - "description": "SorobanTransactionMeta is an XDR Struct defined as:\n\n```text struct SorobanTransactionMeta { SorobanTransactionMetaExt ext;\n\nContractEvent events<>; // custom events populated by the // contracts themselves. SCVal returnValue; // return value of the host fn invocation\n\n// Diagnostics events that are not hashed. // This will contain all contract and diagnostic events. Even ones // that were emitted in a failed contract call. DiagnosticEvent diagnosticEvents<>; }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "return_value" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "$ref": "#/definitions/ScVal" - } - } - }, - "SorobanTransactionMetaExt": { - "description": "SorobanTransactionMetaExt is an XDR Union defined as:\n\n```text union SorobanTransactionMetaExt switch (int v) { case 0: void; case 1: SorobanTransactionMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionMetaExtV1" - } - } - } - ] - }, - "SorobanTransactionMetaExtV1": { - "description": "SorobanTransactionMetaExtV1 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaExtV1 { ExtensionPoint ext;\n\n// The following are the components of the overall Soroban resource fee // charged for the transaction. // The following relation holds: // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` // where `resourceFeeCharged` is the overall fee charged for the // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` // i.e.we never charge more than the declared resource fee. // The inclusion fee for charged the Soroban transaction can be found using // the following equation: // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.\n\n// Total amount (in stroops) that has been charged for non-refundable // Soroban resources. // Non-refundable resources are charged based on the usage declared in // the transaction envelope (such as `instructions`, `readBytes` etc.) and // is charged regardless of the success of the transaction. int64 totalNonRefundableResourceFeeCharged; // Total amount (in stroops) that has been charged for refundable // Soroban resource fees. // Currently this comprises the rent fee (`rentFeeCharged`) and the // fee for the events and return value. // Refundable resources are charged based on the actual resources usage. // Since currently refundable resources are only used for the successful // transactions, this will be `0` for failed transactions. int64 totalRefundableResourceFeeCharged; // Amount (in stroops) that has been charged for rent. // This is a part of `totalNonRefundableResourceFeeCharged`. int64 rentFeeCharged; }; ```", - "type": "object", - "required": [ - "ext", - "rent_fee_charged", - "total_non_refundable_resource_fee_charged", - "total_refundable_resource_fee_charged" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "rent_fee_charged": { - "type": "string" - }, - "total_non_refundable_resource_fee_charged": { - "type": "string" - }, - "total_refundable_resource_fee_charged": { - "type": "string" - } - } - }, - "SorobanTransactionMetaV2": { - "description": "SorobanTransactionMetaV2 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaV2 { SorobanTransactionMetaExt ext;\n\nSCVal* returnValue; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "anyOf": [ - { - "$ref": "#/definitions/ScVal" - }, - { - "type": "null" - } - ] - } - } - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "StellarValue": { - "description": "StellarValue is an XDR Struct defined as:\n\n```text struct StellarValue { Hash txSetHash; // transaction set to apply to previous ledger TimePoint closeTime; // network close time\n\n// upgrades to apply to the previous ledger (usually empty) // this is a vector of encoded 'LedgerUpgrade' so that nodes can drop // unknown steps during consensus if needed. // see notes below on 'LedgerUpgrade' for more detail // max size is dictated by number of upgrade types (+ room for future) UpgradeType upgrades<6>;\n\n// reserved for future use union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ext; }; ```", - "type": "object", - "required": [ - "close_time", - "ext", - "tx_set_hash", - "upgrades" - ], - "properties": { - "close_time": { - "$ref": "#/definitions/TimePoint" - }, - "ext": { - "$ref": "#/definitions/StellarValueExt" - }, - "tx_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "upgrades": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeType" - }, - "maxItems": 6 - } - } - }, - "StellarValueExt": { - "description": "StellarValueExt is an XDR NestedUnion defined as:\n\n```text union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "basic" - ] - }, - { - "type": "object", - "required": [ - "signed" - ], - "properties": { - "signed": { - "$ref": "#/definitions/LedgerCloseValueSignature" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionEvent": { - "description": "TransactionEvent is an XDR Struct defined as:\n\n```text struct TransactionEvent { TransactionEventStage stage; // Stage at which an event has occurred. ContractEvent event; // The contract event that has occurred. }; ```", - "type": "object", - "required": [ - "event", - "stage" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "stage": { - "$ref": "#/definitions/TransactionEventStage" - } - } - }, - "TransactionEventStage": { - "description": "TransactionEventStage is an XDR Enum defined as:\n\n```text enum TransactionEventStage { // The event has happened before any one of the transactions has its // operations applied. TRANSACTION_EVENT_STAGE_BEFORE_ALL_TXS = 0, // The event has happened immediately after operations of the transaction // have been applied. TRANSACTION_EVENT_STAGE_AFTER_TX = 1, // The event has happened after every transaction had its operations // applied. TRANSACTION_EVENT_STAGE_AFTER_ALL_TXS = 2 }; ```", - "type": "string", - "enum": [ - "before_all_txs", - "after_tx", - "after_all_txs" - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionMeta": { - "description": "TransactionMeta is an XDR Union defined as:\n\n```text union TransactionMeta switch (int v) { case 0: OperationMeta operations<>; case 1: TransactionMetaV1 v1; case 2: TransactionMetaV2 v2; case 3: TransactionMetaV3 v3; case 4: TransactionMetaV4 v4; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionMetaV1" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TransactionMetaV2" - } - } - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/TransactionMetaV3" - } - } - }, - { - "type": "object", - "required": [ - "v4" - ], - "properties": { - "v4": { - "$ref": "#/definitions/TransactionMetaV4" - } - } - } - ] - }, - "TransactionMetaV1": { - "description": "TransactionMetaV1 is an XDR Struct defined as:\n\n```text struct TransactionMetaV1 { LedgerEntryChanges txChanges; // tx level changes if any OperationMeta operations<>; // meta for each operation }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV2": { - "description": "TransactionMetaV2 is an XDR Struct defined as:\n\n```text struct TransactionMetaV2 { LedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV3": { - "description": "TransactionMetaV3 is an XDR Struct defined as:\n\n```text struct TransactionMetaV3 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMeta* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions). }; ```", - "type": "object", - "required": [ - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMeta" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV4": { - "description": "TransactionMetaV4 is an XDR Struct defined as:\n\n```text struct TransactionMetaV4 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMetaV2 operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMetaV2* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions).\n\nTransactionEvent events<>; // Used for transaction-level events (like fee payment) DiagnosticEvent diagnosticEvents<>; // Used for all diagnostic information }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMetaV2" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMetaV2" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionResult": { - "description": "TransactionResult is an XDR Struct defined as:\n\n```text struct TransactionResult { int64 feeCharged; // actual fee charged for the transaction\n\nunion switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/TransactionResultResult" - } - } - }, - "TransactionResultExt": { - "description": "TransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionResultMeta": { - "description": "TransactionResultMeta is an XDR Struct defined as:\n\n```text struct TransactionResultMeta { TransactionResultPair result; LedgerEntryChanges feeProcessing; TransactionMeta txApplyProcessing; }; ```", - "type": "object", - "required": [ - "fee_processing", - "result", - "tx_apply_processing" - ], - "properties": { - "fee_processing": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "result": { - "$ref": "#/definitions/TransactionResultPair" - }, - "tx_apply_processing": { - "$ref": "#/definitions/TransactionMeta" - } - } - }, - "TransactionResultPair": { - "description": "TransactionResultPair is an XDR Struct defined as:\n\n```text struct TransactionResultPair { Hash transactionHash; TransactionResult result; // result for the transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/TransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionResultResult": { - "description": "TransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_success" - ], - "properties": { - "tx_fee_bump_inner_success": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_failed" - ], - "properties": { - "tx_fee_bump_inner_failed": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "TransactionSetV1": { - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - }, - "UpgradeEntryMeta": { - "description": "UpgradeEntryMeta is an XDR Struct defined as:\n\n```text struct UpgradeEntryMeta { LedgerUpgrade upgrade; LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes", - "upgrade" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "upgrade": { - "$ref": "#/definitions/LedgerUpgrade" - } - } - }, - "UpgradeType": { - "description": "UpgradeType is an XDR Typedef defined as:\n\n```text typedef opaque UpgradeType<128>; ```", - "type": "string", - "maxLength": 256, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerCloseMetaV2.json b/xdr-json/next/LedgerCloseMetaV2.json deleted file mode 100644 index 4c6e9e7d..00000000 --- a/xdr-json/next/LedgerCloseMetaV2.json +++ /dev/null @@ -1,7476 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerCloseMetaV2", - "description": "LedgerCloseMetaV2 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaV2 { LedgerCloseMetaExt ext;\n\nLedgerHeaderHistoryEntry ledgerHeader;\n\nGeneralizedTransactionSet txSet;\n\n// NB: transactions are sorted in apply order here // fees for all transactions are processed first // followed by applying transactions TransactionResultMetaV1 txProcessing<>;\n\n// upgrades are applied last UpgradeEntryMeta upgradesProcessing<>;\n\n// other misc information attached to the ledger close SCPHistoryEntry scpInfo<>;\n\n// Size in bytes of live Soroban state, to support downstream // systems calculating storage fees correctly. uint64 totalByteSizeOfLiveSorobanState;\n\n// TTL and data/code keys that have been evicted at this ledger. LedgerKey evictedKeys<>; }; ```", - "type": "object", - "required": [ - "evicted_keys", - "ext", - "ledger_header", - "scp_info", - "total_byte_size_of_live_soroban_state", - "tx_processing", - "tx_set", - "upgrades_processing" - ], - "properties": { - "$schema": { - "type": "string" - }, - "evicted_keys": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/LedgerCloseMetaExt" - }, - "ledger_header": { - "$ref": "#/definitions/LedgerHeaderHistoryEntry" - }, - "scp_info": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpHistoryEntry" - }, - "maxItems": 4294967295 - }, - "total_byte_size_of_live_soroban_state": { - "type": "string" - }, - "tx_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionResultMetaV1" - }, - "maxItems": 4294967295 - }, - "tx_set": { - "$ref": "#/definitions/GeneralizedTransactionSet" - }, - "upgrades_processing": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeEntryMeta" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigUpgradeSetKey": { - "description": "ConfigUpgradeSetKey is an XDR Struct defined as:\n\n```text struct ConfigUpgradeSetKey { ContractID contractID; Hash contentHash; }; ```", - "type": "object", - "required": [ - "content_hash", - "contract_id" - ], - "properties": { - "content_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "contract_id": { - "$ref": "#/definitions/ContractId" - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "DiagnosticEvent": { - "description": "DiagnosticEvent is an XDR Struct defined as:\n\n```text struct DiagnosticEvent { bool inSuccessfulContractCall; ContractEvent event; }; ```", - "type": "object", - "required": [ - "event", - "in_successful_contract_call" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "in_successful_contract_call": { - "type": "boolean" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "GeneralizedTransactionSet": { - "description": "GeneralizedTransactionSet is an XDR Union defined as:\n\n```text union GeneralizedTransactionSet switch (int v) { // We consider the legacy TransactionSet to be v0. case 1: TransactionSetV1 v1TxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionSetV1" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InnerTransactionResult": { - "description": "InnerTransactionResult is an XDR Struct defined as:\n\n```text struct InnerTransactionResult { // Always 0. Here for binary compatibility. int64 feeCharged;\n\nunion switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/InnerTransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResultResult" - } - } - }, - "InnerTransactionResultExt": { - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "InnerTransactionResultPair": { - "description": "InnerTransactionResultPair is an XDR Struct defined as:\n\n```text struct InnerTransactionResultPair { Hash transactionHash; // hash of the inner transaction InnerTransactionResult result; // result for the inner transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/InnerTransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "InnerTransactionResultResult": { - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerCloseMetaExt": { - "description": "LedgerCloseMetaExt is an XDR Union defined as:\n\n```text union LedgerCloseMetaExt switch (int v) { case 0: void; case 1: LedgerCloseMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerCloseMetaExtV1" - } - } - } - ] - }, - "LedgerCloseMetaExtV1": { - "description": "LedgerCloseMetaExtV1 is an XDR Struct defined as:\n\n```text struct LedgerCloseMetaExtV1 { ExtensionPoint ext; int64 sorobanFeeWrite1KB; }; ```", - "type": "object", - "required": [ - "ext", - "soroban_fee_write1_kb" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "soroban_fee_write1_kb": { - "type": "string" - } - } - }, - "LedgerCloseValueSignature": { - "description": "LedgerCloseValueSignature is an XDR Struct defined as:\n\n```text struct LedgerCloseValueSignature { NodeID nodeID; // which node introduced the value Signature signature; // nodeID's signature }; ```", - "type": "object", - "required": [ - "node_id", - "signature" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerHeader": { - "description": "LedgerHeader is an XDR Struct defined as:\n\n```text struct LedgerHeader { uint32 ledgerVersion; // the protocol version of the ledger Hash previousLedgerHash; // hash of the previous ledger header StellarValue scpValue; // what consensus agreed to Hash txSetResultHash; // the TransactionResultSet that led to this ledger Hash bucketListHash; // hash of the ledger state\n\nuint32 ledgerSeq; // sequence number of this ledger\n\nint64 totalCoins; // total number of stroops in existence. // 10,000,000 stroops in 1 XLM\n\nint64 feePool; // fees burned since last inflation run uint32 inflationSeq; // inflation sequence number\n\nuint64 idPool; // last used global ID, used for generating objects\n\nuint32 baseFee; // base fee per operation in stroops uint32 baseReserve; // account base reserve in stroops\n\nuint32 maxTxSetSize; // maximum size a transaction set can be\n\nHash skipList[4]; // hashes of ledgers in the past. allows you to jump back // in time without walking the chain back ledger by ledger // each slot contains the oldest ledger that is mod of // either 50 5000 50000 or 500000 depending on index // skipList[0] mod(50), skipList[1] mod(5000), etc\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "base_fee", - "base_reserve", - "bucket_list_hash", - "ext", - "fee_pool", - "id_pool", - "inflation_seq", - "ledger_seq", - "ledger_version", - "max_tx_set_size", - "previous_ledger_hash", - "scp_value", - "skip_list", - "total_coins", - "tx_set_result_hash" - ], - "properties": { - "base_fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "base_reserve": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "bucket_list_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/LedgerHeaderExt" - }, - "fee_pool": { - "type": "string" - }, - "id_pool": { - "type": "string" - }, - "inflation_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "scp_value": { - "$ref": "#/definitions/StellarValue" - }, - "skip_list": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4, - "minItems": 4 - }, - "total_coins": { - "type": "string" - }, - "tx_set_result_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerHeaderExt": { - "description": "LedgerHeaderExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerHeaderExtensionV1" - } - } - } - ] - }, - "LedgerHeaderExtensionV1": { - "description": "LedgerHeaderExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerHeaderExtensionV1 { uint32 flags; // LedgerHeaderFlags\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerHeaderExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerHeaderExtensionV1Ext": { - "description": "LedgerHeaderExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerHeaderHistoryEntry": { - "description": "LedgerHeaderHistoryEntry is an XDR Struct defined as:\n\n```text struct LedgerHeaderHistoryEntry { Hash hash; LedgerHeader header;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "hash", - "header" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerHeaderHistoryEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "header": { - "$ref": "#/definitions/LedgerHeader" - } - } - }, - "LedgerHeaderHistoryEntryExt": { - "description": "LedgerHeaderHistoryEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerScpMessages": { - "description": "LedgerScpMessages is an XDR Struct defined as:\n\n```text struct LedgerSCPMessages { uint32 ledgerSeq; SCPEnvelope messages<>; }; ```", - "type": "object", - "required": [ - "ledger_seq", - "messages" - ], - "properties": { - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerUpgrade": { - "description": "LedgerUpgrade is an XDR Union defined as:\n\n```text union LedgerUpgrade switch (LedgerUpgradeType type) { case LEDGER_UPGRADE_VERSION: uint32 newLedgerVersion; // update ledgerVersion case LEDGER_UPGRADE_BASE_FEE: uint32 newBaseFee; // update baseFee case LEDGER_UPGRADE_MAX_TX_SET_SIZE: uint32 newMaxTxSetSize; // update maxTxSetSize case LEDGER_UPGRADE_BASE_RESERVE: uint32 newBaseReserve; // update baseReserve case LEDGER_UPGRADE_FLAGS: uint32 newFlags; // update flags case LEDGER_UPGRADE_CONFIG: // Update arbitrary `ConfigSetting` entries identified by the key. ConfigUpgradeSetKey newConfig; case LEDGER_UPGRADE_MAX_SOROBAN_TX_SET_SIZE: // Update ConfigSettingContractExecutionLanesV0.ledgerMaxTxCount without // using `LEDGER_UPGRADE_CONFIG`. uint32 newMaxSorobanTxSetSize; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "base_fee" - ], - "properties": { - "base_fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "max_tx_set_size" - ], - "properties": { - "max_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "base_reserve" - ], - "properties": { - "base_reserve": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "flags" - ], - "properties": { - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "config" - ], - "properties": { - "config": { - "$ref": "#/definitions/ConfigUpgradeSetKey" - } - } - }, - { - "type": "object", - "required": [ - "max_soroban_tx_set_size" - ], - "properties": { - "max_soroban_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - } - ] - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "NodeId": { - "type": "string" - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "OperationMeta": { - "description": "OperationMeta is an XDR Struct defined as:\n\n```text struct OperationMeta { LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "OperationMetaV2": { - "description": "OperationMetaV2 is an XDR Struct defined as:\n\n```text struct OperationMetaV2 { ExtensionPoint ext;\n\nLedgerEntryChanges changes;\n\nContractEvent events<>; }; ```", - "type": "object", - "required": [ - "changes", - "events", - "ext" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpEnvelope": { - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - } - }, - "ScpHistoryEntry": { - "description": "ScpHistoryEntry is an XDR Union defined as:\n\n```text union SCPHistoryEntry switch (int v) { case 0: SCPHistoryEntryV0 v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ScpHistoryEntryV0" - } - } - } - ] - }, - "ScpHistoryEntryV0": { - "description": "ScpHistoryEntryV0 is an XDR Struct defined as:\n\n```text struct SCPHistoryEntryV0 { SCPQuorumSet quorumSets<>; // additional quorum sets used by ledgerMessages LedgerSCPMessages ledgerMessages; }; ```", - "type": "object", - "required": [ - "ledger_messages", - "quorum_sets" - ], - "properties": { - "ledger_messages": { - "$ref": "#/definitions/LedgerScpMessages" - }, - "quorum_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpQuorumSet": { - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "SorobanTransactionMeta": { - "description": "SorobanTransactionMeta is an XDR Struct defined as:\n\n```text struct SorobanTransactionMeta { SorobanTransactionMetaExt ext;\n\nContractEvent events<>; // custom events populated by the // contracts themselves. SCVal returnValue; // return value of the host fn invocation\n\n// Diagnostics events that are not hashed. // This will contain all contract and diagnostic events. Even ones // that were emitted in a failed contract call. DiagnosticEvent diagnosticEvents<>; }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "return_value" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "$ref": "#/definitions/ScVal" - } - } - }, - "SorobanTransactionMetaExt": { - "description": "SorobanTransactionMetaExt is an XDR Union defined as:\n\n```text union SorobanTransactionMetaExt switch (int v) { case 0: void; case 1: SorobanTransactionMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionMetaExtV1" - } - } - } - ] - }, - "SorobanTransactionMetaExtV1": { - "description": "SorobanTransactionMetaExtV1 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaExtV1 { ExtensionPoint ext;\n\n// The following are the components of the overall Soroban resource fee // charged for the transaction. // The following relation holds: // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` // where `resourceFeeCharged` is the overall fee charged for the // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` // i.e.we never charge more than the declared resource fee. // The inclusion fee for charged the Soroban transaction can be found using // the following equation: // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.\n\n// Total amount (in stroops) that has been charged for non-refundable // Soroban resources. // Non-refundable resources are charged based on the usage declared in // the transaction envelope (such as `instructions`, `readBytes` etc.) and // is charged regardless of the success of the transaction. int64 totalNonRefundableResourceFeeCharged; // Total amount (in stroops) that has been charged for refundable // Soroban resource fees. // Currently this comprises the rent fee (`rentFeeCharged`) and the // fee for the events and return value. // Refundable resources are charged based on the actual resources usage. // Since currently refundable resources are only used for the successful // transactions, this will be `0` for failed transactions. int64 totalRefundableResourceFeeCharged; // Amount (in stroops) that has been charged for rent. // This is a part of `totalNonRefundableResourceFeeCharged`. int64 rentFeeCharged; }; ```", - "type": "object", - "required": [ - "ext", - "rent_fee_charged", - "total_non_refundable_resource_fee_charged", - "total_refundable_resource_fee_charged" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "rent_fee_charged": { - "type": "string" - }, - "total_non_refundable_resource_fee_charged": { - "type": "string" - }, - "total_refundable_resource_fee_charged": { - "type": "string" - } - } - }, - "SorobanTransactionMetaV2": { - "description": "SorobanTransactionMetaV2 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaV2 { SorobanTransactionMetaExt ext;\n\nSCVal* returnValue; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "anyOf": [ - { - "$ref": "#/definitions/ScVal" - }, - { - "type": "null" - } - ] - } - } - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "StellarValue": { - "description": "StellarValue is an XDR Struct defined as:\n\n```text struct StellarValue { Hash txSetHash; // transaction set to apply to previous ledger TimePoint closeTime; // network close time\n\n// upgrades to apply to the previous ledger (usually empty) // this is a vector of encoded 'LedgerUpgrade' so that nodes can drop // unknown steps during consensus if needed. // see notes below on 'LedgerUpgrade' for more detail // max size is dictated by number of upgrade types (+ room for future) UpgradeType upgrades<6>;\n\n// reserved for future use union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ext; }; ```", - "type": "object", - "required": [ - "close_time", - "ext", - "tx_set_hash", - "upgrades" - ], - "properties": { - "close_time": { - "$ref": "#/definitions/TimePoint" - }, - "ext": { - "$ref": "#/definitions/StellarValueExt" - }, - "tx_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "upgrades": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeType" - }, - "maxItems": 6 - } - } - }, - "StellarValueExt": { - "description": "StellarValueExt is an XDR NestedUnion defined as:\n\n```text union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "basic" - ] - }, - { - "type": "object", - "required": [ - "signed" - ], - "properties": { - "signed": { - "$ref": "#/definitions/LedgerCloseValueSignature" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionEvent": { - "description": "TransactionEvent is an XDR Struct defined as:\n\n```text struct TransactionEvent { TransactionEventStage stage; // Stage at which an event has occurred. ContractEvent event; // The contract event that has occurred. }; ```", - "type": "object", - "required": [ - "event", - "stage" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "stage": { - "$ref": "#/definitions/TransactionEventStage" - } - } - }, - "TransactionEventStage": { - "description": "TransactionEventStage is an XDR Enum defined as:\n\n```text enum TransactionEventStage { // The event has happened before any one of the transactions has its // operations applied. TRANSACTION_EVENT_STAGE_BEFORE_ALL_TXS = 0, // The event has happened immediately after operations of the transaction // have been applied. TRANSACTION_EVENT_STAGE_AFTER_TX = 1, // The event has happened after every transaction had its operations // applied. TRANSACTION_EVENT_STAGE_AFTER_ALL_TXS = 2 }; ```", - "type": "string", - "enum": [ - "before_all_txs", - "after_tx", - "after_all_txs" - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionMeta": { - "description": "TransactionMeta is an XDR Union defined as:\n\n```text union TransactionMeta switch (int v) { case 0: OperationMeta operations<>; case 1: TransactionMetaV1 v1; case 2: TransactionMetaV2 v2; case 3: TransactionMetaV3 v3; case 4: TransactionMetaV4 v4; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionMetaV1" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TransactionMetaV2" - } - } - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/TransactionMetaV3" - } - } - }, - { - "type": "object", - "required": [ - "v4" - ], - "properties": { - "v4": { - "$ref": "#/definitions/TransactionMetaV4" - } - } - } - ] - }, - "TransactionMetaV1": { - "description": "TransactionMetaV1 is an XDR Struct defined as:\n\n```text struct TransactionMetaV1 { LedgerEntryChanges txChanges; // tx level changes if any OperationMeta operations<>; // meta for each operation }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV2": { - "description": "TransactionMetaV2 is an XDR Struct defined as:\n\n```text struct TransactionMetaV2 { LedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV3": { - "description": "TransactionMetaV3 is an XDR Struct defined as:\n\n```text struct TransactionMetaV3 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMeta* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions). }; ```", - "type": "object", - "required": [ - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMeta" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV4": { - "description": "TransactionMetaV4 is an XDR Struct defined as:\n\n```text struct TransactionMetaV4 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMetaV2 operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMetaV2* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions).\n\nTransactionEvent events<>; // Used for transaction-level events (like fee payment) DiagnosticEvent diagnosticEvents<>; // Used for all diagnostic information }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMetaV2" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMetaV2" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionResult": { - "description": "TransactionResult is an XDR Struct defined as:\n\n```text struct TransactionResult { int64 feeCharged; // actual fee charged for the transaction\n\nunion switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/TransactionResultResult" - } - } - }, - "TransactionResultExt": { - "description": "TransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionResultMetaV1": { - "description": "TransactionResultMetaV1 is an XDR Struct defined as:\n\n```text struct TransactionResultMetaV1 { ExtensionPoint ext;\n\nTransactionResultPair result; LedgerEntryChanges feeProcessing; TransactionMeta txApplyProcessing;\n\nLedgerEntryChanges postTxApplyFeeProcessing; }; ```", - "type": "object", - "required": [ - "ext", - "fee_processing", - "post_tx_apply_fee_processing", - "result", - "tx_apply_processing" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "fee_processing": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "post_tx_apply_fee_processing": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "result": { - "$ref": "#/definitions/TransactionResultPair" - }, - "tx_apply_processing": { - "$ref": "#/definitions/TransactionMeta" - } - } - }, - "TransactionResultPair": { - "description": "TransactionResultPair is an XDR Struct defined as:\n\n```text struct TransactionResultPair { Hash transactionHash; TransactionResult result; // result for the transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/TransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionResultResult": { - "description": "TransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_success" - ], - "properties": { - "tx_fee_bump_inner_success": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_failed" - ], - "properties": { - "tx_fee_bump_inner_failed": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "TransactionSetV1": { - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - }, - "UpgradeEntryMeta": { - "description": "UpgradeEntryMeta is an XDR Struct defined as:\n\n```text struct UpgradeEntryMeta { LedgerUpgrade upgrade; LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes", - "upgrade" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "upgrade": { - "$ref": "#/definitions/LedgerUpgrade" - } - } - }, - "UpgradeType": { - "description": "UpgradeType is an XDR Typedef defined as:\n\n```text typedef opaque UpgradeType<128>; ```", - "type": "string", - "maxLength": 256, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerCloseValueSignature.json b/xdr-json/next/LedgerCloseValueSignature.json deleted file mode 100644 index b0adafd2..00000000 --- a/xdr-json/next/LedgerCloseValueSignature.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerCloseValueSignature", - "description": "LedgerCloseValueSignature is an XDR Struct defined as:\n\n```text struct LedgerCloseValueSignature { NodeID nodeID; // which node introduced the value Signature signature; // nodeID's signature }; ```", - "type": "object", - "required": [ - "node_id", - "signature" - ], - "properties": { - "$schema": { - "type": "string" - }, - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - }, - "unevaluatedProperties": false, - "definitions": { - "NodeId": { - "type": "string" - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerEntry.json b/xdr-json/next/LedgerEntry.json deleted file mode 100644 index f7dec1d8..00000000 --- a/xdr-json/next/LedgerEntry.json +++ /dev/null @@ -1,2504 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerEntry", - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "$schema": { - "type": "string" - }, - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerEntryChange.json b/xdr-json/next/LedgerEntryChange.json deleted file mode 100644 index c5e2928e..00000000 --- a/xdr-json/next/LedgerEntryChange.json +++ /dev/null @@ -1,2856 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerEntryChange", - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerEntryChangeType.json b/xdr-json/next/LedgerEntryChangeType.json deleted file mode 100644 index 8104fcb4..00000000 --- a/xdr-json/next/LedgerEntryChangeType.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerEntryChangeType", - "description": "LedgerEntryChangeType is an XDR Enum defined as:\n\n```text enum LedgerEntryChangeType { LEDGER_ENTRY_CREATED = 0, // entry was added to the ledger LEDGER_ENTRY_UPDATED = 1, // entry was modified in the ledger LEDGER_ENTRY_REMOVED = 2, // entry was removed from the ledger LEDGER_ENTRY_STATE = 3, // value of the entry LEDGER_ENTRY_RESTORED = 4 // archived entry was restored in the ledger }; ```", - "type": "string", - "enum": [ - "created", - "updated", - "removed", - "state", - "restored" - ] -} \ No newline at end of file diff --git a/xdr-json/next/LedgerEntryChanges.json b/xdr-json/next/LedgerEntryChanges.json deleted file mode 100644 index 355260ab..00000000 --- a/xdr-json/next/LedgerEntryChanges.json +++ /dev/null @@ -1,2858 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerEntryChanges", - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerEntryData.json b/xdr-json/next/LedgerEntryData.json deleted file mode 100644 index c1cfc2d7..00000000 --- a/xdr-json/next/LedgerEntryData.json +++ /dev/null @@ -1,2439 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerEntryData", - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerEntryExt.json b/xdr-json/next/LedgerEntryExt.json deleted file mode 100644 index 6b04465a..00000000 --- a/xdr-json/next/LedgerEntryExt.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerEntryExt", - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerEntryExtensionV1.json b/xdr-json/next/LedgerEntryExtensionV1.json deleted file mode 100644 index 6562f305..00000000 --- a/xdr-json/next/LedgerEntryExtensionV1.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerEntryExtensionV1", - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerEntryExtensionV1Ext.json b/xdr-json/next/LedgerEntryExtensionV1Ext.json deleted file mode 100644 index 5c10eafe..00000000 --- a/xdr-json/next/LedgerEntryExtensionV1Ext.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerEntryExtensionV1Ext", - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/LedgerEntryType.json b/xdr-json/next/LedgerEntryType.json deleted file mode 100644 index a8c51447..00000000 --- a/xdr-json/next/LedgerEntryType.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerEntryType", - "description": "LedgerEntryType is an XDR Enum defined as:\n\n```text enum LedgerEntryType { ACCOUNT = 0, TRUSTLINE = 1, OFFER = 2, DATA = 3, CLAIMABLE_BALANCE = 4, LIQUIDITY_POOL = 5, CONTRACT_DATA = 6, CONTRACT_CODE = 7, CONFIG_SETTING = 8, TTL = 9 }; ```", - "type": "string", - "enum": [ - "account", - "trustline", - "offer", - "data", - "claimable_balance", - "liquidity_pool", - "contract_data", - "contract_code", - "config_setting", - "ttl" - ] -} \ No newline at end of file diff --git a/xdr-json/next/LedgerFootprint.json b/xdr-json/next/LedgerFootprint.json deleted file mode 100644 index 125732c7..00000000 --- a/xdr-json/next/LedgerFootprint.json +++ /dev/null @@ -1,948 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerFootprint", - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "$schema": { - "type": "string" - }, - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "PoolId": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerHeader.json b/xdr-json/next/LedgerHeader.json deleted file mode 100644 index 290034c1..00000000 --- a/xdr-json/next/LedgerHeader.json +++ /dev/null @@ -1,247 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerHeader", - "description": "LedgerHeader is an XDR Struct defined as:\n\n```text struct LedgerHeader { uint32 ledgerVersion; // the protocol version of the ledger Hash previousLedgerHash; // hash of the previous ledger header StellarValue scpValue; // what consensus agreed to Hash txSetResultHash; // the TransactionResultSet that led to this ledger Hash bucketListHash; // hash of the ledger state\n\nuint32 ledgerSeq; // sequence number of this ledger\n\nint64 totalCoins; // total number of stroops in existence. // 10,000,000 stroops in 1 XLM\n\nint64 feePool; // fees burned since last inflation run uint32 inflationSeq; // inflation sequence number\n\nuint64 idPool; // last used global ID, used for generating objects\n\nuint32 baseFee; // base fee per operation in stroops uint32 baseReserve; // account base reserve in stroops\n\nuint32 maxTxSetSize; // maximum size a transaction set can be\n\nHash skipList[4]; // hashes of ledgers in the past. allows you to jump back // in time without walking the chain back ledger by ledger // each slot contains the oldest ledger that is mod of // either 50 5000 50000 or 500000 depending on index // skipList[0] mod(50), skipList[1] mod(5000), etc\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "base_fee", - "base_reserve", - "bucket_list_hash", - "ext", - "fee_pool", - "id_pool", - "inflation_seq", - "ledger_seq", - "ledger_version", - "max_tx_set_size", - "previous_ledger_hash", - "scp_value", - "skip_list", - "total_coins", - "tx_set_result_hash" - ], - "properties": { - "$schema": { - "type": "string" - }, - "base_fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "base_reserve": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "bucket_list_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/LedgerHeaderExt" - }, - "fee_pool": { - "type": "string" - }, - "id_pool": { - "type": "string" - }, - "inflation_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "scp_value": { - "$ref": "#/definitions/StellarValue" - }, - "skip_list": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4, - "minItems": 4 - }, - "total_coins": { - "type": "string" - }, - "tx_set_result_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - }, - "unevaluatedProperties": false, - "definitions": { - "LedgerCloseValueSignature": { - "description": "LedgerCloseValueSignature is an XDR Struct defined as:\n\n```text struct LedgerCloseValueSignature { NodeID nodeID; // which node introduced the value Signature signature; // nodeID's signature }; ```", - "type": "object", - "required": [ - "node_id", - "signature" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "LedgerHeaderExt": { - "description": "LedgerHeaderExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerHeaderExtensionV1" - } - } - } - ] - }, - "LedgerHeaderExtensionV1": { - "description": "LedgerHeaderExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerHeaderExtensionV1 { uint32 flags; // LedgerHeaderFlags\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerHeaderExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerHeaderExtensionV1Ext": { - "description": "LedgerHeaderExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "NodeId": { - "type": "string" - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "StellarValue": { - "description": "StellarValue is an XDR Struct defined as:\n\n```text struct StellarValue { Hash txSetHash; // transaction set to apply to previous ledger TimePoint closeTime; // network close time\n\n// upgrades to apply to the previous ledger (usually empty) // this is a vector of encoded 'LedgerUpgrade' so that nodes can drop // unknown steps during consensus if needed. // see notes below on 'LedgerUpgrade' for more detail // max size is dictated by number of upgrade types (+ room for future) UpgradeType upgrades<6>;\n\n// reserved for future use union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ext; }; ```", - "type": "object", - "required": [ - "close_time", - "ext", - "tx_set_hash", - "upgrades" - ], - "properties": { - "close_time": { - "$ref": "#/definitions/TimePoint" - }, - "ext": { - "$ref": "#/definitions/StellarValueExt" - }, - "tx_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "upgrades": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeType" - }, - "maxItems": 6 - } - } - }, - "StellarValueExt": { - "description": "StellarValueExt is an XDR NestedUnion defined as:\n\n```text union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "basic" - ] - }, - { - "type": "object", - "required": [ - "signed" - ], - "properties": { - "signed": { - "$ref": "#/definitions/LedgerCloseValueSignature" - } - } - } - ] - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UpgradeType": { - "description": "UpgradeType is an XDR Typedef defined as:\n\n```text typedef opaque UpgradeType<128>; ```", - "type": "string", - "maxLength": 256, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerHeaderExt.json b/xdr-json/next/LedgerHeaderExt.json deleted file mode 100644 index de9ea4ec..00000000 --- a/xdr-json/next/LedgerHeaderExt.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerHeaderExt", - "description": "LedgerHeaderExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerHeaderExtensionV1" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "LedgerHeaderExtensionV1": { - "description": "LedgerHeaderExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerHeaderExtensionV1 { uint32 flags; // LedgerHeaderFlags\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerHeaderExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerHeaderExtensionV1Ext": { - "description": "LedgerHeaderExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerHeaderExtensionV1.json b/xdr-json/next/LedgerHeaderExtensionV1.json deleted file mode 100644 index c1f31f5a..00000000 --- a/xdr-json/next/LedgerHeaderExtensionV1.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerHeaderExtensionV1", - "description": "LedgerHeaderExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerHeaderExtensionV1 { uint32 flags; // LedgerHeaderFlags\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/LedgerHeaderExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "LedgerHeaderExtensionV1Ext": { - "description": "LedgerHeaderExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerHeaderExtensionV1Ext.json b/xdr-json/next/LedgerHeaderExtensionV1Ext.json deleted file mode 100644 index 4e4933a4..00000000 --- a/xdr-json/next/LedgerHeaderExtensionV1Ext.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerHeaderExtensionV1Ext", - "description": "LedgerHeaderExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/LedgerHeaderFlags.json b/xdr-json/next/LedgerHeaderFlags.json deleted file mode 100644 index b986085a..00000000 --- a/xdr-json/next/LedgerHeaderFlags.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerHeaderFlags", - "description": "LedgerHeaderFlags is an XDR Enum defined as:\n\n```text enum LedgerHeaderFlags { DISABLE_LIQUIDITY_POOL_TRADING_FLAG = 0x1, DISABLE_LIQUIDITY_POOL_DEPOSIT_FLAG = 0x2, DISABLE_LIQUIDITY_POOL_WITHDRAWAL_FLAG = 0x4 }; ```", - "type": "string", - "enum": [ - "trading_flag", - "deposit_flag", - "withdrawal_flag" - ] -} \ No newline at end of file diff --git a/xdr-json/next/LedgerHeaderHistoryEntry.json b/xdr-json/next/LedgerHeaderHistoryEntry.json deleted file mode 100644 index 3dd6ee27..00000000 --- a/xdr-json/next/LedgerHeaderHistoryEntry.json +++ /dev/null @@ -1,278 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerHeaderHistoryEntry", - "description": "LedgerHeaderHistoryEntry is an XDR Struct defined as:\n\n```text struct LedgerHeaderHistoryEntry { Hash hash; LedgerHeader header;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "hash", - "header" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/LedgerHeaderHistoryEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "header": { - "$ref": "#/definitions/LedgerHeader" - } - }, - "unevaluatedProperties": false, - "definitions": { - "LedgerCloseValueSignature": { - "description": "LedgerCloseValueSignature is an XDR Struct defined as:\n\n```text struct LedgerCloseValueSignature { NodeID nodeID; // which node introduced the value Signature signature; // nodeID's signature }; ```", - "type": "object", - "required": [ - "node_id", - "signature" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "LedgerHeader": { - "description": "LedgerHeader is an XDR Struct defined as:\n\n```text struct LedgerHeader { uint32 ledgerVersion; // the protocol version of the ledger Hash previousLedgerHash; // hash of the previous ledger header StellarValue scpValue; // what consensus agreed to Hash txSetResultHash; // the TransactionResultSet that led to this ledger Hash bucketListHash; // hash of the ledger state\n\nuint32 ledgerSeq; // sequence number of this ledger\n\nint64 totalCoins; // total number of stroops in existence. // 10,000,000 stroops in 1 XLM\n\nint64 feePool; // fees burned since last inflation run uint32 inflationSeq; // inflation sequence number\n\nuint64 idPool; // last used global ID, used for generating objects\n\nuint32 baseFee; // base fee per operation in stroops uint32 baseReserve; // account base reserve in stroops\n\nuint32 maxTxSetSize; // maximum size a transaction set can be\n\nHash skipList[4]; // hashes of ledgers in the past. allows you to jump back // in time without walking the chain back ledger by ledger // each slot contains the oldest ledger that is mod of // either 50 5000 50000 or 500000 depending on index // skipList[0] mod(50), skipList[1] mod(5000), etc\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "base_fee", - "base_reserve", - "bucket_list_hash", - "ext", - "fee_pool", - "id_pool", - "inflation_seq", - "ledger_seq", - "ledger_version", - "max_tx_set_size", - "previous_ledger_hash", - "scp_value", - "skip_list", - "total_coins", - "tx_set_result_hash" - ], - "properties": { - "base_fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "base_reserve": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "bucket_list_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/LedgerHeaderExt" - }, - "fee_pool": { - "type": "string" - }, - "id_pool": { - "type": "string" - }, - "inflation_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "scp_value": { - "$ref": "#/definitions/StellarValue" - }, - "skip_list": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4, - "minItems": 4 - }, - "total_coins": { - "type": "string" - }, - "tx_set_result_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerHeaderExt": { - "description": "LedgerHeaderExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerHeaderExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerHeaderExtensionV1" - } - } - } - ] - }, - "LedgerHeaderExtensionV1": { - "description": "LedgerHeaderExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerHeaderExtensionV1 { uint32 flags; // LedgerHeaderFlags\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerHeaderExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerHeaderExtensionV1Ext": { - "description": "LedgerHeaderExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerHeaderHistoryEntryExt": { - "description": "LedgerHeaderHistoryEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "NodeId": { - "type": "string" - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "StellarValue": { - "description": "StellarValue is an XDR Struct defined as:\n\n```text struct StellarValue { Hash txSetHash; // transaction set to apply to previous ledger TimePoint closeTime; // network close time\n\n// upgrades to apply to the previous ledger (usually empty) // this is a vector of encoded 'LedgerUpgrade' so that nodes can drop // unknown steps during consensus if needed. // see notes below on 'LedgerUpgrade' for more detail // max size is dictated by number of upgrade types (+ room for future) UpgradeType upgrades<6>;\n\n// reserved for future use union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ext; }; ```", - "type": "object", - "required": [ - "close_time", - "ext", - "tx_set_hash", - "upgrades" - ], - "properties": { - "close_time": { - "$ref": "#/definitions/TimePoint" - }, - "ext": { - "$ref": "#/definitions/StellarValueExt" - }, - "tx_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "upgrades": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeType" - }, - "maxItems": 6 - } - } - }, - "StellarValueExt": { - "description": "StellarValueExt is an XDR NestedUnion defined as:\n\n```text union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "basic" - ] - }, - { - "type": "object", - "required": [ - "signed" - ], - "properties": { - "signed": { - "$ref": "#/definitions/LedgerCloseValueSignature" - } - } - } - ] - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UpgradeType": { - "description": "UpgradeType is an XDR Typedef defined as:\n\n```text typedef opaque UpgradeType<128>; ```", - "type": "string", - "maxLength": 256, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerHeaderHistoryEntryExt.json b/xdr-json/next/LedgerHeaderHistoryEntryExt.json deleted file mode 100644 index 5b1d33e5..00000000 --- a/xdr-json/next/LedgerHeaderHistoryEntryExt.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerHeaderHistoryEntryExt", - "description": "LedgerHeaderHistoryEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/LedgerKey.json b/xdr-json/next/LedgerKey.json deleted file mode 100644 index 3d7bd0b9..00000000 --- a/xdr-json/next/LedgerKey.json +++ /dev/null @@ -1,926 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerKey", - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "PoolId": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerKeyAccount.json b/xdr-json/next/LedgerKeyAccount.json deleted file mode 100644 index e4238bb8..00000000 --- a/xdr-json/next/LedgerKeyAccount.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerKeyAccount", - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "account_id": { - "$ref": "#/definitions/AccountId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerKeyClaimableBalance.json b/xdr-json/next/LedgerKeyClaimableBalance.json deleted file mode 100644 index 8f0c19a4..00000000 --- a/xdr-json/next/LedgerKeyClaimableBalance.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerKeyClaimableBalance", - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ClaimableBalanceId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerKeyConfigSetting.json b/xdr-json/next/LedgerKeyConfigSetting.json deleted file mode 100644 index ccbe5fb6..00000000 --- a/xdr-json/next/LedgerKeyConfigSetting.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerKeyConfigSetting", - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerKeyContractCode.json b/xdr-json/next/LedgerKeyContractCode.json deleted file mode 100644 index 02de840d..00000000 --- a/xdr-json/next/LedgerKeyContractCode.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerKeyContractCode", - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "$schema": { - "type": "string" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/LedgerKeyContractData.json b/xdr-json/next/LedgerKeyContractData.json deleted file mode 100644 index 2fce1a6c..00000000 --- a/xdr-json/next/LedgerKeyContractData.json +++ /dev/null @@ -1,555 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerKeyContractData", - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "$schema": { - "type": "string" - }, - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerKeyData.json b/xdr-json/next/LedgerKeyData.json deleted file mode 100644 index 0f8c2268..00000000 --- a/xdr-json/next/LedgerKeyData.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerKeyData", - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "$schema": { - "type": "string" - }, - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerKeyLiquidityPool.json b/xdr-json/next/LedgerKeyLiquidityPool.json deleted file mode 100644 index a10baa4a..00000000 --- a/xdr-json/next/LedgerKeyLiquidityPool.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerKeyLiquidityPool", - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "PoolId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerKeyOffer.json b/xdr-json/next/LedgerKeyOffer.json deleted file mode 100644 index b8155277..00000000 --- a/xdr-json/next/LedgerKeyOffer.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerKeyOffer", - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerKeyTrustLine.json b/xdr-json/next/LedgerKeyTrustLine.json deleted file mode 100644 index 0e050254..00000000 --- a/xdr-json/next/LedgerKeyTrustLine.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerKeyTrustLine", - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "$schema": { - "type": "string" - }, - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "PoolId": { - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerKeyTtl.json b/xdr-json/next/LedgerKeyTtl.json deleted file mode 100644 index db5f3d55..00000000 --- a/xdr-json/next/LedgerKeyTtl.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerKeyTtl", - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "$schema": { - "type": "string" - }, - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/LedgerScpMessages.json b/xdr-json/next/LedgerScpMessages.json deleted file mode 100644 index 03224d08..00000000 --- a/xdr-json/next/LedgerScpMessages.json +++ /dev/null @@ -1,297 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerScpMessages", - "description": "LedgerScpMessages is an XDR Struct defined as:\n\n```text struct LedgerSCPMessages { uint32 ledgerSeq; SCPEnvelope messages<>; }; ```", - "type": "object", - "required": [ - "ledger_seq", - "messages" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpEnvelope" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "NodeId": { - "type": "string" - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpEnvelope": { - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerUpgrade.json b/xdr-json/next/LedgerUpgrade.json deleted file mode 100644 index cc823408..00000000 --- a/xdr-json/next/LedgerUpgrade.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerUpgrade", - "description": "LedgerUpgrade is an XDR Union defined as:\n\n```text union LedgerUpgrade switch (LedgerUpgradeType type) { case LEDGER_UPGRADE_VERSION: uint32 newLedgerVersion; // update ledgerVersion case LEDGER_UPGRADE_BASE_FEE: uint32 newBaseFee; // update baseFee case LEDGER_UPGRADE_MAX_TX_SET_SIZE: uint32 newMaxTxSetSize; // update maxTxSetSize case LEDGER_UPGRADE_BASE_RESERVE: uint32 newBaseReserve; // update baseReserve case LEDGER_UPGRADE_FLAGS: uint32 newFlags; // update flags case LEDGER_UPGRADE_CONFIG: // Update arbitrary `ConfigSetting` entries identified by the key. ConfigUpgradeSetKey newConfig; case LEDGER_UPGRADE_MAX_SOROBAN_TX_SET_SIZE: // Update ConfigSettingContractExecutionLanesV0.ledgerMaxTxCount without // using `LEDGER_UPGRADE_CONFIG`. uint32 newMaxSorobanTxSetSize; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "base_fee" - ], - "properties": { - "base_fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "max_tx_set_size" - ], - "properties": { - "max_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "base_reserve" - ], - "properties": { - "base_reserve": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "flags" - ], - "properties": { - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "config" - ], - "properties": { - "config": { - "$ref": "#/definitions/ConfigUpgradeSetKey" - } - } - }, - { - "type": "object", - "required": [ - "max_soroban_tx_set_size" - ], - "properties": { - "max_soroban_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ConfigUpgradeSetKey": { - "description": "ConfigUpgradeSetKey is an XDR Struct defined as:\n\n```text struct ConfigUpgradeSetKey { ContractID contractID; Hash contentHash; }; ```", - "type": "object", - "required": [ - "content_hash", - "contract_id" - ], - "properties": { - "content_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "contract_id": { - "$ref": "#/definitions/ContractId" - } - } - }, - "ContractId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LedgerUpgradeType.json b/xdr-json/next/LedgerUpgradeType.json deleted file mode 100644 index 3f1bd608..00000000 --- a/xdr-json/next/LedgerUpgradeType.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LedgerUpgradeType", - "description": "LedgerUpgradeType is an XDR Enum defined as:\n\n```text enum LedgerUpgradeType { LEDGER_UPGRADE_VERSION = 1, LEDGER_UPGRADE_BASE_FEE = 2, LEDGER_UPGRADE_MAX_TX_SET_SIZE = 3, LEDGER_UPGRADE_BASE_RESERVE = 4, LEDGER_UPGRADE_FLAGS = 5, LEDGER_UPGRADE_CONFIG = 6, LEDGER_UPGRADE_MAX_SOROBAN_TX_SET_SIZE = 7 }; ```", - "type": "string", - "enum": [ - "version", - "base_fee", - "max_tx_set_size", - "base_reserve", - "flags", - "config", - "max_soroban_tx_set_size" - ] -} \ No newline at end of file diff --git a/xdr-json/next/Liabilities.json b/xdr-json/next/Liabilities.json deleted file mode 100644 index e5d3383b..00000000 --- a/xdr-json/next/Liabilities.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Liabilities", - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "$schema": { - "type": "string" - }, - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/LiquidityPoolConstantProductParameters.json b/xdr-json/next/LiquidityPoolConstantProductParameters.json deleted file mode 100644 index 779e94a4..00000000 --- a/xdr-json/next/LiquidityPoolConstantProductParameters.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LiquidityPoolConstantProductParameters", - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "$schema": { - "type": "string" - }, - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LiquidityPoolDepositOp.json b/xdr-json/next/LiquidityPoolDepositOp.json deleted file mode 100644 index 217b8a1b..00000000 --- a/xdr-json/next/LiquidityPoolDepositOp.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LiquidityPoolDepositOp", - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "$schema": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - }, - "unevaluatedProperties": false, - "definitions": { - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LiquidityPoolDepositResult.json b/xdr-json/next/LiquidityPoolDepositResult.json deleted file mode 100644 index 58c27bb6..00000000 --- a/xdr-json/next/LiquidityPoolDepositResult.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LiquidityPoolDepositResult", - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] -} \ No newline at end of file diff --git a/xdr-json/next/LiquidityPoolDepositResultCode.json b/xdr-json/next/LiquidityPoolDepositResultCode.json deleted file mode 100644 index b343652a..00000000 --- a/xdr-json/next/LiquidityPoolDepositResultCode.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LiquidityPoolDepositResultCode", - "description": "LiquidityPoolDepositResultCode is an XDR Enum defined as:\n\n```text enum LiquidityPoolDepositResultCode { // codes considered as \"success\" for the operation LIQUIDITY_POOL_DEPOSIT_SUCCESS = 0,\n\n// codes considered as \"failure\" for the operation LIQUIDITY_POOL_DEPOSIT_MALFORMED = -1, // bad input LIQUIDITY_POOL_DEPOSIT_NO_TRUST = -2, // no trust line for one of the // assets LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED = -3, // not authorized for one of the // assets LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED = -4, // not enough balance for one of // the assets LIQUIDITY_POOL_DEPOSIT_LINE_FULL = -5, // pool share trust line doesn't // have sufficient limit LIQUIDITY_POOL_DEPOSIT_BAD_PRICE = -6, // deposit price outside bounds LIQUIDITY_POOL_DEPOSIT_POOL_FULL = -7, // pool reserves are full LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN = -8 // trustline for one of the // assets is frozen }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] -} \ No newline at end of file diff --git a/xdr-json/next/LiquidityPoolEntry.json b/xdr-json/next/LiquidityPoolEntry.json deleted file mode 100644 index aa73d89c..00000000 --- a/xdr-json/next/LiquidityPoolEntry.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LiquidityPoolEntry", - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "PoolId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LiquidityPoolEntryBody.json b/xdr-json/next/LiquidityPoolEntryBody.json deleted file mode 100644 index 9fc1784e..00000000 --- a/xdr-json/next/LiquidityPoolEntryBody.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LiquidityPoolEntryBody", - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LiquidityPoolEntryConstantProduct.json b/xdr-json/next/LiquidityPoolEntryConstantProduct.json deleted file mode 100644 index 583614d6..00000000 --- a/xdr-json/next/LiquidityPoolEntryConstantProduct.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LiquidityPoolEntryConstantProduct", - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "$schema": { - "type": "string" - }, - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LiquidityPoolParameters.json b/xdr-json/next/LiquidityPoolParameters.json deleted file mode 100644 index 333c494e..00000000 --- a/xdr-json/next/LiquidityPoolParameters.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LiquidityPoolParameters", - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LiquidityPoolType.json b/xdr-json/next/LiquidityPoolType.json deleted file mode 100644 index 6eb47bfe..00000000 --- a/xdr-json/next/LiquidityPoolType.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LiquidityPoolType", - "description": "LiquidityPoolType is an XDR Enum defined as:\n\n```text enum LiquidityPoolType { LIQUIDITY_POOL_CONSTANT_PRODUCT = 0 }; ```", - "type": "string", - "enum": [ - "liquidity_pool_constant_product" - ] -} \ No newline at end of file diff --git a/xdr-json/next/LiquidityPoolWithdrawOp.json b/xdr-json/next/LiquidityPoolWithdrawOp.json deleted file mode 100644 index 4bfbd578..00000000 --- a/xdr-json/next/LiquidityPoolWithdrawOp.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LiquidityPoolWithdrawOp", - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "$schema": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "PoolId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/LiquidityPoolWithdrawResult.json b/xdr-json/next/LiquidityPoolWithdrawResult.json deleted file mode 100644 index d68cd9b0..00000000 --- a/xdr-json/next/LiquidityPoolWithdrawResult.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LiquidityPoolWithdrawResult", - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] -} \ No newline at end of file diff --git a/xdr-json/next/LiquidityPoolWithdrawResultCode.json b/xdr-json/next/LiquidityPoolWithdrawResultCode.json deleted file mode 100644 index b06cc1f0..00000000 --- a/xdr-json/next/LiquidityPoolWithdrawResultCode.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "LiquidityPoolWithdrawResultCode", - "description": "LiquidityPoolWithdrawResultCode is an XDR Enum defined as:\n\n```text enum LiquidityPoolWithdrawResultCode { // codes considered as \"success\" for the operation LIQUIDITY_POOL_WITHDRAW_SUCCESS = 0,\n\n// codes considered as \"failure\" for the operation LIQUIDITY_POOL_WITHDRAW_MALFORMED = -1, // bad input LIQUIDITY_POOL_WITHDRAW_NO_TRUST = -2, // no trust line for one of the // assets LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED = -3, // not enough balance of the // pool share LIQUIDITY_POOL_WITHDRAW_LINE_FULL = -4, // would go above limit for one // of the assets LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM = -5, // didn't withdraw enough LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN = -6 // trustline for one of the // assets is frozen }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ManageBuyOfferOp.json b/xdr-json/next/ManageBuyOfferOp.json deleted file mode 100644 index f4e3a882..00000000 --- a/xdr-json/next/ManageBuyOfferOp.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ManageBuyOfferOp", - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "$schema": { - "type": "string" - }, - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ManageBuyOfferResult.json b/xdr-json/next/ManageBuyOfferResult.json deleted file mode 100644 index d7d0289b..00000000 --- a/xdr-json/next/ManageBuyOfferResult.json +++ /dev/null @@ -1,374 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ManageBuyOfferResult", - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ManageBuyOfferResultCode.json b/xdr-json/next/ManageBuyOfferResultCode.json deleted file mode 100644 index 6e9193be..00000000 --- a/xdr-json/next/ManageBuyOfferResultCode.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ManageBuyOfferResultCode", - "description": "ManageBuyOfferResultCode is an XDR Enum defined as:\n\n```text enum ManageBuyOfferResultCode { // codes considered as \"success\" for the operation MANAGE_BUY_OFFER_SUCCESS = 0,\n\n// codes considered as \"failure\" for the operation MANAGE_BUY_OFFER_MALFORMED = -1, // generated offer would be invalid MANAGE_BUY_OFFER_SELL_NO_TRUST = -2, // no trust line for what we're selling MANAGE_BUY_OFFER_BUY_NO_TRUST = -3, // no trust line for what we're buying MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED = -5, // not authorized to buy MANAGE_BUY_OFFER_LINE_FULL = -6, // can't receive more of what it's buying MANAGE_BUY_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell MANAGE_BUY_OFFER_CROSS_SELF = -8, // would cross an offer from the same user MANAGE_BUY_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling MANAGE_BUY_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying\n\n// update errors MANAGE_BUY_OFFER_NOT_FOUND = -11, // offerID does not match an existing offer\n\nMANAGE_BUY_OFFER_LOW_RESERVE = -12 // not enough funds to create a new Offer }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ManageDataOp.json b/xdr-json/next/ManageDataOp.json deleted file mode 100644 index 0030e09b..00000000 --- a/xdr-json/next/ManageDataOp.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ManageDataOp", - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "$schema": { - "type": "string" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - }, - "unevaluatedProperties": false, - "definitions": { - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ManageDataResult.json b/xdr-json/next/ManageDataResult.json deleted file mode 100644 index 626ad494..00000000 --- a/xdr-json/next/ManageDataResult.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ManageDataResult", - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ManageDataResultCode.json b/xdr-json/next/ManageDataResultCode.json deleted file mode 100644 index 477a1318..00000000 --- a/xdr-json/next/ManageDataResultCode.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ManageDataResultCode", - "description": "ManageDataResultCode is an XDR Enum defined as:\n\n```text enum ManageDataResultCode { // codes considered as \"success\" for the operation MANAGE_DATA_SUCCESS = 0, // codes considered as \"failure\" for the operation MANAGE_DATA_NOT_SUPPORTED_YET = -1, // The network hasn't moved to this protocol change yet MANAGE_DATA_NAME_NOT_FOUND = -2, // Trying to remove a Data Entry that isn't there MANAGE_DATA_LOW_RESERVE = -3, // not enough funds to create a new Data Entry MANAGE_DATA_INVALID_NAME = -4 // Name not a valid string }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ManageOfferEffect.json b/xdr-json/next/ManageOfferEffect.json deleted file mode 100644 index 0f80c28a..00000000 --- a/xdr-json/next/ManageOfferEffect.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ManageOfferEffect", - "description": "ManageOfferEffect is an XDR Enum defined as:\n\n```text enum ManageOfferEffect { MANAGE_OFFER_CREATED = 0, MANAGE_OFFER_UPDATED = 1, MANAGE_OFFER_DELETED = 2 }; ```", - "type": "string", - "enum": [ - "created", - "updated", - "deleted" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ManageOfferSuccessResult.json b/xdr-json/next/ManageOfferSuccessResult.json deleted file mode 100644 index e07e9c75..00000000 --- a/xdr-json/next/ManageOfferSuccessResult.json +++ /dev/null @@ -1,339 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ManageOfferSuccessResult", - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "$schema": { - "type": "string" - }, - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ManageOfferSuccessResultOffer.json b/xdr-json/next/ManageOfferSuccessResultOffer.json deleted file mode 100644 index dd1695bc..00000000 --- a/xdr-json/next/ManageOfferSuccessResultOffer.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ManageOfferSuccessResultOffer", - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ManageSellOfferOp.json b/xdr-json/next/ManageSellOfferOp.json deleted file mode 100644 index 34893e86..00000000 --- a/xdr-json/next/ManageSellOfferOp.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ManageSellOfferOp", - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "$schema": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ManageSellOfferResult.json b/xdr-json/next/ManageSellOfferResult.json deleted file mode 100644 index 2747c74e..00000000 --- a/xdr-json/next/ManageSellOfferResult.json +++ /dev/null @@ -1,374 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ManageSellOfferResult", - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ManageSellOfferResultCode.json b/xdr-json/next/ManageSellOfferResultCode.json deleted file mode 100644 index 4bfe7958..00000000 --- a/xdr-json/next/ManageSellOfferResultCode.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ManageSellOfferResultCode", - "description": "ManageSellOfferResultCode is an XDR Enum defined as:\n\n```text enum ManageSellOfferResultCode { // codes considered as \"success\" for the operation MANAGE_SELL_OFFER_SUCCESS = 0,\n\n// codes considered as \"failure\" for the operation MANAGE_SELL_OFFER_MALFORMED = -1, // generated offer would be invalid MANAGE_SELL_OFFER_SELL_NO_TRUST = -2, // no trust line for what we're selling MANAGE_SELL_OFFER_BUY_NO_TRUST = -3, // no trust line for what we're buying MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED = -4, // not authorized to sell MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED = -5, // not authorized to buy MANAGE_SELL_OFFER_LINE_FULL = -6, // can't receive more of what it's buying MANAGE_SELL_OFFER_UNDERFUNDED = -7, // doesn't hold what it's trying to sell MANAGE_SELL_OFFER_CROSS_SELF = -8, // would cross an offer from the same user MANAGE_SELL_OFFER_SELL_NO_ISSUER = -9, // no issuer for what we're selling MANAGE_SELL_OFFER_BUY_NO_ISSUER = -10, // no issuer for what we're buying\n\n// update errors MANAGE_SELL_OFFER_NOT_FOUND = -11, // offerID does not match an existing offer\n\nMANAGE_SELL_OFFER_LOW_RESERVE = -12 // not enough funds to create a new Offer }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] -} \ No newline at end of file diff --git a/xdr-json/next/Memo.json b/xdr-json/next/Memo.json deleted file mode 100644 index 739a7e07..00000000 --- a/xdr-json/next/Memo.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Memo", - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "StringM<28>": { - "type": "string", - "maxLength": 28 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/MemoType.json b/xdr-json/next/MemoType.json deleted file mode 100644 index d6c35d9f..00000000 --- a/xdr-json/next/MemoType.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "MemoType", - "description": "MemoType is an XDR Enum defined as:\n\n```text enum MemoType { MEMO_NONE = 0, MEMO_TEXT = 1, MEMO_ID = 2, MEMO_HASH = 3, MEMO_RETURN = 4 }; ```", - "type": "string", - "enum": [ - "none", - "text", - "id", - "hash", - "return" - ] -} \ No newline at end of file diff --git a/xdr-json/next/MessageType.json b/xdr-json/next/MessageType.json deleted file mode 100644 index 787318f1..00000000 --- a/xdr-json/next/MessageType.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "MessageType", - "description": "MessageType is an XDR Enum defined as:\n\n```text enum MessageType { ERROR_MSG = 0, AUTH = 2, DONT_HAVE = 3, // GET_PEERS (4) is deprecated\n\nPEERS = 5,\n\nGET_TX_SET = 6, // gets a particular txset by hash TX_SET = 7, GENERALIZED_TX_SET = 17,\n\nTRANSACTION = 8, // pass on a tx you have heard about\n\n// SCP GET_SCP_QUORUMSET = 9, SCP_QUORUMSET = 10, SCP_MESSAGE = 11, GET_SCP_STATE = 12,\n\n// new messages HELLO = 13,\n\n// SURVEY_REQUEST (14) removed and replaced by TIME_SLICED_SURVEY_REQUEST // SURVEY_RESPONSE (15) removed and replaced by TIME_SLICED_SURVEY_RESPONSE\n\nSEND_MORE = 16, SEND_MORE_EXTENDED = 20,\n\nFLOOD_ADVERT = 18, FLOOD_DEMAND = 19,\n\nTIME_SLICED_SURVEY_REQUEST = 21, TIME_SLICED_SURVEY_RESPONSE = 22, TIME_SLICED_SURVEY_START_COLLECTING = 23, TIME_SLICED_SURVEY_STOP_COLLECTING = 24 }; ```", - "type": "string", - "enum": [ - "error_msg", - "auth", - "dont_have", - "peers", - "get_tx_set", - "tx_set", - "generalized_tx_set", - "transaction", - "get_scp_quorumset", - "scp_quorumset", - "scp_message", - "get_scp_state", - "hello", - "send_more", - "send_more_extended", - "flood_advert", - "flood_demand", - "time_sliced_survey_request", - "time_sliced_survey_response", - "time_sliced_survey_start_collecting", - "time_sliced_survey_stop_collecting" - ] -} \ No newline at end of file diff --git a/xdr-json/next/MuxedAccount.json b/xdr-json/next/MuxedAccount.json deleted file mode 100644 index b620dced..00000000 --- a/xdr-json/next/MuxedAccount.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "MuxedAccount", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/MuxedAccountMed25519.json b/xdr-json/next/MuxedAccountMed25519.json deleted file mode 100644 index eb4ef4d6..00000000 --- a/xdr-json/next/MuxedAccountMed25519.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "MuxedAccountMed25519", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/MuxedEd25519Account.json b/xdr-json/next/MuxedEd25519Account.json deleted file mode 100644 index 9528e050..00000000 --- a/xdr-json/next/MuxedEd25519Account.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "MuxedEd25519Account", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/NodeId.json b/xdr-json/next/NodeId.json deleted file mode 100644 index 05bd95c8..00000000 --- a/xdr-json/next/NodeId.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "NodeId", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/OfferEntry.json b/xdr-json/next/OfferEntry.json deleted file mode 100644 index c9ede2be..00000000 --- a/xdr-json/next/OfferEntry.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OfferEntry", - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "$schema": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/OfferEntryExt.json b/xdr-json/next/OfferEntryExt.json deleted file mode 100644 index 5c749f93..00000000 --- a/xdr-json/next/OfferEntryExt.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OfferEntryExt", - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/OfferEntryFlags.json b/xdr-json/next/OfferEntryFlags.json deleted file mode 100644 index 5876124f..00000000 --- a/xdr-json/next/OfferEntryFlags.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OfferEntryFlags", - "description": "OfferEntryFlags is an XDR Enum defined as:\n\n```text enum OfferEntryFlags { // an offer with this flag will not act on and take a reverse offer of equal // price PASSIVE_FLAG = 1 }; ```", - "type": "string", - "enum": [ - "passive_flag" - ] -} \ No newline at end of file diff --git a/xdr-json/next/Operation.json b/xdr-json/next/Operation.json deleted file mode 100644 index dd88f3c6..00000000 --- a/xdr-json/next/Operation.json +++ /dev/null @@ -1,2408 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Operation", - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "$schema": { - "type": "string" - }, - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "MuxedAccount": { - "type": "string" - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/OperationBody.json b/xdr-json/next/OperationBody.json deleted file mode 100644 index 356f52b8..00000000 --- a/xdr-json/next/OperationBody.json +++ /dev/null @@ -1,2388 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OperationBody", - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "MuxedAccount": { - "type": "string" - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/OperationMeta.json b/xdr-json/next/OperationMeta.json deleted file mode 100644 index dff40d72..00000000 --- a/xdr-json/next/OperationMeta.json +++ /dev/null @@ -1,2874 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OperationMeta", - "description": "OperationMeta is an XDR Struct defined as:\n\n```text struct OperationMeta { LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes" - ], - "properties": { - "$schema": { - "type": "string" - }, - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/OperationMetaV2.json b/xdr-json/next/OperationMetaV2.json deleted file mode 100644 index a815d007..00000000 --- a/xdr-json/next/OperationMetaV2.json +++ /dev/null @@ -1,2964 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OperationMetaV2", - "description": "OperationMetaV2 is an XDR Struct defined as:\n\n```text struct OperationMetaV2 { ExtensionPoint ext;\n\nLedgerEntryChanges changes;\n\nContractEvent events<>; }; ```", - "type": "object", - "required": [ - "changes", - "events", - "ext" - ], - "properties": { - "$schema": { - "type": "string" - }, - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/OperationResult.json b/xdr-json/next/OperationResult.json deleted file mode 100644 index 613d1f95..00000000 --- a/xdr-json/next/OperationResult.json +++ /dev/null @@ -1,1226 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OperationResult", - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/OperationResultCode.json b/xdr-json/next/OperationResultCode.json deleted file mode 100644 index 3fe08fad..00000000 --- a/xdr-json/next/OperationResultCode.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OperationResultCode", - "description": "OperationResultCode is an XDR Enum defined as:\n\n```text enum OperationResultCode { opINNER = 0, // inner object result is valid\n\nopBAD_AUTH = -1, // too few valid signatures / wrong network opNO_ACCOUNT = -2, // source account was not found opNOT_SUPPORTED = -3, // operation not supported at this time opTOO_MANY_SUBENTRIES = -4, // max number of subentries already reached opEXCEEDED_WORK_LIMIT = -5, // operation did too much work opTOO_MANY_SPONSORING = -6 // account is sponsoring too many entries }; ```", - "type": "string", - "enum": [ - "op_inner", - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] -} \ No newline at end of file diff --git a/xdr-json/next/OperationResultTr.json b/xdr-json/next/OperationResultTr.json deleted file mode 100644 index 796acb27..00000000 --- a/xdr-json/next/OperationResultTr.json +++ /dev/null @@ -1,1199 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OperationResultTr", - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/OperationType.json b/xdr-json/next/OperationType.json deleted file mode 100644 index b494f53a..00000000 --- a/xdr-json/next/OperationType.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OperationType", - "description": "OperationType is an XDR Enum defined as:\n\n```text enum OperationType { CREATE_ACCOUNT = 0, PAYMENT = 1, PATH_PAYMENT_STRICT_RECEIVE = 2, MANAGE_SELL_OFFER = 3, CREATE_PASSIVE_SELL_OFFER = 4, SET_OPTIONS = 5, CHANGE_TRUST = 6, ALLOW_TRUST = 7, ACCOUNT_MERGE = 8, INFLATION = 9, MANAGE_DATA = 10, BUMP_SEQUENCE = 11, MANAGE_BUY_OFFER = 12, PATH_PAYMENT_STRICT_SEND = 13, CREATE_CLAIMABLE_BALANCE = 14, CLAIM_CLAIMABLE_BALANCE = 15, BEGIN_SPONSORING_FUTURE_RESERVES = 16, END_SPONSORING_FUTURE_RESERVES = 17, REVOKE_SPONSORSHIP = 18, CLAWBACK = 19, CLAWBACK_CLAIMABLE_BALANCE = 20, SET_TRUST_LINE_FLAGS = 21, LIQUIDITY_POOL_DEPOSIT = 22, LIQUIDITY_POOL_WITHDRAW = 23, INVOKE_HOST_FUNCTION = 24, EXTEND_FOOTPRINT_TTL = 25, RESTORE_FOOTPRINT = 26 }; ```", - "type": "string", - "enum": [ - "create_account", - "payment", - "path_payment_strict_receive", - "manage_sell_offer", - "create_passive_sell_offer", - "set_options", - "change_trust", - "allow_trust", - "account_merge", - "inflation", - "manage_data", - "bump_sequence", - "manage_buy_offer", - "path_payment_strict_send", - "create_claimable_balance", - "claim_claimable_balance", - "begin_sponsoring_future_reserves", - "end_sponsoring_future_reserves", - "revoke_sponsorship", - "clawback", - "clawback_claimable_balance", - "set_trust_line_flags", - "liquidity_pool_deposit", - "liquidity_pool_withdraw", - "invoke_host_function", - "extend_footprint_ttl", - "restore_footprint" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ParallelTxExecutionStage.json b/xdr-json/next/ParallelTxExecutionStage.json deleted file mode 100644 index 52d42733..00000000 --- a/xdr-json/next/ParallelTxExecutionStage.json +++ /dev/null @@ -1,3021 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ParallelTxExecutionStage", - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ParallelTxsComponent.json b/xdr-json/next/ParallelTxsComponent.json deleted file mode 100644 index 3224afc6..00000000 --- a/xdr-json/next/ParallelTxsComponent.json +++ /dev/null @@ -1,3048 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ParallelTxsComponent", - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "$schema": { - "type": "string" - }, - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/PathPaymentStrictReceiveOp.json b/xdr-json/next/PathPaymentStrictReceiveOp.json deleted file mode 100644 index 8df2321d..00000000 --- a/xdr-json/next/PathPaymentStrictReceiveOp.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PathPaymentStrictReceiveOp", - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "$schema": { - "type": "string" - }, - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "MuxedAccount": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/PathPaymentStrictReceiveResult.json b/xdr-json/next/PathPaymentStrictReceiveResult.json deleted file mode 100644 index d5819dd2..00000000 --- a/xdr-json/next/PathPaymentStrictReceiveResult.json +++ /dev/null @@ -1,304 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PathPaymentStrictReceiveResult", - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PoolId": { - "type": "string" - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/PathPaymentStrictReceiveResultCode.json b/xdr-json/next/PathPaymentStrictReceiveResultCode.json deleted file mode 100644 index 92662ad5..00000000 --- a/xdr-json/next/PathPaymentStrictReceiveResultCode.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PathPaymentStrictReceiveResultCode", - "description": "PathPaymentStrictReceiveResultCode is an XDR Enum defined as:\n\n```text enum PathPaymentStrictReceiveResultCode { // codes considered as \"success\" for the operation PATH_PAYMENT_STRICT_RECEIVE_SUCCESS = 0, // success\n\n// codes considered as \"failure\" for the operation PATH_PAYMENT_STRICT_RECEIVE_MALFORMED = -1, // bad input PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED = -2, // not enough funds in source account PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST = -3, // no trust line on source account PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED = -4, // source not authorized to transfer PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION = -5, // destination account does not exist PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST = -6, // dest missing a trust line for asset PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED = -7, // dest not authorized to hold asset PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL = -8, // dest would go above their limit PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER = -9, // missing issuer on one asset PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS = -10, // not enough offers to satisfy path PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF = -11, // would cross one of its own offers PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX = -12 // could not satisfy sendmax }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] -} \ No newline at end of file diff --git a/xdr-json/next/PathPaymentStrictReceiveResultSuccess.json b/xdr-json/next/PathPaymentStrictReceiveResultSuccess.json deleted file mode 100644 index 0c3d2243..00000000 --- a/xdr-json/next/PathPaymentStrictReceiveResultSuccess.json +++ /dev/null @@ -1,259 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PathPaymentStrictReceiveResultSuccess", - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "$schema": { - "type": "string" - }, - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "PoolId": { - "type": "string" - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/PathPaymentStrictSendOp.json b/xdr-json/next/PathPaymentStrictSendOp.json deleted file mode 100644 index 10ea5622..00000000 --- a/xdr-json/next/PathPaymentStrictSendOp.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PathPaymentStrictSendOp", - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "$schema": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "MuxedAccount": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/PathPaymentStrictSendResult.json b/xdr-json/next/PathPaymentStrictSendResult.json deleted file mode 100644 index 37c81014..00000000 --- a/xdr-json/next/PathPaymentStrictSendResult.json +++ /dev/null @@ -1,304 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PathPaymentStrictSendResult", - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PoolId": { - "type": "string" - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/PathPaymentStrictSendResultCode.json b/xdr-json/next/PathPaymentStrictSendResultCode.json deleted file mode 100644 index 89e5d3c9..00000000 --- a/xdr-json/next/PathPaymentStrictSendResultCode.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PathPaymentStrictSendResultCode", - "description": "PathPaymentStrictSendResultCode is an XDR Enum defined as:\n\n```text enum PathPaymentStrictSendResultCode { // codes considered as \"success\" for the operation PATH_PAYMENT_STRICT_SEND_SUCCESS = 0, // success\n\n// codes considered as \"failure\" for the operation PATH_PAYMENT_STRICT_SEND_MALFORMED = -1, // bad input PATH_PAYMENT_STRICT_SEND_UNDERFUNDED = -2, // not enough funds in source account PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST = -3, // no trust line on source account PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED = -4, // source not authorized to transfer PATH_PAYMENT_STRICT_SEND_NO_DESTINATION = -5, // destination account does not exist PATH_PAYMENT_STRICT_SEND_NO_TRUST = -6, // dest missing a trust line for asset PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED = -7, // dest not authorized to hold asset PATH_PAYMENT_STRICT_SEND_LINE_FULL = -8, // dest would go above their limit PATH_PAYMENT_STRICT_SEND_NO_ISSUER = -9, // missing issuer on one asset PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS = -10, // not enough offers to satisfy path PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF = -11, // would cross one of its own offers PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN = -12 // could not satisfy destMin }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] -} \ No newline at end of file diff --git a/xdr-json/next/PathPaymentStrictSendResultSuccess.json b/xdr-json/next/PathPaymentStrictSendResultSuccess.json deleted file mode 100644 index d2d7b69c..00000000 --- a/xdr-json/next/PathPaymentStrictSendResultSuccess.json +++ /dev/null @@ -1,259 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PathPaymentStrictSendResultSuccess", - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "$schema": { - "type": "string" - }, - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "PoolId": { - "type": "string" - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/PaymentOp.json b/xdr-json/next/PaymentOp.json deleted file mode 100644 index 85c61e17..00000000 --- a/xdr-json/next/PaymentOp.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PaymentOp", - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "$schema": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "MuxedAccount": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/PaymentResult.json b/xdr-json/next/PaymentResult.json deleted file mode 100644 index 7170d7a5..00000000 --- a/xdr-json/next/PaymentResult.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PaymentResult", - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] -} \ No newline at end of file diff --git a/xdr-json/next/PaymentResultCode.json b/xdr-json/next/PaymentResultCode.json deleted file mode 100644 index 8af087f8..00000000 --- a/xdr-json/next/PaymentResultCode.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PaymentResultCode", - "description": "PaymentResultCode is an XDR Enum defined as:\n\n```text enum PaymentResultCode { // codes considered as \"success\" for the operation PAYMENT_SUCCESS = 0, // payment successfully completed\n\n// codes considered as \"failure\" for the operation PAYMENT_MALFORMED = -1, // bad input PAYMENT_UNDERFUNDED = -2, // not enough funds in source account PAYMENT_SRC_NO_TRUST = -3, // no trust line on source account PAYMENT_SRC_NOT_AUTHORIZED = -4, // source not authorized to transfer PAYMENT_NO_DESTINATION = -5, // destination account does not exist PAYMENT_NO_TRUST = -6, // destination missing a trust line for asset PAYMENT_NOT_AUTHORIZED = -7, // destination not authorized to hold asset PAYMENT_LINE_FULL = -8, // destination would go above their limit PAYMENT_NO_ISSUER = -9 // missing issuer on asset }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] -} \ No newline at end of file diff --git a/xdr-json/next/PeerAddress.json b/xdr-json/next/PeerAddress.json deleted file mode 100644 index ef719846..00000000 --- a/xdr-json/next/PeerAddress.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PeerAddress", - "description": "PeerAddress is an XDR Struct defined as:\n\n```text struct PeerAddress { union switch (IPAddrType type) { case IPv4: opaque ipv4[4]; case IPv6: opaque ipv6[16]; } ip; uint32 port; uint32 numFailures; }; ```", - "type": "object", - "required": [ - "ip", - "num_failures", - "port" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ip": { - "$ref": "#/definitions/PeerAddressIp" - }, - "num_failures": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "port": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "PeerAddressIp": { - "description": "PeerAddressIp is an XDR NestedUnion defined as:\n\n```text union switch (IPAddrType type) { case IPv4: opaque ipv4[4]; case IPv6: opaque ipv6[16]; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "i_pv4" - ], - "properties": { - "i_pv4": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 4, - "minItems": 4 - } - } - }, - { - "type": "object", - "required": [ - "i_pv6" - ], - "properties": { - "i_pv6": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 16, - "minItems": 16 - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/PeerAddressIp.json b/xdr-json/next/PeerAddressIp.json deleted file mode 100644 index 8968b10c..00000000 --- a/xdr-json/next/PeerAddressIp.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PeerAddressIp", - "description": "PeerAddressIp is an XDR NestedUnion defined as:\n\n```text union switch (IPAddrType type) { case IPv4: opaque ipv4[4]; case IPv6: opaque ipv6[16]; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "i_pv4" - ], - "properties": { - "i_pv4": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 4, - "minItems": 4 - } - } - }, - { - "type": "object", - "required": [ - "i_pv6" - ], - "properties": { - "i_pv6": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 16, - "minItems": 16 - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/PeerStats.json b/xdr-json/next/PeerStats.json deleted file mode 100644 index 2a65149b..00000000 --- a/xdr-json/next/PeerStats.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PeerStats", - "description": "PeerStats is an XDR Struct defined as:\n\n```text struct PeerStats { NodeID id; string versionStr<100>; uint64 messagesRead; uint64 messagesWritten; uint64 bytesRead; uint64 bytesWritten; uint64 secondsConnected;\n\nuint64 uniqueFloodBytesRecv; uint64 duplicateFloodBytesRecv; uint64 uniqueFetchBytesRecv; uint64 duplicateFetchBytesRecv;\n\nuint64 uniqueFloodMessageRecv; uint64 duplicateFloodMessageRecv; uint64 uniqueFetchMessageRecv; uint64 duplicateFetchMessageRecv; }; ```", - "type": "object", - "required": [ - "bytes_read", - "bytes_written", - "duplicate_fetch_bytes_recv", - "duplicate_fetch_message_recv", - "duplicate_flood_bytes_recv", - "duplicate_flood_message_recv", - "id", - "messages_read", - "messages_written", - "seconds_connected", - "unique_fetch_bytes_recv", - "unique_fetch_message_recv", - "unique_flood_bytes_recv", - "unique_flood_message_recv", - "version_str" - ], - "properties": { - "$schema": { - "type": "string" - }, - "bytes_read": { - "type": "string" - }, - "bytes_written": { - "type": "string" - }, - "duplicate_fetch_bytes_recv": { - "type": "string" - }, - "duplicate_fetch_message_recv": { - "type": "string" - }, - "duplicate_flood_bytes_recv": { - "type": "string" - }, - "duplicate_flood_message_recv": { - "type": "string" - }, - "id": { - "$ref": "#/definitions/NodeId" - }, - "messages_read": { - "type": "string" - }, - "messages_written": { - "type": "string" - }, - "seconds_connected": { - "type": "string" - }, - "unique_fetch_bytes_recv": { - "type": "string" - }, - "unique_fetch_message_recv": { - "type": "string" - }, - "unique_flood_bytes_recv": { - "type": "string" - }, - "unique_flood_message_recv": { - "type": "string" - }, - "version_str": { - "$ref": "#/definitions/StringM<100>" - } - }, - "unevaluatedProperties": false, - "definitions": { - "NodeId": { - "type": "string" - }, - "StringM<100>": { - "type": "string", - "maxLength": 100 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/PersistedScpState.json b/xdr-json/next/PersistedScpState.json deleted file mode 100644 index ce6c972c..00000000 --- a/xdr-json/next/PersistedScpState.json +++ /dev/null @@ -1,3584 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PersistedScpState", - "description": "PersistedScpState is an XDR Union defined as:\n\n```text union PersistedSCPState switch (int v) { case 0: PersistedSCPStateV0 v0; case 1: PersistedSCPStateV1 v1; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/PersistedScpStateV0" - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/PersistedScpStateV1" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "GeneralizedTransactionSet": { - "description": "GeneralizedTransactionSet is an XDR Union defined as:\n\n```text union GeneralizedTransactionSet switch (int v) { // We consider the legacy TransactionSet to be v0. case 1: TransactionSetV1 v1TxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionSetV1" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "NodeId": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PersistedScpStateV0": { - "description": "PersistedScpStateV0 is an XDR Struct defined as:\n\n```text struct PersistedSCPStateV0 { SCPEnvelope scpEnvelopes<>; SCPQuorumSet quorumSets<>; StoredTransactionSet txSets<>; }; ```", - "type": "object", - "required": [ - "quorum_sets", - "scp_envelopes", - "tx_sets" - ], - "properties": { - "quorum_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "scp_envelopes": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpEnvelope" - }, - "maxItems": 4294967295 - }, - "tx_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/StoredTransactionSet" - }, - "maxItems": 4294967295 - } - } - }, - "PersistedScpStateV1": { - "description": "PersistedScpStateV1 is an XDR Struct defined as:\n\n```text struct PersistedSCPStateV1 { // Tx sets are saved separately SCPEnvelope scpEnvelopes<>; SCPQuorumSet quorumSets<>; }; ```", - "type": "object", - "required": [ - "quorum_sets", - "scp_envelopes" - ], - "properties": { - "quorum_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "scp_envelopes": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpEnvelope": { - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpQuorumSet": { - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "StoredTransactionSet": { - "description": "StoredTransactionSet is an XDR Union defined as:\n\n```text union StoredTransactionSet switch (int v) { case 0: TransactionSet txSet; case 1: GeneralizedTransactionSet generalizedTxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/TransactionSet" - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/GeneralizedTransactionSet" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionSet": { - "description": "TransactionSet is an XDR Struct defined as:\n\n```text struct TransactionSet { Hash previousLedgerHash; TransactionEnvelope txs<>; }; ```", - "type": "object", - "required": [ - "previous_ledger_hash", - "txs" - ], - "properties": { - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "TransactionSetV1": { - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/PersistedScpStateV0.json b/xdr-json/next/PersistedScpStateV0.json deleted file mode 100644 index e4cca786..00000000 --- a/xdr-json/next/PersistedScpStateV0.json +++ /dev/null @@ -1,3531 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PersistedScpStateV0", - "description": "PersistedScpStateV0 is an XDR Struct defined as:\n\n```text struct PersistedSCPStateV0 { SCPEnvelope scpEnvelopes<>; SCPQuorumSet quorumSets<>; StoredTransactionSet txSets<>; }; ```", - "type": "object", - "required": [ - "quorum_sets", - "scp_envelopes", - "tx_sets" - ], - "properties": { - "$schema": { - "type": "string" - }, - "quorum_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "scp_envelopes": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpEnvelope" - }, - "maxItems": 4294967295 - }, - "tx_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/StoredTransactionSet" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "GeneralizedTransactionSet": { - "description": "GeneralizedTransactionSet is an XDR Union defined as:\n\n```text union GeneralizedTransactionSet switch (int v) { // We consider the legacy TransactionSet to be v0. case 1: TransactionSetV1 v1TxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionSetV1" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "NodeId": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpEnvelope": { - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpQuorumSet": { - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "StoredTransactionSet": { - "description": "StoredTransactionSet is an XDR Union defined as:\n\n```text union StoredTransactionSet switch (int v) { case 0: TransactionSet txSet; case 1: GeneralizedTransactionSet generalizedTxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/TransactionSet" - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/GeneralizedTransactionSet" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionSet": { - "description": "TransactionSet is an XDR Struct defined as:\n\n```text struct TransactionSet { Hash previousLedgerHash; TransactionEnvelope txs<>; }; ```", - "type": "object", - "required": [ - "previous_ledger_hash", - "txs" - ], - "properties": { - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "TransactionSetV1": { - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/PersistedScpStateV1.json b/xdr-json/next/PersistedScpStateV1.json deleted file mode 100644 index 32cee4ff..00000000 --- a/xdr-json/next/PersistedScpStateV1.json +++ /dev/null @@ -1,329 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PersistedScpStateV1", - "description": "PersistedScpStateV1 is an XDR Struct defined as:\n\n```text struct PersistedSCPStateV1 { // Tx sets are saved separately SCPEnvelope scpEnvelopes<>; SCPQuorumSet quorumSets<>; }; ```", - "type": "object", - "required": [ - "quorum_sets", - "scp_envelopes" - ], - "properties": { - "$schema": { - "type": "string" - }, - "quorum_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "scp_envelopes": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpEnvelope" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "NodeId": { - "type": "string" - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpEnvelope": { - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpQuorumSet": { - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/PoolId.json b/xdr-json/next/PoolId.json deleted file mode 100644 index bb13a29b..00000000 --- a/xdr-json/next/PoolId.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PoolId", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/PreconditionType.json b/xdr-json/next/PreconditionType.json deleted file mode 100644 index cba595e5..00000000 --- a/xdr-json/next/PreconditionType.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PreconditionType", - "description": "PreconditionType is an XDR Enum defined as:\n\n```text enum PreconditionType { PRECOND_NONE = 0, PRECOND_TIME = 1, PRECOND_V2 = 2 }; ```", - "type": "string", - "enum": [ - "none", - "time", - "v2" - ] -} \ No newline at end of file diff --git a/xdr-json/next/Preconditions.json b/xdr-json/next/Preconditions.json deleted file mode 100644 index bd652228..00000000 --- a/xdr-json/next/Preconditions.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Preconditions", - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SignerKey": { - "type": "string" - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/PreconditionsV2.json b/xdr-json/next/PreconditionsV2.json deleted file mode 100644 index 6de1290e..00000000 --- a/xdr-json/next/PreconditionsV2.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PreconditionsV2", - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "$schema": { - "type": "string" - }, - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - }, - "unevaluatedProperties": false, - "definitions": { - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SignerKey": { - "type": "string" - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/Price.json b/xdr-json/next/Price.json deleted file mode 100644 index 0a6d71f2..00000000 --- a/xdr-json/next/Price.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Price", - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "$schema": { - "type": "string" - }, - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/PublicKey.json b/xdr-json/next/PublicKey.json deleted file mode 100644 index a5f70233..00000000 --- a/xdr-json/next/PublicKey.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PublicKey", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/PublicKeyType.json b/xdr-json/next/PublicKeyType.json deleted file mode 100644 index f60b598e..00000000 --- a/xdr-json/next/PublicKeyType.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "PublicKeyType", - "description": "PublicKeyType is an XDR Enum defined as:\n\n```text enum PublicKeyType { PUBLIC_KEY_TYPE_ED25519 = KEY_TYPE_ED25519 }; ```", - "type": "string", - "enum": [ - "public_key_type_ed25519" - ] -} \ No newline at end of file diff --git a/xdr-json/next/RestoreFootprintOp.json b/xdr-json/next/RestoreFootprintOp.json deleted file mode 100644 index 9469af27..00000000 --- a/xdr-json/next/RestoreFootprintOp.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "RestoreFootprintOp", - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/RestoreFootprintResult.json b/xdr-json/next/RestoreFootprintResult.json deleted file mode 100644 index 85288e20..00000000 --- a/xdr-json/next/RestoreFootprintResult.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "RestoreFootprintResult", - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] -} \ No newline at end of file diff --git a/xdr-json/next/RestoreFootprintResultCode.json b/xdr-json/next/RestoreFootprintResultCode.json deleted file mode 100644 index 345805cb..00000000 --- a/xdr-json/next/RestoreFootprintResultCode.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "RestoreFootprintResultCode", - "description": "RestoreFootprintResultCode is an XDR Enum defined as:\n\n```text enum RestoreFootprintResultCode { // codes considered as \"success\" for the operation RESTORE_FOOTPRINT_SUCCESS = 0,\n\n// codes considered as \"failure\" for the operation RESTORE_FOOTPRINT_MALFORMED = -1, RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED = -2, RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE = -3 }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] -} \ No newline at end of file diff --git a/xdr-json/next/RevokeSponsorshipOp.json b/xdr-json/next/RevokeSponsorshipOp.json deleted file mode 100644 index e69a1ca6..00000000 --- a/xdr-json/next/RevokeSponsorshipOp.json +++ /dev/null @@ -1,972 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "RevokeSponsorshipOp", - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "PoolId": { - "type": "string" - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SignerKey": { - "type": "string" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/RevokeSponsorshipOpSigner.json b/xdr-json/next/RevokeSponsorshipOpSigner.json deleted file mode 100644 index 18e3715a..00000000 --- a/xdr-json/next/RevokeSponsorshipOpSigner.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "RevokeSponsorshipOpSigner", - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "$schema": { - "type": "string" - }, - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "SignerKey": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/RevokeSponsorshipResult.json b/xdr-json/next/RevokeSponsorshipResult.json deleted file mode 100644 index ff2c001f..00000000 --- a/xdr-json/next/RevokeSponsorshipResult.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "RevokeSponsorshipResult", - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] -} \ No newline at end of file diff --git a/xdr-json/next/RevokeSponsorshipResultCode.json b/xdr-json/next/RevokeSponsorshipResultCode.json deleted file mode 100644 index c3871e37..00000000 --- a/xdr-json/next/RevokeSponsorshipResultCode.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "RevokeSponsorshipResultCode", - "description": "RevokeSponsorshipResultCode is an XDR Enum defined as:\n\n```text enum RevokeSponsorshipResultCode { // codes considered as \"success\" for the operation REVOKE_SPONSORSHIP_SUCCESS = 0,\n\n// codes considered as \"failure\" for the operation REVOKE_SPONSORSHIP_DOES_NOT_EXIST = -1, REVOKE_SPONSORSHIP_NOT_SPONSOR = -2, REVOKE_SPONSORSHIP_LOW_RESERVE = -3, REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE = -4, REVOKE_SPONSORSHIP_MALFORMED = -5 }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] -} \ No newline at end of file diff --git a/xdr-json/next/RevokeSponsorshipType.json b/xdr-json/next/RevokeSponsorshipType.json deleted file mode 100644 index 461fbf72..00000000 --- a/xdr-json/next/RevokeSponsorshipType.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "RevokeSponsorshipType", - "description": "RevokeSponsorshipType is an XDR Enum defined as:\n\n```text enum RevokeSponsorshipType { REVOKE_SPONSORSHIP_LEDGER_ENTRY = 0, REVOKE_SPONSORSHIP_SIGNER = 1 }; ```", - "type": "string", - "enum": [ - "ledger_entry", - "signer" - ] -} \ No newline at end of file diff --git a/xdr-json/next/SError.json b/xdr-json/next/SError.json deleted file mode 100644 index 09106a50..00000000 --- a/xdr-json/next/SError.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SError", - "description": "SError is an XDR Struct defined as:\n\n```text struct Error { ErrorCode code; string msg<100>; }; ```", - "type": "object", - "required": [ - "code", - "msg" - ], - "properties": { - "$schema": { - "type": "string" - }, - "code": { - "$ref": "#/definitions/ErrorCode" - }, - "msg": { - "$ref": "#/definitions/StringM<100>" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ErrorCode": { - "description": "ErrorCode is an XDR Enum defined as:\n\n```text enum ErrorCode { ERR_MISC = 0, // Unspecific error ERR_DATA = 1, // Malformed data ERR_CONF = 2, // Misconfiguration error ERR_AUTH = 3, // Authentication failure ERR_LOAD = 4 // System overloaded }; ```", - "type": "string", - "enum": [ - "misc", - "data", - "conf", - "auth", - "load" - ] - }, - "StringM<100>": { - "type": "string", - "maxLength": 100 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScAddress.json b/xdr-json/next/ScAddress.json deleted file mode 100644 index 7e703308..00000000 --- a/xdr-json/next/ScAddress.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScAddress", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/ScAddressType.json b/xdr-json/next/ScAddressType.json deleted file mode 100644 index 1dad7bd4..00000000 --- a/xdr-json/next/ScAddressType.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScAddressType", - "description": "ScAddressType is an XDR Enum defined as:\n\n```text enum SCAddressType { SC_ADDRESS_TYPE_ACCOUNT = 0, SC_ADDRESS_TYPE_CONTRACT = 1, SC_ADDRESS_TYPE_MUXED_ACCOUNT = 2, SC_ADDRESS_TYPE_CLAIMABLE_BALANCE = 3, SC_ADDRESS_TYPE_LIQUIDITY_POOL = 4 }; ```", - "type": "string", - "enum": [ - "account", - "contract", - "muxed_account", - "claimable_balance", - "liquidity_pool" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ScBytes.json b/xdr-json/next/ScBytes.json deleted file mode 100644 index ffab0c73..00000000 --- a/xdr-json/next/ScBytes.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScBytes", - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" -} \ No newline at end of file diff --git a/xdr-json/next/ScContractInstance.json b/xdr-json/next/ScContractInstance.json deleted file mode 100644 index cff978f5..00000000 --- a/xdr-json/next/ScContractInstance.json +++ /dev/null @@ -1,549 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScContractInstance", - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "$schema": { - "type": "string" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScEnvMetaEntry.json b/xdr-json/next/ScEnvMetaEntry.json deleted file mode 100644 index db2cea7e..00000000 --- a/xdr-json/next/ScEnvMetaEntry.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScEnvMetaEntry", - "description": "ScEnvMetaEntry is an XDR Union defined as:\n\n```text union SCEnvMetaEntry switch (SCEnvMetaKind kind) { case SC_ENV_META_KIND_INTERFACE_VERSION: struct { uint32 protocol; uint32 preRelease; } interfaceVersion; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "sc_env_meta_kind_interface_version" - ], - "properties": { - "sc_env_meta_kind_interface_version": { - "$ref": "#/definitions/ScEnvMetaEntryInterfaceVersion" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScEnvMetaEntryInterfaceVersion": { - "description": "ScEnvMetaEntryInterfaceVersion is an XDR NestedStruct defined as:\n\n```text struct { uint32 protocol; uint32 preRelease; } ```", - "type": "object", - "required": [ - "pre_release", - "protocol" - ], - "properties": { - "pre_release": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "protocol": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScEnvMetaEntryInterfaceVersion.json b/xdr-json/next/ScEnvMetaEntryInterfaceVersion.json deleted file mode 100644 index 2ae5051d..00000000 --- a/xdr-json/next/ScEnvMetaEntryInterfaceVersion.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScEnvMetaEntryInterfaceVersion", - "description": "ScEnvMetaEntryInterfaceVersion is an XDR NestedStruct defined as:\n\n```text struct { uint32 protocol; uint32 preRelease; } ```", - "type": "object", - "required": [ - "pre_release", - "protocol" - ], - "properties": { - "$schema": { - "type": "string" - }, - "pre_release": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "protocol": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/ScEnvMetaKind.json b/xdr-json/next/ScEnvMetaKind.json deleted file mode 100644 index 55ea0313..00000000 --- a/xdr-json/next/ScEnvMetaKind.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScEnvMetaKind", - "description": "ScEnvMetaKind is an XDR Enum defined as:\n\n```text enum SCEnvMetaKind { SC_ENV_META_KIND_INTERFACE_VERSION = 0 }; ```", - "type": "string", - "enum": [ - "sc_env_meta_kind_interface_version" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ScError.json b/xdr-json/next/ScError.json deleted file mode 100644 index 3752164b..00000000 --- a/xdr-json/next/ScError.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScError", - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScErrorCode.json b/xdr-json/next/ScErrorCode.json deleted file mode 100644 index d01b3221..00000000 --- a/xdr-json/next/ScErrorCode.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScErrorCode", - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ScErrorType.json b/xdr-json/next/ScErrorType.json deleted file mode 100644 index 7165cd54..00000000 --- a/xdr-json/next/ScErrorType.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScErrorType", - "description": "ScErrorType is an XDR Enum defined as:\n\n```text enum SCErrorType { SCE_CONTRACT = 0, // Contract-specific, user-defined codes. SCE_WASM_VM = 1, // Errors while interpreting WASM bytecode. SCE_CONTEXT = 2, // Errors in the contract's host context. SCE_STORAGE = 3, // Errors accessing host storage. SCE_OBJECT = 4, // Errors working with host objects. SCE_CRYPTO = 5, // Errors in cryptographic operations. SCE_EVENTS = 6, // Errors while emitting events. SCE_BUDGET = 7, // Errors relating to budget limits. SCE_VALUE = 8, // Errors working with host values or SCVals. SCE_AUTH = 9 // Errors from the authentication subsystem. }; ```", - "type": "string", - "enum": [ - "contract", - "wasm_vm", - "context", - "storage", - "object", - "crypto", - "events", - "budget", - "value", - "auth" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ScMap.json b/xdr-json/next/ScMap.json deleted file mode 100644 index 47805cf3..00000000 --- a/xdr-json/next/ScMap.json +++ /dev/null @@ -1,531 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScMap", - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295, - "definitions": { - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScMapEntry.json b/xdr-json/next/ScMapEntry.json deleted file mode 100644 index def259f4..00000000 --- a/xdr-json/next/ScMapEntry.json +++ /dev/null @@ -1,543 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScMapEntry", - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "$schema": { - "type": "string" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScMetaEntry.json b/xdr-json/next/ScMetaEntry.json deleted file mode 100644 index 59d795b1..00000000 --- a/xdr-json/next/ScMetaEntry.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScMetaEntry", - "description": "ScMetaEntry is an XDR Union defined as:\n\n```text union SCMetaEntry switch (SCMetaKind kind) { case SC_META_V0: SCMetaV0 v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "sc_meta_v0" - ], - "properties": { - "sc_meta_v0": { - "$ref": "#/definitions/ScMetaV0" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScMetaV0": { - "description": "ScMetaV0 is an XDR Struct defined as:\n\n```text struct SCMetaV0 { string key<>; string val<>; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/StringM<4294967295>" - }, - "val": { - "$ref": "#/definitions/StringM<4294967295>" - } - } - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScMetaKind.json b/xdr-json/next/ScMetaKind.json deleted file mode 100644 index 73ab06aa..00000000 --- a/xdr-json/next/ScMetaKind.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScMetaKind", - "description": "ScMetaKind is an XDR Enum defined as:\n\n```text enum SCMetaKind { SC_META_V0 = 0 }; ```", - "type": "string", - "enum": [ - "sc_meta_v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ScMetaV0.json b/xdr-json/next/ScMetaV0.json deleted file mode 100644 index dc83eccf..00000000 --- a/xdr-json/next/ScMetaV0.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScMetaV0", - "description": "ScMetaV0 is an XDR Struct defined as:\n\n```text struct SCMetaV0 { string key<>; string val<>; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "$schema": { - "type": "string" - }, - "key": { - "$ref": "#/definitions/StringM<4294967295>" - }, - "val": { - "$ref": "#/definitions/StringM<4294967295>" - } - }, - "unevaluatedProperties": false, - "definitions": { - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScNonceKey.json b/xdr-json/next/ScNonceKey.json deleted file mode 100644 index 1a6d9a6b..00000000 --- a/xdr-json/next/ScNonceKey.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScNonceKey", - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "$schema": { - "type": "string" - }, - "nonce": { - "type": "string" - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecEntry.json b/xdr-json/next/ScSpecEntry.json deleted file mode 100644 index de619fd4..00000000 --- a/xdr-json/next/ScSpecEntry.json +++ /dev/null @@ -1,685 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecEntry", - "description": "ScSpecEntry is an XDR Union defined as:\n\n```text union SCSpecEntry switch (SCSpecEntryKind kind) { case SC_SPEC_ENTRY_FUNCTION_V0: SCSpecFunctionV0 functionV0; case SC_SPEC_ENTRY_UDT_STRUCT_V0: SCSpecUDTStructV0 udtStructV0; case SC_SPEC_ENTRY_UDT_UNION_V0: SCSpecUDTUnionV0 udtUnionV0; case SC_SPEC_ENTRY_UDT_ENUM_V0: SCSpecUDTEnumV0 udtEnumV0; case SC_SPEC_ENTRY_UDT_ERROR_ENUM_V0: SCSpecUDTErrorEnumV0 udtErrorEnumV0; case SC_SPEC_ENTRY_EVENT_V0: SCSpecEventV0 eventV0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "function_v0" - ], - "properties": { - "function_v0": { - "$ref": "#/definitions/ScSpecFunctionV0" - } - } - }, - { - "type": "object", - "required": [ - "udt_struct_v0" - ], - "properties": { - "udt_struct_v0": { - "$ref": "#/definitions/ScSpecUdtStructV0" - } - } - }, - { - "type": "object", - "required": [ - "udt_union_v0" - ], - "properties": { - "udt_union_v0": { - "$ref": "#/definitions/ScSpecUdtUnionV0" - } - } - }, - { - "type": "object", - "required": [ - "udt_enum_v0" - ], - "properties": { - "udt_enum_v0": { - "$ref": "#/definitions/ScSpecUdtEnumV0" - } - } - }, - { - "type": "object", - "required": [ - "udt_error_enum_v0" - ], - "properties": { - "udt_error_enum_v0": { - "$ref": "#/definitions/ScSpecUdtErrorEnumV0" - } - } - }, - { - "type": "object", - "required": [ - "event_v0" - ], - "properties": { - "event_v0": { - "$ref": "#/definitions/ScSpecEventV0" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecEventDataFormat": { - "description": "ScSpecEventDataFormat is an XDR Enum defined as:\n\n```text enum SCSpecEventDataFormat { SC_SPEC_EVENT_DATA_FORMAT_SINGLE_VALUE = 0, SC_SPEC_EVENT_DATA_FORMAT_VEC = 1, SC_SPEC_EVENT_DATA_FORMAT_MAP = 2 }; ```", - "type": "string", - "enum": [ - "single_value", - "vec", - "map" - ] - }, - "ScSpecEventParamLocationV0": { - "description": "ScSpecEventParamLocationV0 is an XDR Enum defined as:\n\n```text enum SCSpecEventParamLocationV0 { SC_SPEC_EVENT_PARAM_LOCATION_DATA = 0, SC_SPEC_EVENT_PARAM_LOCATION_TOPIC_LIST = 1 }; ```", - "type": "string", - "enum": [ - "data", - "topic_list" - ] - }, - "ScSpecEventParamV0": { - "description": "ScSpecEventParamV0 is an XDR Struct defined as:\n\n```text struct SCSpecEventParamV0 { string doc; string name<30>; SCSpecTypeDef type; SCSpecEventParamLocationV0 location; }; ```", - "type": "object", - "required": [ - "doc", - "location", - "name", - "type_" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "location": { - "$ref": "#/definitions/ScSpecEventParamLocationV0" - }, - "name": { - "$ref": "#/definitions/StringM<30>" - }, - "type_": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecEventV0": { - "description": "ScSpecEventV0 is an XDR Struct defined as:\n\n```text struct SCSpecEventV0 { string doc; string lib<80>; SCSymbol name; SCSymbol prefixTopics<2>; SCSpecEventParamV0 params<>; SCSpecEventDataFormat dataFormat; }; ```", - "type": "object", - "required": [ - "data_format", - "doc", - "lib", - "name", - "params", - "prefix_topics" - ], - "properties": { - "data_format": { - "$ref": "#/definitions/ScSpecEventDataFormat" - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "lib": { - "$ref": "#/definitions/StringM<80>" - }, - "name": { - "$ref": "#/definitions/ScSymbol" - }, - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecEventParamV0" - }, - "maxItems": 4294967295 - }, - "prefix_topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSymbol" - }, - "maxItems": 2 - } - } - }, - "ScSpecFunctionInputV0": { - "description": "ScSpecFunctionInputV0 is an XDR Struct defined as:\n\n```text struct SCSpecFunctionInputV0 { string doc; string name<30>; SCSpecTypeDef type; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "type_" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<30>" - }, - "type_": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecFunctionV0": { - "description": "ScSpecFunctionV0 is an XDR Struct defined as:\n\n```text struct SCSpecFunctionV0 { string doc; SCSymbol name; SCSpecFunctionInputV0 inputs<>; SCSpecTypeDef outputs<1>; }; ```", - "type": "object", - "required": [ - "doc", - "inputs", - "name", - "outputs" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "inputs": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecFunctionInputV0" - }, - "maxItems": 4294967295 - }, - "name": { - "$ref": "#/definitions/ScSymbol" - }, - "outputs": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 1 - } - } - }, - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecUdtEnumCaseV0": { - "description": "ScSpecUdtEnumCaseV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTEnumCaseV0 { string doc; string name<60>; uint32 value; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "value" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - }, - "value": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecUdtEnumV0": { - "description": "ScSpecUdtEnumV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTEnumV0 { string doc; string lib<80>; string name<60>; SCSpecUDTEnumCaseV0 cases<>; }; ```", - "type": "object", - "required": [ - "cases", - "doc", - "lib", - "name" - ], - "properties": { - "cases": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecUdtEnumCaseV0" - }, - "maxItems": 4294967295 - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "lib": { - "$ref": "#/definitions/StringM<80>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecUdtErrorEnumCaseV0": { - "description": "ScSpecUdtErrorEnumCaseV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTErrorEnumCaseV0 { string doc; string name<60>; uint32 value; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "value" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - }, - "value": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecUdtErrorEnumV0": { - "description": "ScSpecUdtErrorEnumV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTErrorEnumV0 { string doc; string lib<80>; string name<60>; SCSpecUDTErrorEnumCaseV0 cases<>; }; ```", - "type": "object", - "required": [ - "cases", - "doc", - "lib", - "name" - ], - "properties": { - "cases": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecUdtErrorEnumCaseV0" - }, - "maxItems": 4294967295 - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "lib": { - "$ref": "#/definitions/StringM<80>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecUdtStructFieldV0": { - "description": "ScSpecUdtStructFieldV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTStructFieldV0 { string doc; string name<30>; SCSpecTypeDef type; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "type_" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<30>" - }, - "type_": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecUdtStructV0": { - "description": "ScSpecUdtStructV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTStructV0 { string doc; string lib<80>; string name<60>; SCSpecUDTStructFieldV0 fields<>; }; ```", - "type": "object", - "required": [ - "doc", - "fields", - "lib", - "name" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecUdtStructFieldV0" - }, - "maxItems": 4294967295 - }, - "lib": { - "$ref": "#/definitions/StringM<80>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecUdtUnionCaseTupleV0": { - "description": "ScSpecUdtUnionCaseTupleV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTUnionCaseTupleV0 { string doc; string name<60>; SCSpecTypeDef type<>; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "type_" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - }, - "type_": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 4294967295 - } - } - }, - "ScSpecUdtUnionCaseV0": { - "description": "ScSpecUdtUnionCaseV0 is an XDR Union defined as:\n\n```text union SCSpecUDTUnionCaseV0 switch (SCSpecUDTUnionCaseV0Kind kind) { case SC_SPEC_UDT_UNION_CASE_VOID_V0: SCSpecUDTUnionCaseVoidV0 voidCase; case SC_SPEC_UDT_UNION_CASE_TUPLE_V0: SCSpecUDTUnionCaseTupleV0 tupleCase; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "void_v0" - ], - "properties": { - "void_v0": { - "$ref": "#/definitions/ScSpecUdtUnionCaseVoidV0" - } - } - }, - { - "type": "object", - "required": [ - "tuple_v0" - ], - "properties": { - "tuple_v0": { - "$ref": "#/definitions/ScSpecUdtUnionCaseTupleV0" - } - } - } - ] - }, - "ScSpecUdtUnionCaseVoidV0": { - "description": "ScSpecUdtUnionCaseVoidV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTUnionCaseVoidV0 { string doc; string name<60>; }; ```", - "type": "object", - "required": [ - "doc", - "name" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecUdtUnionV0": { - "description": "ScSpecUdtUnionV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTUnionV0 { string doc; string lib<80>; string name<60>; SCSpecUDTUnionCaseV0 cases<>; }; ```", - "type": "object", - "required": [ - "cases", - "doc", - "lib", - "name" - ], - "properties": { - "cases": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecUdtUnionCaseV0" - }, - "maxItems": 4294967295 - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "lib": { - "$ref": "#/definitions/StringM<80>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<30>": { - "type": "string", - "maxLength": 30 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - }, - "StringM<80>": { - "type": "string", - "maxLength": 80 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecEntryKind.json b/xdr-json/next/ScSpecEntryKind.json deleted file mode 100644 index c0f55e41..00000000 --- a/xdr-json/next/ScSpecEntryKind.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecEntryKind", - "description": "ScSpecEntryKind is an XDR Enum defined as:\n\n```text enum SCSpecEntryKind { SC_SPEC_ENTRY_FUNCTION_V0 = 0, SC_SPEC_ENTRY_UDT_STRUCT_V0 = 1, SC_SPEC_ENTRY_UDT_UNION_V0 = 2, SC_SPEC_ENTRY_UDT_ENUM_V0 = 3, SC_SPEC_ENTRY_UDT_ERROR_ENUM_V0 = 4, SC_SPEC_ENTRY_EVENT_V0 = 5 }; ```", - "type": "string", - "enum": [ - "function_v0", - "udt_struct_v0", - "udt_union_v0", - "udt_enum_v0", - "udt_error_enum_v0", - "event_v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecEventDataFormat.json b/xdr-json/next/ScSpecEventDataFormat.json deleted file mode 100644 index 31c8f5ca..00000000 --- a/xdr-json/next/ScSpecEventDataFormat.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecEventDataFormat", - "description": "ScSpecEventDataFormat is an XDR Enum defined as:\n\n```text enum SCSpecEventDataFormat { SC_SPEC_EVENT_DATA_FORMAT_SINGLE_VALUE = 0, SC_SPEC_EVENT_DATA_FORMAT_VEC = 1, SC_SPEC_EVENT_DATA_FORMAT_MAP = 2 }; ```", - "type": "string", - "enum": [ - "single_value", - "vec", - "map" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecEventParamLocationV0.json b/xdr-json/next/ScSpecEventParamLocationV0.json deleted file mode 100644 index e342ccb6..00000000 --- a/xdr-json/next/ScSpecEventParamLocationV0.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecEventParamLocationV0", - "description": "ScSpecEventParamLocationV0 is an XDR Enum defined as:\n\n```text enum SCSpecEventParamLocationV0 { SC_SPEC_EVENT_PARAM_LOCATION_DATA = 0, SC_SPEC_EVENT_PARAM_LOCATION_TOPIC_LIST = 1 }; ```", - "type": "string", - "enum": [ - "data", - "topic_list" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecEventParamV0.json b/xdr-json/next/ScSpecEventParamV0.json deleted file mode 100644 index 8bce5c62..00000000 --- a/xdr-json/next/ScSpecEventParamV0.json +++ /dev/null @@ -1,256 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecEventParamV0", - "description": "ScSpecEventParamV0 is an XDR Struct defined as:\n\n```text struct SCSpecEventParamV0 { string doc; string name<30>; SCSpecTypeDef type; SCSpecEventParamLocationV0 location; }; ```", - "type": "object", - "required": [ - "doc", - "location", - "name", - "type_" - ], - "properties": { - "$schema": { - "type": "string" - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "location": { - "$ref": "#/definitions/ScSpecEventParamLocationV0" - }, - "name": { - "$ref": "#/definitions/StringM<30>" - }, - "type_": { - "$ref": "#/definitions/ScSpecTypeDef" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecEventParamLocationV0": { - "description": "ScSpecEventParamLocationV0 is an XDR Enum defined as:\n\n```text enum SCSpecEventParamLocationV0 { SC_SPEC_EVENT_PARAM_LOCATION_DATA = 0, SC_SPEC_EVENT_PARAM_LOCATION_TOPIC_LIST = 1 }; ```", - "type": "string", - "enum": [ - "data", - "topic_list" - ] - }, - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<30>": { - "type": "string", - "maxLength": 30 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecEventV0.json b/xdr-json/next/ScSpecEventV0.json deleted file mode 100644 index d5488d89..00000000 --- a/xdr-json/next/ScSpecEventV0.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecEventV0", - "description": "ScSpecEventV0 is an XDR Struct defined as:\n\n```text struct SCSpecEventV0 { string doc; string lib<80>; SCSymbol name; SCSymbol prefixTopics<2>; SCSpecEventParamV0 params<>; SCSpecEventDataFormat dataFormat; }; ```", - "type": "object", - "required": [ - "data_format", - "doc", - "lib", - "name", - "params", - "prefix_topics" - ], - "properties": { - "$schema": { - "type": "string" - }, - "data_format": { - "$ref": "#/definitions/ScSpecEventDataFormat" - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "lib": { - "$ref": "#/definitions/StringM<80>" - }, - "name": { - "$ref": "#/definitions/ScSymbol" - }, - "params": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecEventParamV0" - }, - "maxItems": 4294967295 - }, - "prefix_topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSymbol" - }, - "maxItems": 2 - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecEventDataFormat": { - "description": "ScSpecEventDataFormat is an XDR Enum defined as:\n\n```text enum SCSpecEventDataFormat { SC_SPEC_EVENT_DATA_FORMAT_SINGLE_VALUE = 0, SC_SPEC_EVENT_DATA_FORMAT_VEC = 1, SC_SPEC_EVENT_DATA_FORMAT_MAP = 2 }; ```", - "type": "string", - "enum": [ - "single_value", - "vec", - "map" - ] - }, - "ScSpecEventParamLocationV0": { - "description": "ScSpecEventParamLocationV0 is an XDR Enum defined as:\n\n```text enum SCSpecEventParamLocationV0 { SC_SPEC_EVENT_PARAM_LOCATION_DATA = 0, SC_SPEC_EVENT_PARAM_LOCATION_TOPIC_LIST = 1 }; ```", - "type": "string", - "enum": [ - "data", - "topic_list" - ] - }, - "ScSpecEventParamV0": { - "description": "ScSpecEventParamV0 is an XDR Struct defined as:\n\n```text struct SCSpecEventParamV0 { string doc; string name<30>; SCSpecTypeDef type; SCSpecEventParamLocationV0 location; }; ```", - "type": "object", - "required": [ - "doc", - "location", - "name", - "type_" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "location": { - "$ref": "#/definitions/ScSpecEventParamLocationV0" - }, - "name": { - "$ref": "#/definitions/StringM<30>" - }, - "type_": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<30>": { - "type": "string", - "maxLength": 30 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - }, - "StringM<80>": { - "type": "string", - "maxLength": 80 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecFunctionInputV0.json b/xdr-json/next/ScSpecFunctionInputV0.json deleted file mode 100644 index 435084f5..00000000 --- a/xdr-json/next/ScSpecFunctionInputV0.json +++ /dev/null @@ -1,244 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecFunctionInputV0", - "description": "ScSpecFunctionInputV0 is an XDR Struct defined as:\n\n```text struct SCSpecFunctionInputV0 { string doc; string name<30>; SCSpecTypeDef type; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "type_" - ], - "properties": { - "$schema": { - "type": "string" - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<30>" - }, - "type_": { - "$ref": "#/definitions/ScSpecTypeDef" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<30>": { - "type": "string", - "maxLength": 30 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecFunctionV0.json b/xdr-json/next/ScSpecFunctionV0.json deleted file mode 100644 index 9d9a115d..00000000 --- a/xdr-json/next/ScSpecFunctionV0.json +++ /dev/null @@ -1,284 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecFunctionV0", - "description": "ScSpecFunctionV0 is an XDR Struct defined as:\n\n```text struct SCSpecFunctionV0 { string doc; SCSymbol name; SCSpecFunctionInputV0 inputs<>; SCSpecTypeDef outputs<1>; }; ```", - "type": "object", - "required": [ - "doc", - "inputs", - "name", - "outputs" - ], - "properties": { - "$schema": { - "type": "string" - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "inputs": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecFunctionInputV0" - }, - "maxItems": 4294967295 - }, - "name": { - "$ref": "#/definitions/ScSymbol" - }, - "outputs": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 1 - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecFunctionInputV0": { - "description": "ScSpecFunctionInputV0 is an XDR Struct defined as:\n\n```text struct SCSpecFunctionInputV0 { string doc; string name<30>; SCSpecTypeDef type; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "type_" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<30>" - }, - "type_": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<30>": { - "type": "string", - "maxLength": 30 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecType.json b/xdr-json/next/ScSpecType.json deleted file mode 100644 index 18654db8..00000000 --- a/xdr-json/next/ScSpecType.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecType", - "description": "ScSpecType is an XDR Enum defined as:\n\n```text enum SCSpecType { SC_SPEC_TYPE_VAL = 0,\n\n// Types with no parameters. SC_SPEC_TYPE_BOOL = 1, SC_SPEC_TYPE_VOID = 2, SC_SPEC_TYPE_ERROR = 3, SC_SPEC_TYPE_U32 = 4, SC_SPEC_TYPE_I32 = 5, SC_SPEC_TYPE_U64 = 6, SC_SPEC_TYPE_I64 = 7, SC_SPEC_TYPE_TIMEPOINT = 8, SC_SPEC_TYPE_DURATION = 9, SC_SPEC_TYPE_U128 = 10, SC_SPEC_TYPE_I128 = 11, SC_SPEC_TYPE_U256 = 12, SC_SPEC_TYPE_I256 = 13, SC_SPEC_TYPE_BYTES = 14, SC_SPEC_TYPE_STRING = 16, SC_SPEC_TYPE_SYMBOL = 17, SC_SPEC_TYPE_ADDRESS = 19, SC_SPEC_TYPE_MUXED_ADDRESS = 20,\n\n// Types with parameters. SC_SPEC_TYPE_OPTION = 1000, SC_SPEC_TYPE_RESULT = 1001, SC_SPEC_TYPE_VEC = 1002, SC_SPEC_TYPE_MAP = 1004, SC_SPEC_TYPE_TUPLE = 1005, SC_SPEC_TYPE_BYTES_N = 1006,\n\n// User defined types. SC_SPEC_TYPE_UDT = 2000 }; ```", - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address", - "option", - "result", - "vec", - "map", - "tuple", - "bytes_n", - "udt" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecTypeBytesN.json b/xdr-json/next/ScSpecTypeBytesN.json deleted file mode 100644 index 8de3369a..00000000 --- a/xdr-json/next/ScSpecTypeBytesN.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecTypeBytesN", - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "$schema": { - "type": "string" - }, - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecTypeDef.json b/xdr-json/next/ScSpecTypeDef.json deleted file mode 100644 index a0d492a5..00000000 --- a/xdr-json/next/ScSpecTypeDef.json +++ /dev/null @@ -1,324 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecTypeDef", - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecTypeMap.json b/xdr-json/next/ScSpecTypeMap.json deleted file mode 100644 index 38f09bc7..00000000 --- a/xdr-json/next/ScSpecTypeMap.json +++ /dev/null @@ -1,232 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecTypeMap", - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "$schema": { - "type": "string" - }, - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecTypeOption.json b/xdr-json/next/ScSpecTypeOption.json deleted file mode 100644 index 74f48476..00000000 --- a/xdr-json/next/ScSpecTypeOption.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecTypeOption", - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "$schema": { - "type": "string" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecTypeResult.json b/xdr-json/next/ScSpecTypeResult.json deleted file mode 100644 index 5360f226..00000000 --- a/xdr-json/next/ScSpecTypeResult.json +++ /dev/null @@ -1,232 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecTypeResult", - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "$schema": { - "type": "string" - }, - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecTypeTuple.json b/xdr-json/next/ScSpecTypeTuple.json deleted file mode 100644 index 3912f671..00000000 --- a/xdr-json/next/ScSpecTypeTuple.json +++ /dev/null @@ -1,232 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecTypeTuple", - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "$schema": { - "type": "string" - }, - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecTypeUdt.json b/xdr-json/next/ScSpecTypeUdt.json deleted file mode 100644 index 6e47333d..00000000 --- a/xdr-json/next/ScSpecTypeUdt.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecTypeUdt", - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "$schema": { - "type": "string" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - } - }, - "unevaluatedProperties": false, - "definitions": { - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecTypeVec.json b/xdr-json/next/ScSpecTypeVec.json deleted file mode 100644 index abced42f..00000000 --- a/xdr-json/next/ScSpecTypeVec.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecTypeVec", - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "$schema": { - "type": "string" - }, - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecUdtEnumCaseV0.json b/xdr-json/next/ScSpecUdtEnumCaseV0.json deleted file mode 100644 index a2e1c481..00000000 --- a/xdr-json/next/ScSpecUdtEnumCaseV0.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecUdtEnumCaseV0", - "description": "ScSpecUdtEnumCaseV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTEnumCaseV0 { string doc; string name<60>; uint32 value; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "value" - ], - "properties": { - "$schema": { - "type": "string" - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - }, - "value": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecUdtEnumV0.json b/xdr-json/next/ScSpecUdtEnumV0.json deleted file mode 100644 index 538a0d5d..00000000 --- a/xdr-json/next/ScSpecUdtEnumV0.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecUdtEnumV0", - "description": "ScSpecUdtEnumV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTEnumV0 { string doc; string lib<80>; string name<60>; SCSpecUDTEnumCaseV0 cases<>; }; ```", - "type": "object", - "required": [ - "cases", - "doc", - "lib", - "name" - ], - "properties": { - "$schema": { - "type": "string" - }, - "cases": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecUdtEnumCaseV0" - }, - "maxItems": 4294967295 - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "lib": { - "$ref": "#/definitions/StringM<80>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecUdtEnumCaseV0": { - "description": "ScSpecUdtEnumCaseV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTEnumCaseV0 { string doc; string name<60>; uint32 value; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "value" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - }, - "value": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - }, - "StringM<80>": { - "type": "string", - "maxLength": 80 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecUdtErrorEnumCaseV0.json b/xdr-json/next/ScSpecUdtErrorEnumCaseV0.json deleted file mode 100644 index 34141d44..00000000 --- a/xdr-json/next/ScSpecUdtErrorEnumCaseV0.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecUdtErrorEnumCaseV0", - "description": "ScSpecUdtErrorEnumCaseV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTErrorEnumCaseV0 { string doc; string name<60>; uint32 value; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "value" - ], - "properties": { - "$schema": { - "type": "string" - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - }, - "value": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecUdtErrorEnumV0.json b/xdr-json/next/ScSpecUdtErrorEnumV0.json deleted file mode 100644 index 67b4f157..00000000 --- a/xdr-json/next/ScSpecUdtErrorEnumV0.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecUdtErrorEnumV0", - "description": "ScSpecUdtErrorEnumV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTErrorEnumV0 { string doc; string lib<80>; string name<60>; SCSpecUDTErrorEnumCaseV0 cases<>; }; ```", - "type": "object", - "required": [ - "cases", - "doc", - "lib", - "name" - ], - "properties": { - "$schema": { - "type": "string" - }, - "cases": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecUdtErrorEnumCaseV0" - }, - "maxItems": 4294967295 - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "lib": { - "$ref": "#/definitions/StringM<80>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecUdtErrorEnumCaseV0": { - "description": "ScSpecUdtErrorEnumCaseV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTErrorEnumCaseV0 { string doc; string name<60>; uint32 value; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "value" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - }, - "value": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - }, - "StringM<80>": { - "type": "string", - "maxLength": 80 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecUdtStructFieldV0.json b/xdr-json/next/ScSpecUdtStructFieldV0.json deleted file mode 100644 index 50861779..00000000 --- a/xdr-json/next/ScSpecUdtStructFieldV0.json +++ /dev/null @@ -1,244 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecUdtStructFieldV0", - "description": "ScSpecUdtStructFieldV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTStructFieldV0 { string doc; string name<30>; SCSpecTypeDef type; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "type_" - ], - "properties": { - "$schema": { - "type": "string" - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<30>" - }, - "type_": { - "$ref": "#/definitions/ScSpecTypeDef" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<30>": { - "type": "string", - "maxLength": 30 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecUdtStructV0.json b/xdr-json/next/ScSpecUdtStructV0.json deleted file mode 100644 index d695743c..00000000 --- a/xdr-json/next/ScSpecUdtStructV0.json +++ /dev/null @@ -1,276 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecUdtStructV0", - "description": "ScSpecUdtStructV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTStructV0 { string doc; string lib<80>; string name<60>; SCSpecUDTStructFieldV0 fields<>; }; ```", - "type": "object", - "required": [ - "doc", - "fields", - "lib", - "name" - ], - "properties": { - "$schema": { - "type": "string" - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "fields": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecUdtStructFieldV0" - }, - "maxItems": 4294967295 - }, - "lib": { - "$ref": "#/definitions/StringM<80>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecUdtStructFieldV0": { - "description": "ScSpecUdtStructFieldV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTStructFieldV0 { string doc; string name<30>; SCSpecTypeDef type; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "type_" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<30>" - }, - "type_": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<30>": { - "type": "string", - "maxLength": 30 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - }, - "StringM<80>": { - "type": "string", - "maxLength": 80 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecUdtUnionCaseTupleV0.json b/xdr-json/next/ScSpecUdtUnionCaseTupleV0.json deleted file mode 100644 index 30cb9714..00000000 --- a/xdr-json/next/ScSpecUdtUnionCaseTupleV0.json +++ /dev/null @@ -1,244 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecUdtUnionCaseTupleV0", - "description": "ScSpecUdtUnionCaseTupleV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTUnionCaseTupleV0 { string doc; string name<60>; SCSpecTypeDef type<>; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "type_" - ], - "properties": { - "$schema": { - "type": "string" - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - }, - "type_": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecUdtUnionCaseV0.json b/xdr-json/next/ScSpecUdtUnionCaseV0.json deleted file mode 100644 index 1705bb25..00000000 --- a/xdr-json/next/ScSpecUdtUnionCaseV0.json +++ /dev/null @@ -1,289 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecUdtUnionCaseV0", - "description": "ScSpecUdtUnionCaseV0 is an XDR Union defined as:\n\n```text union SCSpecUDTUnionCaseV0 switch (SCSpecUDTUnionCaseV0Kind kind) { case SC_SPEC_UDT_UNION_CASE_VOID_V0: SCSpecUDTUnionCaseVoidV0 voidCase; case SC_SPEC_UDT_UNION_CASE_TUPLE_V0: SCSpecUDTUnionCaseTupleV0 tupleCase; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "void_v0" - ], - "properties": { - "void_v0": { - "$ref": "#/definitions/ScSpecUdtUnionCaseVoidV0" - } - } - }, - { - "type": "object", - "required": [ - "tuple_v0" - ], - "properties": { - "tuple_v0": { - "$ref": "#/definitions/ScSpecUdtUnionCaseTupleV0" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecUdtUnionCaseTupleV0": { - "description": "ScSpecUdtUnionCaseTupleV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTUnionCaseTupleV0 { string doc; string name<60>; SCSpecTypeDef type<>; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "type_" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - }, - "type_": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 4294967295 - } - } - }, - "ScSpecUdtUnionCaseVoidV0": { - "description": "ScSpecUdtUnionCaseVoidV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTUnionCaseVoidV0 { string doc; string name<60>; }; ```", - "type": "object", - "required": [ - "doc", - "name" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecUdtUnionCaseV0Kind.json b/xdr-json/next/ScSpecUdtUnionCaseV0Kind.json deleted file mode 100644 index 810dda89..00000000 --- a/xdr-json/next/ScSpecUdtUnionCaseV0Kind.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecUdtUnionCaseV0Kind", - "description": "ScSpecUdtUnionCaseV0Kind is an XDR Enum defined as:\n\n```text enum SCSpecUDTUnionCaseV0Kind { SC_SPEC_UDT_UNION_CASE_VOID_V0 = 0, SC_SPEC_UDT_UNION_CASE_TUPLE_V0 = 1 }; ```", - "type": "string", - "enum": [ - "void_v0", - "tuple_v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecUdtUnionCaseVoidV0.json b/xdr-json/next/ScSpecUdtUnionCaseVoidV0.json deleted file mode 100644 index c224f594..00000000 --- a/xdr-json/next/ScSpecUdtUnionCaseVoidV0.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecUdtUnionCaseVoidV0", - "description": "ScSpecUdtUnionCaseVoidV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTUnionCaseVoidV0 { string doc; string name<60>; }; ```", - "type": "object", - "required": [ - "doc", - "name" - ], - "properties": { - "$schema": { - "type": "string" - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - } - }, - "unevaluatedProperties": false, - "definitions": { - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSpecUdtUnionV0.json b/xdr-json/next/ScSpecUdtUnionV0.json deleted file mode 100644 index 9bbe83fd..00000000 --- a/xdr-json/next/ScSpecUdtUnionV0.json +++ /dev/null @@ -1,319 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSpecUdtUnionV0", - "description": "ScSpecUdtUnionV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTUnionV0 { string doc; string lib<80>; string name<60>; SCSpecUDTUnionCaseV0 cases<>; }; ```", - "type": "object", - "required": [ - "cases", - "doc", - "lib", - "name" - ], - "properties": { - "$schema": { - "type": "string" - }, - "cases": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecUdtUnionCaseV0" - }, - "maxItems": 4294967295 - }, - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "lib": { - "$ref": "#/definitions/StringM<80>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScSpecTypeBytesN": { - "description": "ScSpecTypeBytesN is an XDR Struct defined as:\n\n```text struct SCSpecTypeBytesN { uint32 n; }; ```", - "type": "object", - "required": [ - "n" - ], - "properties": { - "n": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScSpecTypeDef": { - "description": "ScSpecTypeDef is an XDR Union defined as:\n\n```text union SCSpecTypeDef switch (SCSpecType type) { case SC_SPEC_TYPE_VAL: case SC_SPEC_TYPE_BOOL: case SC_SPEC_TYPE_VOID: case SC_SPEC_TYPE_ERROR: case SC_SPEC_TYPE_U32: case SC_SPEC_TYPE_I32: case SC_SPEC_TYPE_U64: case SC_SPEC_TYPE_I64: case SC_SPEC_TYPE_TIMEPOINT: case SC_SPEC_TYPE_DURATION: case SC_SPEC_TYPE_U128: case SC_SPEC_TYPE_I128: case SC_SPEC_TYPE_U256: case SC_SPEC_TYPE_I256: case SC_SPEC_TYPE_BYTES: case SC_SPEC_TYPE_STRING: case SC_SPEC_TYPE_SYMBOL: case SC_SPEC_TYPE_ADDRESS: case SC_SPEC_TYPE_MUXED_ADDRESS: void; case SC_SPEC_TYPE_OPTION: SCSpecTypeOption option; case SC_SPEC_TYPE_RESULT: SCSpecTypeResult result; case SC_SPEC_TYPE_VEC: SCSpecTypeVec vec; case SC_SPEC_TYPE_MAP: SCSpecTypeMap map; case SC_SPEC_TYPE_TUPLE: SCSpecTypeTuple tuple; case SC_SPEC_TYPE_BYTES_N: SCSpecTypeBytesN bytesN; case SC_SPEC_TYPE_UDT: SCSpecTypeUDT udt; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "val", - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "address", - "muxed_address" - ] - }, - { - "type": "object", - "required": [ - "option" - ], - "properties": { - "option": { - "$ref": "#/definitions/ScSpecTypeOption" - } - } - }, - { - "type": "object", - "required": [ - "result" - ], - "properties": { - "result": { - "$ref": "#/definitions/ScSpecTypeResult" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "$ref": "#/definitions/ScSpecTypeVec" - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "$ref": "#/definitions/ScSpecTypeMap" - } - } - }, - { - "type": "object", - "required": [ - "tuple" - ], - "properties": { - "tuple": { - "$ref": "#/definitions/ScSpecTypeTuple" - } - } - }, - { - "type": "object", - "required": [ - "bytes_n" - ], - "properties": { - "bytes_n": { - "$ref": "#/definitions/ScSpecTypeBytesN" - } - } - }, - { - "type": "object", - "required": [ - "udt" - ], - "properties": { - "udt": { - "$ref": "#/definitions/ScSpecTypeUdt" - } - } - } - ] - }, - "ScSpecTypeMap": { - "description": "ScSpecTypeMap is an XDR Struct defined as:\n\n```text struct SCSpecTypeMap { SCSpecTypeDef keyType; SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "key_type", - "value_type" - ], - "properties": { - "key_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeOption": { - "description": "ScSpecTypeOption is an XDR Struct defined as:\n\n```text struct SCSpecTypeOption { SCSpecTypeDef valueType; }; ```", - "type": "object", - "required": [ - "value_type" - ], - "properties": { - "value_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeResult": { - "description": "ScSpecTypeResult is an XDR Struct defined as:\n\n```text struct SCSpecTypeResult { SCSpecTypeDef okType; SCSpecTypeDef errorType; }; ```", - "type": "object", - "required": [ - "error_type", - "ok_type" - ], - "properties": { - "error_type": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "ok_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecTypeTuple": { - "description": "ScSpecTypeTuple is an XDR Struct defined as:\n\n```text struct SCSpecTypeTuple { SCSpecTypeDef valueTypes<12>; }; ```", - "type": "object", - "required": [ - "value_types" - ], - "properties": { - "value_types": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 12 - } - } - }, - "ScSpecTypeUdt": { - "description": "ScSpecTypeUdt is an XDR Struct defined as:\n\n```text struct SCSpecTypeUDT { string name<60>; }; ```", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "ScSpecTypeVec": { - "description": "ScSpecTypeVec is an XDR Struct defined as:\n\n```text struct SCSpecTypeVec { SCSpecTypeDef elementType; }; ```", - "type": "object", - "required": [ - "element_type" - ], - "properties": { - "element_type": { - "$ref": "#/definitions/ScSpecTypeDef" - } - } - }, - "ScSpecUdtUnionCaseTupleV0": { - "description": "ScSpecUdtUnionCaseTupleV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTUnionCaseTupleV0 { string doc; string name<60>; SCSpecTypeDef type<>; }; ```", - "type": "object", - "required": [ - "doc", - "name", - "type_" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - }, - "type_": { - "type": "array", - "items": { - "$ref": "#/definitions/ScSpecTypeDef" - }, - "maxItems": 4294967295 - } - } - }, - "ScSpecUdtUnionCaseV0": { - "description": "ScSpecUdtUnionCaseV0 is an XDR Union defined as:\n\n```text union SCSpecUDTUnionCaseV0 switch (SCSpecUDTUnionCaseV0Kind kind) { case SC_SPEC_UDT_UNION_CASE_VOID_V0: SCSpecUDTUnionCaseVoidV0 voidCase; case SC_SPEC_UDT_UNION_CASE_TUPLE_V0: SCSpecUDTUnionCaseTupleV0 tupleCase; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "void_v0" - ], - "properties": { - "void_v0": { - "$ref": "#/definitions/ScSpecUdtUnionCaseVoidV0" - } - } - }, - { - "type": "object", - "required": [ - "tuple_v0" - ], - "properties": { - "tuple_v0": { - "$ref": "#/definitions/ScSpecUdtUnionCaseTupleV0" - } - } - } - ] - }, - "ScSpecUdtUnionCaseVoidV0": { - "description": "ScSpecUdtUnionCaseVoidV0 is an XDR Struct defined as:\n\n```text struct SCSpecUDTUnionCaseVoidV0 { string doc; string name<60>; }; ```", - "type": "object", - "required": [ - "doc", - "name" - ], - "properties": { - "doc": { - "$ref": "#/definitions/StringM<1024>" - }, - "name": { - "$ref": "#/definitions/StringM<60>" - } - } - }, - "StringM<1024>": { - "type": "string", - "maxLength": 1024 - }, - "StringM<60>": { - "type": "string", - "maxLength": 60 - }, - "StringM<80>": { - "type": "string", - "maxLength": 80 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScString.json b/xdr-json/next/ScString.json deleted file mode 100644 index a03a0494..00000000 --- a/xdr-json/next/ScString.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScString", - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "properties": { - "$schema": { - "type": "string" - } - }, - "$ref": "#/definitions/StringM<4294967295>", - "unevaluatedProperties": false, - "definitions": { - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScSymbol.json b/xdr-json/next/ScSymbol.json deleted file mode 100644 index a8fb6011..00000000 --- a/xdr-json/next/ScSymbol.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScSymbol", - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "properties": { - "$schema": { - "type": "string" - } - }, - "$ref": "#/definitions/StringM<32>", - "unevaluatedProperties": false, - "definitions": { - "StringM<32>": { - "type": "string", - "maxLength": 32 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScVal.json b/xdr-json/next/ScVal.json deleted file mode 100644 index 6eaf3daf..00000000 --- a/xdr-json/next/ScVal.json +++ /dev/null @@ -1,778 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScVal", - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScValType.json b/xdr-json/next/ScValType.json deleted file mode 100644 index f52e9fd8..00000000 --- a/xdr-json/next/ScValType.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScValType", - "description": "ScValType is an XDR Enum defined as:\n\n```text enum SCValType { SCV_BOOL = 0, SCV_VOID = 1, SCV_ERROR = 2,\n\n// 32 bits is the smallest type in WASM or XDR; no need for u8/u16. SCV_U32 = 3, SCV_I32 = 4,\n\n// 64 bits is naturally supported by both WASM and XDR also. SCV_U64 = 5, SCV_I64 = 6,\n\n// Time-related u64 subtypes with their own functions and formatting. SCV_TIMEPOINT = 7, SCV_DURATION = 8,\n\n// 128 bits is naturally supported by Rust and we use it for Soroban // fixed-point arithmetic prices / balances / similar \"quantities\". These // are represented in XDR as a pair of 2 u64s. SCV_U128 = 9, SCV_I128 = 10,\n\n// 256 bits is the size of sha256 output, ed25519 keys, and the EVM machine // word, so for interop use we include this even though it requires a small // amount of Rust guest and/or host library code. SCV_U256 = 11, SCV_I256 = 12,\n\n// Bytes come in 3 flavors, 2 of which have meaningfully different // formatting and validity-checking / domain-restriction. SCV_BYTES = 13, SCV_STRING = 14, SCV_SYMBOL = 15,\n\n// Vecs and maps are just polymorphic containers of other ScVals. SCV_VEC = 16, SCV_MAP = 17,\n\n// Address is the universal identifier for contracts and classic // accounts. SCV_ADDRESS = 18,\n\n// The following are the internal SCVal variants that are not // exposed to the contracts. SCV_CONTRACT_INSTANCE = 19,\n\n// SCV_LEDGER_KEY_CONTRACT_INSTANCE and SCV_LEDGER_KEY_NONCE are unique // symbolic SCVals used as the key for ledger entries for a contract's // instance and an address' nonce, respectively. SCV_LEDGER_KEY_CONTRACT_INSTANCE = 20, SCV_LEDGER_KEY_NONCE = 21 }; ```", - "type": "string", - "enum": [ - "bool", - "void", - "error", - "u32", - "i32", - "u64", - "i64", - "timepoint", - "duration", - "u128", - "i128", - "u256", - "i256", - "bytes", - "string", - "symbol", - "vec", - "map", - "address", - "contract_instance", - "ledger_key_contract_instance", - "ledger_key_nonce" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ScVec.json b/xdr-json/next/ScVec.json deleted file mode 100644 index 4de3c9f4..00000000 --- a/xdr-json/next/ScVec.json +++ /dev/null @@ -1,531 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScVec", - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295, - "definitions": { - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScpBallot.json b/xdr-json/next/ScpBallot.json deleted file mode 100644 index 0e30e5ff..00000000 --- a/xdr-json/next/ScpBallot.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScpBallot", - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "$schema": { - "type": "string" - }, - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - }, - "unevaluatedProperties": false, - "definitions": { - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScpEnvelope.json b/xdr-json/next/ScpEnvelope.json deleted file mode 100644 index a102313e..00000000 --- a/xdr-json/next/ScpEnvelope.json +++ /dev/null @@ -1,275 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScpEnvelope", - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "$schema": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - }, - "unevaluatedProperties": false, - "definitions": { - "NodeId": { - "type": "string" - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScpHistoryEntry.json b/xdr-json/next/ScpHistoryEntry.json deleted file mode 100644 index cfdc9fb3..00000000 --- a/xdr-json/next/ScpHistoryEntry.json +++ /dev/null @@ -1,365 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScpHistoryEntry", - "description": "ScpHistoryEntry is an XDR Union defined as:\n\n```text union SCPHistoryEntry switch (int v) { case 0: SCPHistoryEntryV0 v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ScpHistoryEntryV0" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "LedgerScpMessages": { - "description": "LedgerScpMessages is an XDR Struct defined as:\n\n```text struct LedgerSCPMessages { uint32 ledgerSeq; SCPEnvelope messages<>; }; ```", - "type": "object", - "required": [ - "ledger_seq", - "messages" - ], - "properties": { - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "NodeId": { - "type": "string" - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpEnvelope": { - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - } - }, - "ScpHistoryEntryV0": { - "description": "ScpHistoryEntryV0 is an XDR Struct defined as:\n\n```text struct SCPHistoryEntryV0 { SCPQuorumSet quorumSets<>; // additional quorum sets used by ledgerMessages LedgerSCPMessages ledgerMessages; }; ```", - "type": "object", - "required": [ - "ledger_messages", - "quorum_sets" - ], - "properties": { - "ledger_messages": { - "$ref": "#/definitions/LedgerScpMessages" - }, - "quorum_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpQuorumSet": { - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScpHistoryEntryV0.json b/xdr-json/next/ScpHistoryEntryV0.json deleted file mode 100644 index 514b501f..00000000 --- a/xdr-json/next/ScpHistoryEntryV0.json +++ /dev/null @@ -1,347 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScpHistoryEntryV0", - "description": "ScpHistoryEntryV0 is an XDR Struct defined as:\n\n```text struct SCPHistoryEntryV0 { SCPQuorumSet quorumSets<>; // additional quorum sets used by ledgerMessages LedgerSCPMessages ledgerMessages; }; ```", - "type": "object", - "required": [ - "ledger_messages", - "quorum_sets" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ledger_messages": { - "$ref": "#/definitions/LedgerScpMessages" - }, - "quorum_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "LedgerScpMessages": { - "description": "LedgerScpMessages is an XDR Struct defined as:\n\n```text struct LedgerSCPMessages { uint32 ledgerSeq; SCPEnvelope messages<>; }; ```", - "type": "object", - "required": [ - "ledger_seq", - "messages" - ], - "properties": { - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "messages": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "NodeId": { - "type": "string" - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpEnvelope": { - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpQuorumSet": { - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScpNomination.json b/xdr-json/next/ScpNomination.json deleted file mode 100644 index f601e2c5..00000000 --- a/xdr-json/next/ScpNomination.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScpNomination", - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "$schema": { - "type": "string" - }, - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScpQuorumSet.json b/xdr-json/next/ScpQuorumSet.json deleted file mode 100644 index faea8279..00000000 --- a/xdr-json/next/ScpQuorumSet.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScpQuorumSet", - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "$schema": { - "type": "string" - }, - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "NodeId": { - "type": "string" - }, - "ScpQuorumSet": { - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScpStatement.json b/xdr-json/next/ScpStatement.json deleted file mode 100644 index f2f18e3c..00000000 --- a/xdr-json/next/ScpStatement.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScpStatement", - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "$schema": { - "type": "string" - }, - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "NodeId": { - "type": "string" - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScpStatementConfirm.json b/xdr-json/next/ScpStatementConfirm.json deleted file mode 100644 index 9754d3c3..00000000 --- a/xdr-json/next/ScpStatementConfirm.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScpStatementConfirm", - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScpStatementExternalize.json b/xdr-json/next/ScpStatementExternalize.json deleted file mode 100644 index ff3d082c..00000000 --- a/xdr-json/next/ScpStatementExternalize.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScpStatementExternalize", - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "$schema": { - "type": "string" - }, - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScpStatementPledges.json b/xdr-json/next/ScpStatementPledges.json deleted file mode 100644 index afa42cd7..00000000 --- a/xdr-json/next/ScpStatementPledges.json +++ /dev/null @@ -1,231 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScpStatementPledges", - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScpStatementPrepare.json b/xdr-json/next/ScpStatementPrepare.json deleted file mode 100644 index 58f2626b..00000000 --- a/xdr-json/next/ScpStatementPrepare.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScpStatementPrepare", - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ScpStatementType.json b/xdr-json/next/ScpStatementType.json deleted file mode 100644 index ab0ac953..00000000 --- a/xdr-json/next/ScpStatementType.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ScpStatementType", - "description": "ScpStatementType is an XDR Enum defined as:\n\n```text enum SCPStatementType { SCP_ST_PREPARE = 0, SCP_ST_CONFIRM = 1, SCP_ST_EXTERNALIZE = 2, SCP_ST_NOMINATE = 3 }; ```", - "type": "string", - "enum": [ - "prepare", - "confirm", - "externalize", - "nominate" - ] -} \ No newline at end of file diff --git a/xdr-json/next/SendMore.json b/xdr-json/next/SendMore.json deleted file mode 100644 index 913ff160..00000000 --- a/xdr-json/next/SendMore.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SendMore", - "description": "SendMore is an XDR Struct defined as:\n\n```text struct SendMore { uint32 numMessages; }; ```", - "type": "object", - "required": [ - "num_messages" - ], - "properties": { - "$schema": { - "type": "string" - }, - "num_messages": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/SendMoreExtended.json b/xdr-json/next/SendMoreExtended.json deleted file mode 100644 index bb9f06fb..00000000 --- a/xdr-json/next/SendMoreExtended.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SendMoreExtended", - "description": "SendMoreExtended is an XDR Struct defined as:\n\n```text struct SendMoreExtended { uint32 numMessages; uint32 numBytes; }; ```", - "type": "object", - "required": [ - "num_bytes", - "num_messages" - ], - "properties": { - "$schema": { - "type": "string" - }, - "num_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_messages": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/SequenceNumber.json b/xdr-json/next/SequenceNumber.json deleted file mode 100644 index 4046a181..00000000 --- a/xdr-json/next/SequenceNumber.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SequenceNumber", - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/SerializedBinaryFuseFilter.json b/xdr-json/next/SerializedBinaryFuseFilter.json deleted file mode 100644 index a90057a7..00000000 --- a/xdr-json/next/SerializedBinaryFuseFilter.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SerializedBinaryFuseFilter", - "description": "SerializedBinaryFuseFilter is an XDR Struct defined as:\n\n```text struct SerializedBinaryFuseFilter { BinaryFuseFilterType type;\n\n// Seed used to hash input to filter ShortHashSeed inputHashSeed;\n\n// Seed used for internal filter hash operations ShortHashSeed filterSeed; uint32 segmentLength; uint32 segementLengthMask; uint32 segmentCount; uint32 segmentCountLength; uint32 fingerprintLength; // Length in terms of element count, not bytes\n\n// Array of uint8_t, uint16_t, or uint32_t depending on filter type opaque fingerprints<>; }; ```", - "type": "object", - "required": [ - "filter_seed", - "fingerprint_length", - "fingerprints", - "input_hash_seed", - "segement_length_mask", - "segment_count", - "segment_count_length", - "segment_length", - "type_" - ], - "properties": { - "$schema": { - "type": "string" - }, - "filter_seed": { - "$ref": "#/definitions/ShortHashSeed" - }, - "fingerprint_length": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "fingerprints": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "input_hash_seed": { - "$ref": "#/definitions/ShortHashSeed" - }, - "segement_length_mask": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "segment_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "segment_count_length": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "segment_length": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "type_": { - "$ref": "#/definitions/BinaryFuseFilterType" - } - }, - "unevaluatedProperties": false, - "definitions": { - "BinaryFuseFilterType": { - "description": "BinaryFuseFilterType is an XDR Enum defined as:\n\n```text enum BinaryFuseFilterType { BINARY_FUSE_FILTER_8_BIT = 0, BINARY_FUSE_FILTER_16_BIT = 1, BINARY_FUSE_FILTER_32_BIT = 2 }; ```", - "type": "string", - "enum": [ - "b8_bit", - "b16_bit", - "b32_bit" - ] - }, - "ShortHashSeed": { - "description": "ShortHashSeed is an XDR Struct defined as:\n\n```text struct ShortHashSeed { opaque seed[16]; }; ```", - "type": "object", - "required": [ - "seed" - ], - "properties": { - "seed": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 16, - "minItems": 16 - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SetOptionsOp.json b/xdr-json/next/SetOptionsOp.json deleted file mode 100644 index b3850714..00000000 --- a/xdr-json/next/SetOptionsOp.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SetOptionsOp", - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "$schema": { - "type": "string" - }, - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SetOptionsResult.json b/xdr-json/next/SetOptionsResult.json deleted file mode 100644 index 2fdd2657..00000000 --- a/xdr-json/next/SetOptionsResult.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SetOptionsResult", - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] -} \ No newline at end of file diff --git a/xdr-json/next/SetOptionsResultCode.json b/xdr-json/next/SetOptionsResultCode.json deleted file mode 100644 index 00f49d47..00000000 --- a/xdr-json/next/SetOptionsResultCode.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SetOptionsResultCode", - "description": "SetOptionsResultCode is an XDR Enum defined as:\n\n```text enum SetOptionsResultCode { // codes considered as \"success\" for the operation SET_OPTIONS_SUCCESS = 0, // codes considered as \"failure\" for the operation SET_OPTIONS_LOW_RESERVE = -1, // not enough funds to add a signer SET_OPTIONS_TOO_MANY_SIGNERS = -2, // max number of signers already reached SET_OPTIONS_BAD_FLAGS = -3, // invalid combination of clear/set flags SET_OPTIONS_INVALID_INFLATION = -4, // inflation account does not exist SET_OPTIONS_CANT_CHANGE = -5, // can no longer change this option SET_OPTIONS_UNKNOWN_FLAG = -6, // can't set an unknown flag SET_OPTIONS_THRESHOLD_OUT_OF_RANGE = -7, // bad value for weight/threshold SET_OPTIONS_BAD_SIGNER = -8, // signer cannot be masterkey SET_OPTIONS_INVALID_HOME_DOMAIN = -9, // malformed home domain SET_OPTIONS_AUTH_REVOCABLE_REQUIRED = -10 // auth revocable is required for clawback }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] -} \ No newline at end of file diff --git a/xdr-json/next/SetTrustLineFlagsOp.json b/xdr-json/next/SetTrustLineFlagsOp.json deleted file mode 100644 index cd03cec9..00000000 --- a/xdr-json/next/SetTrustLineFlagsOp.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SetTrustLineFlagsOp", - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "$schema": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SetTrustLineFlagsResult.json b/xdr-json/next/SetTrustLineFlagsResult.json deleted file mode 100644 index 9c4fa195..00000000 --- a/xdr-json/next/SetTrustLineFlagsResult.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SetTrustLineFlagsResult", - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] -} \ No newline at end of file diff --git a/xdr-json/next/SetTrustLineFlagsResultCode.json b/xdr-json/next/SetTrustLineFlagsResultCode.json deleted file mode 100644 index 2bb3cda8..00000000 --- a/xdr-json/next/SetTrustLineFlagsResultCode.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SetTrustLineFlagsResultCode", - "description": "SetTrustLineFlagsResultCode is an XDR Enum defined as:\n\n```text enum SetTrustLineFlagsResultCode { // codes considered as \"success\" for the operation SET_TRUST_LINE_FLAGS_SUCCESS = 0,\n\n// codes considered as \"failure\" for the operation SET_TRUST_LINE_FLAGS_MALFORMED = -1, SET_TRUST_LINE_FLAGS_NO_TRUST_LINE = -2, SET_TRUST_LINE_FLAGS_CANT_REVOKE = -3, SET_TRUST_LINE_FLAGS_INVALID_STATE = -4, SET_TRUST_LINE_FLAGS_LOW_RESERVE = -5 // claimable balances can't be created // on revoke due to low reserves }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] -} \ No newline at end of file diff --git a/xdr-json/next/ShortHashSeed.json b/xdr-json/next/ShortHashSeed.json deleted file mode 100644 index b22b466a..00000000 --- a/xdr-json/next/ShortHashSeed.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ShortHashSeed", - "description": "ShortHashSeed is an XDR Struct defined as:\n\n```text struct ShortHashSeed { opaque seed[16]; }; ```", - "type": "object", - "required": [ - "seed" - ], - "properties": { - "$schema": { - "type": "string" - }, - "seed": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 16, - "minItems": 16 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/Signature.json b/xdr-json/next/Signature.json deleted file mode 100644 index e881bb42..00000000 --- a/xdr-json/next/Signature.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Signature", - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" -} \ No newline at end of file diff --git a/xdr-json/next/SignatureHint.json b/xdr-json/next/SignatureHint.json deleted file mode 100644 index 88c892fc..00000000 --- a/xdr-json/next/SignatureHint.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SignatureHint", - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" -} \ No newline at end of file diff --git a/xdr-json/next/SignedTimeSlicedSurveyRequestMessage.json b/xdr-json/next/SignedTimeSlicedSurveyRequestMessage.json deleted file mode 100644 index da1bceb2..00000000 --- a/xdr-json/next/SignedTimeSlicedSurveyRequestMessage.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SignedTimeSlicedSurveyRequestMessage", - "description": "SignedTimeSlicedSurveyRequestMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyRequestMessage { Signature requestSignature; TimeSlicedSurveyRequestMessage request; }; ```", - "type": "object", - "required": [ - "request", - "request_signature" - ], - "properties": { - "$schema": { - "type": "string" - }, - "request": { - "$ref": "#/definitions/TimeSlicedSurveyRequestMessage" - }, - "request_signature": { - "$ref": "#/definitions/Signature" - } - }, - "unevaluatedProperties": false, - "definitions": { - "Curve25519Public": { - "description": "Curve25519Public is an XDR Struct defined as:\n\n```text struct Curve25519Public { opaque key[32]; }; ```", - "type": "object", - "required": [ - "key" - ], - "properties": { - "key": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 32, - "minItems": 32 - } - } - }, - "NodeId": { - "type": "string" - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "SurveyMessageCommandType": { - "description": "SurveyMessageCommandType is an XDR Enum defined as:\n\n```text enum SurveyMessageCommandType { TIME_SLICED_SURVEY_TOPOLOGY = 1 }; ```", - "type": "string", - "enum": [ - "time_sliced_survey_topology" - ] - }, - "SurveyRequestMessage": { - "description": "SurveyRequestMessage is an XDR Struct defined as:\n\n```text struct SurveyRequestMessage { NodeID surveyorPeerID; NodeID surveyedPeerID; uint32 ledgerNum; Curve25519Public encryptionKey; SurveyMessageCommandType commandType; }; ```", - "type": "object", - "required": [ - "command_type", - "encryption_key", - "ledger_num", - "surveyed_peer_id", - "surveyor_peer_id" - ], - "properties": { - "command_type": { - "$ref": "#/definitions/SurveyMessageCommandType" - }, - "encryption_key": { - "$ref": "#/definitions/Curve25519Public" - }, - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyed_peer_id": { - "$ref": "#/definitions/NodeId" - }, - "surveyor_peer_id": { - "$ref": "#/definitions/NodeId" - } - } - }, - "TimeSlicedSurveyRequestMessage": { - "description": "TimeSlicedSurveyRequestMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyRequestMessage { SurveyRequestMessage request; uint32 nonce; uint32 inboundPeersIndex; uint32 outboundPeersIndex; }; ```", - "type": "object", - "required": [ - "inbound_peers_index", - "nonce", - "outbound_peers_index", - "request" - ], - "properties": { - "inbound_peers_index": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "outbound_peers_index": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "request": { - "$ref": "#/definitions/SurveyRequestMessage" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SignedTimeSlicedSurveyResponseMessage.json b/xdr-json/next/SignedTimeSlicedSurveyResponseMessage.json deleted file mode 100644 index c64bbeea..00000000 --- a/xdr-json/next/SignedTimeSlicedSurveyResponseMessage.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SignedTimeSlicedSurveyResponseMessage", - "description": "SignedTimeSlicedSurveyResponseMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyResponseMessage { Signature responseSignature; TimeSlicedSurveyResponseMessage response; }; ```", - "type": "object", - "required": [ - "response", - "response_signature" - ], - "properties": { - "$schema": { - "type": "string" - }, - "response": { - "$ref": "#/definitions/TimeSlicedSurveyResponseMessage" - }, - "response_signature": { - "$ref": "#/definitions/Signature" - } - }, - "unevaluatedProperties": false, - "definitions": { - "EncryptedBody": { - "description": "EncryptedBody is an XDR Typedef defined as:\n\n```text typedef opaque EncryptedBody<64000>; ```", - "type": "string", - "maxLength": 128000, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "NodeId": { - "type": "string" - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "SurveyMessageCommandType": { - "description": "SurveyMessageCommandType is an XDR Enum defined as:\n\n```text enum SurveyMessageCommandType { TIME_SLICED_SURVEY_TOPOLOGY = 1 }; ```", - "type": "string", - "enum": [ - "time_sliced_survey_topology" - ] - }, - "SurveyResponseMessage": { - "description": "SurveyResponseMessage is an XDR Struct defined as:\n\n```text struct SurveyResponseMessage { NodeID surveyorPeerID; NodeID surveyedPeerID; uint32 ledgerNum; SurveyMessageCommandType commandType; EncryptedBody encryptedBody; }; ```", - "type": "object", - "required": [ - "command_type", - "encrypted_body", - "ledger_num", - "surveyed_peer_id", - "surveyor_peer_id" - ], - "properties": { - "command_type": { - "$ref": "#/definitions/SurveyMessageCommandType" - }, - "encrypted_body": { - "$ref": "#/definitions/EncryptedBody" - }, - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyed_peer_id": { - "$ref": "#/definitions/NodeId" - }, - "surveyor_peer_id": { - "$ref": "#/definitions/NodeId" - } - } - }, - "TimeSlicedSurveyResponseMessage": { - "description": "TimeSlicedSurveyResponseMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyResponseMessage { SurveyResponseMessage response; uint32 nonce; }; ```", - "type": "object", - "required": [ - "nonce", - "response" - ], - "properties": { - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "response": { - "$ref": "#/definitions/SurveyResponseMessage" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SignedTimeSlicedSurveyStartCollectingMessage.json b/xdr-json/next/SignedTimeSlicedSurveyStartCollectingMessage.json deleted file mode 100644 index 52ad6884..00000000 --- a/xdr-json/next/SignedTimeSlicedSurveyStartCollectingMessage.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SignedTimeSlicedSurveyStartCollectingMessage", - "description": "SignedTimeSlicedSurveyStartCollectingMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyStartCollectingMessage { Signature signature; TimeSlicedSurveyStartCollectingMessage startCollecting; }; ```", - "type": "object", - "required": [ - "signature", - "start_collecting" - ], - "properties": { - "$schema": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/Signature" - }, - "start_collecting": { - "$ref": "#/definitions/TimeSlicedSurveyStartCollectingMessage" - } - }, - "unevaluatedProperties": false, - "definitions": { - "NodeId": { - "type": "string" - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "TimeSlicedSurveyStartCollectingMessage": { - "description": "TimeSlicedSurveyStartCollectingMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyStartCollectingMessage { NodeID surveyorID; uint32 nonce; uint32 ledgerNum; }; ```", - "type": "object", - "required": [ - "ledger_num", - "nonce", - "surveyor_id" - ], - "properties": { - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyor_id": { - "$ref": "#/definitions/NodeId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SignedTimeSlicedSurveyStopCollectingMessage.json b/xdr-json/next/SignedTimeSlicedSurveyStopCollectingMessage.json deleted file mode 100644 index 9593dc72..00000000 --- a/xdr-json/next/SignedTimeSlicedSurveyStopCollectingMessage.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SignedTimeSlicedSurveyStopCollectingMessage", - "description": "SignedTimeSlicedSurveyStopCollectingMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyStopCollectingMessage { Signature signature; TimeSlicedSurveyStopCollectingMessage stopCollecting; }; ```", - "type": "object", - "required": [ - "signature", - "stop_collecting" - ], - "properties": { - "$schema": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/Signature" - }, - "stop_collecting": { - "$ref": "#/definitions/TimeSlicedSurveyStopCollectingMessage" - } - }, - "unevaluatedProperties": false, - "definitions": { - "NodeId": { - "type": "string" - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "TimeSlicedSurveyStopCollectingMessage": { - "description": "TimeSlicedSurveyStopCollectingMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyStopCollectingMessage { NodeID surveyorID; uint32 nonce; uint32 ledgerNum; }; ```", - "type": "object", - "required": [ - "ledger_num", - "nonce", - "surveyor_id" - ], - "properties": { - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyor_id": { - "$ref": "#/definitions/NodeId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/Signer.json b/xdr-json/next/Signer.json deleted file mode 100644 index dae18548..00000000 --- a/xdr-json/next/Signer.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Signer", - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "$schema": { - "type": "string" - }, - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "SignerKey": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SignerKey.json b/xdr-json/next/SignerKey.json deleted file mode 100644 index b2831d3d..00000000 --- a/xdr-json/next/SignerKey.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SignerKey", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/SignerKeyEd25519SignedPayload.json b/xdr-json/next/SignerKeyEd25519SignedPayload.json deleted file mode 100644 index 15d61c24..00000000 --- a/xdr-json/next/SignerKeyEd25519SignedPayload.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SignerKeyEd25519SignedPayload", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/SignerKeyType.json b/xdr-json/next/SignerKeyType.json deleted file mode 100644 index ca43cb7b..00000000 --- a/xdr-json/next/SignerKeyType.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SignerKeyType", - "description": "SignerKeyType is an XDR Enum defined as:\n\n```text enum SignerKeyType { SIGNER_KEY_TYPE_ED25519 = KEY_TYPE_ED25519, SIGNER_KEY_TYPE_PRE_AUTH_TX = KEY_TYPE_PRE_AUTH_TX, SIGNER_KEY_TYPE_HASH_X = KEY_TYPE_HASH_X, SIGNER_KEY_TYPE_ED25519_SIGNED_PAYLOAD = KEY_TYPE_ED25519_SIGNED_PAYLOAD }; ```", - "type": "string", - "enum": [ - "ed25519", - "pre_auth_tx", - "hash_x", - "ed25519_signed_payload" - ] -} \ No newline at end of file diff --git a/xdr-json/next/SimplePaymentResult.json b/xdr-json/next/SimplePaymentResult.json deleted file mode 100644 index b232a36b..00000000 --- a/xdr-json/next/SimplePaymentResult.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SimplePaymentResult", - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "$schema": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SorobanAddressCredentials.json b/xdr-json/next/SorobanAddressCredentials.json deleted file mode 100644 index ad5af306..00000000 --- a/xdr-json/next/SorobanAddressCredentials.json +++ /dev/null @@ -1,553 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanAddressCredentials", - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "$schema": { - "type": "string" - }, - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SorobanAuthorizationEntries.json b/xdr-json/next/SorobanAuthorizationEntries.json deleted file mode 100644 index 669c3dab..00000000 --- a/xdr-json/next/SorobanAuthorizationEntries.json +++ /dev/null @@ -1,838 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanAuthorizationEntries", - "description": "SorobanAuthorizationEntries is an XDR Typedef defined as:\n\n```text typedef SorobanAuthorizationEntry SorobanAuthorizationEntries<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SorobanAuthorizationEntry.json b/xdr-json/next/SorobanAuthorizationEntry.json deleted file mode 100644 index 8292b242..00000000 --- a/xdr-json/next/SorobanAuthorizationEntry.json +++ /dev/null @@ -1,834 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanAuthorizationEntry", - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "$schema": { - "type": "string" - }, - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SorobanAuthorizedFunction.json b/xdr-json/next/SorobanAuthorizedFunction.json deleted file mode 100644 index b86d7066..00000000 --- a/xdr-json/next/SorobanAuthorizedFunction.json +++ /dev/null @@ -1,752 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanAuthorizedFunction", - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SorobanAuthorizedFunctionType.json b/xdr-json/next/SorobanAuthorizedFunctionType.json deleted file mode 100644 index 17029de1..00000000 --- a/xdr-json/next/SorobanAuthorizedFunctionType.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanAuthorizedFunctionType", - "description": "SorobanAuthorizedFunctionType is an XDR Enum defined as:\n\n```text enum SorobanAuthorizedFunctionType { SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN = 0, SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1, SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN = 2 }; ```", - "type": "string", - "enum": [ - "contract_fn", - "create_contract_host_fn", - "create_contract_v2_host_fn" - ] -} \ No newline at end of file diff --git a/xdr-json/next/SorobanAuthorizedInvocation.json b/xdr-json/next/SorobanAuthorizedInvocation.json deleted file mode 100644 index 0fa895a8..00000000 --- a/xdr-json/next/SorobanAuthorizedInvocation.json +++ /dev/null @@ -1,790 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanAuthorizedInvocation", - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "$schema": { - "type": "string" - }, - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SorobanCredentials.json b/xdr-json/next/SorobanCredentials.json deleted file mode 100644 index 8db0b3d3..00000000 --- a/xdr-json/next/SorobanCredentials.json +++ /dev/null @@ -1,577 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanCredentials", - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SorobanCredentialsType.json b/xdr-json/next/SorobanCredentialsType.json deleted file mode 100644 index 04d544ca..00000000 --- a/xdr-json/next/SorobanCredentialsType.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanCredentialsType", - "description": "SorobanCredentialsType is an XDR Enum defined as:\n\n```text enum SorobanCredentialsType { SOROBAN_CREDENTIALS_SOURCE_ACCOUNT = 0, SOROBAN_CREDENTIALS_ADDRESS = 1 }; ```", - "type": "string", - "enum": [ - "source_account", - "address" - ] -} \ No newline at end of file diff --git a/xdr-json/next/SorobanResources.json b/xdr-json/next/SorobanResources.json deleted file mode 100644 index 643bd870..00000000 --- a/xdr-json/next/SorobanResources.json +++ /dev/null @@ -1,978 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanResources", - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "$schema": { - "type": "string" - }, - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "PoolId": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SorobanResourcesExtV0.json b/xdr-json/next/SorobanResourcesExtV0.json deleted file mode 100644 index e0fdb6f4..00000000 --- a/xdr-json/next/SorobanResourcesExtV0.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanResourcesExtV0", - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "$schema": { - "type": "string" - }, - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/SorobanTransactionData.json b/xdr-json/next/SorobanTransactionData.json deleted file mode 100644 index 470dc359..00000000 --- a/xdr-json/next/SorobanTransactionData.json +++ /dev/null @@ -1,1038 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanTransactionData", - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "PoolId": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SorobanTransactionDataExt.json b/xdr-json/next/SorobanTransactionDataExt.json deleted file mode 100644 index 644f539a..00000000 --- a/xdr-json/next/SorobanTransactionDataExt.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanTransactionDataExt", - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SorobanTransactionMeta.json b/xdr-json/next/SorobanTransactionMeta.json deleted file mode 100644 index 29ac16e0..00000000 --- a/xdr-json/next/SorobanTransactionMeta.json +++ /dev/null @@ -1,706 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanTransactionMeta", - "description": "SorobanTransactionMeta is an XDR Struct defined as:\n\n```text struct SorobanTransactionMeta { SorobanTransactionMetaExt ext;\n\nContractEvent events<>; // custom events populated by the // contracts themselves. SCVal returnValue; // return value of the host fn invocation\n\n// Diagnostics events that are not hashed. // This will contain all contract and diagnostic events. Even ones // that were emitted in a failed contract call. DiagnosticEvent diagnosticEvents<>; }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "return_value" - ], - "properties": { - "$schema": { - "type": "string" - }, - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "$ref": "#/definitions/ScVal" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "DiagnosticEvent": { - "description": "DiagnosticEvent is an XDR Struct defined as:\n\n```text struct DiagnosticEvent { bool inSuccessfulContractCall; ContractEvent event; }; ```", - "type": "object", - "required": [ - "event", - "in_successful_contract_call" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "in_successful_contract_call": { - "type": "boolean" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SorobanTransactionMetaExt": { - "description": "SorobanTransactionMetaExt is an XDR Union defined as:\n\n```text union SorobanTransactionMetaExt switch (int v) { case 0: void; case 1: SorobanTransactionMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionMetaExtV1" - } - } - } - ] - }, - "SorobanTransactionMetaExtV1": { - "description": "SorobanTransactionMetaExtV1 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaExtV1 { ExtensionPoint ext;\n\n// The following are the components of the overall Soroban resource fee // charged for the transaction. // The following relation holds: // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` // where `resourceFeeCharged` is the overall fee charged for the // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` // i.e.we never charge more than the declared resource fee. // The inclusion fee for charged the Soroban transaction can be found using // the following equation: // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.\n\n// Total amount (in stroops) that has been charged for non-refundable // Soroban resources. // Non-refundable resources are charged based on the usage declared in // the transaction envelope (such as `instructions`, `readBytes` etc.) and // is charged regardless of the success of the transaction. int64 totalNonRefundableResourceFeeCharged; // Total amount (in stroops) that has been charged for refundable // Soroban resource fees. // Currently this comprises the rent fee (`rentFeeCharged`) and the // fee for the events and return value. // Refundable resources are charged based on the actual resources usage. // Since currently refundable resources are only used for the successful // transactions, this will be `0` for failed transactions. int64 totalRefundableResourceFeeCharged; // Amount (in stroops) that has been charged for rent. // This is a part of `totalNonRefundableResourceFeeCharged`. int64 rentFeeCharged; }; ```", - "type": "object", - "required": [ - "ext", - "rent_fee_charged", - "total_non_refundable_resource_fee_charged", - "total_refundable_resource_fee_charged" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "rent_fee_charged": { - "type": "string" - }, - "total_non_refundable_resource_fee_charged": { - "type": "string" - }, - "total_refundable_resource_fee_charged": { - "type": "string" - } - } - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SorobanTransactionMetaExt.json b/xdr-json/next/SorobanTransactionMetaExt.json deleted file mode 100644 index 5e057a0a..00000000 --- a/xdr-json/next/SorobanTransactionMetaExt.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanTransactionMetaExt", - "description": "SorobanTransactionMetaExt is an XDR Union defined as:\n\n```text union SorobanTransactionMetaExt switch (int v) { case 0: void; case 1: SorobanTransactionMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionMetaExtV1" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "SorobanTransactionMetaExtV1": { - "description": "SorobanTransactionMetaExtV1 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaExtV1 { ExtensionPoint ext;\n\n// The following are the components of the overall Soroban resource fee // charged for the transaction. // The following relation holds: // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` // where `resourceFeeCharged` is the overall fee charged for the // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` // i.e.we never charge more than the declared resource fee. // The inclusion fee for charged the Soroban transaction can be found using // the following equation: // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.\n\n// Total amount (in stroops) that has been charged for non-refundable // Soroban resources. // Non-refundable resources are charged based on the usage declared in // the transaction envelope (such as `instructions`, `readBytes` etc.) and // is charged regardless of the success of the transaction. int64 totalNonRefundableResourceFeeCharged; // Total amount (in stroops) that has been charged for refundable // Soroban resource fees. // Currently this comprises the rent fee (`rentFeeCharged`) and the // fee for the events and return value. // Refundable resources are charged based on the actual resources usage. // Since currently refundable resources are only used for the successful // transactions, this will be `0` for failed transactions. int64 totalRefundableResourceFeeCharged; // Amount (in stroops) that has been charged for rent. // This is a part of `totalNonRefundableResourceFeeCharged`. int64 rentFeeCharged; }; ```", - "type": "object", - "required": [ - "ext", - "rent_fee_charged", - "total_non_refundable_resource_fee_charged", - "total_refundable_resource_fee_charged" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "rent_fee_charged": { - "type": "string" - }, - "total_non_refundable_resource_fee_charged": { - "type": "string" - }, - "total_refundable_resource_fee_charged": { - "type": "string" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SorobanTransactionMetaExtV1.json b/xdr-json/next/SorobanTransactionMetaExtV1.json deleted file mode 100644 index c06e542d..00000000 --- a/xdr-json/next/SorobanTransactionMetaExtV1.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanTransactionMetaExtV1", - "description": "SorobanTransactionMetaExtV1 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaExtV1 { ExtensionPoint ext;\n\n// The following are the components of the overall Soroban resource fee // charged for the transaction. // The following relation holds: // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` // where `resourceFeeCharged` is the overall fee charged for the // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` // i.e.we never charge more than the declared resource fee. // The inclusion fee for charged the Soroban transaction can be found using // the following equation: // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.\n\n// Total amount (in stroops) that has been charged for non-refundable // Soroban resources. // Non-refundable resources are charged based on the usage declared in // the transaction envelope (such as `instructions`, `readBytes` etc.) and // is charged regardless of the success of the transaction. int64 totalNonRefundableResourceFeeCharged; // Total amount (in stroops) that has been charged for refundable // Soroban resource fees. // Currently this comprises the rent fee (`rentFeeCharged`) and the // fee for the events and return value. // Refundable resources are charged based on the actual resources usage. // Since currently refundable resources are only used for the successful // transactions, this will be `0` for failed transactions. int64 totalRefundableResourceFeeCharged; // Amount (in stroops) that has been charged for rent. // This is a part of `totalNonRefundableResourceFeeCharged`. int64 rentFeeCharged; }; ```", - "type": "object", - "required": [ - "ext", - "rent_fee_charged", - "total_non_refundable_resource_fee_charged", - "total_refundable_resource_fee_charged" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "rent_fee_charged": { - "type": "string" - }, - "total_non_refundable_resource_fee_charged": { - "type": "string" - }, - "total_refundable_resource_fee_charged": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SorobanTransactionMetaV2.json b/xdr-json/next/SorobanTransactionMetaV2.json deleted file mode 100644 index 6b30bf29..00000000 --- a/xdr-json/next/SorobanTransactionMetaV2.json +++ /dev/null @@ -1,602 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SorobanTransactionMetaV2", - "description": "SorobanTransactionMetaV2 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaV2 { SorobanTransactionMetaExt ext;\n\nSCVal* returnValue; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "anyOf": [ - { - "$ref": "#/definitions/ScVal" - }, - { - "type": "null" - } - ] - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SorobanTransactionMetaExt": { - "description": "SorobanTransactionMetaExt is an XDR Union defined as:\n\n```text union SorobanTransactionMetaExt switch (int v) { case 0: void; case 1: SorobanTransactionMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionMetaExtV1" - } - } - } - ] - }, - "SorobanTransactionMetaExtV1": { - "description": "SorobanTransactionMetaExtV1 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaExtV1 { ExtensionPoint ext;\n\n// The following are the components of the overall Soroban resource fee // charged for the transaction. // The following relation holds: // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` // where `resourceFeeCharged` is the overall fee charged for the // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` // i.e.we never charge more than the declared resource fee. // The inclusion fee for charged the Soroban transaction can be found using // the following equation: // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.\n\n// Total amount (in stroops) that has been charged for non-refundable // Soroban resources. // Non-refundable resources are charged based on the usage declared in // the transaction envelope (such as `instructions`, `readBytes` etc.) and // is charged regardless of the success of the transaction. int64 totalNonRefundableResourceFeeCharged; // Total amount (in stroops) that has been charged for refundable // Soroban resource fees. // Currently this comprises the rent fee (`rentFeeCharged`) and the // fee for the events and return value. // Refundable resources are charged based on the actual resources usage. // Since currently refundable resources are only used for the successful // transactions, this will be `0` for failed transactions. int64 totalRefundableResourceFeeCharged; // Amount (in stroops) that has been charged for rent. // This is a part of `totalNonRefundableResourceFeeCharged`. int64 rentFeeCharged; }; ```", - "type": "object", - "required": [ - "ext", - "rent_fee_charged", - "total_non_refundable_resource_fee_charged", - "total_refundable_resource_fee_charged" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "rent_fee_charged": { - "type": "string" - }, - "total_non_refundable_resource_fee_charged": { - "type": "string" - }, - "total_refundable_resource_fee_charged": { - "type": "string" - } - } - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SponsorshipDescriptor.json b/xdr-json/next/SponsorshipDescriptor.json deleted file mode 100644 index 672e3beb..00000000 --- a/xdr-json/next/SponsorshipDescriptor.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SponsorshipDescriptor", - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/StateArchivalSettings.json b/xdr-json/next/StateArchivalSettings.json deleted file mode 100644 index 6d64fc43..00000000 --- a/xdr-json/next/StateArchivalSettings.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "StateArchivalSettings", - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "$schema": { - "type": "string" - }, - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/StellarMessage.json b/xdr-json/next/StellarMessage.json deleted file mode 100644 index 012c48aa..00000000 --- a/xdr-json/next/StellarMessage.json +++ /dev/null @@ -1,4294 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "StellarMessage", - "description": "StellarMessage is an XDR Union defined as:\n\n```text union StellarMessage switch (MessageType type) { case ERROR_MSG: Error error; case HELLO: Hello hello; case AUTH: Auth auth; case DONT_HAVE: DontHave dontHave; case PEERS: PeerAddress peers<100>;\n\ncase GET_TX_SET: uint256 txSetHash; case TX_SET: TransactionSet txSet; case GENERALIZED_TX_SET: GeneralizedTransactionSet generalizedTxSet;\n\ncase TRANSACTION: TransactionEnvelope transaction;\n\ncase TIME_SLICED_SURVEY_REQUEST: SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage;\n\ncase TIME_SLICED_SURVEY_RESPONSE: SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage;\n\ncase TIME_SLICED_SURVEY_START_COLLECTING: SignedTimeSlicedSurveyStartCollectingMessage signedTimeSlicedSurveyStartCollectingMessage;\n\ncase TIME_SLICED_SURVEY_STOP_COLLECTING: SignedTimeSlicedSurveyStopCollectingMessage signedTimeSlicedSurveyStopCollectingMessage;\n\n// SCP case GET_SCP_QUORUMSET: uint256 qSetHash; case SCP_QUORUMSET: SCPQuorumSet qSet; case SCP_MESSAGE: SCPEnvelope envelope; case GET_SCP_STATE: uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest case SEND_MORE: SendMore sendMoreMessage; case SEND_MORE_EXTENDED: SendMoreExtended sendMoreExtendedMessage; // Pull mode case FLOOD_ADVERT: FloodAdvert floodAdvert; case FLOOD_DEMAND: FloodDemand floodDemand; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "error_msg" - ], - "properties": { - "error_msg": { - "$ref": "#/definitions/SError" - } - } - }, - { - "type": "object", - "required": [ - "hello" - ], - "properties": { - "hello": { - "$ref": "#/definitions/Hello" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/Auth" - } - } - }, - { - "type": "object", - "required": [ - "dont_have" - ], - "properties": { - "dont_have": { - "$ref": "#/definitions/DontHave" - } - } - }, - { - "type": "object", - "required": [ - "peers" - ], - "properties": { - "peers": { - "type": "array", - "items": { - "$ref": "#/definitions/PeerAddress" - }, - "maxItems": 100 - } - } - }, - { - "type": "object", - "required": [ - "get_tx_set" - ], - "properties": { - "get_tx_set": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "tx_set" - ], - "properties": { - "tx_set": { - "$ref": "#/definitions/TransactionSet" - } - } - }, - { - "type": "object", - "required": [ - "generalized_tx_set" - ], - "properties": { - "generalized_tx_set": { - "$ref": "#/definitions/GeneralizedTransactionSet" - } - } - }, - { - "type": "object", - "required": [ - "transaction" - ], - "properties": { - "transaction": { - "$ref": "#/definitions/TransactionEnvelope" - } - } - }, - { - "type": "object", - "required": [ - "time_sliced_survey_request" - ], - "properties": { - "time_sliced_survey_request": { - "$ref": "#/definitions/SignedTimeSlicedSurveyRequestMessage" - } - } - }, - { - "type": "object", - "required": [ - "time_sliced_survey_response" - ], - "properties": { - "time_sliced_survey_response": { - "$ref": "#/definitions/SignedTimeSlicedSurveyResponseMessage" - } - } - }, - { - "type": "object", - "required": [ - "time_sliced_survey_start_collecting" - ], - "properties": { - "time_sliced_survey_start_collecting": { - "$ref": "#/definitions/SignedTimeSlicedSurveyStartCollectingMessage" - } - } - }, - { - "type": "object", - "required": [ - "time_sliced_survey_stop_collecting" - ], - "properties": { - "time_sliced_survey_stop_collecting": { - "$ref": "#/definitions/SignedTimeSlicedSurveyStopCollectingMessage" - } - } - }, - { - "type": "object", - "required": [ - "get_scp_quorumset" - ], - "properties": { - "get_scp_quorumset": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "scp_quorumset" - ], - "properties": { - "scp_quorumset": { - "$ref": "#/definitions/ScpQuorumSet" - } - } - }, - { - "type": "object", - "required": [ - "scp_message" - ], - "properties": { - "scp_message": { - "$ref": "#/definitions/ScpEnvelope" - } - } - }, - { - "type": "object", - "required": [ - "get_scp_state" - ], - "properties": { - "get_scp_state": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "send_more" - ], - "properties": { - "send_more": { - "$ref": "#/definitions/SendMore" - } - } - }, - { - "type": "object", - "required": [ - "send_more_extended" - ], - "properties": { - "send_more_extended": { - "$ref": "#/definitions/SendMoreExtended" - } - } - }, - { - "type": "object", - "required": [ - "flood_advert" - ], - "properties": { - "flood_advert": { - "$ref": "#/definitions/FloodAdvert" - } - } - }, - { - "type": "object", - "required": [ - "flood_demand" - ], - "properties": { - "flood_demand": { - "$ref": "#/definitions/FloodDemand" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "Auth": { - "description": "Auth is an XDR Struct defined as:\n\n```text struct Auth { int flags; }; ```", - "type": "object", - "required": [ - "flags" - ], - "properties": { - "flags": { - "type": "integer", - "format": "int32" - } - } - }, - "AuthCert": { - "description": "AuthCert is an XDR Struct defined as:\n\n```text struct AuthCert { Curve25519Public pubkey; uint64 expiration; Signature sig; }; ```", - "type": "object", - "required": [ - "expiration", - "pubkey", - "sig" - ], - "properties": { - "expiration": { - "type": "string" - }, - "pubkey": { - "$ref": "#/definitions/Curve25519Public" - }, - "sig": { - "$ref": "#/definitions/Signature" - } - } - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Curve25519Public": { - "description": "Curve25519Public is an XDR Struct defined as:\n\n```text struct Curve25519Public { opaque key[32]; }; ```", - "type": "object", - "required": [ - "key" - ], - "properties": { - "key": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 32, - "minItems": 32 - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "DontHave": { - "description": "DontHave is an XDR Struct defined as:\n\n```text struct DontHave { MessageType type; uint256 reqHash; }; ```", - "type": "object", - "required": [ - "req_hash", - "type_" - ], - "properties": { - "req_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "type_": { - "$ref": "#/definitions/MessageType" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncryptedBody": { - "description": "EncryptedBody is an XDR Typedef defined as:\n\n```text typedef opaque EncryptedBody<64000>; ```", - "type": "string", - "maxLength": 128000, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ErrorCode": { - "description": "ErrorCode is an XDR Enum defined as:\n\n```text enum ErrorCode { ERR_MISC = 0, // Unspecific error ERR_DATA = 1, // Malformed data ERR_CONF = 2, // Misconfiguration error ERR_AUTH = 3, // Authentication failure ERR_LOAD = 4 // System overloaded }; ```", - "type": "string", - "enum": [ - "misc", - "data", - "conf", - "auth", - "load" - ] - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "FloodAdvert": { - "description": "FloodAdvert is an XDR Struct defined as:\n\n```text struct FloodAdvert { TxAdvertVector txHashes; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "$ref": "#/definitions/TxAdvertVector" - } - } - }, - "FloodDemand": { - "description": "FloodDemand is an XDR Struct defined as:\n\n```text struct FloodDemand { TxDemandVector txHashes; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "$ref": "#/definitions/TxDemandVector" - } - } - }, - "GeneralizedTransactionSet": { - "description": "GeneralizedTransactionSet is an XDR Union defined as:\n\n```text union GeneralizedTransactionSet switch (int v) { // We consider the legacy TransactionSet to be v0. case 1: TransactionSetV1 v1TxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionSetV1" - } - } - } - ] - }, - "Hello": { - "description": "Hello is an XDR Struct defined as:\n\n```text struct Hello { uint32 ledgerVersion; uint32 overlayVersion; uint32 overlayMinVersion; Hash networkID; string versionStr<100>; int listeningPort; NodeID peerID; AuthCert cert; uint256 nonce; }; ```", - "type": "object", - "required": [ - "cert", - "ledger_version", - "listening_port", - "network_id", - "nonce", - "overlay_min_version", - "overlay_version", - "peer_id", - "version_str" - ], - "properties": { - "cert": { - "$ref": "#/definitions/AuthCert" - }, - "ledger_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "listening_port": { - "type": "integer", - "format": "int32" - }, - "network_id": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "nonce": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "overlay_min_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "overlay_version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "peer_id": { - "$ref": "#/definitions/NodeId" - }, - "version_str": { - "$ref": "#/definitions/StringM<100>" - } - } - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MessageType": { - "description": "MessageType is an XDR Enum defined as:\n\n```text enum MessageType { ERROR_MSG = 0, AUTH = 2, DONT_HAVE = 3, // GET_PEERS (4) is deprecated\n\nPEERS = 5,\n\nGET_TX_SET = 6, // gets a particular txset by hash TX_SET = 7, GENERALIZED_TX_SET = 17,\n\nTRANSACTION = 8, // pass on a tx you have heard about\n\n// SCP GET_SCP_QUORUMSET = 9, SCP_QUORUMSET = 10, SCP_MESSAGE = 11, GET_SCP_STATE = 12,\n\n// new messages HELLO = 13,\n\n// SURVEY_REQUEST (14) removed and replaced by TIME_SLICED_SURVEY_REQUEST // SURVEY_RESPONSE (15) removed and replaced by TIME_SLICED_SURVEY_RESPONSE\n\nSEND_MORE = 16, SEND_MORE_EXTENDED = 20,\n\nFLOOD_ADVERT = 18, FLOOD_DEMAND = 19,\n\nTIME_SLICED_SURVEY_REQUEST = 21, TIME_SLICED_SURVEY_RESPONSE = 22, TIME_SLICED_SURVEY_START_COLLECTING = 23, TIME_SLICED_SURVEY_STOP_COLLECTING = 24 }; ```", - "type": "string", - "enum": [ - "error_msg", - "auth", - "dont_have", - "peers", - "get_tx_set", - "tx_set", - "generalized_tx_set", - "transaction", - "get_scp_quorumset", - "scp_quorumset", - "scp_message", - "get_scp_state", - "hello", - "send_more", - "send_more_extended", - "flood_advert", - "flood_demand", - "time_sliced_survey_request", - "time_sliced_survey_response", - "time_sliced_survey_start_collecting", - "time_sliced_survey_stop_collecting" - ] - }, - "MuxedAccount": { - "type": "string" - }, - "NodeId": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PeerAddress": { - "description": "PeerAddress is an XDR Struct defined as:\n\n```text struct PeerAddress { union switch (IPAddrType type) { case IPv4: opaque ipv4[4]; case IPv6: opaque ipv6[16]; } ip; uint32 port; uint32 numFailures; }; ```", - "type": "object", - "required": [ - "ip", - "num_failures", - "port" - ], - "properties": { - "ip": { - "$ref": "#/definitions/PeerAddressIp" - }, - "num_failures": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "port": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "PeerAddressIp": { - "description": "PeerAddressIp is an XDR NestedUnion defined as:\n\n```text union switch (IPAddrType type) { case IPv4: opaque ipv4[4]; case IPv6: opaque ipv6[16]; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "i_pv4" - ], - "properties": { - "i_pv4": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 4, - "minItems": 4 - } - } - }, - { - "type": "object", - "required": [ - "i_pv6" - ], - "properties": { - "i_pv6": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 16, - "minItems": 16 - } - } - } - ] - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "SError": { - "description": "SError is an XDR Struct defined as:\n\n```text struct Error { ErrorCode code; string msg<100>; }; ```", - "type": "object", - "required": [ - "code", - "msg" - ], - "properties": { - "code": { - "$ref": "#/definitions/ErrorCode" - }, - "msg": { - "$ref": "#/definitions/StringM<100>" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "ScpBallot": { - "description": "ScpBallot is an XDR Struct defined as:\n\n```text struct SCPBallot { uint32 counter; // n Value value; // x }; ```", - "type": "object", - "required": [ - "counter", - "value" - ], - "properties": { - "counter": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "value": { - "$ref": "#/definitions/Value" - } - } - }, - "ScpEnvelope": { - "description": "ScpEnvelope is an XDR Struct defined as:\n\n```text struct SCPEnvelope { SCPStatement statement; Signature signature; }; ```", - "type": "object", - "required": [ - "signature", - "statement" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "statement": { - "$ref": "#/definitions/ScpStatement" - } - } - }, - "ScpNomination": { - "description": "ScpNomination is an XDR Struct defined as:\n\n```text struct SCPNomination { Hash quorumSetHash; // D Value votes<>; // X Value accepted<>; // Y }; ```", - "type": "object", - "required": [ - "accepted", - "quorum_set_hash", - "votes" - ], - "properties": { - "accepted": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "votes": { - "type": "array", - "items": { - "$ref": "#/definitions/Value" - }, - "maxItems": 4294967295 - } - } - }, - "ScpQuorumSet": { - "description": "ScpQuorumSet is an XDR Struct defined as:\n\n```text struct SCPQuorumSet { uint32 threshold; NodeID validators<>; SCPQuorumSet innerSets<>; }; ```", - "type": "object", - "required": [ - "inner_sets", - "threshold", - "validators" - ], - "properties": { - "inner_sets": { - "type": "array", - "items": { - "$ref": "#/definitions/ScpQuorumSet" - }, - "maxItems": 4294967295 - }, - "threshold": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/NodeId" - }, - "maxItems": 4294967295 - } - } - }, - "ScpStatement": { - "description": "ScpStatement is an XDR Struct defined as:\n\n```text struct SCPStatement { NodeID nodeID; // v uint64 slotIndex; // i\n\nunion switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } pledges; }; ```", - "type": "object", - "required": [ - "node_id", - "pledges", - "slot_index" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "pledges": { - "$ref": "#/definitions/ScpStatementPledges" - }, - "slot_index": { - "type": "string" - } - } - }, - "ScpStatementConfirm": { - "description": "ScpStatementConfirm is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } ```", - "type": "object", - "required": [ - "ballot", - "n_commit", - "n_h", - "n_prepared", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_commit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_prepared": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ScpStatementExternalize": { - "description": "ScpStatementExternalize is an XDR NestedStruct defined as:\n\n```text struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } ```", - "type": "object", - "required": [ - "commit", - "commit_quorum_set_hash", - "n_h" - ], - "properties": { - "commit": { - "$ref": "#/definitions/ScpBallot" - }, - "commit_quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ScpStatementPledges": { - "description": "ScpStatementPledges is an XDR NestedUnion defined as:\n\n```text union switch (SCPStatementType type) { case SCP_ST_PREPARE: struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } prepare; case SCP_ST_CONFIRM: struct { SCPBallot ballot; // b uint32 nPrepared; // p.n uint32 nCommit; // c.n uint32 nH; // h.n Hash quorumSetHash; // D } confirm; case SCP_ST_EXTERNALIZE: struct { SCPBallot commit; // c uint32 nH; // h.n Hash commitQuorumSetHash; // D used before EXTERNALIZE } externalize; case SCP_ST_NOMINATE: SCPNomination nominate; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "prepare" - ], - "properties": { - "prepare": { - "$ref": "#/definitions/ScpStatementPrepare" - } - } - }, - { - "type": "object", - "required": [ - "confirm" - ], - "properties": { - "confirm": { - "$ref": "#/definitions/ScpStatementConfirm" - } - } - }, - { - "type": "object", - "required": [ - "externalize" - ], - "properties": { - "externalize": { - "$ref": "#/definitions/ScpStatementExternalize" - } - } - }, - { - "type": "object", - "required": [ - "nominate" - ], - "properties": { - "nominate": { - "$ref": "#/definitions/ScpNomination" - } - } - } - ] - }, - "ScpStatementPrepare": { - "description": "ScpStatementPrepare is an XDR NestedStruct defined as:\n\n```text struct { Hash quorumSetHash; // D SCPBallot ballot; // b SCPBallot* prepared; // p SCPBallot* preparedPrime; // p' uint32 nC; // c.n uint32 nH; // h.n } ```", - "type": "object", - "required": [ - "ballot", - "n_c", - "n_h", - "quorum_set_hash" - ], - "properties": { - "ballot": { - "$ref": "#/definitions/ScpBallot" - }, - "n_c": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_h": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "prepared": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "prepared_prime": { - "anyOf": [ - { - "$ref": "#/definitions/ScpBallot" - }, - { - "type": "null" - } - ] - }, - "quorum_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "SendMore": { - "description": "SendMore is an XDR Struct defined as:\n\n```text struct SendMore { uint32 numMessages; }; ```", - "type": "object", - "required": [ - "num_messages" - ], - "properties": { - "num_messages": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SendMoreExtended": { - "description": "SendMoreExtended is an XDR Struct defined as:\n\n```text struct SendMoreExtended { uint32 numMessages; uint32 numBytes; }; ```", - "type": "object", - "required": [ - "num_bytes", - "num_messages" - ], - "properties": { - "num_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_messages": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "SignedTimeSlicedSurveyRequestMessage": { - "description": "SignedTimeSlicedSurveyRequestMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyRequestMessage { Signature requestSignature; TimeSlicedSurveyRequestMessage request; }; ```", - "type": "object", - "required": [ - "request", - "request_signature" - ], - "properties": { - "request": { - "$ref": "#/definitions/TimeSlicedSurveyRequestMessage" - }, - "request_signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "SignedTimeSlicedSurveyResponseMessage": { - "description": "SignedTimeSlicedSurveyResponseMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyResponseMessage { Signature responseSignature; TimeSlicedSurveyResponseMessage response; }; ```", - "type": "object", - "required": [ - "response", - "response_signature" - ], - "properties": { - "response": { - "$ref": "#/definitions/TimeSlicedSurveyResponseMessage" - }, - "response_signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "SignedTimeSlicedSurveyStartCollectingMessage": { - "description": "SignedTimeSlicedSurveyStartCollectingMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyStartCollectingMessage { Signature signature; TimeSlicedSurveyStartCollectingMessage startCollecting; }; ```", - "type": "object", - "required": [ - "signature", - "start_collecting" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "start_collecting": { - "$ref": "#/definitions/TimeSlicedSurveyStartCollectingMessage" - } - } - }, - "SignedTimeSlicedSurveyStopCollectingMessage": { - "description": "SignedTimeSlicedSurveyStopCollectingMessage is an XDR Struct defined as:\n\n```text struct SignedTimeSlicedSurveyStopCollectingMessage { Signature signature; TimeSlicedSurveyStopCollectingMessage stopCollecting; }; ```", - "type": "object", - "required": [ - "signature", - "stop_collecting" - ], - "properties": { - "signature": { - "$ref": "#/definitions/Signature" - }, - "stop_collecting": { - "$ref": "#/definitions/TimeSlicedSurveyStopCollectingMessage" - } - } - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<100>": { - "type": "string", - "maxLength": 100 - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "SurveyMessageCommandType": { - "description": "SurveyMessageCommandType is an XDR Enum defined as:\n\n```text enum SurveyMessageCommandType { TIME_SLICED_SURVEY_TOPOLOGY = 1 }; ```", - "type": "string", - "enum": [ - "time_sliced_survey_topology" - ] - }, - "SurveyRequestMessage": { - "description": "SurveyRequestMessage is an XDR Struct defined as:\n\n```text struct SurveyRequestMessage { NodeID surveyorPeerID; NodeID surveyedPeerID; uint32 ledgerNum; Curve25519Public encryptionKey; SurveyMessageCommandType commandType; }; ```", - "type": "object", - "required": [ - "command_type", - "encryption_key", - "ledger_num", - "surveyed_peer_id", - "surveyor_peer_id" - ], - "properties": { - "command_type": { - "$ref": "#/definitions/SurveyMessageCommandType" - }, - "encryption_key": { - "$ref": "#/definitions/Curve25519Public" - }, - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyed_peer_id": { - "$ref": "#/definitions/NodeId" - }, - "surveyor_peer_id": { - "$ref": "#/definitions/NodeId" - } - } - }, - "SurveyResponseMessage": { - "description": "SurveyResponseMessage is an XDR Struct defined as:\n\n```text struct SurveyResponseMessage { NodeID surveyorPeerID; NodeID surveyedPeerID; uint32 ledgerNum; SurveyMessageCommandType commandType; EncryptedBody encryptedBody; }; ```", - "type": "object", - "required": [ - "command_type", - "encrypted_body", - "ledger_num", - "surveyed_peer_id", - "surveyor_peer_id" - ], - "properties": { - "command_type": { - "$ref": "#/definitions/SurveyMessageCommandType" - }, - "encrypted_body": { - "$ref": "#/definitions/EncryptedBody" - }, - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyed_peer_id": { - "$ref": "#/definitions/NodeId" - }, - "surveyor_peer_id": { - "$ref": "#/definitions/NodeId" - } - } - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TimeSlicedSurveyRequestMessage": { - "description": "TimeSlicedSurveyRequestMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyRequestMessage { SurveyRequestMessage request; uint32 nonce; uint32 inboundPeersIndex; uint32 outboundPeersIndex; }; ```", - "type": "object", - "required": [ - "inbound_peers_index", - "nonce", - "outbound_peers_index", - "request" - ], - "properties": { - "inbound_peers_index": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "outbound_peers_index": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "request": { - "$ref": "#/definitions/SurveyRequestMessage" - } - } - }, - "TimeSlicedSurveyResponseMessage": { - "description": "TimeSlicedSurveyResponseMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyResponseMessage { SurveyResponseMessage response; uint32 nonce; }; ```", - "type": "object", - "required": [ - "nonce", - "response" - ], - "properties": { - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "response": { - "$ref": "#/definitions/SurveyResponseMessage" - } - } - }, - "TimeSlicedSurveyStartCollectingMessage": { - "description": "TimeSlicedSurveyStartCollectingMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyStartCollectingMessage { NodeID surveyorID; uint32 nonce; uint32 ledgerNum; }; ```", - "type": "object", - "required": [ - "ledger_num", - "nonce", - "surveyor_id" - ], - "properties": { - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyor_id": { - "$ref": "#/definitions/NodeId" - } - } - }, - "TimeSlicedSurveyStopCollectingMessage": { - "description": "TimeSlicedSurveyStopCollectingMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyStopCollectingMessage { NodeID surveyorID; uint32 nonce; uint32 ledgerNum; }; ```", - "type": "object", - "required": [ - "ledger_num", - "nonce", - "surveyor_id" - ], - "properties": { - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyor_id": { - "$ref": "#/definitions/NodeId" - } - } - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionSet": { - "description": "TransactionSet is an XDR Struct defined as:\n\n```text struct TransactionSet { Hash previousLedgerHash; TransactionEnvelope txs<>; }; ```", - "type": "object", - "required": [ - "previous_ledger_hash", - "txs" - ], - "properties": { - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "TransactionSetV1": { - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TxAdvertVector": { - "description": "TxAdvertVector is an XDR Typedef defined as:\n\n```text typedef Hash TxAdvertVector; ```", - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 1000 - }, - "TxDemandVector": { - "description": "TxDemandVector is an XDR Typedef defined as:\n\n```text typedef Hash TxDemandVector; ```", - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 1000 - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - }, - "Value": { - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/StellarValue.json b/xdr-json/next/StellarValue.json deleted file mode 100644 index 36c0107d..00000000 --- a/xdr-json/next/StellarValue.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "StellarValue", - "description": "StellarValue is an XDR Struct defined as:\n\n```text struct StellarValue { Hash txSetHash; // transaction set to apply to previous ledger TimePoint closeTime; // network close time\n\n// upgrades to apply to the previous ledger (usually empty) // this is a vector of encoded 'LedgerUpgrade' so that nodes can drop // unknown steps during consensus if needed. // see notes below on 'LedgerUpgrade' for more detail // max size is dictated by number of upgrade types (+ room for future) UpgradeType upgrades<6>;\n\n// reserved for future use union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ext; }; ```", - "type": "object", - "required": [ - "close_time", - "ext", - "tx_set_hash", - "upgrades" - ], - "properties": { - "$schema": { - "type": "string" - }, - "close_time": { - "$ref": "#/definitions/TimePoint" - }, - "ext": { - "$ref": "#/definitions/StellarValueExt" - }, - "tx_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "upgrades": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeType" - }, - "maxItems": 6 - } - }, - "unevaluatedProperties": false, - "definitions": { - "LedgerCloseValueSignature": { - "description": "LedgerCloseValueSignature is an XDR Struct defined as:\n\n```text struct LedgerCloseValueSignature { NodeID nodeID; // which node introduced the value Signature signature; // nodeID's signature }; ```", - "type": "object", - "required": [ - "node_id", - "signature" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "NodeId": { - "type": "string" - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "StellarValueExt": { - "description": "StellarValueExt is an XDR NestedUnion defined as:\n\n```text union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "basic" - ] - }, - { - "type": "object", - "required": [ - "signed" - ], - "properties": { - "signed": { - "$ref": "#/definitions/LedgerCloseValueSignature" - } - } - } - ] - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "UpgradeType": { - "description": "UpgradeType is an XDR Typedef defined as:\n\n```text typedef opaque UpgradeType<128>; ```", - "type": "string", - "maxLength": 256, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/StellarValueExt.json b/xdr-json/next/StellarValueExt.json deleted file mode 100644 index 765614ff..00000000 --- a/xdr-json/next/StellarValueExt.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "StellarValueExt", - "description": "StellarValueExt is an XDR NestedUnion defined as:\n\n```text union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "basic" - ] - }, - { - "type": "object", - "required": [ - "signed" - ], - "properties": { - "signed": { - "$ref": "#/definitions/LedgerCloseValueSignature" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "LedgerCloseValueSignature": { - "description": "LedgerCloseValueSignature is an XDR Struct defined as:\n\n```text struct LedgerCloseValueSignature { NodeID nodeID; // which node introduced the value Signature signature; // nodeID's signature }; ```", - "type": "object", - "required": [ - "node_id", - "signature" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "NodeId": { - "type": "string" - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/StellarValueType.json b/xdr-json/next/StellarValueType.json deleted file mode 100644 index 5aa40595..00000000 --- a/xdr-json/next/StellarValueType.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "StellarValueType", - "description": "StellarValueType is an XDR Enum defined as:\n\n```text enum StellarValueType { STELLAR_VALUE_BASIC = 0, STELLAR_VALUE_SIGNED = 1 }; ```", - "type": "string", - "enum": [ - "basic", - "signed" - ] -} \ No newline at end of file diff --git a/xdr-json/next/StoredDebugTransactionSet.json b/xdr-json/next/StoredDebugTransactionSet.json deleted file mode 100644 index 404ac46d..00000000 --- a/xdr-json/next/StoredDebugTransactionSet.json +++ /dev/null @@ -1,3311 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "StoredDebugTransactionSet", - "description": "StoredDebugTransactionSet is an XDR Struct defined as:\n\n```text struct StoredDebugTransactionSet { StoredTransactionSet txSet; uint32 ledgerSeq; StellarValue scpValue; }; ```", - "type": "object", - "required": [ - "ledger_seq", - "scp_value", - "tx_set" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "scp_value": { - "$ref": "#/definitions/StellarValue" - }, - "tx_set": { - "$ref": "#/definitions/StoredTransactionSet" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "GeneralizedTransactionSet": { - "description": "GeneralizedTransactionSet is an XDR Union defined as:\n\n```text union GeneralizedTransactionSet switch (int v) { // We consider the legacy TransactionSet to be v0. case 1: TransactionSetV1 v1TxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionSetV1" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerCloseValueSignature": { - "description": "LedgerCloseValueSignature is an XDR Struct defined as:\n\n```text struct LedgerCloseValueSignature { NodeID nodeID; // which node introduced the value Signature signature; // nodeID's signature }; ```", - "type": "object", - "required": [ - "node_id", - "signature" - ], - "properties": { - "node_id": { - "$ref": "#/definitions/NodeId" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "NodeId": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "StellarValue": { - "description": "StellarValue is an XDR Struct defined as:\n\n```text struct StellarValue { Hash txSetHash; // transaction set to apply to previous ledger TimePoint closeTime; // network close time\n\n// upgrades to apply to the previous ledger (usually empty) // this is a vector of encoded 'LedgerUpgrade' so that nodes can drop // unknown steps during consensus if needed. // see notes below on 'LedgerUpgrade' for more detail // max size is dictated by number of upgrade types (+ room for future) UpgradeType upgrades<6>;\n\n// reserved for future use union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ext; }; ```", - "type": "object", - "required": [ - "close_time", - "ext", - "tx_set_hash", - "upgrades" - ], - "properties": { - "close_time": { - "$ref": "#/definitions/TimePoint" - }, - "ext": { - "$ref": "#/definitions/StellarValueExt" - }, - "tx_set_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "upgrades": { - "type": "array", - "items": { - "$ref": "#/definitions/UpgradeType" - }, - "maxItems": 6 - } - } - }, - "StellarValueExt": { - "description": "StellarValueExt is an XDR NestedUnion defined as:\n\n```text union switch (StellarValueType v) { case STELLAR_VALUE_BASIC: void; case STELLAR_VALUE_SIGNED: LedgerCloseValueSignature lcValueSignature; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "basic" - ] - }, - { - "type": "object", - "required": [ - "signed" - ], - "properties": { - "signed": { - "$ref": "#/definitions/LedgerCloseValueSignature" - } - } - } - ] - }, - "StoredTransactionSet": { - "description": "StoredTransactionSet is an XDR Union defined as:\n\n```text union StoredTransactionSet switch (int v) { case 0: TransactionSet txSet; case 1: GeneralizedTransactionSet generalizedTxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/TransactionSet" - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/GeneralizedTransactionSet" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionSet": { - "description": "TransactionSet is an XDR Struct defined as:\n\n```text struct TransactionSet { Hash previousLedgerHash; TransactionEnvelope txs<>; }; ```", - "type": "object", - "required": [ - "previous_ledger_hash", - "txs" - ], - "properties": { - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "TransactionSetV1": { - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - }, - "UpgradeType": { - "description": "UpgradeType is an XDR Typedef defined as:\n\n```text typedef opaque UpgradeType<128>; ```", - "type": "string", - "maxLength": 256, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/StoredTransactionSet.json b/xdr-json/next/StoredTransactionSet.json deleted file mode 100644 index 48872852..00000000 --- a/xdr-json/next/StoredTransactionSet.json +++ /dev/null @@ -1,3211 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "StoredTransactionSet", - "description": "StoredTransactionSet is an XDR Union defined as:\n\n```text union StoredTransactionSet switch (int v) { case 0: TransactionSet txSet; case 1: GeneralizedTransactionSet generalizedTxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/TransactionSet" - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/GeneralizedTransactionSet" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "GeneralizedTransactionSet": { - "description": "GeneralizedTransactionSet is an XDR Union defined as:\n\n```text union GeneralizedTransactionSet switch (int v) { // We consider the legacy TransactionSet to be v0. case 1: TransactionSetV1 v1TxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionSetV1" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionSet": { - "description": "TransactionSet is an XDR Struct defined as:\n\n```text struct TransactionSet { Hash previousLedgerHash; TransactionEnvelope txs<>; }; ```", - "type": "object", - "required": [ - "previous_ledger_hash", - "txs" - ], - "properties": { - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "TransactionSetV1": { - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/String32.json b/xdr-json/next/String32.json deleted file mode 100644 index 8bfb289d..00000000 --- a/xdr-json/next/String32.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "String32", - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "properties": { - "$schema": { - "type": "string" - } - }, - "$ref": "#/definitions/StringM<32>", - "unevaluatedProperties": false, - "definitions": { - "StringM<32>": { - "type": "string", - "maxLength": 32 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/String64.json b/xdr-json/next/String64.json deleted file mode 100644 index 0341e969..00000000 --- a/xdr-json/next/String64.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "String64", - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "properties": { - "$schema": { - "type": "string" - } - }, - "$ref": "#/definitions/StringM<64>", - "unevaluatedProperties": false, - "definitions": { - "StringM<64>": { - "type": "string", - "maxLength": 64 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SurveyMessageCommandType.json b/xdr-json/next/SurveyMessageCommandType.json deleted file mode 100644 index 9f38c9d6..00000000 --- a/xdr-json/next/SurveyMessageCommandType.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SurveyMessageCommandType", - "description": "SurveyMessageCommandType is an XDR Enum defined as:\n\n```text enum SurveyMessageCommandType { TIME_SLICED_SURVEY_TOPOLOGY = 1 }; ```", - "type": "string", - "enum": [ - "time_sliced_survey_topology" - ] -} \ No newline at end of file diff --git a/xdr-json/next/SurveyMessageResponseType.json b/xdr-json/next/SurveyMessageResponseType.json deleted file mode 100644 index 1545726b..00000000 --- a/xdr-json/next/SurveyMessageResponseType.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SurveyMessageResponseType", - "description": "SurveyMessageResponseType is an XDR Enum defined as:\n\n```text enum SurveyMessageResponseType { SURVEY_TOPOLOGY_RESPONSE_V2 = 2 }; ```", - "type": "string", - "enum": [ - "survey_topology_response_v2" - ] -} \ No newline at end of file diff --git a/xdr-json/next/SurveyRequestMessage.json b/xdr-json/next/SurveyRequestMessage.json deleted file mode 100644 index 7e837c2f..00000000 --- a/xdr-json/next/SurveyRequestMessage.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SurveyRequestMessage", - "description": "SurveyRequestMessage is an XDR Struct defined as:\n\n```text struct SurveyRequestMessage { NodeID surveyorPeerID; NodeID surveyedPeerID; uint32 ledgerNum; Curve25519Public encryptionKey; SurveyMessageCommandType commandType; }; ```", - "type": "object", - "required": [ - "command_type", - "encryption_key", - "ledger_num", - "surveyed_peer_id", - "surveyor_peer_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "command_type": { - "$ref": "#/definitions/SurveyMessageCommandType" - }, - "encryption_key": { - "$ref": "#/definitions/Curve25519Public" - }, - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyed_peer_id": { - "$ref": "#/definitions/NodeId" - }, - "surveyor_peer_id": { - "$ref": "#/definitions/NodeId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "Curve25519Public": { - "description": "Curve25519Public is an XDR Struct defined as:\n\n```text struct Curve25519Public { opaque key[32]; }; ```", - "type": "object", - "required": [ - "key" - ], - "properties": { - "key": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 32, - "minItems": 32 - } - } - }, - "NodeId": { - "type": "string" - }, - "SurveyMessageCommandType": { - "description": "SurveyMessageCommandType is an XDR Enum defined as:\n\n```text enum SurveyMessageCommandType { TIME_SLICED_SURVEY_TOPOLOGY = 1 }; ```", - "type": "string", - "enum": [ - "time_sliced_survey_topology" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SurveyResponseBody.json b/xdr-json/next/SurveyResponseBody.json deleted file mode 100644 index 61fd4cdd..00000000 --- a/xdr-json/next/SurveyResponseBody.json +++ /dev/null @@ -1,213 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SurveyResponseBody", - "description": "SurveyResponseBody is an XDR Union defined as:\n\n```text union SurveyResponseBody switch (SurveyMessageResponseType type) { case SURVEY_TOPOLOGY_RESPONSE_V2: TopologyResponseBodyV2 topologyResponseBodyV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "survey_topology_response_v2" - ], - "properties": { - "survey_topology_response_v2": { - "$ref": "#/definitions/TopologyResponseBodyV2" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "NodeId": { - "type": "string" - }, - "PeerStats": { - "description": "PeerStats is an XDR Struct defined as:\n\n```text struct PeerStats { NodeID id; string versionStr<100>; uint64 messagesRead; uint64 messagesWritten; uint64 bytesRead; uint64 bytesWritten; uint64 secondsConnected;\n\nuint64 uniqueFloodBytesRecv; uint64 duplicateFloodBytesRecv; uint64 uniqueFetchBytesRecv; uint64 duplicateFetchBytesRecv;\n\nuint64 uniqueFloodMessageRecv; uint64 duplicateFloodMessageRecv; uint64 uniqueFetchMessageRecv; uint64 duplicateFetchMessageRecv; }; ```", - "type": "object", - "required": [ - "bytes_read", - "bytes_written", - "duplicate_fetch_bytes_recv", - "duplicate_fetch_message_recv", - "duplicate_flood_bytes_recv", - "duplicate_flood_message_recv", - "id", - "messages_read", - "messages_written", - "seconds_connected", - "unique_fetch_bytes_recv", - "unique_fetch_message_recv", - "unique_flood_bytes_recv", - "unique_flood_message_recv", - "version_str" - ], - "properties": { - "bytes_read": { - "type": "string" - }, - "bytes_written": { - "type": "string" - }, - "duplicate_fetch_bytes_recv": { - "type": "string" - }, - "duplicate_fetch_message_recv": { - "type": "string" - }, - "duplicate_flood_bytes_recv": { - "type": "string" - }, - "duplicate_flood_message_recv": { - "type": "string" - }, - "id": { - "$ref": "#/definitions/NodeId" - }, - "messages_read": { - "type": "string" - }, - "messages_written": { - "type": "string" - }, - "seconds_connected": { - "type": "string" - }, - "unique_fetch_bytes_recv": { - "type": "string" - }, - "unique_fetch_message_recv": { - "type": "string" - }, - "unique_flood_bytes_recv": { - "type": "string" - }, - "unique_flood_message_recv": { - "type": "string" - }, - "version_str": { - "$ref": "#/definitions/StringM<100>" - } - } - }, - "StringM<100>": { - "type": "string", - "maxLength": 100 - }, - "TimeSlicedNodeData": { - "description": "TimeSlicedNodeData is an XDR Struct defined as:\n\n```text struct TimeSlicedNodeData { uint32 addedAuthenticatedPeers; uint32 droppedAuthenticatedPeers; uint32 totalInboundPeerCount; uint32 totalOutboundPeerCount;\n\n// SCP stats uint32 p75SCPFirstToSelfLatencyMs; uint32 p75SCPSelfToOtherLatencyMs;\n\n// How many times the node lost sync in the time slice uint32 lostSyncCount;\n\n// Config data bool isValidator; uint32 maxInboundPeerCount; uint32 maxOutboundPeerCount; }; ```", - "type": "object", - "required": [ - "added_authenticated_peers", - "dropped_authenticated_peers", - "is_validator", - "lost_sync_count", - "max_inbound_peer_count", - "max_outbound_peer_count", - "p75_scp_first_to_self_latency_ms", - "p75_scp_self_to_other_latency_ms", - "total_inbound_peer_count", - "total_outbound_peer_count" - ], - "properties": { - "added_authenticated_peers": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "dropped_authenticated_peers": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_validator": { - "type": "boolean" - }, - "lost_sync_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_inbound_peer_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_outbound_peer_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "p75_scp_first_to_self_latency_ms": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "p75_scp_self_to_other_latency_ms": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "total_inbound_peer_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "total_outbound_peer_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "TimeSlicedPeerData": { - "description": "TimeSlicedPeerData is an XDR Struct defined as:\n\n```text struct TimeSlicedPeerData { PeerStats peerStats; uint32 averageLatencyMs; }; ```", - "type": "object", - "required": [ - "average_latency_ms", - "peer_stats" - ], - "properties": { - "average_latency_ms": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "peer_stats": { - "$ref": "#/definitions/PeerStats" - } - } - }, - "TimeSlicedPeerDataList": { - "description": "TimeSlicedPeerDataList is an XDR Typedef defined as:\n\n```text typedef TimeSlicedPeerData TimeSlicedPeerDataList<25>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TimeSlicedPeerData" - }, - "maxItems": 25 - }, - "TopologyResponseBodyV2": { - "description": "TopologyResponseBodyV2 is an XDR Struct defined as:\n\n```text struct TopologyResponseBodyV2 { TimeSlicedPeerDataList inboundPeers; TimeSlicedPeerDataList outboundPeers; TimeSlicedNodeData nodeData; }; ```", - "type": "object", - "required": [ - "inbound_peers", - "node_data", - "outbound_peers" - ], - "properties": { - "inbound_peers": { - "$ref": "#/definitions/TimeSlicedPeerDataList" - }, - "node_data": { - "$ref": "#/definitions/TimeSlicedNodeData" - }, - "outbound_peers": { - "$ref": "#/definitions/TimeSlicedPeerDataList" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/SurveyResponseMessage.json b/xdr-json/next/SurveyResponseMessage.json deleted file mode 100644 index 37fca8a1..00000000 --- a/xdr-json/next/SurveyResponseMessage.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SurveyResponseMessage", - "description": "SurveyResponseMessage is an XDR Struct defined as:\n\n```text struct SurveyResponseMessage { NodeID surveyorPeerID; NodeID surveyedPeerID; uint32 ledgerNum; SurveyMessageCommandType commandType; EncryptedBody encryptedBody; }; ```", - "type": "object", - "required": [ - "command_type", - "encrypted_body", - "ledger_num", - "surveyed_peer_id", - "surveyor_peer_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "command_type": { - "$ref": "#/definitions/SurveyMessageCommandType" - }, - "encrypted_body": { - "$ref": "#/definitions/EncryptedBody" - }, - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyed_peer_id": { - "$ref": "#/definitions/NodeId" - }, - "surveyor_peer_id": { - "$ref": "#/definitions/NodeId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "EncryptedBody": { - "description": "EncryptedBody is an XDR Typedef defined as:\n\n```text typedef opaque EncryptedBody<64000>; ```", - "type": "string", - "maxLength": 128000, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "NodeId": { - "type": "string" - }, - "SurveyMessageCommandType": { - "description": "SurveyMessageCommandType is an XDR Enum defined as:\n\n```text enum SurveyMessageCommandType { TIME_SLICED_SURVEY_TOPOLOGY = 1 }; ```", - "type": "string", - "enum": [ - "time_sliced_survey_topology" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/ThresholdIndexes.json b/xdr-json/next/ThresholdIndexes.json deleted file mode 100644 index 825a4377..00000000 --- a/xdr-json/next/ThresholdIndexes.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "ThresholdIndexes", - "description": "ThresholdIndexes is an XDR Enum defined as:\n\n```text enum ThresholdIndexes { THRESHOLD_MASTER_WEIGHT = 0, THRESHOLD_LOW = 1, THRESHOLD_MED = 2, THRESHOLD_HIGH = 3 }; ```", - "type": "string", - "enum": [ - "master_weight", - "low", - "med", - "high" - ] -} \ No newline at end of file diff --git a/xdr-json/next/Thresholds.json b/xdr-json/next/Thresholds.json deleted file mode 100644 index 223f9e34..00000000 --- a/xdr-json/next/Thresholds.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Thresholds", - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" -} \ No newline at end of file diff --git a/xdr-json/next/TimeBounds.json b/xdr-json/next/TimeBounds.json deleted file mode 100644 index 9bf5cd5a..00000000 --- a/xdr-json/next/TimeBounds.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TimeBounds", - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "$schema": { - "type": "string" - }, - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - }, - "unevaluatedProperties": false, - "definitions": { - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TimePoint.json b/xdr-json/next/TimePoint.json deleted file mode 100644 index ed245220..00000000 --- a/xdr-json/next/TimePoint.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TimePoint", - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/TimeSlicedNodeData.json b/xdr-json/next/TimeSlicedNodeData.json deleted file mode 100644 index bfa5cbce..00000000 --- a/xdr-json/next/TimeSlicedNodeData.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TimeSlicedNodeData", - "description": "TimeSlicedNodeData is an XDR Struct defined as:\n\n```text struct TimeSlicedNodeData { uint32 addedAuthenticatedPeers; uint32 droppedAuthenticatedPeers; uint32 totalInboundPeerCount; uint32 totalOutboundPeerCount;\n\n// SCP stats uint32 p75SCPFirstToSelfLatencyMs; uint32 p75SCPSelfToOtherLatencyMs;\n\n// How many times the node lost sync in the time slice uint32 lostSyncCount;\n\n// Config data bool isValidator; uint32 maxInboundPeerCount; uint32 maxOutboundPeerCount; }; ```", - "type": "object", - "required": [ - "added_authenticated_peers", - "dropped_authenticated_peers", - "is_validator", - "lost_sync_count", - "max_inbound_peer_count", - "max_outbound_peer_count", - "p75_scp_first_to_self_latency_ms", - "p75_scp_self_to_other_latency_ms", - "total_inbound_peer_count", - "total_outbound_peer_count" - ], - "properties": { - "$schema": { - "type": "string" - }, - "added_authenticated_peers": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "dropped_authenticated_peers": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_validator": { - "type": "boolean" - }, - "lost_sync_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_inbound_peer_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_outbound_peer_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "p75_scp_first_to_self_latency_ms": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "p75_scp_self_to_other_latency_ms": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "total_inbound_peer_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "total_outbound_peer_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/TimeSlicedPeerData.json b/xdr-json/next/TimeSlicedPeerData.json deleted file mode 100644 index f8e3cf3a..00000000 --- a/xdr-json/next/TimeSlicedPeerData.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TimeSlicedPeerData", - "description": "TimeSlicedPeerData is an XDR Struct defined as:\n\n```text struct TimeSlicedPeerData { PeerStats peerStats; uint32 averageLatencyMs; }; ```", - "type": "object", - "required": [ - "average_latency_ms", - "peer_stats" - ], - "properties": { - "$schema": { - "type": "string" - }, - "average_latency_ms": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "peer_stats": { - "$ref": "#/definitions/PeerStats" - } - }, - "unevaluatedProperties": false, - "definitions": { - "NodeId": { - "type": "string" - }, - "PeerStats": { - "description": "PeerStats is an XDR Struct defined as:\n\n```text struct PeerStats { NodeID id; string versionStr<100>; uint64 messagesRead; uint64 messagesWritten; uint64 bytesRead; uint64 bytesWritten; uint64 secondsConnected;\n\nuint64 uniqueFloodBytesRecv; uint64 duplicateFloodBytesRecv; uint64 uniqueFetchBytesRecv; uint64 duplicateFetchBytesRecv;\n\nuint64 uniqueFloodMessageRecv; uint64 duplicateFloodMessageRecv; uint64 uniqueFetchMessageRecv; uint64 duplicateFetchMessageRecv; }; ```", - "type": "object", - "required": [ - "bytes_read", - "bytes_written", - "duplicate_fetch_bytes_recv", - "duplicate_fetch_message_recv", - "duplicate_flood_bytes_recv", - "duplicate_flood_message_recv", - "id", - "messages_read", - "messages_written", - "seconds_connected", - "unique_fetch_bytes_recv", - "unique_fetch_message_recv", - "unique_flood_bytes_recv", - "unique_flood_message_recv", - "version_str" - ], - "properties": { - "bytes_read": { - "type": "string" - }, - "bytes_written": { - "type": "string" - }, - "duplicate_fetch_bytes_recv": { - "type": "string" - }, - "duplicate_fetch_message_recv": { - "type": "string" - }, - "duplicate_flood_bytes_recv": { - "type": "string" - }, - "duplicate_flood_message_recv": { - "type": "string" - }, - "id": { - "$ref": "#/definitions/NodeId" - }, - "messages_read": { - "type": "string" - }, - "messages_written": { - "type": "string" - }, - "seconds_connected": { - "type": "string" - }, - "unique_fetch_bytes_recv": { - "type": "string" - }, - "unique_fetch_message_recv": { - "type": "string" - }, - "unique_flood_bytes_recv": { - "type": "string" - }, - "unique_flood_message_recv": { - "type": "string" - }, - "version_str": { - "$ref": "#/definitions/StringM<100>" - } - } - }, - "StringM<100>": { - "type": "string", - "maxLength": 100 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TimeSlicedPeerDataList.json b/xdr-json/next/TimeSlicedPeerDataList.json deleted file mode 100644 index aa4efa9c..00000000 --- a/xdr-json/next/TimeSlicedPeerDataList.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TimeSlicedPeerDataList", - "description": "TimeSlicedPeerDataList is an XDR Typedef defined as:\n\n```text typedef TimeSlicedPeerData TimeSlicedPeerDataList<25>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TimeSlicedPeerData" - }, - "maxItems": 25, - "definitions": { - "NodeId": { - "type": "string" - }, - "PeerStats": { - "description": "PeerStats is an XDR Struct defined as:\n\n```text struct PeerStats { NodeID id; string versionStr<100>; uint64 messagesRead; uint64 messagesWritten; uint64 bytesRead; uint64 bytesWritten; uint64 secondsConnected;\n\nuint64 uniqueFloodBytesRecv; uint64 duplicateFloodBytesRecv; uint64 uniqueFetchBytesRecv; uint64 duplicateFetchBytesRecv;\n\nuint64 uniqueFloodMessageRecv; uint64 duplicateFloodMessageRecv; uint64 uniqueFetchMessageRecv; uint64 duplicateFetchMessageRecv; }; ```", - "type": "object", - "required": [ - "bytes_read", - "bytes_written", - "duplicate_fetch_bytes_recv", - "duplicate_fetch_message_recv", - "duplicate_flood_bytes_recv", - "duplicate_flood_message_recv", - "id", - "messages_read", - "messages_written", - "seconds_connected", - "unique_fetch_bytes_recv", - "unique_fetch_message_recv", - "unique_flood_bytes_recv", - "unique_flood_message_recv", - "version_str" - ], - "properties": { - "bytes_read": { - "type": "string" - }, - "bytes_written": { - "type": "string" - }, - "duplicate_fetch_bytes_recv": { - "type": "string" - }, - "duplicate_fetch_message_recv": { - "type": "string" - }, - "duplicate_flood_bytes_recv": { - "type": "string" - }, - "duplicate_flood_message_recv": { - "type": "string" - }, - "id": { - "$ref": "#/definitions/NodeId" - }, - "messages_read": { - "type": "string" - }, - "messages_written": { - "type": "string" - }, - "seconds_connected": { - "type": "string" - }, - "unique_fetch_bytes_recv": { - "type": "string" - }, - "unique_fetch_message_recv": { - "type": "string" - }, - "unique_flood_bytes_recv": { - "type": "string" - }, - "unique_flood_message_recv": { - "type": "string" - }, - "version_str": { - "$ref": "#/definitions/StringM<100>" - } - } - }, - "StringM<100>": { - "type": "string", - "maxLength": 100 - }, - "TimeSlicedPeerData": { - "description": "TimeSlicedPeerData is an XDR Struct defined as:\n\n```text struct TimeSlicedPeerData { PeerStats peerStats; uint32 averageLatencyMs; }; ```", - "type": "object", - "required": [ - "average_latency_ms", - "peer_stats" - ], - "properties": { - "average_latency_ms": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "peer_stats": { - "$ref": "#/definitions/PeerStats" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TimeSlicedSurveyRequestMessage.json b/xdr-json/next/TimeSlicedSurveyRequestMessage.json deleted file mode 100644 index 20631f65..00000000 --- a/xdr-json/next/TimeSlicedSurveyRequestMessage.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TimeSlicedSurveyRequestMessage", - "description": "TimeSlicedSurveyRequestMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyRequestMessage { SurveyRequestMessage request; uint32 nonce; uint32 inboundPeersIndex; uint32 outboundPeersIndex; }; ```", - "type": "object", - "required": [ - "inbound_peers_index", - "nonce", - "outbound_peers_index", - "request" - ], - "properties": { - "$schema": { - "type": "string" - }, - "inbound_peers_index": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "outbound_peers_index": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "request": { - "$ref": "#/definitions/SurveyRequestMessage" - } - }, - "unevaluatedProperties": false, - "definitions": { - "Curve25519Public": { - "description": "Curve25519Public is an XDR Struct defined as:\n\n```text struct Curve25519Public { opaque key[32]; }; ```", - "type": "object", - "required": [ - "key" - ], - "properties": { - "key": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - }, - "maxItems": 32, - "minItems": 32 - } - } - }, - "NodeId": { - "type": "string" - }, - "SurveyMessageCommandType": { - "description": "SurveyMessageCommandType is an XDR Enum defined as:\n\n```text enum SurveyMessageCommandType { TIME_SLICED_SURVEY_TOPOLOGY = 1 }; ```", - "type": "string", - "enum": [ - "time_sliced_survey_topology" - ] - }, - "SurveyRequestMessage": { - "description": "SurveyRequestMessage is an XDR Struct defined as:\n\n```text struct SurveyRequestMessage { NodeID surveyorPeerID; NodeID surveyedPeerID; uint32 ledgerNum; Curve25519Public encryptionKey; SurveyMessageCommandType commandType; }; ```", - "type": "object", - "required": [ - "command_type", - "encryption_key", - "ledger_num", - "surveyed_peer_id", - "surveyor_peer_id" - ], - "properties": { - "command_type": { - "$ref": "#/definitions/SurveyMessageCommandType" - }, - "encryption_key": { - "$ref": "#/definitions/Curve25519Public" - }, - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyed_peer_id": { - "$ref": "#/definitions/NodeId" - }, - "surveyor_peer_id": { - "$ref": "#/definitions/NodeId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TimeSlicedSurveyResponseMessage.json b/xdr-json/next/TimeSlicedSurveyResponseMessage.json deleted file mode 100644 index a354c871..00000000 --- a/xdr-json/next/TimeSlicedSurveyResponseMessage.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TimeSlicedSurveyResponseMessage", - "description": "TimeSlicedSurveyResponseMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyResponseMessage { SurveyResponseMessage response; uint32 nonce; }; ```", - "type": "object", - "required": [ - "nonce", - "response" - ], - "properties": { - "$schema": { - "type": "string" - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "response": { - "$ref": "#/definitions/SurveyResponseMessage" - } - }, - "unevaluatedProperties": false, - "definitions": { - "EncryptedBody": { - "description": "EncryptedBody is an XDR Typedef defined as:\n\n```text typedef opaque EncryptedBody<64000>; ```", - "type": "string", - "maxLength": 128000, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "NodeId": { - "type": "string" - }, - "SurveyMessageCommandType": { - "description": "SurveyMessageCommandType is an XDR Enum defined as:\n\n```text enum SurveyMessageCommandType { TIME_SLICED_SURVEY_TOPOLOGY = 1 }; ```", - "type": "string", - "enum": [ - "time_sliced_survey_topology" - ] - }, - "SurveyResponseMessage": { - "description": "SurveyResponseMessage is an XDR Struct defined as:\n\n```text struct SurveyResponseMessage { NodeID surveyorPeerID; NodeID surveyedPeerID; uint32 ledgerNum; SurveyMessageCommandType commandType; EncryptedBody encryptedBody; }; ```", - "type": "object", - "required": [ - "command_type", - "encrypted_body", - "ledger_num", - "surveyed_peer_id", - "surveyor_peer_id" - ], - "properties": { - "command_type": { - "$ref": "#/definitions/SurveyMessageCommandType" - }, - "encrypted_body": { - "$ref": "#/definitions/EncryptedBody" - }, - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyed_peer_id": { - "$ref": "#/definitions/NodeId" - }, - "surveyor_peer_id": { - "$ref": "#/definitions/NodeId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TimeSlicedSurveyStartCollectingMessage.json b/xdr-json/next/TimeSlicedSurveyStartCollectingMessage.json deleted file mode 100644 index 7f6415d9..00000000 --- a/xdr-json/next/TimeSlicedSurveyStartCollectingMessage.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TimeSlicedSurveyStartCollectingMessage", - "description": "TimeSlicedSurveyStartCollectingMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyStartCollectingMessage { NodeID surveyorID; uint32 nonce; uint32 ledgerNum; }; ```", - "type": "object", - "required": [ - "ledger_num", - "nonce", - "surveyor_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyor_id": { - "$ref": "#/definitions/NodeId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "NodeId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TimeSlicedSurveyStopCollectingMessage.json b/xdr-json/next/TimeSlicedSurveyStopCollectingMessage.json deleted file mode 100644 index 974cc39a..00000000 --- a/xdr-json/next/TimeSlicedSurveyStopCollectingMessage.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TimeSlicedSurveyStopCollectingMessage", - "description": "TimeSlicedSurveyStopCollectingMessage is an XDR Struct defined as:\n\n```text struct TimeSlicedSurveyStopCollectingMessage { NodeID surveyorID; uint32 nonce; uint32 ledgerNum; }; ```", - "type": "object", - "required": [ - "ledger_num", - "nonce", - "surveyor_id" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ledger_num": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nonce": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "surveyor_id": { - "$ref": "#/definitions/NodeId" - } - }, - "unevaluatedProperties": false, - "definitions": { - "NodeId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TopologyResponseBodyV2.json b/xdr-json/next/TopologyResponseBodyV2.json deleted file mode 100644 index 5ced5070..00000000 --- a/xdr-json/next/TopologyResponseBodyV2.json +++ /dev/null @@ -1,195 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TopologyResponseBodyV2", - "description": "TopologyResponseBodyV2 is an XDR Struct defined as:\n\n```text struct TopologyResponseBodyV2 { TimeSlicedPeerDataList inboundPeers; TimeSlicedPeerDataList outboundPeers; TimeSlicedNodeData nodeData; }; ```", - "type": "object", - "required": [ - "inbound_peers", - "node_data", - "outbound_peers" - ], - "properties": { - "$schema": { - "type": "string" - }, - "inbound_peers": { - "$ref": "#/definitions/TimeSlicedPeerDataList" - }, - "node_data": { - "$ref": "#/definitions/TimeSlicedNodeData" - }, - "outbound_peers": { - "$ref": "#/definitions/TimeSlicedPeerDataList" - } - }, - "unevaluatedProperties": false, - "definitions": { - "NodeId": { - "type": "string" - }, - "PeerStats": { - "description": "PeerStats is an XDR Struct defined as:\n\n```text struct PeerStats { NodeID id; string versionStr<100>; uint64 messagesRead; uint64 messagesWritten; uint64 bytesRead; uint64 bytesWritten; uint64 secondsConnected;\n\nuint64 uniqueFloodBytesRecv; uint64 duplicateFloodBytesRecv; uint64 uniqueFetchBytesRecv; uint64 duplicateFetchBytesRecv;\n\nuint64 uniqueFloodMessageRecv; uint64 duplicateFloodMessageRecv; uint64 uniqueFetchMessageRecv; uint64 duplicateFetchMessageRecv; }; ```", - "type": "object", - "required": [ - "bytes_read", - "bytes_written", - "duplicate_fetch_bytes_recv", - "duplicate_fetch_message_recv", - "duplicate_flood_bytes_recv", - "duplicate_flood_message_recv", - "id", - "messages_read", - "messages_written", - "seconds_connected", - "unique_fetch_bytes_recv", - "unique_fetch_message_recv", - "unique_flood_bytes_recv", - "unique_flood_message_recv", - "version_str" - ], - "properties": { - "bytes_read": { - "type": "string" - }, - "bytes_written": { - "type": "string" - }, - "duplicate_fetch_bytes_recv": { - "type": "string" - }, - "duplicate_fetch_message_recv": { - "type": "string" - }, - "duplicate_flood_bytes_recv": { - "type": "string" - }, - "duplicate_flood_message_recv": { - "type": "string" - }, - "id": { - "$ref": "#/definitions/NodeId" - }, - "messages_read": { - "type": "string" - }, - "messages_written": { - "type": "string" - }, - "seconds_connected": { - "type": "string" - }, - "unique_fetch_bytes_recv": { - "type": "string" - }, - "unique_fetch_message_recv": { - "type": "string" - }, - "unique_flood_bytes_recv": { - "type": "string" - }, - "unique_flood_message_recv": { - "type": "string" - }, - "version_str": { - "$ref": "#/definitions/StringM<100>" - } - } - }, - "StringM<100>": { - "type": "string", - "maxLength": 100 - }, - "TimeSlicedNodeData": { - "description": "TimeSlicedNodeData is an XDR Struct defined as:\n\n```text struct TimeSlicedNodeData { uint32 addedAuthenticatedPeers; uint32 droppedAuthenticatedPeers; uint32 totalInboundPeerCount; uint32 totalOutboundPeerCount;\n\n// SCP stats uint32 p75SCPFirstToSelfLatencyMs; uint32 p75SCPSelfToOtherLatencyMs;\n\n// How many times the node lost sync in the time slice uint32 lostSyncCount;\n\n// Config data bool isValidator; uint32 maxInboundPeerCount; uint32 maxOutboundPeerCount; }; ```", - "type": "object", - "required": [ - "added_authenticated_peers", - "dropped_authenticated_peers", - "is_validator", - "lost_sync_count", - "max_inbound_peer_count", - "max_outbound_peer_count", - "p75_scp_first_to_self_latency_ms", - "p75_scp_self_to_other_latency_ms", - "total_inbound_peer_count", - "total_outbound_peer_count" - ], - "properties": { - "added_authenticated_peers": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "dropped_authenticated_peers": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_validator": { - "type": "boolean" - }, - "lost_sync_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_inbound_peer_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_outbound_peer_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "p75_scp_first_to_self_latency_ms": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "p75_scp_self_to_other_latency_ms": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "total_inbound_peer_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "total_outbound_peer_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "TimeSlicedPeerData": { - "description": "TimeSlicedPeerData is an XDR Struct defined as:\n\n```text struct TimeSlicedPeerData { PeerStats peerStats; uint32 averageLatencyMs; }; ```", - "type": "object", - "required": [ - "average_latency_ms", - "peer_stats" - ], - "properties": { - "average_latency_ms": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "peer_stats": { - "$ref": "#/definitions/PeerStats" - } - } - }, - "TimeSlicedPeerDataList": { - "description": "TimeSlicedPeerDataList is an XDR Typedef defined as:\n\n```text typedef TimeSlicedPeerData TimeSlicedPeerDataList<25>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TimeSlicedPeerData" - }, - "maxItems": 25 - } - } -} \ No newline at end of file diff --git a/xdr-json/next/Transaction.json b/xdr-json/next/Transaction.json deleted file mode 100644 index fbfd6de2..00000000 --- a/xdr-json/next/Transaction.json +++ /dev/null @@ -1,2778 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Transaction", - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "$schema": { - "type": "string" - }, - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionEnvelope.json b/xdr-json/next/TransactionEnvelope.json deleted file mode 100644 index 20dd46f7..00000000 --- a/xdr-json/next/TransactionEnvelope.json +++ /dev/null @@ -1,3011 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionEnvelope", - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionEvent.json b/xdr-json/next/TransactionEvent.json deleted file mode 100644 index 8adb1eef..00000000 --- a/xdr-json/next/TransactionEvent.json +++ /dev/null @@ -1,637 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionEvent", - "description": "TransactionEvent is an XDR Struct defined as:\n\n```text struct TransactionEvent { TransactionEventStage stage; // Stage at which an event has occurred. ContractEvent event; // The contract event that has occurred. }; ```", - "type": "object", - "required": [ - "event", - "stage" - ], - "properties": { - "$schema": { - "type": "string" - }, - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "stage": { - "$ref": "#/definitions/TransactionEventStage" - } - }, - "unevaluatedProperties": false, - "definitions": { - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TransactionEventStage": { - "description": "TransactionEventStage is an XDR Enum defined as:\n\n```text enum TransactionEventStage { // The event has happened before any one of the transactions has its // operations applied. TRANSACTION_EVENT_STAGE_BEFORE_ALL_TXS = 0, // The event has happened immediately after operations of the transaction // have been applied. TRANSACTION_EVENT_STAGE_AFTER_TX = 1, // The event has happened after every transaction had its operations // applied. TRANSACTION_EVENT_STAGE_AFTER_ALL_TXS = 2 }; ```", - "type": "string", - "enum": [ - "before_all_txs", - "after_tx", - "after_all_txs" - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionEventStage.json b/xdr-json/next/TransactionEventStage.json deleted file mode 100644 index 452d307e..00000000 --- a/xdr-json/next/TransactionEventStage.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionEventStage", - "description": "TransactionEventStage is an XDR Enum defined as:\n\n```text enum TransactionEventStage { // The event has happened before any one of the transactions has its // operations applied. TRANSACTION_EVENT_STAGE_BEFORE_ALL_TXS = 0, // The event has happened immediately after operations of the transaction // have been applied. TRANSACTION_EVENT_STAGE_AFTER_TX = 1, // The event has happened after every transaction had its operations // applied. TRANSACTION_EVENT_STAGE_AFTER_ALL_TXS = 2 }; ```", - "type": "string", - "enum": [ - "before_all_txs", - "after_tx", - "after_all_txs" - ] -} \ No newline at end of file diff --git a/xdr-json/next/TransactionExt.json b/xdr-json/next/TransactionExt.json deleted file mode 100644 index d2b524db..00000000 --- a/xdr-json/next/TransactionExt.json +++ /dev/null @@ -1,1062 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionExt", - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "PoolId": { - "type": "string" - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionHistoryEntry.json b/xdr-json/next/TransactionHistoryEntry.json deleted file mode 100644 index d947e4a0..00000000 --- a/xdr-json/next/TransactionHistoryEntry.json +++ /dev/null @@ -1,3226 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionHistoryEntry", - "description": "TransactionHistoryEntry is an XDR Struct defined as:\n\n```text struct TransactionHistoryEntry { uint32 ledgerSeq; TransactionSet txSet;\n\n// when v != 0, txSet must be empty union switch (int v) { case 0: void; case 1: GeneralizedTransactionSet generalizedTxSet; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "ledger_seq", - "tx_set" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TransactionHistoryEntryExt" - }, - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_set": { - "$ref": "#/definitions/TransactionSet" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "GeneralizedTransactionSet": { - "description": "GeneralizedTransactionSet is an XDR Union defined as:\n\n```text union GeneralizedTransactionSet switch (int v) { // We consider the legacy TransactionSet to be v0. case 1: TransactionSetV1 v1TxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionSetV1" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionHistoryEntryExt": { - "description": "TransactionHistoryEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: GeneralizedTransactionSet generalizedTxSet; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/GeneralizedTransactionSet" - } - } - } - ] - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionSet": { - "description": "TransactionSet is an XDR Struct defined as:\n\n```text struct TransactionSet { Hash previousLedgerHash; TransactionEnvelope txs<>; }; ```", - "type": "object", - "required": [ - "previous_ledger_hash", - "txs" - ], - "properties": { - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "TransactionSetV1": { - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionHistoryEntryExt.json b/xdr-json/next/TransactionHistoryEntryExt.json deleted file mode 100644 index 4afb801b..00000000 --- a/xdr-json/next/TransactionHistoryEntryExt.json +++ /dev/null @@ -1,3182 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionHistoryEntryExt", - "description": "TransactionHistoryEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: GeneralizedTransactionSet generalizedTxSet; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/GeneralizedTransactionSet" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "GeneralizedTransactionSet": { - "description": "GeneralizedTransactionSet is an XDR Union defined as:\n\n```text union GeneralizedTransactionSet switch (int v) { // We consider the legacy TransactionSet to be v0. case 1: TransactionSetV1 v1TxSet; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionSetV1" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionSetV1": { - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionHistoryResultEntry.json b/xdr-json/next/TransactionHistoryResultEntry.json deleted file mode 100644 index 61bf535c..00000000 --- a/xdr-json/next/TransactionHistoryResultEntry.json +++ /dev/null @@ -1,1497 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionHistoryResultEntry", - "description": "TransactionHistoryResultEntry is an XDR Struct defined as:\n\n```text struct TransactionHistoryResultEntry { uint32 ledgerSeq; TransactionResultSet txResultSet;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "ledger_seq", - "tx_result_set" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TransactionHistoryResultEntryExt" - }, - "ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_result_set": { - "$ref": "#/definitions/TransactionResultSet" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InnerTransactionResult": { - "description": "InnerTransactionResult is an XDR Struct defined as:\n\n```text struct InnerTransactionResult { // Always 0. Here for binary compatibility. int64 feeCharged;\n\nunion switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/InnerTransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResultResult" - } - } - }, - "InnerTransactionResultExt": { - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "InnerTransactionResultPair": { - "description": "InnerTransactionResultPair is an XDR Struct defined as:\n\n```text struct InnerTransactionResultPair { Hash transactionHash; // hash of the inner transaction InnerTransactionResult result; // result for the inner transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/InnerTransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "InnerTransactionResultResult": { - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "TransactionHistoryResultEntryExt": { - "description": "TransactionHistoryResultEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionResult": { - "description": "TransactionResult is an XDR Struct defined as:\n\n```text struct TransactionResult { int64 feeCharged; // actual fee charged for the transaction\n\nunion switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/TransactionResultResult" - } - } - }, - "TransactionResultExt": { - "description": "TransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionResultPair": { - "description": "TransactionResultPair is an XDR Struct defined as:\n\n```text struct TransactionResultPair { Hash transactionHash; TransactionResult result; // result for the transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/TransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionResultResult": { - "description": "TransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_success" - ], - "properties": { - "tx_fee_bump_inner_success": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_failed" - ], - "properties": { - "tx_fee_bump_inner_failed": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "TransactionResultSet": { - "description": "TransactionResultSet is an XDR Struct defined as:\n\n```text struct TransactionResultSet { TransactionResultPair results<>; }; ```", - "type": "object", - "required": [ - "results" - ], - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionResultPair" - }, - "maxItems": 4294967295 - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionHistoryResultEntryExt.json b/xdr-json/next/TransactionHistoryResultEntryExt.json deleted file mode 100644 index 6961048b..00000000 --- a/xdr-json/next/TransactionHistoryResultEntryExt.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionHistoryResultEntryExt", - "description": "TransactionHistoryResultEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/TransactionMeta.json b/xdr-json/next/TransactionMeta.json deleted file mode 100644 index 0e35b445..00000000 --- a/xdr-json/next/TransactionMeta.json +++ /dev/null @@ -1,3319 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionMeta", - "description": "TransactionMeta is an XDR Union defined as:\n\n```text union TransactionMeta switch (int v) { case 0: OperationMeta operations<>; case 1: TransactionMetaV1 v1; case 2: TransactionMetaV2 v2; case 3: TransactionMetaV3 v3; case 4: TransactionMetaV4 v4; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionMetaV1" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TransactionMetaV2" - } - } - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/TransactionMetaV3" - } - } - }, - { - "type": "object", - "required": [ - "v4" - ], - "properties": { - "v4": { - "$ref": "#/definitions/TransactionMetaV4" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DiagnosticEvent": { - "description": "DiagnosticEvent is an XDR Struct defined as:\n\n```text struct DiagnosticEvent { bool inSuccessfulContractCall; ContractEvent event; }; ```", - "type": "object", - "required": [ - "event", - "in_successful_contract_call" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "in_successful_contract_call": { - "type": "boolean" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationMeta": { - "description": "OperationMeta is an XDR Struct defined as:\n\n```text struct OperationMeta { LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "OperationMetaV2": { - "description": "OperationMetaV2 is an XDR Struct defined as:\n\n```text struct OperationMetaV2 { ExtensionPoint ext;\n\nLedgerEntryChanges changes;\n\nContractEvent events<>; }; ```", - "type": "object", - "required": [ - "changes", - "events", - "ext" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanTransactionMeta": { - "description": "SorobanTransactionMeta is an XDR Struct defined as:\n\n```text struct SorobanTransactionMeta { SorobanTransactionMetaExt ext;\n\nContractEvent events<>; // custom events populated by the // contracts themselves. SCVal returnValue; // return value of the host fn invocation\n\n// Diagnostics events that are not hashed. // This will contain all contract and diagnostic events. Even ones // that were emitted in a failed contract call. DiagnosticEvent diagnosticEvents<>; }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "return_value" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "$ref": "#/definitions/ScVal" - } - } - }, - "SorobanTransactionMetaExt": { - "description": "SorobanTransactionMetaExt is an XDR Union defined as:\n\n```text union SorobanTransactionMetaExt switch (int v) { case 0: void; case 1: SorobanTransactionMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionMetaExtV1" - } - } - } - ] - }, - "SorobanTransactionMetaExtV1": { - "description": "SorobanTransactionMetaExtV1 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaExtV1 { ExtensionPoint ext;\n\n// The following are the components of the overall Soroban resource fee // charged for the transaction. // The following relation holds: // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` // where `resourceFeeCharged` is the overall fee charged for the // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` // i.e.we never charge more than the declared resource fee. // The inclusion fee for charged the Soroban transaction can be found using // the following equation: // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.\n\n// Total amount (in stroops) that has been charged for non-refundable // Soroban resources. // Non-refundable resources are charged based on the usage declared in // the transaction envelope (such as `instructions`, `readBytes` etc.) and // is charged regardless of the success of the transaction. int64 totalNonRefundableResourceFeeCharged; // Total amount (in stroops) that has been charged for refundable // Soroban resource fees. // Currently this comprises the rent fee (`rentFeeCharged`) and the // fee for the events and return value. // Refundable resources are charged based on the actual resources usage. // Since currently refundable resources are only used for the successful // transactions, this will be `0` for failed transactions. int64 totalRefundableResourceFeeCharged; // Amount (in stroops) that has been charged for rent. // This is a part of `totalNonRefundableResourceFeeCharged`. int64 rentFeeCharged; }; ```", - "type": "object", - "required": [ - "ext", - "rent_fee_charged", - "total_non_refundable_resource_fee_charged", - "total_refundable_resource_fee_charged" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "rent_fee_charged": { - "type": "string" - }, - "total_non_refundable_resource_fee_charged": { - "type": "string" - }, - "total_refundable_resource_fee_charged": { - "type": "string" - } - } - }, - "SorobanTransactionMetaV2": { - "description": "SorobanTransactionMetaV2 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaV2 { SorobanTransactionMetaExt ext;\n\nSCVal* returnValue; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "anyOf": [ - { - "$ref": "#/definitions/ScVal" - }, - { - "type": "null" - } - ] - } - } - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TransactionEvent": { - "description": "TransactionEvent is an XDR Struct defined as:\n\n```text struct TransactionEvent { TransactionEventStage stage; // Stage at which an event has occurred. ContractEvent event; // The contract event that has occurred. }; ```", - "type": "object", - "required": [ - "event", - "stage" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "stage": { - "$ref": "#/definitions/TransactionEventStage" - } - } - }, - "TransactionEventStage": { - "description": "TransactionEventStage is an XDR Enum defined as:\n\n```text enum TransactionEventStage { // The event has happened before any one of the transactions has its // operations applied. TRANSACTION_EVENT_STAGE_BEFORE_ALL_TXS = 0, // The event has happened immediately after operations of the transaction // have been applied. TRANSACTION_EVENT_STAGE_AFTER_TX = 1, // The event has happened after every transaction had its operations // applied. TRANSACTION_EVENT_STAGE_AFTER_ALL_TXS = 2 }; ```", - "type": "string", - "enum": [ - "before_all_txs", - "after_tx", - "after_all_txs" - ] - }, - "TransactionMetaV1": { - "description": "TransactionMetaV1 is an XDR Struct defined as:\n\n```text struct TransactionMetaV1 { LedgerEntryChanges txChanges; // tx level changes if any OperationMeta operations<>; // meta for each operation }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV2": { - "description": "TransactionMetaV2 is an XDR Struct defined as:\n\n```text struct TransactionMetaV2 { LedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV3": { - "description": "TransactionMetaV3 is an XDR Struct defined as:\n\n```text struct TransactionMetaV3 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMeta* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions). }; ```", - "type": "object", - "required": [ - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMeta" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV4": { - "description": "TransactionMetaV4 is an XDR Struct defined as:\n\n```text struct TransactionMetaV4 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMetaV2 operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMetaV2* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions).\n\nTransactionEvent events<>; // Used for transaction-level events (like fee payment) DiagnosticEvent diagnosticEvents<>; // Used for all diagnostic information }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMetaV2" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMetaV2" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionMetaV1.json b/xdr-json/next/TransactionMetaV1.json deleted file mode 100644 index 72788178..00000000 --- a/xdr-json/next/TransactionMetaV1.json +++ /dev/null @@ -1,2894 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionMetaV1", - "description": "TransactionMetaV1 is an XDR Struct defined as:\n\n```text struct TransactionMetaV1 { LedgerEntryChanges txChanges; // tx level changes if any OperationMeta operations<>; // meta for each operation }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes" - ], - "properties": { - "$schema": { - "type": "string" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationMeta": { - "description": "OperationMeta is an XDR Struct defined as:\n\n```text struct OperationMeta { LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionMetaV2.json b/xdr-json/next/TransactionMetaV2.json deleted file mode 100644 index b5620f75..00000000 --- a/xdr-json/next/TransactionMetaV2.json +++ /dev/null @@ -1,2898 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionMetaV2", - "description": "TransactionMetaV2 is an XDR Struct defined as:\n\n```text struct TransactionMetaV2 { LedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "$schema": { - "type": "string" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationMeta": { - "description": "OperationMeta is an XDR Struct defined as:\n\n```text struct OperationMeta { LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionMetaV3.json b/xdr-json/next/TransactionMetaV3.json deleted file mode 100644 index b31f868c..00000000 --- a/xdr-json/next/TransactionMetaV3.json +++ /dev/null @@ -1,3084 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionMetaV3", - "description": "TransactionMetaV3 is an XDR Struct defined as:\n\n```text struct TransactionMetaV3 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMeta* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions). }; ```", - "type": "object", - "required": [ - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMeta" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DiagnosticEvent": { - "description": "DiagnosticEvent is an XDR Struct defined as:\n\n```text struct DiagnosticEvent { bool inSuccessfulContractCall; ContractEvent event; }; ```", - "type": "object", - "required": [ - "event", - "in_successful_contract_call" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "in_successful_contract_call": { - "type": "boolean" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationMeta": { - "description": "OperationMeta is an XDR Struct defined as:\n\n```text struct OperationMeta { LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanTransactionMeta": { - "description": "SorobanTransactionMeta is an XDR Struct defined as:\n\n```text struct SorobanTransactionMeta { SorobanTransactionMetaExt ext;\n\nContractEvent events<>; // custom events populated by the // contracts themselves. SCVal returnValue; // return value of the host fn invocation\n\n// Diagnostics events that are not hashed. // This will contain all contract and diagnostic events. Even ones // that were emitted in a failed contract call. DiagnosticEvent diagnosticEvents<>; }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "return_value" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "$ref": "#/definitions/ScVal" - } - } - }, - "SorobanTransactionMetaExt": { - "description": "SorobanTransactionMetaExt is an XDR Union defined as:\n\n```text union SorobanTransactionMetaExt switch (int v) { case 0: void; case 1: SorobanTransactionMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionMetaExtV1" - } - } - } - ] - }, - "SorobanTransactionMetaExtV1": { - "description": "SorobanTransactionMetaExtV1 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaExtV1 { ExtensionPoint ext;\n\n// The following are the components of the overall Soroban resource fee // charged for the transaction. // The following relation holds: // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` // where `resourceFeeCharged` is the overall fee charged for the // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` // i.e.we never charge more than the declared resource fee. // The inclusion fee for charged the Soroban transaction can be found using // the following equation: // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.\n\n// Total amount (in stroops) that has been charged for non-refundable // Soroban resources. // Non-refundable resources are charged based on the usage declared in // the transaction envelope (such as `instructions`, `readBytes` etc.) and // is charged regardless of the success of the transaction. int64 totalNonRefundableResourceFeeCharged; // Total amount (in stroops) that has been charged for refundable // Soroban resource fees. // Currently this comprises the rent fee (`rentFeeCharged`) and the // fee for the events and return value. // Refundable resources are charged based on the actual resources usage. // Since currently refundable resources are only used for the successful // transactions, this will be `0` for failed transactions. int64 totalRefundableResourceFeeCharged; // Amount (in stroops) that has been charged for rent. // This is a part of `totalNonRefundableResourceFeeCharged`. int64 rentFeeCharged; }; ```", - "type": "object", - "required": [ - "ext", - "rent_fee_charged", - "total_non_refundable_resource_fee_charged", - "total_refundable_resource_fee_charged" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "rent_fee_charged": { - "type": "string" - }, - "total_non_refundable_resource_fee_charged": { - "type": "string" - }, - "total_refundable_resource_fee_charged": { - "type": "string" - } - } - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionMetaV4.json b/xdr-json/next/TransactionMetaV4.json deleted file mode 100644 index afe057e1..00000000 --- a/xdr-json/next/TransactionMetaV4.json +++ /dev/null @@ -1,3127 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionMetaV4", - "description": "TransactionMetaV4 is an XDR Struct defined as:\n\n```text struct TransactionMetaV4 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMetaV2 operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMetaV2* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions).\n\nTransactionEvent events<>; // Used for transaction-level events (like fee payment) DiagnosticEvent diagnosticEvents<>; // Used for all diagnostic information }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "$schema": { - "type": "string" - }, - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMetaV2" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMetaV2" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DiagnosticEvent": { - "description": "DiagnosticEvent is an XDR Struct defined as:\n\n```text struct DiagnosticEvent { bool inSuccessfulContractCall; ContractEvent event; }; ```", - "type": "object", - "required": [ - "event", - "in_successful_contract_call" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "in_successful_contract_call": { - "type": "boolean" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationMetaV2": { - "description": "OperationMetaV2 is an XDR Struct defined as:\n\n```text struct OperationMetaV2 { ExtensionPoint ext;\n\nLedgerEntryChanges changes;\n\nContractEvent events<>; }; ```", - "type": "object", - "required": [ - "changes", - "events", - "ext" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanTransactionMetaExt": { - "description": "SorobanTransactionMetaExt is an XDR Union defined as:\n\n```text union SorobanTransactionMetaExt switch (int v) { case 0: void; case 1: SorobanTransactionMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionMetaExtV1" - } - } - } - ] - }, - "SorobanTransactionMetaExtV1": { - "description": "SorobanTransactionMetaExtV1 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaExtV1 { ExtensionPoint ext;\n\n// The following are the components of the overall Soroban resource fee // charged for the transaction. // The following relation holds: // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` // where `resourceFeeCharged` is the overall fee charged for the // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` // i.e.we never charge more than the declared resource fee. // The inclusion fee for charged the Soroban transaction can be found using // the following equation: // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.\n\n// Total amount (in stroops) that has been charged for non-refundable // Soroban resources. // Non-refundable resources are charged based on the usage declared in // the transaction envelope (such as `instructions`, `readBytes` etc.) and // is charged regardless of the success of the transaction. int64 totalNonRefundableResourceFeeCharged; // Total amount (in stroops) that has been charged for refundable // Soroban resource fees. // Currently this comprises the rent fee (`rentFeeCharged`) and the // fee for the events and return value. // Refundable resources are charged based on the actual resources usage. // Since currently refundable resources are only used for the successful // transactions, this will be `0` for failed transactions. int64 totalRefundableResourceFeeCharged; // Amount (in stroops) that has been charged for rent. // This is a part of `totalNonRefundableResourceFeeCharged`. int64 rentFeeCharged; }; ```", - "type": "object", - "required": [ - "ext", - "rent_fee_charged", - "total_non_refundable_resource_fee_charged", - "total_refundable_resource_fee_charged" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "rent_fee_charged": { - "type": "string" - }, - "total_non_refundable_resource_fee_charged": { - "type": "string" - }, - "total_refundable_resource_fee_charged": { - "type": "string" - } - } - }, - "SorobanTransactionMetaV2": { - "description": "SorobanTransactionMetaV2 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaV2 { SorobanTransactionMetaExt ext;\n\nSCVal* returnValue; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "anyOf": [ - { - "$ref": "#/definitions/ScVal" - }, - { - "type": "null" - } - ] - } - } - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TransactionEvent": { - "description": "TransactionEvent is an XDR Struct defined as:\n\n```text struct TransactionEvent { TransactionEventStage stage; // Stage at which an event has occurred. ContractEvent event; // The contract event that has occurred. }; ```", - "type": "object", - "required": [ - "event", - "stage" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "stage": { - "$ref": "#/definitions/TransactionEventStage" - } - } - }, - "TransactionEventStage": { - "description": "TransactionEventStage is an XDR Enum defined as:\n\n```text enum TransactionEventStage { // The event has happened before any one of the transactions has its // operations applied. TRANSACTION_EVENT_STAGE_BEFORE_ALL_TXS = 0, // The event has happened immediately after operations of the transaction // have been applied. TRANSACTION_EVENT_STAGE_AFTER_TX = 1, // The event has happened after every transaction had its operations // applied. TRANSACTION_EVENT_STAGE_AFTER_ALL_TXS = 2 }; ```", - "type": "string", - "enum": [ - "before_all_txs", - "after_tx", - "after_all_txs" - ] - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionPhase.json b/xdr-json/next/TransactionPhase.json deleted file mode 100644 index 1c76f119..00000000 --- a/xdr-json/next/TransactionPhase.json +++ /dev/null @@ -1,3120 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionPhase", - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionResult.json b/xdr-json/next/TransactionResult.json deleted file mode 100644 index 59af40e0..00000000 --- a/xdr-json/next/TransactionResult.json +++ /dev/null @@ -1,1432 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionResult", - "description": "TransactionResult is an XDR Struct defined as:\n\n```text struct TransactionResult { int64 feeCharged; // actual fee charged for the transaction\n\nunion switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/TransactionResultResult" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InnerTransactionResult": { - "description": "InnerTransactionResult is an XDR Struct defined as:\n\n```text struct InnerTransactionResult { // Always 0. Here for binary compatibility. int64 feeCharged;\n\nunion switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/InnerTransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResultResult" - } - } - }, - "InnerTransactionResultExt": { - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "InnerTransactionResultPair": { - "description": "InnerTransactionResultPair is an XDR Struct defined as:\n\n```text struct InnerTransactionResultPair { Hash transactionHash; // hash of the inner transaction InnerTransactionResult result; // result for the inner transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/InnerTransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "InnerTransactionResultResult": { - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "TransactionResultExt": { - "description": "TransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionResultResult": { - "description": "TransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_success" - ], - "properties": { - "tx_fee_bump_inner_success": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_failed" - ], - "properties": { - "tx_fee_bump_inner_failed": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionResultCode.json b/xdr-json/next/TransactionResultCode.json deleted file mode 100644 index fe49d00a..00000000 --- a/xdr-json/next/TransactionResultCode.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionResultCode", - "description": "TransactionResultCode is an XDR Enum defined as:\n\n```text enum TransactionResultCode { txFEE_BUMP_INNER_SUCCESS = 1, // fee bump inner transaction succeeded txSUCCESS = 0, // all operations succeeded\n\ntxFAILED = -1, // one of the operations failed (none were applied)\n\ntxTOO_EARLY = -2, // ledger closeTime before minTime txTOO_LATE = -3, // ledger closeTime after maxTime txMISSING_OPERATION = -4, // no operation was specified txBAD_SEQ = -5, // sequence number does not match source account\n\ntxBAD_AUTH = -6, // too few valid signatures / wrong network txINSUFFICIENT_BALANCE = -7, // fee would bring account below reserve txNO_ACCOUNT = -8, // source account not found txINSUFFICIENT_FEE = -9, // fee is too small txBAD_AUTH_EXTRA = -10, // unused signatures attached to transaction txINTERNAL_ERROR = -11, // an unknown error occurred\n\ntxNOT_SUPPORTED = -12, // transaction type not supported txFEE_BUMP_INNER_FAILED = -13, // fee bump inner transaction failed txBAD_SPONSORSHIP = -14, // sponsorship not confirmed txBAD_MIN_SEQ_AGE_OR_GAP = -15, // minSeqAge or minSeqLedgerGap conditions not met txMALFORMED = -16, // precondition is invalid txSOROBAN_INVALID = -17, // soroban-specific preconditions were not met txFROZEN_KEY_ACCESSED = -18 // a 'frozen' ledger key is accessed by any operation }; ```", - "type": "string", - "enum": [ - "tx_fee_bump_inner_success", - "tx_success", - "tx_failed", - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_fee_bump_inner_failed", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] -} \ No newline at end of file diff --git a/xdr-json/next/TransactionResultExt.json b/xdr-json/next/TransactionResultExt.json deleted file mode 100644 index b7ae6375..00000000 --- a/xdr-json/next/TransactionResultExt.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionResultExt", - "description": "TransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/TransactionResultMeta.json b/xdr-json/next/TransactionResultMeta.json deleted file mode 100644 index 6db19f5b..00000000 --- a/xdr-json/next/TransactionResultMeta.json +++ /dev/null @@ -1,4634 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionResultMeta", - "description": "TransactionResultMeta is an XDR Struct defined as:\n\n```text struct TransactionResultMeta { TransactionResultPair result; LedgerEntryChanges feeProcessing; TransactionMeta txApplyProcessing; }; ```", - "type": "object", - "required": [ - "fee_processing", - "result", - "tx_apply_processing" - ], - "properties": { - "$schema": { - "type": "string" - }, - "fee_processing": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "result": { - "$ref": "#/definitions/TransactionResultPair" - }, - "tx_apply_processing": { - "$ref": "#/definitions/TransactionMeta" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DiagnosticEvent": { - "description": "DiagnosticEvent is an XDR Struct defined as:\n\n```text struct DiagnosticEvent { bool inSuccessfulContractCall; ContractEvent event; }; ```", - "type": "object", - "required": [ - "event", - "in_successful_contract_call" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "in_successful_contract_call": { - "type": "boolean" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InnerTransactionResult": { - "description": "InnerTransactionResult is an XDR Struct defined as:\n\n```text struct InnerTransactionResult { // Always 0. Here for binary compatibility. int64 feeCharged;\n\nunion switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/InnerTransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResultResult" - } - } - }, - "InnerTransactionResultExt": { - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "InnerTransactionResultPair": { - "description": "InnerTransactionResultPair is an XDR Struct defined as:\n\n```text struct InnerTransactionResultPair { Hash transactionHash; // hash of the inner transaction InnerTransactionResult result; // result for the inner transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/InnerTransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "InnerTransactionResultResult": { - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationMeta": { - "description": "OperationMeta is an XDR Struct defined as:\n\n```text struct OperationMeta { LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "OperationMetaV2": { - "description": "OperationMetaV2 is an XDR Struct defined as:\n\n```text struct OperationMetaV2 { ExtensionPoint ext;\n\nLedgerEntryChanges changes;\n\nContractEvent events<>; }; ```", - "type": "object", - "required": [ - "changes", - "events", - "ext" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "SorobanTransactionMeta": { - "description": "SorobanTransactionMeta is an XDR Struct defined as:\n\n```text struct SorobanTransactionMeta { SorobanTransactionMetaExt ext;\n\nContractEvent events<>; // custom events populated by the // contracts themselves. SCVal returnValue; // return value of the host fn invocation\n\n// Diagnostics events that are not hashed. // This will contain all contract and diagnostic events. Even ones // that were emitted in a failed contract call. DiagnosticEvent diagnosticEvents<>; }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "return_value" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "$ref": "#/definitions/ScVal" - } - } - }, - "SorobanTransactionMetaExt": { - "description": "SorobanTransactionMetaExt is an XDR Union defined as:\n\n```text union SorobanTransactionMetaExt switch (int v) { case 0: void; case 1: SorobanTransactionMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionMetaExtV1" - } - } - } - ] - }, - "SorobanTransactionMetaExtV1": { - "description": "SorobanTransactionMetaExtV1 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaExtV1 { ExtensionPoint ext;\n\n// The following are the components of the overall Soroban resource fee // charged for the transaction. // The following relation holds: // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` // where `resourceFeeCharged` is the overall fee charged for the // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` // i.e.we never charge more than the declared resource fee. // The inclusion fee for charged the Soroban transaction can be found using // the following equation: // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.\n\n// Total amount (in stroops) that has been charged for non-refundable // Soroban resources. // Non-refundable resources are charged based on the usage declared in // the transaction envelope (such as `instructions`, `readBytes` etc.) and // is charged regardless of the success of the transaction. int64 totalNonRefundableResourceFeeCharged; // Total amount (in stroops) that has been charged for refundable // Soroban resource fees. // Currently this comprises the rent fee (`rentFeeCharged`) and the // fee for the events and return value. // Refundable resources are charged based on the actual resources usage. // Since currently refundable resources are only used for the successful // transactions, this will be `0` for failed transactions. int64 totalRefundableResourceFeeCharged; // Amount (in stroops) that has been charged for rent. // This is a part of `totalNonRefundableResourceFeeCharged`. int64 rentFeeCharged; }; ```", - "type": "object", - "required": [ - "ext", - "rent_fee_charged", - "total_non_refundable_resource_fee_charged", - "total_refundable_resource_fee_charged" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "rent_fee_charged": { - "type": "string" - }, - "total_non_refundable_resource_fee_charged": { - "type": "string" - }, - "total_refundable_resource_fee_charged": { - "type": "string" - } - } - }, - "SorobanTransactionMetaV2": { - "description": "SorobanTransactionMetaV2 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaV2 { SorobanTransactionMetaExt ext;\n\nSCVal* returnValue; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "anyOf": [ - { - "$ref": "#/definitions/ScVal" - }, - { - "type": "null" - } - ] - } - } - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TransactionEvent": { - "description": "TransactionEvent is an XDR Struct defined as:\n\n```text struct TransactionEvent { TransactionEventStage stage; // Stage at which an event has occurred. ContractEvent event; // The contract event that has occurred. }; ```", - "type": "object", - "required": [ - "event", - "stage" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "stage": { - "$ref": "#/definitions/TransactionEventStage" - } - } - }, - "TransactionEventStage": { - "description": "TransactionEventStage is an XDR Enum defined as:\n\n```text enum TransactionEventStage { // The event has happened before any one of the transactions has its // operations applied. TRANSACTION_EVENT_STAGE_BEFORE_ALL_TXS = 0, // The event has happened immediately after operations of the transaction // have been applied. TRANSACTION_EVENT_STAGE_AFTER_TX = 1, // The event has happened after every transaction had its operations // applied. TRANSACTION_EVENT_STAGE_AFTER_ALL_TXS = 2 }; ```", - "type": "string", - "enum": [ - "before_all_txs", - "after_tx", - "after_all_txs" - ] - }, - "TransactionMeta": { - "description": "TransactionMeta is an XDR Union defined as:\n\n```text union TransactionMeta switch (int v) { case 0: OperationMeta operations<>; case 1: TransactionMetaV1 v1; case 2: TransactionMetaV2 v2; case 3: TransactionMetaV3 v3; case 4: TransactionMetaV4 v4; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionMetaV1" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TransactionMetaV2" - } - } - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/TransactionMetaV3" - } - } - }, - { - "type": "object", - "required": [ - "v4" - ], - "properties": { - "v4": { - "$ref": "#/definitions/TransactionMetaV4" - } - } - } - ] - }, - "TransactionMetaV1": { - "description": "TransactionMetaV1 is an XDR Struct defined as:\n\n```text struct TransactionMetaV1 { LedgerEntryChanges txChanges; // tx level changes if any OperationMeta operations<>; // meta for each operation }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV2": { - "description": "TransactionMetaV2 is an XDR Struct defined as:\n\n```text struct TransactionMetaV2 { LedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV3": { - "description": "TransactionMetaV3 is an XDR Struct defined as:\n\n```text struct TransactionMetaV3 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMeta* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions). }; ```", - "type": "object", - "required": [ - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMeta" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV4": { - "description": "TransactionMetaV4 is an XDR Struct defined as:\n\n```text struct TransactionMetaV4 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMetaV2 operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMetaV2* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions).\n\nTransactionEvent events<>; // Used for transaction-level events (like fee payment) DiagnosticEvent diagnosticEvents<>; // Used for all diagnostic information }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMetaV2" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMetaV2" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionResult": { - "description": "TransactionResult is an XDR Struct defined as:\n\n```text struct TransactionResult { int64 feeCharged; // actual fee charged for the transaction\n\nunion switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/TransactionResultResult" - } - } - }, - "TransactionResultExt": { - "description": "TransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionResultPair": { - "description": "TransactionResultPair is an XDR Struct defined as:\n\n```text struct TransactionResultPair { Hash transactionHash; TransactionResult result; // result for the transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/TransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionResultResult": { - "description": "TransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_success" - ], - "properties": { - "tx_fee_bump_inner_success": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_failed" - ], - "properties": { - "tx_fee_bump_inner_failed": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionResultMetaV1.json b/xdr-json/next/TransactionResultMetaV1.json deleted file mode 100644 index cc363d71..00000000 --- a/xdr-json/next/TransactionResultMetaV1.json +++ /dev/null @@ -1,4642 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionResultMetaV1", - "description": "TransactionResultMetaV1 is an XDR Struct defined as:\n\n```text struct TransactionResultMetaV1 { ExtensionPoint ext;\n\nTransactionResultPair result; LedgerEntryChanges feeProcessing; TransactionMeta txApplyProcessing;\n\nLedgerEntryChanges postTxApplyFeeProcessing; }; ```", - "type": "object", - "required": [ - "ext", - "fee_processing", - "post_tx_apply_fee_processing", - "result", - "tx_apply_processing" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "fee_processing": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "post_tx_apply_fee_processing": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "result": { - "$ref": "#/definitions/TransactionResultPair" - }, - "tx_apply_processing": { - "$ref": "#/definitions/TransactionMeta" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractEvent": { - "description": "ContractEvent is an XDR Struct defined as:\n\n```text struct ContractEvent { // We can use this to add more fields, or because it // is first, to change ContractEvent into a union. ExtensionPoint ext;\n\nContractID* contractID; ContractEventType type;\n\nunion switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } body; }; ```", - "type": "object", - "required": [ - "body", - "ext", - "type_" - ], - "properties": { - "body": { - "$ref": "#/definitions/ContractEventBody" - }, - "contract_id": { - "anyOf": [ - { - "$ref": "#/definitions/ContractId" - }, - { - "type": "null" - } - ] - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "type_": { - "$ref": "#/definitions/ContractEventType" - } - } - }, - "ContractEventBody": { - "description": "ContractEventBody is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: struct { SCVal topics<>; SCVal data; } v0; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ContractEventV0" - } - } - } - ] - }, - "ContractEventType": { - "description": "ContractEventType is an XDR Enum defined as:\n\n```text enum ContractEventType { SYSTEM = 0, CONTRACT = 1, DIAGNOSTIC = 2 }; ```", - "type": "string", - "enum": [ - "system", - "contract", - "diagnostic" - ] - }, - "ContractEventV0": { - "description": "ContractEventV0 is an XDR NestedStruct defined as:\n\n```text struct { SCVal topics<>; SCVal data; } ```", - "type": "object", - "required": [ - "data", - "topics" - ], - "properties": { - "data": { - "$ref": "#/definitions/ScVal" - }, - "topics": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DiagnosticEvent": { - "description": "DiagnosticEvent is an XDR Struct defined as:\n\n```text struct DiagnosticEvent { bool inSuccessfulContractCall; ContractEvent event; }; ```", - "type": "object", - "required": [ - "event", - "in_successful_contract_call" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "in_successful_contract_call": { - "type": "boolean" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InnerTransactionResult": { - "description": "InnerTransactionResult is an XDR Struct defined as:\n\n```text struct InnerTransactionResult { // Always 0. Here for binary compatibility. int64 feeCharged;\n\nunion switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/InnerTransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResultResult" - } - } - }, - "InnerTransactionResultExt": { - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "InnerTransactionResultPair": { - "description": "InnerTransactionResultPair is an XDR Struct defined as:\n\n```text struct InnerTransactionResultPair { Hash transactionHash; // hash of the inner transaction InnerTransactionResult result; // result for the inner transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/InnerTransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "InnerTransactionResultResult": { - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationMeta": { - "description": "OperationMeta is an XDR Struct defined as:\n\n```text struct OperationMeta { LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "OperationMetaV2": { - "description": "OperationMetaV2 is an XDR Struct defined as:\n\n```text struct OperationMetaV2 { ExtensionPoint ext;\n\nLedgerEntryChanges changes;\n\nContractEvent events<>; }; ```", - "type": "object", - "required": [ - "changes", - "events", - "ext" - ], - "properties": { - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "SorobanTransactionMeta": { - "description": "SorobanTransactionMeta is an XDR Struct defined as:\n\n```text struct SorobanTransactionMeta { SorobanTransactionMetaExt ext;\n\nContractEvent events<>; // custom events populated by the // contracts themselves. SCVal returnValue; // return value of the host fn invocation\n\n// Diagnostics events that are not hashed. // This will contain all contract and diagnostic events. Even ones // that were emitted in a failed contract call. DiagnosticEvent diagnosticEvents<>; }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "return_value" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/ContractEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "$ref": "#/definitions/ScVal" - } - } - }, - "SorobanTransactionMetaExt": { - "description": "SorobanTransactionMetaExt is an XDR Union defined as:\n\n```text union SorobanTransactionMetaExt switch (int v) { case 0: void; case 1: SorobanTransactionMetaExtV1 v1; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionMetaExtV1" - } - } - } - ] - }, - "SorobanTransactionMetaExtV1": { - "description": "SorobanTransactionMetaExtV1 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaExtV1 { ExtensionPoint ext;\n\n// The following are the components of the overall Soroban resource fee // charged for the transaction. // The following relation holds: // `resourceFeeCharged = totalNonRefundableResourceFeeCharged + totalRefundableResourceFeeCharged` // where `resourceFeeCharged` is the overall fee charged for the // transaction. Also, `resourceFeeCharged` <= `sorobanData.resourceFee` // i.e.we never charge more than the declared resource fee. // The inclusion fee for charged the Soroban transaction can be found using // the following equation: // `result.feeCharged = resourceFeeCharged + inclusionFeeCharged`.\n\n// Total amount (in stroops) that has been charged for non-refundable // Soroban resources. // Non-refundable resources are charged based on the usage declared in // the transaction envelope (such as `instructions`, `readBytes` etc.) and // is charged regardless of the success of the transaction. int64 totalNonRefundableResourceFeeCharged; // Total amount (in stroops) that has been charged for refundable // Soroban resource fees. // Currently this comprises the rent fee (`rentFeeCharged`) and the // fee for the events and return value. // Refundable resources are charged based on the actual resources usage. // Since currently refundable resources are only used for the successful // transactions, this will be `0` for failed transactions. int64 totalRefundableResourceFeeCharged; // Amount (in stroops) that has been charged for rent. // This is a part of `totalNonRefundableResourceFeeCharged`. int64 rentFeeCharged; }; ```", - "type": "object", - "required": [ - "ext", - "rent_fee_charged", - "total_non_refundable_resource_fee_charged", - "total_refundable_resource_fee_charged" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "rent_fee_charged": { - "type": "string" - }, - "total_non_refundable_resource_fee_charged": { - "type": "string" - }, - "total_refundable_resource_fee_charged": { - "type": "string" - } - } - }, - "SorobanTransactionMetaV2": { - "description": "SorobanTransactionMetaV2 is an XDR Struct defined as:\n\n```text struct SorobanTransactionMetaV2 { SorobanTransactionMetaExt ext;\n\nSCVal* returnValue; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionMetaExt" - }, - "return_value": { - "anyOf": [ - { - "$ref": "#/definitions/ScVal" - }, - { - "type": "null" - } - ] - } - } - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TransactionEvent": { - "description": "TransactionEvent is an XDR Struct defined as:\n\n```text struct TransactionEvent { TransactionEventStage stage; // Stage at which an event has occurred. ContractEvent event; // The contract event that has occurred. }; ```", - "type": "object", - "required": [ - "event", - "stage" - ], - "properties": { - "event": { - "$ref": "#/definitions/ContractEvent" - }, - "stage": { - "$ref": "#/definitions/TransactionEventStage" - } - } - }, - "TransactionEventStage": { - "description": "TransactionEventStage is an XDR Enum defined as:\n\n```text enum TransactionEventStage { // The event has happened before any one of the transactions has its // operations applied. TRANSACTION_EVENT_STAGE_BEFORE_ALL_TXS = 0, // The event has happened immediately after operations of the transaction // have been applied. TRANSACTION_EVENT_STAGE_AFTER_TX = 1, // The event has happened after every transaction had its operations // applied. TRANSACTION_EVENT_STAGE_AFTER_ALL_TXS = 2 }; ```", - "type": "string", - "enum": [ - "before_all_txs", - "after_tx", - "after_all_txs" - ] - }, - "TransactionMeta": { - "description": "TransactionMeta is an XDR Union defined as:\n\n```text union TransactionMeta switch (int v) { case 0: OperationMeta operations<>; case 1: TransactionMetaV1 v1; case 2: TransactionMetaV2 v2; case 3: TransactionMetaV3 v3; case 4: TransactionMetaV4 v4; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TransactionMetaV1" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TransactionMetaV2" - } - } - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/TransactionMetaV3" - } - } - }, - { - "type": "object", - "required": [ - "v4" - ], - "properties": { - "v4": { - "$ref": "#/definitions/TransactionMetaV4" - } - } - } - ] - }, - "TransactionMetaV1": { - "description": "TransactionMetaV1 is an XDR Struct defined as:\n\n```text struct TransactionMetaV1 { LedgerEntryChanges txChanges; // tx level changes if any OperationMeta operations<>; // meta for each operation }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV2": { - "description": "TransactionMetaV2 is an XDR Struct defined as:\n\n```text struct TransactionMetaV2 { LedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any }; ```", - "type": "object", - "required": [ - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV3": { - "description": "TransactionMetaV3 is an XDR Struct defined as:\n\n```text struct TransactionMetaV3 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMeta operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMeta* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions). }; ```", - "type": "object", - "required": [ - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMeta" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMeta" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionMetaV4": { - "description": "TransactionMetaV4 is an XDR Struct defined as:\n\n```text struct TransactionMetaV4 { ExtensionPoint ext;\n\nLedgerEntryChanges txChangesBefore; // tx level changes before operations // are applied if any OperationMetaV2 operations<>; // meta for each operation LedgerEntryChanges txChangesAfter; // tx level changes after operations are // applied if any SorobanTransactionMetaV2* sorobanMeta; // Soroban-specific meta (only for // Soroban transactions).\n\nTransactionEvent events<>; // Used for transaction-level events (like fee payment) DiagnosticEvent diagnosticEvents<>; // Used for all diagnostic information }; ```", - "type": "object", - "required": [ - "diagnostic_events", - "events", - "ext", - "operations", - "tx_changes_after", - "tx_changes_before" - ], - "properties": { - "diagnostic_events": { - "type": "array", - "items": { - "$ref": "#/definitions/DiagnosticEvent" - }, - "maxItems": 4294967295 - }, - "events": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEvent" - }, - "maxItems": 4294967295 - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationMetaV2" - }, - "maxItems": 4294967295 - }, - "soroban_meta": { - "anyOf": [ - { - "$ref": "#/definitions/SorobanTransactionMetaV2" - }, - { - "type": "null" - } - ] - }, - "tx_changes_after": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "tx_changes_before": { - "$ref": "#/definitions/LedgerEntryChanges" - } - } - }, - "TransactionResult": { - "description": "TransactionResult is an XDR Struct defined as:\n\n```text struct TransactionResult { int64 feeCharged; // actual fee charged for the transaction\n\nunion switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/TransactionResultResult" - } - } - }, - "TransactionResultExt": { - "description": "TransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionResultPair": { - "description": "TransactionResultPair is an XDR Struct defined as:\n\n```text struct TransactionResultPair { Hash transactionHash; TransactionResult result; // result for the transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/TransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionResultResult": { - "description": "TransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_success" - ], - "properties": { - "tx_fee_bump_inner_success": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_failed" - ], - "properties": { - "tx_fee_bump_inner_failed": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionResultPair.json b/xdr-json/next/TransactionResultPair.json deleted file mode 100644 index 977b68e3..00000000 --- a/xdr-json/next/TransactionResultPair.json +++ /dev/null @@ -1,1452 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionResultPair", - "description": "TransactionResultPair is an XDR Struct defined as:\n\n```text struct TransactionResultPair { Hash transactionHash; TransactionResult result; // result for the transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "$schema": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/TransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InnerTransactionResult": { - "description": "InnerTransactionResult is an XDR Struct defined as:\n\n```text struct InnerTransactionResult { // Always 0. Here for binary compatibility. int64 feeCharged;\n\nunion switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/InnerTransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResultResult" - } - } - }, - "InnerTransactionResultExt": { - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "InnerTransactionResultPair": { - "description": "InnerTransactionResultPair is an XDR Struct defined as:\n\n```text struct InnerTransactionResultPair { Hash transactionHash; // hash of the inner transaction InnerTransactionResult result; // result for the inner transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/InnerTransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "InnerTransactionResultResult": { - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "TransactionResult": { - "description": "TransactionResult is an XDR Struct defined as:\n\n```text struct TransactionResult { int64 feeCharged; // actual fee charged for the transaction\n\nunion switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/TransactionResultResult" - } - } - }, - "TransactionResultExt": { - "description": "TransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionResultResult": { - "description": "TransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_success" - ], - "properties": { - "tx_fee_bump_inner_success": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_failed" - ], - "properties": { - "tx_fee_bump_inner_failed": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionResultResult.json b/xdr-json/next/TransactionResultResult.json deleted file mode 100644 index f2f4b7dd..00000000 --- a/xdr-json/next/TransactionResultResult.json +++ /dev/null @@ -1,1407 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionResultResult", - "description": "TransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_success" - ], - "properties": { - "tx_fee_bump_inner_success": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_failed" - ], - "properties": { - "tx_fee_bump_inner_failed": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InnerTransactionResult": { - "description": "InnerTransactionResult is an XDR Struct defined as:\n\n```text struct InnerTransactionResult { // Always 0. Here for binary compatibility. int64 feeCharged;\n\nunion switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/InnerTransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResultResult" - } - } - }, - "InnerTransactionResultExt": { - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "InnerTransactionResultPair": { - "description": "InnerTransactionResultPair is an XDR Struct defined as:\n\n```text struct InnerTransactionResultPair { Hash transactionHash; // hash of the inner transaction InnerTransactionResult result; // result for the inner transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/InnerTransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "InnerTransactionResultResult": { - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionResultSet.json b/xdr-json/next/TransactionResultSet.json deleted file mode 100644 index 390ac79a..00000000 --- a/xdr-json/next/TransactionResultSet.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionResultSet", - "description": "TransactionResultSet is an XDR Struct defined as:\n\n```text struct TransactionResultSet { TransactionResultPair results<>; }; ```", - "type": "object", - "required": [ - "results" - ], - "properties": { - "$schema": { - "type": "string" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionResultPair" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AccountMergeResult": { - "description": "AccountMergeResult is an XDR Union defined as:\n\n```text union AccountMergeResult switch (AccountMergeResultCode code) { case ACCOUNT_MERGE_SUCCESS: int64 sourceAccountBalance; // how much got transferred from source account case ACCOUNT_MERGE_MALFORMED: case ACCOUNT_MERGE_NO_ACCOUNT: case ACCOUNT_MERGE_IMMUTABLE_SET: case ACCOUNT_MERGE_HAS_SUB_ENTRIES: case ACCOUNT_MERGE_SEQNUM_TOO_FAR: case ACCOUNT_MERGE_DEST_FULL: case ACCOUNT_MERGE_IS_SPONSOR: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "no_account", - "immutable_set", - "has_sub_entries", - "seqnum_too_far", - "dest_full", - "is_sponsor" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string" - } - } - } - ] - }, - "AllowTrustResult": { - "description": "AllowTrustResult is an XDR Union defined as:\n\n```text union AllowTrustResult switch (AllowTrustResultCode code) { case ALLOW_TRUST_SUCCESS: void; case ALLOW_TRUST_MALFORMED: case ALLOW_TRUST_NO_TRUST_LINE: case ALLOW_TRUST_TRUST_NOT_REQUIRED: case ALLOW_TRUST_CANT_REVOKE: case ALLOW_TRUST_SELF_NOT_ALLOWED: case ALLOW_TRUST_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "trust_not_required", - "cant_revoke", - "self_not_allowed", - "low_reserve" - ] - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesResult": { - "description": "BeginSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union BeginSponsoringFutureReservesResult switch ( BeginSponsoringFutureReservesResultCode code) { case BEGIN_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED: case BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED: case BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "already_sponsored", - "recursive" - ] - }, - "BumpSequenceResult": { - "description": "BumpSequenceResult is an XDR Union defined as:\n\n```text union BumpSequenceResult switch (BumpSequenceResultCode code) { case BUMP_SEQUENCE_SUCCESS: void; case BUMP_SEQUENCE_BAD_SEQ: void; }; ```", - "type": "string", - "enum": [ - "success", - "bad_seq" - ] - }, - "ChangeTrustResult": { - "description": "ChangeTrustResult is an XDR Union defined as:\n\n```text union ChangeTrustResult switch (ChangeTrustResultCode code) { case CHANGE_TRUST_SUCCESS: void; case CHANGE_TRUST_MALFORMED: case CHANGE_TRUST_NO_ISSUER: case CHANGE_TRUST_INVALID_LIMIT: case CHANGE_TRUST_LOW_RESERVE: case CHANGE_TRUST_SELF_NOT_ALLOWED: case CHANGE_TRUST_TRUST_LINE_MISSING: case CHANGE_TRUST_CANNOT_DELETE: case CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_issuer", - "invalid_limit", - "low_reserve", - "self_not_allowed", - "trust_line_missing", - "cannot_delete", - "not_auth_maintain_liabilities" - ] - }, - "ClaimAtom": { - "description": "ClaimAtom is an XDR Union defined as:\n\n```text union ClaimAtom switch (ClaimAtomType type) { case CLAIM_ATOM_TYPE_V0: ClaimOfferAtomV0 v0; case CLAIM_ATOM_TYPE_ORDER_BOOK: ClaimOfferAtom orderBook; case CLAIM_ATOM_TYPE_LIQUIDITY_POOL: ClaimLiquidityAtom liquidityPool; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "$ref": "#/definitions/ClaimOfferAtomV0" - } - } - }, - { - "type": "object", - "required": [ - "order_book" - ], - "properties": { - "order_book": { - "$ref": "#/definitions/ClaimOfferAtom" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/ClaimLiquidityAtom" - } - } - } - ] - }, - "ClaimClaimableBalanceResult": { - "description": "ClaimClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClaimClaimableBalanceResult switch (ClaimClaimableBalanceResultCode code) { case CLAIM_CLAIMABLE_BALANCE_SUCCESS: void; case CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM: case CLAIM_CLAIMABLE_BALANCE_LINE_FULL: case CLAIM_CLAIMABLE_BALANCE_NO_TRUST: case CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CLAIM_CLAIMABLE_BALANCE_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "cannot_claim", - "line_full", - "no_trust", - "not_authorized", - "trustline_frozen" - ] - }, - "ClaimLiquidityAtom": { - "description": "ClaimLiquidityAtom is an XDR Struct defined as:\n\n```text struct ClaimLiquidityAtom { PoolID liquidityPoolID;\n\n// amount and asset taken from the pool Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the pool Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "liquidity_pool_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "ClaimOfferAtom": { - "description": "ClaimOfferAtom is an XDR Struct defined as:\n\n```text struct ClaimOfferAtom { // emitted to identify the offer AccountID sellerID; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_id" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "ClaimOfferAtomV0": { - "description": "ClaimOfferAtomV0 is an XDR Struct defined as:\n\n```text struct ClaimOfferAtomV0 { // emitted to identify the offer uint256 sellerEd25519; // Account that owns the offer int64 offerID;\n\n// amount and asset taken from the owner Asset assetSold; int64 amountSold;\n\n// amount and asset sent to the owner Asset assetBought; int64 amountBought; }; ```", - "type": "object", - "required": [ - "amount_bought", - "amount_sold", - "asset_bought", - "asset_sold", - "offer_id", - "seller_ed25519" - ], - "properties": { - "amount_bought": { - "type": "string" - }, - "amount_sold": { - "type": "string" - }, - "asset_bought": { - "$ref": "#/definitions/Asset" - }, - "asset_sold": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "seller_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ClaimableBalanceId": { - "type": "string" - }, - "ClawbackClaimableBalanceResult": { - "description": "ClawbackClaimableBalanceResult is an XDR Union defined as:\n\n```text union ClawbackClaimableBalanceResult switch ( ClawbackClaimableBalanceResultCode code) { case CLAWBACK_CLAIMABLE_BALANCE_SUCCESS: void; case CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST: case CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER: case CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_issuer", - "not_clawback_enabled" - ] - }, - "ClawbackResult": { - "description": "ClawbackResult is an XDR Union defined as:\n\n```text union ClawbackResult switch (ClawbackResultCode code) { case CLAWBACK_SUCCESS: void; case CLAWBACK_MALFORMED: case CLAWBACK_NOT_CLAWBACK_ENABLED: case CLAWBACK_NO_TRUST: case CLAWBACK_UNDERFUNDED: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "not_clawback_enabled", - "no_trust", - "underfunded" - ] - }, - "CreateAccountResult": { - "description": "CreateAccountResult is an XDR Union defined as:\n\n```text union CreateAccountResult switch (CreateAccountResultCode code) { case CREATE_ACCOUNT_SUCCESS: void; case CREATE_ACCOUNT_MALFORMED: case CREATE_ACCOUNT_UNDERFUNDED: case CREATE_ACCOUNT_LOW_RESERVE: case CREATE_ACCOUNT_ALREADY_EXIST: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "low_reserve", - "already_exist" - ] - }, - "CreateClaimableBalanceResult": { - "description": "CreateClaimableBalanceResult is an XDR Union defined as:\n\n```text union CreateClaimableBalanceResult switch ( CreateClaimableBalanceResultCode code) { case CREATE_CLAIMABLE_BALANCE_SUCCESS: ClaimableBalanceID balanceID; case CREATE_CLAIMABLE_BALANCE_MALFORMED: case CREATE_CLAIMABLE_BALANCE_LOW_RESERVE: case CREATE_CLAIMABLE_BALANCE_NO_TRUST: case CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED: case CREATE_CLAIMABLE_BALANCE_UNDERFUNDED: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "low_reserve", - "no_trust", - "not_authorized", - "underfunded" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - } - ] - }, - "EndSponsoringFutureReservesResult": { - "description": "EndSponsoringFutureReservesResult is an XDR Union defined as:\n\n```text union EndSponsoringFutureReservesResult switch ( EndSponsoringFutureReservesResultCode code) { case END_SPONSORING_FUTURE_RESERVES_SUCCESS: void; case END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_sponsored" - ] - }, - "ExtendFootprintTtlResult": { - "description": "ExtendFootprintTtlResult is an XDR Union defined as:\n\n```text union ExtendFootprintTTLResult switch (ExtendFootprintTTLResultCode code) { case EXTEND_FOOTPRINT_TTL_SUCCESS: void; case EXTEND_FOOTPRINT_TTL_MALFORMED: case EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED: case EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "InflationPayout": { - "description": "InflationPayout is an XDR Struct defined as:\n\n```text struct InflationPayout // or use PaymentResultAtom to limit types? { AccountID destination; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "InflationResult": { - "description": "InflationResult is an XDR Union defined as:\n\n```text union InflationResult switch (InflationResultCode code) { case INFLATION_SUCCESS: InflationPayout payouts<>; case INFLATION_NOT_TIME: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "not_time" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "array", - "items": { - "$ref": "#/definitions/InflationPayout" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InnerTransactionResult": { - "description": "InnerTransactionResult is an XDR Struct defined as:\n\n```text struct InnerTransactionResult { // Always 0. Here for binary compatibility. int64 feeCharged;\n\nunion switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/InnerTransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/InnerTransactionResultResult" - } - } - }, - "InnerTransactionResultExt": { - "description": "InnerTransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "InnerTransactionResultPair": { - "description": "InnerTransactionResultPair is an XDR Struct defined as:\n\n```text struct InnerTransactionResultPair { Hash transactionHash; // hash of the inner transaction InnerTransactionResult result; // result for the inner transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/InnerTransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "InnerTransactionResultResult": { - "description": "InnerTransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { // txFEE_BUMP_INNER_SUCCESS is not included case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // txFEE_BUMP_INNER_FAILED is not included case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - }, - "InvokeHostFunctionResult": { - "description": "InvokeHostFunctionResult is an XDR Union defined as:\n\n```text union InvokeHostFunctionResult switch (InvokeHostFunctionResultCode code) { case INVOKE_HOST_FUNCTION_SUCCESS: Hash success; // sha256(InvokeHostFunctionSuccessPreImage) case INVOKE_HOST_FUNCTION_MALFORMED: case INVOKE_HOST_FUNCTION_TRAPPED: case INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED: case INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED: case INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "trapped", - "resource_limit_exceeded", - "entry_archived", - "insufficient_refundable_fee" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "LiquidityPoolDepositResult": { - "description": "LiquidityPoolDepositResult is an XDR Union defined as:\n\n```text union LiquidityPoolDepositResult switch (LiquidityPoolDepositResultCode code) { case LIQUIDITY_POOL_DEPOSIT_SUCCESS: void; case LIQUIDITY_POOL_DEPOSIT_MALFORMED: case LIQUIDITY_POOL_DEPOSIT_NO_TRUST: case LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED: case LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED: case LIQUIDITY_POOL_DEPOSIT_LINE_FULL: case LIQUIDITY_POOL_DEPOSIT_BAD_PRICE: case LIQUIDITY_POOL_DEPOSIT_POOL_FULL: case LIQUIDITY_POOL_DEPOSIT_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "not_authorized", - "underfunded", - "line_full", - "bad_price", - "pool_full", - "trustline_frozen" - ] - }, - "LiquidityPoolWithdrawResult": { - "description": "LiquidityPoolWithdrawResult is an XDR Union defined as:\n\n```text union LiquidityPoolWithdrawResult switch (LiquidityPoolWithdrawResultCode code) { case LIQUIDITY_POOL_WITHDRAW_SUCCESS: void; case LIQUIDITY_POOL_WITHDRAW_MALFORMED: case LIQUIDITY_POOL_WITHDRAW_NO_TRUST: case LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED: case LIQUIDITY_POOL_WITHDRAW_LINE_FULL: case LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM: case LIQUIDITY_POOL_WITHDRAW_TRUSTLINE_FROZEN: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust", - "underfunded", - "line_full", - "under_minimum", - "trustline_frozen" - ] - }, - "ManageBuyOfferResult": { - "description": "ManageBuyOfferResult is an XDR Union defined as:\n\n```text union ManageBuyOfferResult switch (ManageBuyOfferResultCode code) { case MANAGE_BUY_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_BUY_OFFER_MALFORMED: case MANAGE_BUY_OFFER_SELL_NO_TRUST: case MANAGE_BUY_OFFER_BUY_NO_TRUST: case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_BUY_OFFER_LINE_FULL: case MANAGE_BUY_OFFER_UNDERFUNDED: case MANAGE_BUY_OFFER_CROSS_SELF: case MANAGE_BUY_OFFER_SELL_NO_ISSUER: case MANAGE_BUY_OFFER_BUY_NO_ISSUER: case MANAGE_BUY_OFFER_NOT_FOUND: case MANAGE_BUY_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "ManageDataResult": { - "description": "ManageDataResult is an XDR Union defined as:\n\n```text union ManageDataResult switch (ManageDataResultCode code) { case MANAGE_DATA_SUCCESS: void; case MANAGE_DATA_NOT_SUPPORTED_YET: case MANAGE_DATA_NAME_NOT_FOUND: case MANAGE_DATA_LOW_RESERVE: case MANAGE_DATA_INVALID_NAME: void; }; ```", - "type": "string", - "enum": [ - "success", - "not_supported_yet", - "name_not_found", - "low_reserve", - "invalid_name" - ] - }, - "ManageOfferSuccessResult": { - "description": "ManageOfferSuccessResult is an XDR Struct defined as:\n\n```text struct ManageOfferSuccessResult { // offers that got claimed while creating this offer ClaimAtom offersClaimed<>;\n\nunion switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } offer; }; ```", - "type": "object", - "required": [ - "offer", - "offers_claimed" - ], - "properties": { - "offer": { - "$ref": "#/definitions/ManageOfferSuccessResultOffer" - }, - "offers_claimed": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "ManageOfferSuccessResultOffer": { - "description": "ManageOfferSuccessResultOffer is an XDR NestedUnion defined as:\n\n```text union switch (ManageOfferEffect effect) { case MANAGE_OFFER_CREATED: case MANAGE_OFFER_UPDATED: OfferEntry offer; case MANAGE_OFFER_DELETED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "deleted" - ] - }, - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/OfferEntry" - } - } - } - ] - }, - "ManageSellOfferResult": { - "description": "ManageSellOfferResult is an XDR Union defined as:\n\n```text union ManageSellOfferResult switch (ManageSellOfferResultCode code) { case MANAGE_SELL_OFFER_SUCCESS: ManageOfferSuccessResult success; case MANAGE_SELL_OFFER_MALFORMED: case MANAGE_SELL_OFFER_SELL_NO_TRUST: case MANAGE_SELL_OFFER_BUY_NO_TRUST: case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED: case MANAGE_SELL_OFFER_LINE_FULL: case MANAGE_SELL_OFFER_UNDERFUNDED: case MANAGE_SELL_OFFER_CROSS_SELF: case MANAGE_SELL_OFFER_SELL_NO_ISSUER: case MANAGE_SELL_OFFER_BUY_NO_ISSUER: case MANAGE_SELL_OFFER_NOT_FOUND: case MANAGE_SELL_OFFER_LOW_RESERVE: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "sell_no_trust", - "buy_no_trust", - "sell_not_authorized", - "buy_not_authorized", - "line_full", - "underfunded", - "cross_self", - "sell_no_issuer", - "buy_no_issuer", - "not_found", - "low_reserve" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/ManageOfferSuccessResult" - } - } - } - ] - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "OperationResult": { - "description": "OperationResult is an XDR Union defined as:\n\n```text union OperationResult switch (OperationResultCode code) { case opINNER: union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } tr; case opBAD_AUTH: case opNO_ACCOUNT: case opNOT_SUPPORTED: case opTOO_MANY_SUBENTRIES: case opEXCEEDED_WORK_LIMIT: case opTOO_MANY_SPONSORING: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "op_bad_auth", - "op_no_account", - "op_not_supported", - "op_too_many_subentries", - "op_exceeded_work_limit", - "op_too_many_sponsoring" - ] - }, - { - "type": "object", - "required": [ - "op_inner" - ], - "properties": { - "op_inner": { - "$ref": "#/definitions/OperationResultTr" - } - } - } - ] - }, - "OperationResultTr": { - "description": "OperationResultTr is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountResult createAccountResult; case PAYMENT: PaymentResult paymentResult; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveResult pathPaymentStrictReceiveResult; case MANAGE_SELL_OFFER: ManageSellOfferResult manageSellOfferResult; case CREATE_PASSIVE_SELL_OFFER: ManageSellOfferResult createPassiveSellOfferResult; case SET_OPTIONS: SetOptionsResult setOptionsResult; case CHANGE_TRUST: ChangeTrustResult changeTrustResult; case ALLOW_TRUST: AllowTrustResult allowTrustResult; case ACCOUNT_MERGE: AccountMergeResult accountMergeResult; case INFLATION: InflationResult inflationResult; case MANAGE_DATA: ManageDataResult manageDataResult; case BUMP_SEQUENCE: BumpSequenceResult bumpSeqResult; case MANAGE_BUY_OFFER: ManageBuyOfferResult manageBuyOfferResult; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendResult pathPaymentStrictSendResult; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceResult createClaimableBalanceResult; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceResult claimClaimableBalanceResult; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesResult beginSponsoringFutureReservesResult; case END_SPONSORING_FUTURE_RESERVES: EndSponsoringFutureReservesResult endSponsoringFutureReservesResult; case REVOKE_SPONSORSHIP: RevokeSponsorshipResult revokeSponsorshipResult; case CLAWBACK: ClawbackResult clawbackResult; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceResult clawbackClaimableBalanceResult; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsResult setTrustLineFlagsResult; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositResult liquidityPoolDepositResult; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawResult liquidityPoolWithdrawResult; case INVOKE_HOST_FUNCTION: InvokeHostFunctionResult invokeHostFunctionResult; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountResult" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/ManageSellOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsResult" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustResult" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/AccountMergeResult" - } - } - }, - { - "type": "object", - "required": [ - "inflation" - ], - "properties": { - "inflation": { - "$ref": "#/definitions/InflationResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataResult" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceResult" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferResult" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendResult" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "end_sponsoring_future_reserves" - ], - "properties": { - "end_sponsoring_future_reserves": { - "$ref": "#/definitions/EndSponsoringFutureReservesResult" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackResult" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceResult" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositResult" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawResult" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionResult" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlResult" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintResult" - } - } - } - ] - }, - "PathPaymentStrictReceiveResult": { - "description": "PathPaymentStrictReceiveResult is an XDR Union defined as:\n\n```text union PathPaymentStrictReceiveResult switch ( PathPaymentStrictReceiveResultCode code) { case PATH_PAYMENT_STRICT_RECEIVE_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_RECEIVE_MALFORMED: case PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION: case PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST: case PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL: void; case PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "over_sendmax" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictReceiveResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictReceiveResultSuccess": { - "description": "PathPaymentStrictReceiveResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictSendResult": { - "description": "PathPaymentStrictSendResult is an XDR Union defined as:\n\n```text union PathPaymentStrictSendResult switch (PathPaymentStrictSendResultCode code) { case PATH_PAYMENT_STRICT_SEND_SUCCESS: struct { ClaimAtom offers<>; SimplePaymentResult last; } success; case PATH_PAYMENT_STRICT_SEND_MALFORMED: case PATH_PAYMENT_STRICT_SEND_UNDERFUNDED: case PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_NO_DESTINATION: case PATH_PAYMENT_STRICT_SEND_NO_TRUST: case PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED: case PATH_PAYMENT_STRICT_SEND_LINE_FULL: void; case PATH_PAYMENT_STRICT_SEND_NO_ISSUER: Asset noIssuer; // the asset that caused the error case PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS: case PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF: case PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "too_few_offers", - "offer_cross_self", - "under_destmin" - ] - }, - { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "$ref": "#/definitions/PathPaymentStrictSendResultSuccess" - } - } - }, - { - "type": "object", - "required": [ - "no_issuer" - ], - "properties": { - "no_issuer": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "PathPaymentStrictSendResultSuccess": { - "description": "PathPaymentStrictSendResultSuccess is an XDR NestedStruct defined as:\n\n```text struct { ClaimAtom offers<>; SimplePaymentResult last; } ```", - "type": "object", - "required": [ - "last", - "offers" - ], - "properties": { - "last": { - "$ref": "#/definitions/SimplePaymentResult" - }, - "offers": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimAtom" - }, - "maxItems": 4294967295 - } - } - }, - "PaymentResult": { - "description": "PaymentResult is an XDR Union defined as:\n\n```text union PaymentResult switch (PaymentResultCode code) { case PAYMENT_SUCCESS: void; case PAYMENT_MALFORMED: case PAYMENT_UNDERFUNDED: case PAYMENT_SRC_NO_TRUST: case PAYMENT_SRC_NOT_AUTHORIZED: case PAYMENT_NO_DESTINATION: case PAYMENT_NO_TRUST: case PAYMENT_NOT_AUTHORIZED: case PAYMENT_LINE_FULL: case PAYMENT_NO_ISSUER: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "underfunded", - "src_no_trust", - "src_not_authorized", - "no_destination", - "no_trust", - "not_authorized", - "line_full", - "no_issuer" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintResult": { - "description": "RestoreFootprintResult is an XDR Union defined as:\n\n```text union RestoreFootprintResult switch (RestoreFootprintResultCode code) { case RESTORE_FOOTPRINT_SUCCESS: void; case RESTORE_FOOTPRINT_MALFORMED: case RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED: case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "resource_limit_exceeded", - "insufficient_refundable_fee" - ] - }, - "RevokeSponsorshipResult": { - "description": "RevokeSponsorshipResult is an XDR Union defined as:\n\n```text union RevokeSponsorshipResult switch (RevokeSponsorshipResultCode code) { case REVOKE_SPONSORSHIP_SUCCESS: void; case REVOKE_SPONSORSHIP_DOES_NOT_EXIST: case REVOKE_SPONSORSHIP_NOT_SPONSOR: case REVOKE_SPONSORSHIP_LOW_RESERVE: case REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE: case REVOKE_SPONSORSHIP_MALFORMED: void; }; ```", - "type": "string", - "enum": [ - "success", - "does_not_exist", - "not_sponsor", - "low_reserve", - "only_transferable", - "malformed" - ] - }, - "SetOptionsResult": { - "description": "SetOptionsResult is an XDR Union defined as:\n\n```text union SetOptionsResult switch (SetOptionsResultCode code) { case SET_OPTIONS_SUCCESS: void; case SET_OPTIONS_LOW_RESERVE: case SET_OPTIONS_TOO_MANY_SIGNERS: case SET_OPTIONS_BAD_FLAGS: case SET_OPTIONS_INVALID_INFLATION: case SET_OPTIONS_CANT_CHANGE: case SET_OPTIONS_UNKNOWN_FLAG: case SET_OPTIONS_THRESHOLD_OUT_OF_RANGE: case SET_OPTIONS_BAD_SIGNER: case SET_OPTIONS_INVALID_HOME_DOMAIN: case SET_OPTIONS_AUTH_REVOCABLE_REQUIRED: void; }; ```", - "type": "string", - "enum": [ - "success", - "low_reserve", - "too_many_signers", - "bad_flags", - "invalid_inflation", - "cant_change", - "unknown_flag", - "threshold_out_of_range", - "bad_signer", - "invalid_home_domain", - "auth_revocable_required" - ] - }, - "SetTrustLineFlagsResult": { - "description": "SetTrustLineFlagsResult is an XDR Union defined as:\n\n```text union SetTrustLineFlagsResult switch (SetTrustLineFlagsResultCode code) { case SET_TRUST_LINE_FLAGS_SUCCESS: void; case SET_TRUST_LINE_FLAGS_MALFORMED: case SET_TRUST_LINE_FLAGS_NO_TRUST_LINE: case SET_TRUST_LINE_FLAGS_CANT_REVOKE: case SET_TRUST_LINE_FLAGS_INVALID_STATE: case SET_TRUST_LINE_FLAGS_LOW_RESERVE: void; }; ```", - "type": "string", - "enum": [ - "success", - "malformed", - "no_trust_line", - "cant_revoke", - "invalid_state", - "low_reserve" - ] - }, - "SimplePaymentResult": { - "description": "SimplePaymentResult is an XDR Struct defined as:\n\n```text struct SimplePaymentResult { AccountID destination; Asset asset; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/AccountId" - } - } - }, - "TransactionResult": { - "description": "TransactionResult is an XDR Struct defined as:\n\n```text struct TransactionResult { int64 feeCharged; // actual fee charged for the transaction\n\nunion switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } result;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee_charged", - "result" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionResultExt" - }, - "fee_charged": { - "type": "string" - }, - "result": { - "$ref": "#/definitions/TransactionResultResult" - } - } - }, - "TransactionResultExt": { - "description": "TransactionResultExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionResultPair": { - "description": "TransactionResultPair is an XDR Struct defined as:\n\n```text struct TransactionResultPair { Hash transactionHash; TransactionResult result; // result for the transaction }; ```", - "type": "object", - "required": [ - "result", - "transaction_hash" - ], - "properties": { - "result": { - "$ref": "#/definitions/TransactionResult" - }, - "transaction_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "TransactionResultResult": { - "description": "TransactionResultResult is an XDR NestedUnion defined as:\n\n```text union switch (TransactionResultCode code) { case txFEE_BUMP_INNER_SUCCESS: case txFEE_BUMP_INNER_FAILED: InnerTransactionResultPair innerResultPair; case txSUCCESS: case txFAILED: OperationResult results<>; case txTOO_EARLY: case txTOO_LATE: case txMISSING_OPERATION: case txBAD_SEQ: case txBAD_AUTH: case txINSUFFICIENT_BALANCE: case txNO_ACCOUNT: case txINSUFFICIENT_FEE: case txBAD_AUTH_EXTRA: case txINTERNAL_ERROR: case txNOT_SUPPORTED: // case txFEE_BUMP_INNER_FAILED: handled above case txBAD_SPONSORSHIP: case txBAD_MIN_SEQ_AGE_OR_GAP: case txMALFORMED: case txSOROBAN_INVALID: case txFROZEN_KEY_ACCESSED: void; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "tx_too_early", - "tx_too_late", - "tx_missing_operation", - "tx_bad_seq", - "tx_bad_auth", - "tx_insufficient_balance", - "tx_no_account", - "tx_insufficient_fee", - "tx_bad_auth_extra", - "tx_internal_error", - "tx_not_supported", - "tx_bad_sponsorship", - "tx_bad_min_seq_age_or_gap", - "tx_malformed", - "tx_soroban_invalid", - "tx_frozen_key_accessed" - ] - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_success" - ], - "properties": { - "tx_fee_bump_inner_success": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump_inner_failed" - ], - "properties": { - "tx_fee_bump_inner_failed": { - "$ref": "#/definitions/InnerTransactionResultPair" - } - } - }, - { - "type": "object", - "required": [ - "tx_success" - ], - "properties": { - "tx_success": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "tx_failed" - ], - "properties": { - "tx_failed": { - "type": "array", - "items": { - "$ref": "#/definitions/OperationResult" - }, - "maxItems": 4294967295 - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionSet.json b/xdr-json/next/TransactionSet.json deleted file mode 100644 index 9e1e3eca..00000000 --- a/xdr-json/next/TransactionSet.json +++ /dev/null @@ -1,3033 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionSet", - "description": "TransactionSet is an XDR Struct defined as:\n\n```text struct TransactionSet { Hash previousLedgerHash; TransactionEnvelope txs<>; }; ```", - "type": "object", - "required": [ - "previous_ledger_hash", - "txs" - ], - "properties": { - "$schema": { - "type": "string" - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionSetV1.json b/xdr-json/next/TransactionSetV1.json deleted file mode 100644 index 4a34a2d7..00000000 --- a/xdr-json/next/TransactionSetV1.json +++ /dev/null @@ -1,3142 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionSetV1", - "description": "TransactionSetV1 is an XDR Struct defined as:\n\n```text struct TransactionSetV1 { Hash previousLedgerHash; TransactionPhase phases<>; }; ```", - "type": "object", - "required": [ - "phases", - "previous_ledger_hash" - ], - "properties": { - "$schema": { - "type": "string" - }, - "phases": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionPhase" - }, - "maxItems": 4294967295 - }, - "previous_ledger_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "DependentTxCluster": { - "description": "DependentTxCluster is an XDR Typedef defined as:\n\n```text typedef TransactionEnvelope DependentTxCluster<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "ParallelTxExecutionStage": { - "description": "ParallelTxExecutionStage is an XDR Typedef defined as:\n\n```text typedef DependentTxCluster ParallelTxExecutionStage<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/DependentTxCluster" - }, - "maxItems": 4294967295 - }, - "ParallelTxsComponent": { - "description": "ParallelTxsComponent is an XDR Struct defined as:\n\n```text struct ParallelTxsComponent { int64* baseFee; // A sequence of stages that *may* have arbitrary data dependencies between // each other, i.e. in a general case the stage execution order may not be // arbitrarily shuffled without affecting the end result. ParallelTxExecutionStage executionStages<>; }; ```", - "type": "object", - "required": [ - "execution_stages" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "execution_stages": { - "type": "array", - "items": { - "$ref": "#/definitions/ParallelTxExecutionStage" - }, - "maxItems": 4294967295 - } - } - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionPhase": { - "description": "TransactionPhase is an XDR Union defined as:\n\n```text union TransactionPhase switch (int v) { case 0: TxSetComponent v0Components<>; case 1: ParallelTxsComponent parallelTxsComponent; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "v0" - ], - "properties": { - "v0": { - "type": "array", - "items": { - "$ref": "#/definitions/TxSetComponent" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ParallelTxsComponent" - } - } - } - ] - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TxSetComponent": { - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionSignaturePayload.json b/xdr-json/next/TransactionSignaturePayload.json deleted file mode 100644 index ba8d4d14..00000000 --- a/xdr-json/next/TransactionSignaturePayload.json +++ /dev/null @@ -1,2919 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionSignaturePayload", - "description": "TransactionSignaturePayload is an XDR Struct defined as:\n\n```text struct TransactionSignaturePayload { Hash networkId; union switch (EnvelopeType type) { // Backwards Compatibility: Use ENVELOPE_TYPE_TX to sign ENVELOPE_TYPE_TX_V0 case ENVELOPE_TYPE_TX: Transaction tx; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransaction feeBump; } taggedTransaction; }; ```", - "type": "object", - "required": [ - "network_id", - "tagged_transaction" - ], - "properties": { - "$schema": { - "type": "string" - }, - "network_id": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "tagged_transaction": { - "$ref": "#/definitions/TransactionSignaturePayloadTaggedTransaction" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionSignaturePayloadTaggedTransaction": { - "description": "TransactionSignaturePayloadTaggedTransaction is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { // Backwards Compatibility: Use ENVELOPE_TYPE_TX to sign ENVELOPE_TYPE_TX_V0 case ENVELOPE_TYPE_TX: Transaction tx; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransaction feeBump; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - } - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionSignaturePayloadTaggedTransaction.json b/xdr-json/next/TransactionSignaturePayloadTaggedTransaction.json deleted file mode 100644 index 83fe3448..00000000 --- a/xdr-json/next/TransactionSignaturePayloadTaggedTransaction.json +++ /dev/null @@ -1,2901 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionSignaturePayloadTaggedTransaction", - "description": "TransactionSignaturePayloadTaggedTransaction is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { // Backwards Compatibility: Use ENVELOPE_TYPE_TX to sign ENVELOPE_TYPE_TX_V0 case ENVELOPE_TYPE_TX: Transaction tx; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransaction feeBump; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionV0.json b/xdr-json/next/TransactionV0.json deleted file mode 100644 index 75b06eee..00000000 --- a/xdr-json/next/TransactionV0.json +++ /dev/null @@ -1,2550 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionV0", - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionV0Envelope.json b/xdr-json/next/TransactionV0Envelope.json deleted file mode 100644 index faaf6947..00000000 --- a/xdr-json/next/TransactionV0Envelope.json +++ /dev/null @@ -1,2597 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionV0Envelope", - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "$schema": { - "type": "string" - }, - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TransactionV0Ext.json b/xdr-json/next/TransactionV0Ext.json deleted file mode 100644 index cc6380be..00000000 --- a/xdr-json/next/TransactionV0Ext.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionV0Ext", - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/TransactionV1Envelope.json b/xdr-json/next/TransactionV1Envelope.json deleted file mode 100644 index 626e5cbb..00000000 --- a/xdr-json/next/TransactionV1Envelope.json +++ /dev/null @@ -1,2825 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TransactionV1Envelope", - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "$schema": { - "type": "string" - }, - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TrustLineAsset.json b/xdr-json/next/TrustLineAsset.json deleted file mode 100644 index 7376bfca..00000000 --- a/xdr-json/next/TrustLineAsset.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TrustLineAsset", - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "PoolId": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TrustLineEntry.json b/xdr-json/next/TrustLineEntry.json deleted file mode 100644 index 1251c752..00000000 --- a/xdr-json/next/TrustLineEntry.json +++ /dev/null @@ -1,230 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TrustLineEntry", - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "$schema": { - "type": "string" - }, - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "PoolId": { - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TrustLineEntryExt.json b/xdr-json/next/TrustLineEntryExt.json deleted file mode 100644 index 81d9c7ea..00000000 --- a/xdr-json/next/TrustLineEntryExt.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TrustLineEntryExt", - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TrustLineEntryExtensionV2.json b/xdr-json/next/TrustLineEntryExtensionV2.json deleted file mode 100644 index dcf8ac82..00000000 --- a/xdr-json/next/TrustLineEntryExtensionV2.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TrustLineEntryExtensionV2", - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - }, - "unevaluatedProperties": false, - "definitions": { - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TrustLineEntryExtensionV2Ext.json b/xdr-json/next/TrustLineEntryExtensionV2Ext.json deleted file mode 100644 index 80a49578..00000000 --- a/xdr-json/next/TrustLineEntryExtensionV2Ext.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TrustLineEntryExtensionV2Ext", - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] -} \ No newline at end of file diff --git a/xdr-json/next/TrustLineEntryV1.json b/xdr-json/next/TrustLineEntryV1.json deleted file mode 100644 index d7a61ac6..00000000 --- a/xdr-json/next/TrustLineEntryV1.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TrustLineEntryV1", - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "$schema": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - }, - "unevaluatedProperties": false, - "definitions": { - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TrustLineEntryV1Ext.json b/xdr-json/next/TrustLineEntryV1Ext.json deleted file mode 100644 index d5b38e36..00000000 --- a/xdr-json/next/TrustLineEntryV1Ext.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TrustLineEntryV1Ext", - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TrustLineFlags.json b/xdr-json/next/TrustLineFlags.json deleted file mode 100644 index e9d1902b..00000000 --- a/xdr-json/next/TrustLineFlags.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TrustLineFlags", - "description": "TrustLineFlags is an XDR Enum defined as:\n\n```text enum TrustLineFlags { // issuer has authorized account to perform transactions with its credit AUTHORIZED_FLAG = 1, // issuer has authorized account to maintain and reduce liabilities for its // credit AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG = 2, // issuer has specified that it may clawback its credit, and that claimable // balances created with its credit may also be clawed back TRUSTLINE_CLAWBACK_ENABLED_FLAG = 4 }; ```", - "type": "string", - "enum": [ - "authorized_flag", - "authorized_to_maintain_liabilities_flag", - "trustline_clawback_enabled_flag" - ] -} \ No newline at end of file diff --git a/xdr-json/next/TtlEntry.json b/xdr-json/next/TtlEntry.json deleted file mode 100644 index 7de161c0..00000000 --- a/xdr-json/next/TtlEntry.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TtlEntry", - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "$schema": { - "type": "string" - }, - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "unevaluatedProperties": false -} \ No newline at end of file diff --git a/xdr-json/next/TxAdvertVector.json b/xdr-json/next/TxAdvertVector.json deleted file mode 100644 index 6dc34d0d..00000000 --- a/xdr-json/next/TxAdvertVector.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TxAdvertVector", - "description": "TxAdvertVector is an XDR Typedef defined as:\n\n```text typedef Hash TxAdvertVector; ```", - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 1000 -} \ No newline at end of file diff --git a/xdr-json/next/TxDemandVector.json b/xdr-json/next/TxDemandVector.json deleted file mode 100644 index 098c1872..00000000 --- a/xdr-json/next/TxDemandVector.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TxDemandVector", - "description": "TxDemandVector is an XDR Typedef defined as:\n\n```text typedef Hash TxDemandVector; ```", - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 1000 -} \ No newline at end of file diff --git a/xdr-json/next/TxSetComponent.json b/xdr-json/next/TxSetComponent.json deleted file mode 100644 index 9ff0a8da..00000000 --- a/xdr-json/next/TxSetComponent.json +++ /dev/null @@ -1,3050 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TxSetComponent", - "description": "TxSetComponent is an XDR Union defined as:\n\n```text union TxSetComponent switch (TxSetComponentType type) { case TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE: struct { int64* baseFee; TransactionEnvelope txs<>; } txsMaybeDiscountedFee; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "txset_comp_txs_maybe_discounted_fee" - ], - "properties": { - "txset_comp_txs_maybe_discounted_fee": { - "$ref": "#/definitions/TxSetComponentTxsMaybeDiscountedFee" - } - } - } - ], - "properties": { - "$schema": { - "type": "string" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TxSetComponentTxsMaybeDiscountedFee": { - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TxSetComponentTxsMaybeDiscountedFee.json b/xdr-json/next/TxSetComponentTxsMaybeDiscountedFee.json deleted file mode 100644 index b31b2b00..00000000 --- a/xdr-json/next/TxSetComponentTxsMaybeDiscountedFee.json +++ /dev/null @@ -1,3032 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TxSetComponentTxsMaybeDiscountedFee", - "description": "TxSetComponentTxsMaybeDiscountedFee is an XDR NestedStruct defined as:\n\n```text struct { int64* baseFee; TransactionEnvelope txs<>; } ```", - "type": "object", - "required": [ - "txs" - ], - "properties": { - "$schema": { - "type": "string" - }, - "base_fee": { - "default": null, - "type": [ - "string", - "null" - ] - }, - "txs": { - "type": "array", - "items": { - "$ref": "#/definitions/TransactionEnvelope" - }, - "maxItems": 4294967295 - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountId": { - "type": "string" - }, - "AllowTrustOp": { - "description": "AllowTrustOp is an XDR Struct defined as:\n\n```text struct AllowTrustOp { AccountID trustor; AssetCode asset;\n\n// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG uint32 authorize; }; ```", - "type": "object", - "required": [ - "asset", - "authorize", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/AssetCode" - }, - "authorize": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode": { - "type": "string" - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "BeginSponsoringFutureReservesOp": { - "description": "BeginSponsoringFutureReservesOp is an XDR Struct defined as:\n\n```text struct BeginSponsoringFutureReservesOp { AccountID sponsoredID; }; ```", - "type": "object", - "required": [ - "sponsored_id" - ], - "properties": { - "sponsored_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "BumpSequenceOp": { - "description": "BumpSequenceOp is an XDR Struct defined as:\n\n```text struct BumpSequenceOp { SequenceNumber bumpTo; }; ```", - "type": "object", - "required": [ - "bump_to" - ], - "properties": { - "bump_to": { - "$ref": "#/definitions/SequenceNumber" - } - } - }, - "ChangeTrustAsset": { - "description": "ChangeTrustAsset is an XDR Union defined as:\n\n```text union ChangeTrustAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: LiquidityPoolParameters liquidityPool;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/LiquidityPoolParameters" - } - } - } - ] - }, - "ChangeTrustOp": { - "description": "ChangeTrustOp is an XDR Struct defined as:\n\n```text struct ChangeTrustOp { ChangeTrustAsset line;\n\n// if limit is set to 0, deletes the trust line int64 limit; }; ```", - "type": "object", - "required": [ - "limit", - "line" - ], - "properties": { - "limit": { - "type": "string" - }, - "line": { - "$ref": "#/definitions/ChangeTrustAsset" - } - } - }, - "ClaimClaimableBalanceOp": { - "description": "ClaimClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClaimClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ClawbackClaimableBalanceOp": { - "description": "ClawbackClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct ClawbackClaimableBalanceOp { ClaimableBalanceID balanceID; }; ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "ClawbackOp": { - "description": "ClawbackOp is an XDR Struct defined as:\n\n```text struct ClawbackOp { Asset asset; MuxedAccount from; int64 amount; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "from" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "from": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractIdPreimage": { - "description": "ContractIdPreimage is an XDR Union defined as:\n\n```text union ContractIDPreimage switch (ContractIDPreimageType type) { case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: struct { SCAddress address; uint256 salt; } fromAddress; case CONTRACT_ID_PREIMAGE_FROM_ASSET: Asset fromAsset; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ContractIdPreimageFromAddress" - } - } - }, - { - "type": "object", - "required": [ - "asset" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - } - } - } - ] - }, - "ContractIdPreimageFromAddress": { - "description": "ContractIdPreimageFromAddress is an XDR NestedStruct defined as:\n\n```text struct { SCAddress address; uint256 salt; } ```", - "type": "object", - "required": [ - "address", - "salt" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "salt": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "CreateAccountOp": { - "description": "CreateAccountOp is an XDR Struct defined as:\n\n```text struct CreateAccountOp { AccountID destination; // account to create int64 startingBalance; // amount they end up with }; ```", - "type": "object", - "required": [ - "destination", - "starting_balance" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "starting_balance": { - "type": "string" - } - } - }, - "CreateClaimableBalanceOp": { - "description": "CreateClaimableBalanceOp is an XDR Struct defined as:\n\n```text struct CreateClaimableBalanceOp { Asset asset; int64 amount; Claimant claimants<10>; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "claimants" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - } - } - }, - "CreateContractArgs": { - "description": "CreateContractArgs is an XDR Struct defined as:\n\n```text struct CreateContractArgs { ContractIDPreimage contractIDPreimage; ContractExecutable executable; }; ```", - "type": "object", - "required": [ - "contract_id_preimage", - "executable" - ], - "properties": { - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreateContractArgsV2": { - "description": "CreateContractArgsV2 is an XDR Struct defined as:\n\n```text struct CreateContractArgsV2 { ContractIDPreimage contractIDPreimage; ContractExecutable executable; // Arguments of the contract's constructor. SCVal constructorArgs<>; }; ```", - "type": "object", - "required": [ - "constructor_args", - "contract_id_preimage", - "executable" - ], - "properties": { - "constructor_args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_id_preimage": { - "$ref": "#/definitions/ContractIdPreimage" - }, - "executable": { - "$ref": "#/definitions/ContractExecutable" - } - } - }, - "CreatePassiveSellOfferOp": { - "description": "CreatePassiveSellOfferOp is an XDR Struct defined as:\n\n```text struct CreatePassiveSellOfferOp { Asset selling; // A Asset buying; // B int64 amount; // amount taker gets Price price; // cost of A in terms of B }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "DecoratedSignature": { - "description": "DecoratedSignature is an XDR Struct defined as:\n\n```text struct DecoratedSignature { SignatureHint hint; // last 4 bytes of the public key, used as a hint Signature signature; // actual signature }; ```", - "type": "object", - "required": [ - "hint", - "signature" - ], - "properties": { - "hint": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "signature": { - "$ref": "#/definitions/Signature" - } - } - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "ExtendFootprintTtlOp": { - "description": "ExtendFootprintTtlOp is an XDR Struct defined as:\n\n```text struct ExtendFootprintTTLOp { ExtensionPoint ext; uint32 extendTo; }; ```", - "type": "object", - "required": [ - "ext", - "extend_to" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "extend_to": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransaction": { - "description": "FeeBumpTransaction is an XDR Struct defined as:\n\n```text struct FeeBumpTransaction { MuxedAccount feeSource; int64 fee; union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } innerTx; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "fee_source", - "inner_tx" - ], - "properties": { - "ext": { - "$ref": "#/definitions/FeeBumpTransactionExt" - }, - "fee": { - "type": "string" - }, - "fee_source": { - "$ref": "#/definitions/MuxedAccount" - }, - "inner_tx": { - "$ref": "#/definitions/FeeBumpTransactionInnerTx" - } - } - }, - "FeeBumpTransactionEnvelope": { - "description": "FeeBumpTransactionEnvelope is an XDR Struct defined as:\n\n```text struct FeeBumpTransactionEnvelope { FeeBumpTransaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/FeeBumpTransaction" - } - } - }, - "FeeBumpTransactionExt": { - "description": "FeeBumpTransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FeeBumpTransactionInnerTx": { - "description": "FeeBumpTransactionInnerTx is an XDR NestedUnion defined as:\n\n```text union switch (EnvelopeType type) { case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - } - ] - }, - "HostFunction": { - "description": "HostFunction is an XDR Union defined as:\n\n```text union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "invoke_contract" - ], - "properties": { - "invoke_contract": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract" - ], - "properties": { - "create_contract": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "upload_contract_wasm" - ], - "properties": { - "upload_contract_wasm": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2" - ], - "properties": { - "create_contract_v2": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "InvokeContractArgs": { - "description": "InvokeContractArgs is an XDR Struct defined as:\n\n```text struct InvokeContractArgs { SCAddress contractAddress; SCSymbol functionName; SCVal args<>; }; ```", - "type": "object", - "required": [ - "args", - "contract_address", - "function_name" - ], - "properties": { - "args": { - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "contract_address": { - "$ref": "#/definitions/ScAddress" - }, - "function_name": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - "InvokeHostFunctionOp": { - "description": "InvokeHostFunctionOp is an XDR Struct defined as:\n\n```text struct InvokeHostFunctionOp { // Host function to invoke. HostFunction hostFunction; // Per-address authorizations for this host function. SorobanAuthorizationEntry auth<>; }; ```", - "type": "object", - "required": [ - "auth", - "host_function" - ], - "properties": { - "auth": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizationEntry" - }, - "maxItems": 4294967295 - }, - "host_function": { - "$ref": "#/definitions/HostFunction" - } - } - }, - "LedgerBounds": { - "description": "LedgerBounds is an XDR Struct defined as:\n\n```text struct LedgerBounds { uint32 minLedger; uint32 maxLedger; // 0 here means no maxLedger }; ```", - "type": "object", - "required": [ - "max_ledger", - "min_ledger" - ], - "properties": { - "max_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerFootprint": { - "description": "LedgerFootprint is an XDR Struct defined as:\n\n```text struct LedgerFootprint { LedgerKey readOnly<>; LedgerKey readWrite<>; }; ```", - "type": "object", - "required": [ - "read_only", - "read_write" - ], - "properties": { - "read_only": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - }, - "read_write": { - "type": "array", - "items": { - "$ref": "#/definitions/LedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolDepositOp": { - "description": "LiquidityPoolDepositOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolDepositOp { PoolID liquidityPoolID; int64 maxAmountA; // maximum amount of first asset to deposit int64 maxAmountB; // maximum amount of second asset to deposit Price minPrice; // minimum depositA/depositB Price maxPrice; // maximum depositA/depositB }; ```", - "type": "object", - "required": [ - "liquidity_pool_id", - "max_amount_a", - "max_amount_b", - "max_price", - "min_price" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "max_amount_a": { - "type": "string" - }, - "max_amount_b": { - "type": "string" - }, - "max_price": { - "$ref": "#/definitions/Price" - }, - "min_price": { - "$ref": "#/definitions/Price" - } - } - }, - "LiquidityPoolParameters": { - "description": "LiquidityPoolParameters is an XDR Union defined as:\n\n```text union LiquidityPoolParameters switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: LiquidityPoolConstantProductParameters constantProduct; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - } - } - } - ] - }, - "LiquidityPoolWithdrawOp": { - "description": "LiquidityPoolWithdrawOp is an XDR Struct defined as:\n\n```text struct LiquidityPoolWithdrawOp { PoolID liquidityPoolID; int64 amount; // amount of pool shares to withdraw int64 minAmountA; // minimum amount of first asset to withdraw int64 minAmountB; // minimum amount of second asset to withdraw }; ```", - "type": "object", - "required": [ - "amount", - "liquidity_pool_id", - "min_amount_a", - "min_amount_b" - ], - "properties": { - "amount": { - "type": "string" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - }, - "min_amount_a": { - "type": "string" - }, - "min_amount_b": { - "type": "string" - } - } - }, - "ManageBuyOfferOp": { - "description": "ManageBuyOfferOp is an XDR Struct defined as:\n\n```text struct ManageBuyOfferOp { Asset selling; Asset buying; int64 buyAmount; // amount being bought. if set to 0, delete the offer Price price; // price of thing being bought in terms of what you are // selling\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "buy_amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "buy_amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "ManageDataOp": { - "description": "ManageDataOp is an XDR Struct defined as:\n\n```text struct ManageDataOp { string64 dataName; DataValue* dataValue; // set to null to clear }; ```", - "type": "object", - "required": [ - "data_name" - ], - "properties": { - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "anyOf": [ - { - "$ref": "#/definitions/DataValue" - }, - { - "type": "null" - } - ] - } - } - }, - "ManageSellOfferOp": { - "description": "ManageSellOfferOp is an XDR Struct defined as:\n\n```text struct ManageSellOfferOp { Asset selling; Asset buying; int64 amount; // amount being sold. if set to 0, delete the offer Price price; // price of thing being sold in terms of what you are buying\n\n// 0=create a new offer, otherwise edit an existing offer int64 offerID; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "offer_id", - "price", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "Memo": { - "description": "Memo is an XDR Union defined as:\n\n```text union Memo switch (MemoType type) { case MEMO_NONE: void; case MEMO_TEXT: string text<28>; case MEMO_ID: uint64 id; case MEMO_HASH: Hash hash; // the hash of what to pull from the content server case MEMO_RETURN: Hash retHash; // the hash of the tx you are rejecting }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "$ref": "#/definitions/StringM<28>" - } - } - }, - { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - { - "type": "object", - "required": [ - "return" - ], - "properties": { - "return": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "MuxedAccount": { - "type": "string" - }, - "Operation": { - "description": "Operation is an XDR Struct defined as:\n\n```text struct Operation { // sourceAccount is the account used to run the operation // if not set, the runtime defaults to \"sourceAccount\" specified at // the transaction level MuxedAccount* sourceAccount;\n\nunion switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } body; }; ```", - "type": "object", - "required": [ - "body" - ], - "properties": { - "body": { - "$ref": "#/definitions/OperationBody" - }, - "source_account": { - "anyOf": [ - { - "$ref": "#/definitions/MuxedAccount" - }, - { - "type": "null" - } - ] - } - } - }, - "OperationBody": { - "description": "OperationBody is an XDR NestedUnion defined as:\n\n```text union switch (OperationType type) { case CREATE_ACCOUNT: CreateAccountOp createAccountOp; case PAYMENT: PaymentOp paymentOp; case PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp; case MANAGE_SELL_OFFER: ManageSellOfferOp manageSellOfferOp; case CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp createPassiveSellOfferOp; case SET_OPTIONS: SetOptionsOp setOptionsOp; case CHANGE_TRUST: ChangeTrustOp changeTrustOp; case ALLOW_TRUST: AllowTrustOp allowTrustOp; case ACCOUNT_MERGE: MuxedAccount destination; case INFLATION: void; case MANAGE_DATA: ManageDataOp manageDataOp; case BUMP_SEQUENCE: BumpSequenceOp bumpSequenceOp; case MANAGE_BUY_OFFER: ManageBuyOfferOp manageBuyOfferOp; case PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp pathPaymentStrictSendOp; case CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp createClaimableBalanceOp; case CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp claimClaimableBalanceOp; case BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp; case END_SPONSORING_FUTURE_RESERVES: void; case REVOKE_SPONSORSHIP: RevokeSponsorshipOp revokeSponsorshipOp; case CLAWBACK: ClawbackOp clawbackOp; case CLAWBACK_CLAIMABLE_BALANCE: ClawbackClaimableBalanceOp clawbackClaimableBalanceOp; case SET_TRUST_LINE_FLAGS: SetTrustLineFlagsOp setTrustLineFlagsOp; case LIQUIDITY_POOL_DEPOSIT: LiquidityPoolDepositOp liquidityPoolDepositOp; case LIQUIDITY_POOL_WITHDRAW: LiquidityPoolWithdrawOp liquidityPoolWithdrawOp; case INVOKE_HOST_FUNCTION: InvokeHostFunctionOp invokeHostFunctionOp; case EXTEND_FOOTPRINT_TTL: ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "inflation", - "end_sponsoring_future_reserves" - ] - }, - { - "type": "object", - "required": [ - "create_account" - ], - "properties": { - "create_account": { - "$ref": "#/definitions/CreateAccountOp" - } - } - }, - { - "type": "object", - "required": [ - "payment" - ], - "properties": { - "payment": { - "$ref": "#/definitions/PaymentOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_receive" - ], - "properties": { - "path_payment_strict_receive": { - "$ref": "#/definitions/PathPaymentStrictReceiveOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_sell_offer" - ], - "properties": { - "manage_sell_offer": { - "$ref": "#/definitions/ManageSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "create_passive_sell_offer" - ], - "properties": { - "create_passive_sell_offer": { - "$ref": "#/definitions/CreatePassiveSellOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "set_options" - ], - "properties": { - "set_options": { - "$ref": "#/definitions/SetOptionsOp" - } - } - }, - { - "type": "object", - "required": [ - "change_trust" - ], - "properties": { - "change_trust": { - "$ref": "#/definitions/ChangeTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "allow_trust" - ], - "properties": { - "allow_trust": { - "$ref": "#/definitions/AllowTrustOp" - } - } - }, - { - "type": "object", - "required": [ - "account_merge" - ], - "properties": { - "account_merge": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - { - "type": "object", - "required": [ - "manage_data" - ], - "properties": { - "manage_data": { - "$ref": "#/definitions/ManageDataOp" - } - } - }, - { - "type": "object", - "required": [ - "bump_sequence" - ], - "properties": { - "bump_sequence": { - "$ref": "#/definitions/BumpSequenceOp" - } - } - }, - { - "type": "object", - "required": [ - "manage_buy_offer" - ], - "properties": { - "manage_buy_offer": { - "$ref": "#/definitions/ManageBuyOfferOp" - } - } - }, - { - "type": "object", - "required": [ - "path_payment_strict_send" - ], - "properties": { - "path_payment_strict_send": { - "$ref": "#/definitions/PathPaymentStrictSendOp" - } - } - }, - { - "type": "object", - "required": [ - "create_claimable_balance" - ], - "properties": { - "create_claimable_balance": { - "$ref": "#/definitions/CreateClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "claim_claimable_balance" - ], - "properties": { - "claim_claimable_balance": { - "$ref": "#/definitions/ClaimClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "begin_sponsoring_future_reserves" - ], - "properties": { - "begin_sponsoring_future_reserves": { - "$ref": "#/definitions/BeginSponsoringFutureReservesOp" - } - } - }, - { - "type": "object", - "required": [ - "revoke_sponsorship" - ], - "properties": { - "revoke_sponsorship": { - "$ref": "#/definitions/RevokeSponsorshipOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback" - ], - "properties": { - "clawback": { - "$ref": "#/definitions/ClawbackOp" - } - } - }, - { - "type": "object", - "required": [ - "clawback_claimable_balance" - ], - "properties": { - "clawback_claimable_balance": { - "$ref": "#/definitions/ClawbackClaimableBalanceOp" - } - } - }, - { - "type": "object", - "required": [ - "set_trust_line_flags" - ], - "properties": { - "set_trust_line_flags": { - "$ref": "#/definitions/SetTrustLineFlagsOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_deposit" - ], - "properties": { - "liquidity_pool_deposit": { - "$ref": "#/definitions/LiquidityPoolDepositOp" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool_withdraw" - ], - "properties": { - "liquidity_pool_withdraw": { - "$ref": "#/definitions/LiquidityPoolWithdrawOp" - } - } - }, - { - "type": "object", - "required": [ - "invoke_host_function" - ], - "properties": { - "invoke_host_function": { - "$ref": "#/definitions/InvokeHostFunctionOp" - } - } - }, - { - "type": "object", - "required": [ - "extend_footprint_ttl" - ], - "properties": { - "extend_footprint_ttl": { - "$ref": "#/definitions/ExtendFootprintTtlOp" - } - } - }, - { - "type": "object", - "required": [ - "restore_footprint" - ], - "properties": { - "restore_footprint": { - "$ref": "#/definitions/RestoreFootprintOp" - } - } - } - ] - }, - "PathPaymentStrictReceiveOp": { - "description": "PathPaymentStrictReceiveOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictReceiveOp { Asset sendAsset; // asset we pay with int64 sendMax; // the maximum amount of sendAsset to // send (excluding fees). // The operation will fail if can't be met\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destAmount; // amount they end up with\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_amount", - "dest_asset", - "destination", - "path", - "send_asset", - "send_max" - ], - "properties": { - "dest_amount": { - "type": "string" - }, - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_asset": { - "$ref": "#/definitions/Asset" - }, - "send_max": { - "type": "string" - } - } - }, - "PathPaymentStrictSendOp": { - "description": "PathPaymentStrictSendOp is an XDR Struct defined as:\n\n```text struct PathPaymentStrictSendOp { Asset sendAsset; // asset we pay with int64 sendAmount; // amount of sendAsset to send (excluding fees)\n\nMuxedAccount destination; // recipient of the payment Asset destAsset; // what they end up with int64 destMin; // the minimum amount of dest asset to // be received // The operation will fail if it can't be met\n\nAsset path<5>; // additional hops it must go through to get there }; ```", - "type": "object", - "required": [ - "dest_asset", - "dest_min", - "destination", - "path", - "send_amount", - "send_asset" - ], - "properties": { - "dest_asset": { - "$ref": "#/definitions/Asset" - }, - "dest_min": { - "type": "string" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/Asset" - }, - "maxItems": 5 - }, - "send_amount": { - "type": "string" - }, - "send_asset": { - "$ref": "#/definitions/Asset" - } - } - }, - "PaymentOp": { - "description": "PaymentOp is an XDR Struct defined as:\n\n```text struct PaymentOp { MuxedAccount destination; // recipient of the payment Asset asset; // what they end up with int64 amount; // amount they end up with }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "destination" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "destination": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "PoolId": { - "type": "string" - }, - "Preconditions": { - "description": "Preconditions is an XDR Union defined as:\n\n```text union Preconditions switch (PreconditionType type) { case PRECOND_NONE: void; case PRECOND_TIME: TimeBounds timeBounds; case PRECOND_V2: PreconditionsV2 v2; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "none" - ] - }, - { - "type": "object", - "required": [ - "time" - ], - "properties": { - "time": { - "$ref": "#/definitions/TimeBounds" - } - } - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/PreconditionsV2" - } - } - } - ] - }, - "PreconditionsV2": { - "description": "PreconditionsV2 is an XDR Struct defined as:\n\n```text struct PreconditionsV2 { TimeBounds* timeBounds;\n\n// Transaction only valid for ledger numbers n such that // minLedger <= n < maxLedger (if maxLedger == 0, then // only minLedger is checked) LedgerBounds* ledgerBounds;\n\n// If NULL, only valid when sourceAccount's sequence number // is seqNum - 1. Otherwise, valid when sourceAccount's // sequence number n satisfies minSeqNum <= n < tx.seqNum. // Note that after execution the account's sequence number // is always raised to tx.seqNum, and a transaction is not // valid if tx.seqNum is too high to ensure replay protection. SequenceNumber* minSeqNum;\n\n// For the transaction to be valid, the current ledger time must // be at least minSeqAge greater than sourceAccount's seqTime. Duration minSeqAge;\n\n// For the transaction to be valid, the current ledger number // must be at least minSeqLedgerGap greater than sourceAccount's // seqLedger. uint32 minSeqLedgerGap;\n\n// For the transaction to be valid, there must be a signature // corresponding to every Signer in this array, even if the // signature is not otherwise required by the sourceAccount or // operations. SignerKey extraSigners<2>; }; ```", - "type": "object", - "required": [ - "extra_signers", - "min_seq_age", - "min_seq_ledger_gap" - ], - "properties": { - "extra_signers": { - "type": "array", - "items": { - "$ref": "#/definitions/SignerKey" - }, - "maxItems": 2 - }, - "ledger_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/LedgerBounds" - }, - { - "type": "null" - } - ] - }, - "min_seq_age": { - "$ref": "#/definitions/Duration" - }, - "min_seq_ledger_gap": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_seq_num": { - "anyOf": [ - { - "$ref": "#/definitions/SequenceNumber" - }, - { - "type": "null" - } - ] - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "RestoreFootprintOp": { - "description": "RestoreFootprintOp is an XDR Struct defined as:\n\n```text struct RestoreFootprintOp { ExtensionPoint ext; }; ```", - "type": "object", - "required": [ - "ext" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "RevokeSponsorshipOp": { - "description": "RevokeSponsorshipOp is an XDR Union defined as:\n\n```text union RevokeSponsorshipOp switch (RevokeSponsorshipType type) { case REVOKE_SPONSORSHIP_LEDGER_ENTRY: LedgerKey ledgerKey; case REVOKE_SPONSORSHIP_SIGNER: struct { AccountID accountID; SignerKey signerKey; } signer; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "ledger_entry" - ], - "properties": { - "ledger_entry": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "signer" - ], - "properties": { - "signer": { - "$ref": "#/definitions/RevokeSponsorshipOpSigner" - } - } - } - ] - }, - "RevokeSponsorshipOpSigner": { - "description": "RevokeSponsorshipOpSigner is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; SignerKey signerKey; } ```", - "type": "object", - "required": [ - "account_id", - "signer_key" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "signer_key": { - "$ref": "#/definitions/SignerKey" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "SetOptionsOp": { - "description": "SetOptionsOp is an XDR Struct defined as:\n\n```text struct SetOptionsOp { AccountID* inflationDest; // sets the inflation destination\n\nuint32* clearFlags; // which flags to clear uint32* setFlags; // which flags to set\n\n// account threshold manipulation uint32* masterWeight; // weight of the master account uint32* lowThreshold; uint32* medThreshold; uint32* highThreshold;\n\nstring32* homeDomain; // sets the home domain\n\n// Add, update or remove a signer for the account // signer is deleted if the weight is 0 Signer* signer; }; ```", - "type": "object", - "properties": { - "clear_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "high_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "anyOf": [ - { - "$ref": "#/definitions/String32" - }, - { - "type": "null" - } - ] - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "low_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "master_weight": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "med_threshold": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": [ - "integer", - "null" - ], - "format": "uint32", - "minimum": 0.0 - }, - "signer": { - "anyOf": [ - { - "$ref": "#/definitions/Signer" - }, - { - "type": "null" - } - ] - } - } - }, - "SetTrustLineFlagsOp": { - "description": "SetTrustLineFlagsOp is an XDR Struct defined as:\n\n```text struct SetTrustLineFlagsOp { AccountID trustor; Asset asset;\n\nuint32 clearFlags; // which flags to clear uint32 setFlags; // which flags to set }; ```", - "type": "object", - "required": [ - "asset", - "clear_flags", - "set_flags", - "trustor" - ], - "properties": { - "asset": { - "$ref": "#/definitions/Asset" - }, - "clear_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "set_flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "trustor": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Signature": { - "description": "Signature is an XDR Typedef defined as:\n\n```text typedef opaque Signature<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SorobanAddressCredentials": { - "description": "SorobanAddressCredentials is an XDR Struct defined as:\n\n```text struct SorobanAddressCredentials { SCAddress address; int64 nonce; uint32 signatureExpirationLedger; SCVal signature; }; ```", - "type": "object", - "required": [ - "address", - "nonce", - "signature", - "signature_expiration_ledger" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - }, - "nonce": { - "type": "string" - }, - "signature": { - "$ref": "#/definitions/ScVal" - }, - "signature_expiration_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanAuthorizationEntry": { - "description": "SorobanAuthorizationEntry is an XDR Struct defined as:\n\n```text struct SorobanAuthorizationEntry { SorobanCredentials credentials; SorobanAuthorizedInvocation rootInvocation; }; ```", - "type": "object", - "required": [ - "credentials", - "root_invocation" - ], - "properties": { - "credentials": { - "$ref": "#/definitions/SorobanCredentials" - }, - "root_invocation": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - } - } - }, - "SorobanAuthorizedFunction": { - "description": "SorobanAuthorizedFunction is an XDR Union defined as:\n\n```text union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_fn" - ], - "properties": { - "contract_fn": { - "$ref": "#/definitions/InvokeContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_host_fn" - ], - "properties": { - "create_contract_host_fn": { - "$ref": "#/definitions/CreateContractArgs" - } - } - }, - { - "type": "object", - "required": [ - "create_contract_v2_host_fn" - ], - "properties": { - "create_contract_v2_host_fn": { - "$ref": "#/definitions/CreateContractArgsV2" - } - } - } - ] - }, - "SorobanAuthorizedInvocation": { - "description": "SorobanAuthorizedInvocation is an XDR Struct defined as:\n\n```text struct SorobanAuthorizedInvocation { SorobanAuthorizedFunction function; SorobanAuthorizedInvocation subInvocations<>; }; ```", - "type": "object", - "required": [ - "function", - "sub_invocations" - ], - "properties": { - "function": { - "$ref": "#/definitions/SorobanAuthorizedFunction" - }, - "sub_invocations": { - "type": "array", - "items": { - "$ref": "#/definitions/SorobanAuthorizedInvocation" - }, - "maxItems": 4294967295 - } - } - }, - "SorobanCredentials": { - "description": "SorobanCredentials is an XDR Union defined as:\n\n```text union SorobanCredentials switch (SorobanCredentialsType type) { case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT: void; case SOROBAN_CREDENTIALS_ADDRESS: SorobanAddressCredentials address; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "source_account" - ] - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/SorobanAddressCredentials" - } - } - } - ] - }, - "SorobanResources": { - "description": "SorobanResources is an XDR Struct defined as:\n\n```text struct SorobanResources { // The ledger footprint of the transaction. LedgerFootprint footprint; // The maximum number of instructions this transaction can use uint32 instructions;\n\n// The maximum number of bytes this transaction can read from disk backed entries uint32 diskReadBytes; // The maximum number of bytes this transaction can write to ledger uint32 writeBytes; }; ```", - "type": "object", - "required": [ - "disk_read_bytes", - "footprint", - "instructions", - "write_bytes" - ], - "properties": { - "disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "footprint": { - "$ref": "#/definitions/LedgerFootprint" - }, - "instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SorobanResourcesExtV0": { - "description": "SorobanResourcesExtV0 is an XDR Struct defined as:\n\n```text struct SorobanResourcesExtV0 { // Vector of indices representing what Soroban // entries in the footprint are archived, based on the // order of keys provided in the readWrite footprint. uint32 archivedSorobanEntries<>; }; ```", - "type": "object", - "required": [ - "archived_soroban_entries" - ], - "properties": { - "archived_soroban_entries": { - "type": "array", - "items": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "maxItems": 4294967295 - } - } - }, - "SorobanTransactionData": { - "description": "SorobanTransactionData is an XDR Struct defined as:\n\n```text struct SorobanTransactionData { union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ext; SorobanResources resources; // Amount of the transaction `fee` allocated to the Soroban resource fees. // The fraction of `resourceFee` corresponding to `resources` specified // above is *not* refundable (i.e. fees for instructions, ledger I/O), as // well as fees for the transaction size. // The remaining part of the fee is refundable and the charged value is // based on the actual consumption of refundable resources (events, ledger // rent bumps). // The `inclusionFee` used for prioritization of the transaction is defined // as `tx.fee - resourceFee`. int64 resourceFee; }; ```", - "type": "object", - "required": [ - "ext", - "resource_fee", - "resources" - ], - "properties": { - "ext": { - "$ref": "#/definitions/SorobanTransactionDataExt" - }, - "resource_fee": { - "type": "string" - }, - "resources": { - "$ref": "#/definitions/SorobanResources" - } - } - }, - "SorobanTransactionDataExt": { - "description": "SorobanTransactionDataExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanResourcesExtV0 resourceExt; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanResourcesExtV0" - } - } - } - ] - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<28>": { - "type": "string", - "maxLength": 28 - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimeBounds": { - "description": "TimeBounds is an XDR Struct defined as:\n\n```text struct TimeBounds { TimePoint minTime; TimePoint maxTime; // 0 here means no maxTime }; ```", - "type": "object", - "required": [ - "max_time", - "min_time" - ], - "properties": { - "max_time": { - "$ref": "#/definitions/TimePoint" - }, - "min_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "Transaction": { - "description": "Transaction is an XDR Struct defined as:\n\n```text struct Transaction { // account used to run the transaction MuxedAccount sourceAccount;\n\n// the fee the sourceAccount will pay uint32 fee;\n\n// sequence number to consume in the account SequenceNumber seqNum;\n\n// validity conditions Preconditions cond;\n\nMemo memo;\n\nOperation operations;\n\nunion switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ext; }; ```", - "type": "object", - "required": [ - "cond", - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account" - ], - "properties": { - "cond": { - "$ref": "#/definitions/Preconditions" - }, - "ext": { - "$ref": "#/definitions/TransactionExt" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account": { - "$ref": "#/definitions/MuxedAccount" - } - } - }, - "TransactionEnvelope": { - "description": "TransactionEnvelope is an XDR Union defined as:\n\n```text union TransactionEnvelope switch (EnvelopeType type) { case ENVELOPE_TYPE_TX_V0: TransactionV0Envelope v0; case ENVELOPE_TYPE_TX: TransactionV1Envelope v1; case ENVELOPE_TYPE_TX_FEE_BUMP: FeeBumpTransactionEnvelope feeBump; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "tx_v0" - ], - "properties": { - "tx_v0": { - "$ref": "#/definitions/TransactionV0Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx" - ], - "properties": { - "tx": { - "$ref": "#/definitions/TransactionV1Envelope" - } - } - }, - { - "type": "object", - "required": [ - "tx_fee_bump" - ], - "properties": { - "tx_fee_bump": { - "$ref": "#/definitions/FeeBumpTransactionEnvelope" - } - } - } - ] - }, - "TransactionExt": { - "description": "TransactionExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: SorobanTransactionData sorobanData; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/SorobanTransactionData" - } - } - } - ] - }, - "TransactionV0": { - "description": "TransactionV0 is an XDR Struct defined as:\n\n```text struct TransactionV0 { uint256 sourceAccountEd25519; uint32 fee; SequenceNumber seqNum; TimeBounds* timeBounds; Memo memo; Operation operations; union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "fee", - "memo", - "operations", - "seq_num", - "source_account_ed25519" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TransactionV0Ext" - }, - "fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "memo": { - "$ref": "#/definitions/Memo" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "maxItems": 100 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "source_account_ed25519": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "time_bounds": { - "anyOf": [ - { - "$ref": "#/definitions/TimeBounds" - }, - { - "type": "null" - } - ] - } - } - }, - "TransactionV0Envelope": { - "description": "TransactionV0Envelope is an XDR Struct defined as:\n\n```text struct TransactionV0Envelope { TransactionV0 tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/TransactionV0" - } - } - }, - "TransactionV0Ext": { - "description": "TransactionV0Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TransactionV1Envelope": { - "description": "TransactionV1Envelope is an XDR Struct defined as:\n\n```text struct TransactionV1Envelope { Transaction tx; /* Each decorated signature is a signature over the SHA256 hash of * a TransactionSignaturePayload */ DecoratedSignature signatures<20>; }; ```", - "type": "object", - "required": [ - "signatures", - "tx" - ], - "properties": { - "signatures": { - "type": "array", - "items": { - "$ref": "#/definitions/DecoratedSignature" - }, - "maxItems": 20 - }, - "tx": { - "$ref": "#/definitions/Transaction" - } - } - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/TxSetComponentType.json b/xdr-json/next/TxSetComponentType.json deleted file mode 100644 index 5ff31fcb..00000000 --- a/xdr-json/next/TxSetComponentType.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TxSetComponentType", - "description": "TxSetComponentType is an XDR Enum defined as:\n\n```text enum TxSetComponentType { // txs with effective fee <= bid derived from a base fee (if any). // If base fee is not specified, no discount is applied. TXSET_COMP_TXS_MAYBE_DISCOUNTED_FEE = 0 }; ```", - "type": "string", - "enum": [ - "txset_comp_txs_maybe_discounted_fee" - ] -} \ No newline at end of file diff --git a/xdr-json/next/UInt128Parts.json b/xdr-json/next/UInt128Parts.json deleted file mode 100644 index f0a3fa85..00000000 --- a/xdr-json/next/UInt128Parts.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "UInt128Parts", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/UInt256Parts.json b/xdr-json/next/UInt256Parts.json deleted file mode 100644 index 0ca4ff96..00000000 --- a/xdr-json/next/UInt256Parts.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "UInt256Parts", - "type": "string" -} \ No newline at end of file diff --git a/xdr-json/next/Uint256.json b/xdr-json/next/Uint256.json deleted file mode 100644 index 751d8af5..00000000 --- a/xdr-json/next/Uint256.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Uint256", - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" -} \ No newline at end of file diff --git a/xdr-json/next/Uint32.json b/xdr-json/next/Uint32.json deleted file mode 100644 index 381ca362..00000000 --- a/xdr-json/next/Uint32.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "uint32", - "type": "integer", - "format": "uint32", - "minimum": 0.0 -} \ No newline at end of file diff --git a/xdr-json/next/Uint64.json b/xdr-json/next/Uint64.json deleted file mode 100644 index 35ea3a18..00000000 --- a/xdr-json/next/Uint64.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "uint64", - "type": "integer", - "format": "uint64", - "minimum": 0.0 -} \ No newline at end of file diff --git a/xdr-json/next/UpgradeEntryMeta.json b/xdr-json/next/UpgradeEntryMeta.json deleted file mode 100644 index d819f32a..00000000 --- a/xdr-json/next/UpgradeEntryMeta.json +++ /dev/null @@ -1,2995 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "UpgradeEntryMeta", - "description": "UpgradeEntryMeta is an XDR Struct defined as:\n\n```text struct UpgradeEntryMeta { LedgerUpgrade upgrade; LedgerEntryChanges changes; }; ```", - "type": "object", - "required": [ - "changes", - "upgrade" - ], - "properties": { - "$schema": { - "type": "string" - }, - "changes": { - "$ref": "#/definitions/LedgerEntryChanges" - }, - "upgrade": { - "$ref": "#/definitions/LedgerUpgrade" - } - }, - "unevaluatedProperties": false, - "definitions": { - "AccountEntry": { - "description": "AccountEntry is an XDR Struct defined as:\n\n```text struct AccountEntry { AccountID accountID; // master public key for this account int64 balance; // in stroops SequenceNumber seqNum; // last sequence number used for this account uint32 numSubEntries; // number of sub-entries this account has // drives the reserve AccountID* inflationDest; // Account to vote for during inflation uint32 flags; // see AccountFlags\n\nstring32 homeDomain; // can be used for reverse federation and memo lookup\n\n// fields used for signatures // thresholds stores unsigned bytes: [weight of master|low|medium|high] Thresholds thresholds;\n\nSigner signers; // possible signers for this account\n\n// reserved for future use union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "balance", - "ext", - "flags", - "home_domain", - "num_sub_entries", - "seq_num", - "signers", - "thresholds" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/AccountEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "home_domain": { - "$ref": "#/definitions/String32" - }, - "inflation_dest": { - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "num_sub_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_num": { - "$ref": "#/definitions/SequenceNumber" - }, - "signers": { - "type": "array", - "items": { - "$ref": "#/definitions/Signer" - }, - "maxItems": 20 - }, - "thresholds": { - "type": "string", - "maxLength": 8, - "minLength": 8, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "AccountEntryExt": { - "description": "AccountEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: AccountEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/AccountEntryExtensionV1" - } - } - } - ] - }, - "AccountEntryExtensionV1": { - "description": "AccountEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV1 { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "AccountEntryExtensionV1Ext": { - "description": "AccountEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: AccountEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/AccountEntryExtensionV2" - } - } - } - ] - }, - "AccountEntryExtensionV2": { - "description": "AccountEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV2 { uint32 numSponsored; uint32 numSponsoring; SponsorshipDescriptor signerSponsoringIDs;\n\nunion switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "num_sponsored", - "num_sponsoring", - "signer_sponsoring_i_ds" - ], - "properties": { - "ext": { - "$ref": "#/definitions/AccountEntryExtensionV2Ext" - }, - "num_sponsored": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "num_sponsoring": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "signer_sponsoring_i_ds": { - "type": "array", - "items": { - "$ref": "#/definitions/SponsorshipDescriptor" - }, - "maxItems": 20 - } - } - }, - "AccountEntryExtensionV2Ext": { - "description": "AccountEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 3: AccountEntryExtensionV3 v3; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v3" - ], - "properties": { - "v3": { - "$ref": "#/definitions/AccountEntryExtensionV3" - } - } - } - ] - }, - "AccountEntryExtensionV3": { - "description": "AccountEntryExtensionV3 is an XDR Struct defined as:\n\n```text struct AccountEntryExtensionV3 { // We can use this to add more fields, or because it is first, to // change AccountEntryExtensionV3 into a union. ExtensionPoint ext;\n\n// Ledger number at which `seqNum` took on its present value. uint32 seqLedger;\n\n// Time at which `seqNum` took on its present value. TimePoint seqTime; }; ```", - "type": "object", - "required": [ - "ext", - "seq_ledger", - "seq_time" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "seq_ledger": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "seq_time": { - "$ref": "#/definitions/TimePoint" - } - } - }, - "AccountId": { - "type": "string" - }, - "AlphaNum12": { - "description": "AlphaNum12 is an XDR Struct defined as:\n\n```text struct AlphaNum12 { AssetCode12 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode12" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "AlphaNum4": { - "description": "AlphaNum4 is an XDR Struct defined as:\n\n```text struct AlphaNum4 { AssetCode4 assetCode; AccountID issuer; }; ```", - "type": "object", - "required": [ - "asset_code", - "issuer" - ], - "properties": { - "asset_code": { - "$ref": "#/definitions/AssetCode4" - }, - "issuer": { - "$ref": "#/definitions/AccountId" - } - } - }, - "Asset": { - "description": "Asset is an XDR Union defined as:\n\n```text union Asset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - } - ] - }, - "AssetCode12": { - "type": "string" - }, - "AssetCode4": { - "type": "string" - }, - "ClaimPredicate": { - "description": "ClaimPredicate is an XDR Union defined as:\n\n```text union ClaimPredicate switch (ClaimPredicateType type) { case CLAIM_PREDICATE_UNCONDITIONAL: void; case CLAIM_PREDICATE_AND: ClaimPredicate andPredicates<2>; case CLAIM_PREDICATE_OR: ClaimPredicate orPredicates<2>; case CLAIM_PREDICATE_NOT: ClaimPredicate* notPredicate; case CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME: int64 absBefore; // Predicate will be true if closeTime < absBefore case CLAIM_PREDICATE_BEFORE_RELATIVE_TIME: int64 relBefore; // Seconds since closeTime of the ledger in which the // ClaimableBalanceEntry was created }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "unconditional" - ] - }, - { - "type": "object", - "required": [ - "and" - ], - "properties": { - "and": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "or" - ], - "properties": { - "or": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimPredicate" - }, - "maxItems": 2 - } - } - }, - { - "type": "object", - "required": [ - "not" - ], - "properties": { - "not": { - "anyOf": [ - { - "$ref": "#/definitions/ClaimPredicate" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "before_absolute_time" - ], - "properties": { - "before_absolute_time": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "before_relative_time" - ], - "properties": { - "before_relative_time": { - "type": "string" - } - } - } - ] - }, - "ClaimableBalanceEntry": { - "description": "ClaimableBalanceEntry is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntry { // Unique identifier for this ClaimableBalanceEntry ClaimableBalanceID balanceID;\n\n// List of claimants with associated predicate Claimant claimants<10>;\n\n// Any asset including native Asset asset;\n\n// Amount of asset int64 amount;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "asset", - "balance_id", - "claimants", - "ext" - ], - "properties": { - "amount": { - "type": "string" - }, - "asset": { - "$ref": "#/definitions/Asset" - }, - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - }, - "claimants": { - "type": "array", - "items": { - "$ref": "#/definitions/Claimant" - }, - "maxItems": 10 - }, - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExt" - } - } - }, - "ClaimableBalanceEntryExt": { - "description": "ClaimableBalanceEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: ClaimableBalanceEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1" - } - } - } - ] - }, - "ClaimableBalanceEntryExtensionV1": { - "description": "ClaimableBalanceEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct ClaimableBalanceEntryExtensionV1 { union switch (int v) { case 0: void; } ext;\n\nuint32 flags; // see ClaimableBalanceFlags }; ```", - "type": "object", - "required": [ - "ext", - "flags" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ClaimableBalanceEntryExtensionV1Ext" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ClaimableBalanceEntryExtensionV1Ext": { - "description": "ClaimableBalanceEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "ClaimableBalanceId": { - "type": "string" - }, - "Claimant": { - "description": "Claimant is an XDR Union defined as:\n\n```text union Claimant switch (ClaimantType type) { case CLAIMANT_TYPE_V0: struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } v0; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "claimant_type_v0" - ], - "properties": { - "claimant_type_v0": { - "$ref": "#/definitions/ClaimantV0" - } - } - } - ] - }, - "ClaimantV0": { - "description": "ClaimantV0 is an XDR NestedStruct defined as:\n\n```text struct { AccountID destination; // The account that can use this condition ClaimPredicate predicate; // Claimable if predicate is true } ```", - "type": "object", - "required": [ - "destination", - "predicate" - ], - "properties": { - "destination": { - "$ref": "#/definitions/AccountId" - }, - "predicate": { - "$ref": "#/definitions/ClaimPredicate" - } - } - }, - "ConfigSettingContractBandwidthV0": { - "description": "ConfigSettingContractBandwidthV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractBandwidthV0 { // Maximum sum of all transaction sizes in the ledger in bytes uint32 ledgerMaxTxsSizeBytes; // Maximum size in bytes for a transaction uint32 txMaxSizeBytes;\n\n// Fee for 1 KB of transaction size int64 feeTxSize1KB; }; ```", - "type": "object", - "required": [ - "fee_tx_size1_kb", - "ledger_max_txs_size_bytes", - "tx_max_size_bytes" - ], - "properties": { - "fee_tx_size1_kb": { - "type": "string" - }, - "ledger_max_txs_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractComputeV0": { - "description": "ConfigSettingContractComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractComputeV0 { // Maximum instructions per ledger int64 ledgerMaxInstructions; // Maximum instructions per transaction int64 txMaxInstructions; // Cost of 10000 instructions int64 feeRatePerInstructionsIncrement;\n\n// Memory limit per transaction. Unlike instructions, there is no fee // for memory, just the limit. uint32 txMemoryLimit; }; ```", - "type": "object", - "required": [ - "fee_rate_per_instructions_increment", - "ledger_max_instructions", - "tx_max_instructions", - "tx_memory_limit" - ], - "properties": { - "fee_rate_per_instructions_increment": { - "type": "string" - }, - "ledger_max_instructions": { - "type": "string" - }, - "tx_max_instructions": { - "type": "string" - }, - "tx_memory_limit": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractEventsV0": { - "description": "ConfigSettingContractEventsV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractEventsV0 { // Maximum size of events that a contract call can emit. uint32 txMaxContractEventsSizeBytes; // Fee for generating 1KB of contract events. int64 feeContractEvents1KB; }; ```", - "type": "object", - "required": [ - "fee_contract_events1_kb", - "tx_max_contract_events_size_bytes" - ], - "properties": { - "fee_contract_events1_kb": { - "type": "string" - }, - "tx_max_contract_events_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractExecutionLanesV0": { - "description": "ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractExecutionLanesV0 { // maximum number of Soroban transactions per ledger uint32 ledgerMaxTxCount; }; ```", - "type": "object", - "required": [ - "ledger_max_tx_count" - ], - "properties": { - "ledger_max_tx_count": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractHistoricalDataV0": { - "description": "ConfigSettingContractHistoricalDataV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractHistoricalDataV0 { int64 feeHistorical1KB; // Fee for storing 1KB in archives }; ```", - "type": "object", - "required": [ - "fee_historical1_kb" - ], - "properties": { - "fee_historical1_kb": { - "type": "string" - } - } - }, - "ConfigSettingContractLedgerCostExtV0": { - "description": "ConfigSettingContractLedgerCostExtV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostExtV0 { // Maximum number of RO+RW entries in the transaction footprint. uint32 txMaxFootprintEntries; // Fee per 1 KB of data written to the ledger. // Unlike the rent fee, this is a flat fee that is charged for any ledger // write, independent of the type of the entry being written. int64 feeWrite1KB; }; ```", - "type": "object", - "required": [ - "fee_write1_kb", - "tx_max_footprint_entries" - ], - "properties": { - "fee_write1_kb": { - "type": "string" - }, - "tx_max_footprint_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractLedgerCostV0": { - "description": "ConfigSettingContractLedgerCostV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractLedgerCostV0 { // Maximum number of disk entry read operations per ledger uint32 ledgerMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per ledger uint32 ledgerMaxDiskReadBytes; // Maximum number of ledger entry write operations per ledger uint32 ledgerMaxWriteLedgerEntries; // Maximum number of bytes that can be written per ledger uint32 ledgerMaxWriteBytes;\n\n// Maximum number of disk entry read operations per transaction uint32 txMaxDiskReadEntries; // Maximum number of bytes of disk reads that can be performed per transaction uint32 txMaxDiskReadBytes; // Maximum number of ledger entry write operations per transaction uint32 txMaxWriteLedgerEntries; // Maximum number of bytes that can be written per transaction uint32 txMaxWriteBytes;\n\nint64 feeDiskReadLedgerEntry; // Fee per disk ledger entry read int64 feeWriteLedgerEntry; // Fee per ledger entry write\n\nint64 feeDiskRead1KB; // Fee for reading 1KB disk\n\n// The following parameters determine the write fee per 1KB. // Rent fee grows linearly until soroban state reaches this size int64 sorobanStateTargetSizeBytes; // Fee per 1KB rent when the soroban state is empty int64 rentFee1KBSorobanStateSizeLow; // Fee per 1KB rent when the soroban state has reached `sorobanStateTargetSizeBytes` int64 rentFee1KBSorobanStateSizeHigh; // Rent fee multiplier for any additional data past the first `sorobanStateTargetSizeBytes` uint32 sorobanStateRentFeeGrowthFactor; }; ```", - "type": "object", - "required": [ - "fee_disk_read1_kb", - "fee_disk_read_ledger_entry", - "fee_write_ledger_entry", - "ledger_max_disk_read_bytes", - "ledger_max_disk_read_entries", - "ledger_max_write_bytes", - "ledger_max_write_ledger_entries", - "rent_fee1_kb_soroban_state_size_high", - "rent_fee1_kb_soroban_state_size_low", - "soroban_state_rent_fee_growth_factor", - "soroban_state_target_size_bytes", - "tx_max_disk_read_bytes", - "tx_max_disk_read_entries", - "tx_max_write_bytes", - "tx_max_write_ledger_entries" - ], - "properties": { - "fee_disk_read1_kb": { - "type": "string" - }, - "fee_disk_read_ledger_entry": { - "type": "string" - }, - "fee_write_ledger_entry": { - "type": "string" - }, - "ledger_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "rent_fee1_kb_soroban_state_size_high": { - "type": "string" - }, - "rent_fee1_kb_soroban_state_size_low": { - "type": "string" - }, - "soroban_state_rent_fee_growth_factor": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "soroban_state_target_size_bytes": { - "type": "string" - }, - "tx_max_disk_read_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_disk_read_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "tx_max_write_ledger_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingContractParallelComputeV0": { - "description": "ConfigSettingContractParallelComputeV0 is an XDR Struct defined as:\n\n```text struct ConfigSettingContractParallelComputeV0 { // Maximum number of clusters with dependent transactions allowed in a // stage of parallel tx set component. // This effectively sets the lower bound on the number of physical threads // necessary to effectively apply transaction sets in parallel. uint32 ledgerMaxDependentTxClusters; }; ```", - "type": "object", - "required": [ - "ledger_max_dependent_tx_clusters" - ], - "properties": { - "ledger_max_dependent_tx_clusters": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigSettingEntry": { - "description": "ConfigSettingEntry is an XDR Union defined as:\n\n```text union ConfigSettingEntry switch (ConfigSettingID configSettingID) { case CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES: uint32 contractMaxSizeBytes; case CONFIG_SETTING_CONTRACT_COMPUTE_V0: ConfigSettingContractComputeV0 contractCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_V0: ConfigSettingContractLedgerCostV0 contractLedgerCost; case CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0: ConfigSettingContractHistoricalDataV0 contractHistoricalData; case CONFIG_SETTING_CONTRACT_EVENTS_V0: ConfigSettingContractEventsV0 contractEvents; case CONFIG_SETTING_CONTRACT_BANDWIDTH_V0: ConfigSettingContractBandwidthV0 contractBandwidth; case CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS: ContractCostParams contractCostParamsCpuInsns; case CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams contractCostParamsMemBytes; case CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: uint32 contractDataKeySizeBytes; case CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: uint32 contractDataEntrySizeBytes; case CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings stateArchivalSettings; case CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0 contractExecutionLanes; case CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW: uint64 liveSorobanStateSizeWindow<>; case CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator evictionIterator; case CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0: ConfigSettingContractParallelComputeV0 contractParallelCompute; case CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0: ConfigSettingContractLedgerCostExtV0 contractLedgerCostExt; case CONFIG_SETTING_SCP_TIMING: ConfigSettingSCPTiming contractSCPTiming; case CONFIG_SETTING_FROZEN_LEDGER_KEYS: FrozenLedgerKeys frozenLedgerKeys; case CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA: FrozenLedgerKeysDelta frozenLedgerKeysDelta; case CONFIG_SETTING_FREEZE_BYPASS_TXS: FreezeBypassTxs freezeBypassTxs; case CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA: FreezeBypassTxsDelta freezeBypassTxsDelta; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract_max_size_bytes" - ], - "properties": { - "contract_max_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_compute_v0" - ], - "properties": { - "contract_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_v0" - ], - "properties": { - "contract_ledger_cost_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_historical_data_v0" - ], - "properties": { - "contract_historical_data_v0": { - "$ref": "#/definitions/ConfigSettingContractHistoricalDataV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_events_v0" - ], - "properties": { - "contract_events_v0": { - "$ref": "#/definitions/ConfigSettingContractEventsV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_bandwidth_v0" - ], - "properties": { - "contract_bandwidth_v0": { - "$ref": "#/definitions/ConfigSettingContractBandwidthV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_cpu_instructions" - ], - "properties": { - "contract_cost_params_cpu_instructions": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_cost_params_memory_bytes" - ], - "properties": { - "contract_cost_params_memory_bytes": { - "$ref": "#/definitions/ContractCostParams" - } - } - }, - { - "type": "object", - "required": [ - "contract_data_key_size_bytes" - ], - "properties": { - "contract_data_key_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "contract_data_entry_size_bytes" - ], - "properties": { - "contract_data_entry_size_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "state_archival" - ], - "properties": { - "state_archival": { - "$ref": "#/definitions/StateArchivalSettings" - } - } - }, - { - "type": "object", - "required": [ - "contract_execution_lanes" - ], - "properties": { - "contract_execution_lanes": { - "$ref": "#/definitions/ConfigSettingContractExecutionLanesV0" - } - } - }, - { - "type": "object", - "required": [ - "live_soroban_state_size_window" - ], - "properties": { - "live_soroban_state_size_window": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 4294967295 - } - } - }, - { - "type": "object", - "required": [ - "eviction_iterator" - ], - "properties": { - "eviction_iterator": { - "$ref": "#/definitions/EvictionIterator" - } - } - }, - { - "type": "object", - "required": [ - "contract_parallel_compute_v0" - ], - "properties": { - "contract_parallel_compute_v0": { - "$ref": "#/definitions/ConfigSettingContractParallelComputeV0" - } - } - }, - { - "type": "object", - "required": [ - "contract_ledger_cost_ext_v0" - ], - "properties": { - "contract_ledger_cost_ext_v0": { - "$ref": "#/definitions/ConfigSettingContractLedgerCostExtV0" - } - } - }, - { - "type": "object", - "required": [ - "scp_timing" - ], - "properties": { - "scp_timing": { - "$ref": "#/definitions/ConfigSettingScpTiming" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys" - ], - "properties": { - "frozen_ledger_keys": { - "$ref": "#/definitions/FrozenLedgerKeys" - } - } - }, - { - "type": "object", - "required": [ - "frozen_ledger_keys_delta" - ], - "properties": { - "frozen_ledger_keys_delta": { - "$ref": "#/definitions/FrozenLedgerKeysDelta" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs" - ], - "properties": { - "freeze_bypass_txs": { - "$ref": "#/definitions/FreezeBypassTxs" - } - } - }, - { - "type": "object", - "required": [ - "freeze_bypass_txs_delta" - ], - "properties": { - "freeze_bypass_txs_delta": { - "$ref": "#/definitions/FreezeBypassTxsDelta" - } - } - } - ] - }, - "ConfigSettingId": { - "description": "ConfigSettingId is an XDR Enum defined as:\n\n```text enum ConfigSettingID { CONFIG_SETTING_CONTRACT_MAX_SIZE_BYTES = 0, CONFIG_SETTING_CONTRACT_COMPUTE_V0 = 1, CONFIG_SETTING_CONTRACT_LEDGER_COST_V0 = 2, CONFIG_SETTING_CONTRACT_HISTORICAL_DATA_V0 = 3, CONFIG_SETTING_CONTRACT_EVENTS_V0 = 4, CONFIG_SETTING_CONTRACT_BANDWIDTH_V0 = 5, CONFIG_SETTING_CONTRACT_COST_PARAMS_CPU_INSTRUCTIONS = 6, CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES = 7, CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES = 8, CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES = 9, CONFIG_SETTING_STATE_ARCHIVAL = 10, CONFIG_SETTING_CONTRACT_EXECUTION_LANES = 11, CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW = 12, CONFIG_SETTING_EVICTION_ITERATOR = 13, CONFIG_SETTING_CONTRACT_PARALLEL_COMPUTE_V0 = 14, CONFIG_SETTING_CONTRACT_LEDGER_COST_EXT_V0 = 15, CONFIG_SETTING_SCP_TIMING = 16, CONFIG_SETTING_FROZEN_LEDGER_KEYS = 17, CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA = 18, CONFIG_SETTING_FREEZE_BYPASS_TXS = 19, CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA = 20 }; ```", - "type": "string", - "enum": [ - "contract_max_size_bytes", - "contract_compute_v0", - "contract_ledger_cost_v0", - "contract_historical_data_v0", - "contract_events_v0", - "contract_bandwidth_v0", - "contract_cost_params_cpu_instructions", - "contract_cost_params_memory_bytes", - "contract_data_key_size_bytes", - "contract_data_entry_size_bytes", - "state_archival", - "contract_execution_lanes", - "live_soroban_state_size_window", - "eviction_iterator", - "contract_parallel_compute_v0", - "contract_ledger_cost_ext_v0", - "scp_timing", - "frozen_ledger_keys", - "frozen_ledger_keys_delta", - "freeze_bypass_txs", - "freeze_bypass_txs_delta" - ] - }, - "ConfigSettingScpTiming": { - "description": "ConfigSettingScpTiming is an XDR Struct defined as:\n\n```text struct ConfigSettingSCPTiming { uint32 ledgerTargetCloseTimeMilliseconds; uint32 nominationTimeoutInitialMilliseconds; uint32 nominationTimeoutIncrementMilliseconds; uint32 ballotTimeoutInitialMilliseconds; uint32 ballotTimeoutIncrementMilliseconds; }; ```", - "type": "object", - "required": [ - "ballot_timeout_increment_milliseconds", - "ballot_timeout_initial_milliseconds", - "ledger_target_close_time_milliseconds", - "nomination_timeout_increment_milliseconds", - "nomination_timeout_initial_milliseconds" - ], - "properties": { - "ballot_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ballot_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "ledger_target_close_time_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_increment_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "nomination_timeout_initial_milliseconds": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ConfigUpgradeSetKey": { - "description": "ConfigUpgradeSetKey is an XDR Struct defined as:\n\n```text struct ConfigUpgradeSetKey { ContractID contractID; Hash contentHash; }; ```", - "type": "object", - "required": [ - "content_hash", - "contract_id" - ], - "properties": { - "content_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "contract_id": { - "$ref": "#/definitions/ContractId" - } - } - }, - "ContractCodeCostInputs": { - "description": "ContractCodeCostInputs is an XDR Struct defined as:\n\n```text struct ContractCodeCostInputs { ExtensionPoint ext; uint32 nInstructions; uint32 nFunctions; uint32 nGlobals; uint32 nTableEntries; uint32 nTypes; uint32 nDataSegments; uint32 nElemSegments; uint32 nImports; uint32 nExports; uint32 nDataSegmentBytes; }; ```", - "type": "object", - "required": [ - "ext", - "n_data_segment_bytes", - "n_data_segments", - "n_elem_segments", - "n_exports", - "n_functions", - "n_globals", - "n_imports", - "n_instructions", - "n_table_entries", - "n_types" - ], - "properties": { - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "n_data_segment_bytes": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_data_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_elem_segments": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_exports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_functions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_globals": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_imports": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_instructions": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_table_entries": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "n_types": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "ContractCodeEntry": { - "description": "ContractCodeEntry is an XDR Struct defined as:\n\n```text struct ContractCodeEntry { union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ext;\n\nHash hash; opaque code<>; }; ```", - "type": "object", - "required": [ - "code", - "ext", - "hash" - ], - "properties": { - "code": { - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ext": { - "$ref": "#/definitions/ContractCodeEntryExt" - }, - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "ContractCodeEntryExt": { - "description": "ContractCodeEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/ContractCodeEntryV1" - } - } - } - ] - }, - "ContractCodeEntryV1": { - "description": "ContractCodeEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { ExtensionPoint ext; ContractCodeCostInputs costInputs; } ```", - "type": "object", - "required": [ - "cost_inputs", - "ext" - ], - "properties": { - "cost_inputs": { - "$ref": "#/definitions/ContractCodeCostInputs" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - } - } - }, - "ContractCostParamEntry": { - "description": "ContractCostParamEntry is an XDR Struct defined as:\n\n```text struct ContractCostParamEntry { // use `ext` to add more terms (e.g. higher order polynomials) in the future ExtensionPoint ext;\n\nint64 constTerm; int64 linearTerm; }; ```", - "type": "object", - "required": [ - "const_term", - "ext", - "linear_term" - ], - "properties": { - "const_term": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "linear_term": { - "type": "string" - } - } - }, - "ContractCostParams": { - "description": "ContractCostParams is an XDR Typedef defined as:\n\n```text typedef ContractCostParamEntry ContractCostParams; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ContractCostParamEntry" - }, - "maxItems": 1024 - }, - "ContractDataDurability": { - "description": "ContractDataDurability is an XDR Enum defined as:\n\n```text enum ContractDataDurability { TEMPORARY = 0, PERSISTENT = 1 }; ```", - "type": "string", - "enum": [ - "temporary", - "persistent" - ] - }, - "ContractDataEntry": { - "description": "ContractDataEntry is an XDR Struct defined as:\n\n```text struct ContractDataEntry { ExtensionPoint ext;\n\nSCAddress contract; SCVal key; ContractDataDurability durability; SCVal val; }; ```", - "type": "object", - "required": [ - "contract", - "durability", - "ext", - "key", - "val" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "ext": { - "$ref": "#/definitions/ExtensionPoint" - }, - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ContractExecutable": { - "description": "ContractExecutable is an XDR Union defined as:\n\n```text union ContractExecutable switch (ContractExecutableType type) { case CONTRACT_EXECUTABLE_WASM: Hash wasm_hash; case CONTRACT_EXECUTABLE_STELLAR_ASSET: void; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "stellar_asset" - ] - }, - { - "type": "object", - "required": [ - "wasm" - ], - "properties": { - "wasm": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - } - ] - }, - "ContractId": { - "type": "string" - }, - "DataEntry": { - "description": "DataEntry is an XDR Struct defined as:\n\n```text struct DataEntry { AccountID accountID; // account this data belongs to string64 dataName; DataValue dataValue;\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "data_name", - "data_value", - "ext" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - }, - "data_value": { - "$ref": "#/definitions/DataValue" - }, - "ext": { - "$ref": "#/definitions/DataEntryExt" - } - } - }, - "DataEntryExt": { - "description": "DataEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "DataValue": { - "description": "DataValue is an XDR Typedef defined as:\n\n```text typedef opaque DataValue<64>; ```", - "type": "string", - "maxLength": 128, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "Duration": { - "description": "Duration is an XDR Typedef defined as:\n\n```text typedef uint64 Duration; ```", - "type": "string" - }, - "EncodedLedgerKey": { - "description": "EncodedLedgerKey is an XDR Typedef defined as:\n\n```text typedef opaque EncodedLedgerKey<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "EvictionIterator": { - "description": "EvictionIterator is an XDR Struct defined as:\n\n```text struct EvictionIterator { uint32 bucketListLevel; bool isCurrBucket; uint64 bucketFileOffset; }; ```", - "type": "object", - "required": [ - "bucket_file_offset", - "bucket_list_level", - "is_curr_bucket" - ], - "properties": { - "bucket_file_offset": { - "type": "string" - }, - "bucket_list_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "is_curr_bucket": { - "type": "boolean" - } - } - }, - "ExtensionPoint": { - "description": "ExtensionPoint is an XDR Union defined as:\n\n```text union ExtensionPoint switch (int v) { case 0: void; }; ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "FreezeBypassTxs": { - "description": "FreezeBypassTxs is an XDR Struct defined as:\n\n```text struct FreezeBypassTxs { Hash txHashes<>; }; ```", - "type": "object", - "required": [ - "tx_hashes" - ], - "properties": { - "tx_hashes": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FreezeBypassTxsDelta": { - "description": "FreezeBypassTxsDelta is an XDR Struct defined as:\n\n```text struct FreezeBypassTxsDelta { Hash addTxs<>; Hash removeTxs<>; }; ```", - "type": "object", - "required": [ - "add_txs", - "remove_txs" - ], - "properties": { - "add_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - }, - "remove_txs": { - "type": "array", - "items": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeys": { - "description": "FrozenLedgerKeys is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeys { EncodedLedgerKey keys<>; }; ```", - "type": "object", - "required": [ - "keys" - ], - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "FrozenLedgerKeysDelta": { - "description": "FrozenLedgerKeysDelta is an XDR Struct defined as:\n\n```text struct FrozenLedgerKeysDelta { EncodedLedgerKey keysToFreeze<>; EncodedLedgerKey keysToUnfreeze<>; }; ```", - "type": "object", - "required": [ - "keys_to_freeze", - "keys_to_unfreeze" - ], - "properties": { - "keys_to_freeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - }, - "keys_to_unfreeze": { - "type": "array", - "items": { - "$ref": "#/definitions/EncodedLedgerKey" - }, - "maxItems": 4294967295 - } - } - }, - "Int128Parts": { - "type": "string" - }, - "Int256Parts": { - "type": "string" - }, - "LedgerEntry": { - "description": "LedgerEntry is an XDR Struct defined as:\n\n```text struct LedgerEntry { uint32 lastModifiedLedgerSeq; // ledger the LedgerEntry was last changed\n\nunion switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } data;\n\n// reserved for future use union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ext; }; ```", - "type": "object", - "required": [ - "data", - "ext", - "last_modified_ledger_seq" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerEntryData" - }, - "ext": { - "$ref": "#/definitions/LedgerEntryExt" - }, - "last_modified_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "LedgerEntryChange": { - "description": "LedgerEntryChange is an XDR Union defined as:\n\n```text union LedgerEntryChange switch (LedgerEntryChangeType type) { case LEDGER_ENTRY_CREATED: LedgerEntry created; case LEDGER_ENTRY_UPDATED: LedgerEntry updated; case LEDGER_ENTRY_REMOVED: LedgerKey removed; case LEDGER_ENTRY_STATE: LedgerEntry state; case LEDGER_ENTRY_RESTORED: LedgerEntry restored; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "created" - ], - "properties": { - "created": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "updated" - ], - "properties": { - "updated": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "removed" - ], - "properties": { - "removed": { - "$ref": "#/definitions/LedgerKey" - } - } - }, - { - "type": "object", - "required": [ - "state" - ], - "properties": { - "state": { - "$ref": "#/definitions/LedgerEntry" - } - } - }, - { - "type": "object", - "required": [ - "restored" - ], - "properties": { - "restored": { - "$ref": "#/definitions/LedgerEntry" - } - } - } - ] - }, - "LedgerEntryChanges": { - "description": "LedgerEntryChanges is an XDR Typedef defined as:\n\n```text typedef LedgerEntryChange LedgerEntryChanges<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/LedgerEntryChange" - }, - "maxItems": 4294967295 - }, - "LedgerEntryData": { - "description": "LedgerEntryData is an XDR NestedUnion defined as:\n\n```text union switch (LedgerEntryType type) { case ACCOUNT: AccountEntry account; case TRUSTLINE: TrustLineEntry trustLine; case OFFER: OfferEntry offer; case DATA: DataEntry data; case CLAIMABLE_BALANCE: ClaimableBalanceEntry claimableBalance; case LIQUIDITY_POOL: LiquidityPoolEntry liquidityPool; case CONTRACT_DATA: ContractDataEntry contractData; case CONTRACT_CODE: ContractCodeEntry contractCode; case CONFIG_SETTING: ConfigSettingEntry configSetting; case TTL: TTLEntry ttl; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/AccountEntry" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/TrustLineEntry" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/OfferEntry" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/DataEntry" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/ClaimableBalanceEntry" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LiquidityPoolEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/ContractDataEntry" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/ContractCodeEntry" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/ConfigSettingEntry" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/TtlEntry" - } - } - } - ] - }, - "LedgerEntryExt": { - "description": "LedgerEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: LedgerEntryExtensionV1 v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/LedgerEntryExtensionV1" - } - } - } - ] - }, - "LedgerEntryExtensionV1": { - "description": "LedgerEntryExtensionV1 is an XDR Struct defined as:\n\n```text struct LedgerEntryExtensionV1 { SponsorshipDescriptor sponsoringID;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "sponsoring_id" - ], - "properties": { - "ext": { - "$ref": "#/definitions/LedgerEntryExtensionV1Ext" - }, - "sponsoring_id": { - "$ref": "#/definitions/SponsorshipDescriptor" - } - } - }, - "LedgerEntryExtensionV1Ext": { - "description": "LedgerEntryExtensionV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "LedgerKey": { - "description": "LedgerKey is an XDR Union defined as:\n\n```text union LedgerKey switch (LedgerEntryType type) { case ACCOUNT: struct { AccountID accountID; } account;\n\ncase TRUSTLINE: struct { AccountID accountID; TrustLineAsset asset; } trustLine;\n\ncase OFFER: struct { AccountID sellerID; int64 offerID; } offer;\n\ncase DATA: struct { AccountID accountID; string64 dataName; } data;\n\ncase CLAIMABLE_BALANCE: struct { ClaimableBalanceID balanceID; } claimableBalance;\n\ncase LIQUIDITY_POOL: struct { PoolID liquidityPoolID; } liquidityPool; case CONTRACT_DATA: struct { SCAddress contract; SCVal key; ContractDataDurability durability; } contractData; case CONTRACT_CODE: struct { Hash hash; } contractCode; case CONFIG_SETTING: struct { ConfigSettingID configSettingID; } configSetting; case TTL: struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ttl; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "account" - ], - "properties": { - "account": { - "$ref": "#/definitions/LedgerKeyAccount" - } - } - }, - { - "type": "object", - "required": [ - "trustline" - ], - "properties": { - "trustline": { - "$ref": "#/definitions/LedgerKeyTrustLine" - } - } - }, - { - "type": "object", - "required": [ - "offer" - ], - "properties": { - "offer": { - "$ref": "#/definitions/LedgerKeyOffer" - } - } - }, - { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "$ref": "#/definitions/LedgerKeyData" - } - } - }, - { - "type": "object", - "required": [ - "claimable_balance" - ], - "properties": { - "claimable_balance": { - "$ref": "#/definitions/LedgerKeyClaimableBalance" - } - } - }, - { - "type": "object", - "required": [ - "liquidity_pool" - ], - "properties": { - "liquidity_pool": { - "$ref": "#/definitions/LedgerKeyLiquidityPool" - } - } - }, - { - "type": "object", - "required": [ - "contract_data" - ], - "properties": { - "contract_data": { - "$ref": "#/definitions/LedgerKeyContractData" - } - } - }, - { - "type": "object", - "required": [ - "contract_code" - ], - "properties": { - "contract_code": { - "$ref": "#/definitions/LedgerKeyContractCode" - } - } - }, - { - "type": "object", - "required": [ - "config_setting" - ], - "properties": { - "config_setting": { - "$ref": "#/definitions/LedgerKeyConfigSetting" - } - } - }, - { - "type": "object", - "required": [ - "ttl" - ], - "properties": { - "ttl": { - "$ref": "#/definitions/LedgerKeyTtl" - } - } - } - ] - }, - "LedgerKeyAccount": { - "description": "LedgerKeyAccount is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; } ```", - "type": "object", - "required": [ - "account_id" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyClaimableBalance": { - "description": "LedgerKeyClaimableBalance is an XDR NestedStruct defined as:\n\n```text struct { ClaimableBalanceID balanceID; } ```", - "type": "object", - "required": [ - "balance_id" - ], - "properties": { - "balance_id": { - "$ref": "#/definitions/ClaimableBalanceId" - } - } - }, - "LedgerKeyConfigSetting": { - "description": "LedgerKeyConfigSetting is an XDR NestedStruct defined as:\n\n```text struct { ConfigSettingID configSettingID; } ```", - "type": "object", - "required": [ - "config_setting_id" - ], - "properties": { - "config_setting_id": { - "$ref": "#/definitions/ConfigSettingId" - } - } - }, - "LedgerKeyContractCode": { - "description": "LedgerKeyContractCode is an XDR NestedStruct defined as:\n\n```text struct { Hash hash; } ```", - "type": "object", - "required": [ - "hash" - ], - "properties": { - "hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerKeyContractData": { - "description": "LedgerKeyContractData is an XDR NestedStruct defined as:\n\n```text struct { SCAddress contract; SCVal key; ContractDataDurability durability; } ```", - "type": "object", - "required": [ - "contract", - "durability", - "key" - ], - "properties": { - "contract": { - "$ref": "#/definitions/ScAddress" - }, - "durability": { - "$ref": "#/definitions/ContractDataDurability" - }, - "key": { - "$ref": "#/definitions/ScVal" - } - } - }, - "LedgerKeyData": { - "description": "LedgerKeyData is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; string64 dataName; } ```", - "type": "object", - "required": [ - "account_id", - "data_name" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "data_name": { - "$ref": "#/definitions/String64" - } - } - }, - "LedgerKeyLiquidityPool": { - "description": "LedgerKeyLiquidityPool is an XDR NestedStruct defined as:\n\n```text struct { PoolID liquidityPoolID; } ```", - "type": "object", - "required": [ - "liquidity_pool_id" - ], - "properties": { - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LedgerKeyOffer": { - "description": "LedgerKeyOffer is an XDR NestedStruct defined as:\n\n```text struct { AccountID sellerID; int64 offerID; } ```", - "type": "object", - "required": [ - "offer_id", - "seller_id" - ], - "properties": { - "offer_id": { - "type": "string" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - } - } - }, - "LedgerKeyTrustLine": { - "description": "LedgerKeyTrustLine is an XDR NestedStruct defined as:\n\n```text struct { AccountID accountID; TrustLineAsset asset; } ```", - "type": "object", - "required": [ - "account_id", - "asset" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - } - } - }, - "LedgerKeyTtl": { - "description": "LedgerKeyTtl is an XDR NestedStruct defined as:\n\n```text struct { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; } ```", - "type": "object", - "required": [ - "key_hash" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - } - } - }, - "LedgerUpgrade": { - "description": "LedgerUpgrade is an XDR Union defined as:\n\n```text union LedgerUpgrade switch (LedgerUpgradeType type) { case LEDGER_UPGRADE_VERSION: uint32 newLedgerVersion; // update ledgerVersion case LEDGER_UPGRADE_BASE_FEE: uint32 newBaseFee; // update baseFee case LEDGER_UPGRADE_MAX_TX_SET_SIZE: uint32 newMaxTxSetSize; // update maxTxSetSize case LEDGER_UPGRADE_BASE_RESERVE: uint32 newBaseReserve; // update baseReserve case LEDGER_UPGRADE_FLAGS: uint32 newFlags; // update flags case LEDGER_UPGRADE_CONFIG: // Update arbitrary `ConfigSetting` entries identified by the key. ConfigUpgradeSetKey newConfig; case LEDGER_UPGRADE_MAX_SOROBAN_TX_SET_SIZE: // Update ConfigSettingContractExecutionLanesV0.ledgerMaxTxCount without // using `LEDGER_UPGRADE_CONFIG`. uint32 newMaxSorobanTxSetSize; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "version" - ], - "properties": { - "version": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "base_fee" - ], - "properties": { - "base_fee": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "max_tx_set_size" - ], - "properties": { - "max_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "base_reserve" - ], - "properties": { - "base_reserve": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "flags" - ], - "properties": { - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "config" - ], - "properties": { - "config": { - "$ref": "#/definitions/ConfigUpgradeSetKey" - } - } - }, - { - "type": "object", - "required": [ - "max_soroban_tx_set_size" - ], - "properties": { - "max_soroban_tx_set_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - } - ] - }, - "Liabilities": { - "description": "Liabilities is an XDR Struct defined as:\n\n```text struct Liabilities { int64 buying; int64 selling; }; ```", - "type": "object", - "required": [ - "buying", - "selling" - ], - "properties": { - "buying": { - "type": "string" - }, - "selling": { - "type": "string" - } - } - }, - "LiquidityPoolConstantProductParameters": { - "description": "LiquidityPoolConstantProductParameters is an XDR Struct defined as:\n\n```text struct LiquidityPoolConstantProductParameters { Asset assetA; // assetA < assetB Asset assetB; int32 fee; // Fee is in basis points, so the actual rate is (fee/100)% }; ```", - "type": "object", - "required": [ - "asset_a", - "asset_b", - "fee" - ], - "properties": { - "asset_a": { - "$ref": "#/definitions/Asset" - }, - "asset_b": { - "$ref": "#/definitions/Asset" - }, - "fee": { - "type": "integer", - "format": "int32" - } - } - }, - "LiquidityPoolEntry": { - "description": "LiquidityPoolEntry is an XDR Struct defined as:\n\n```text struct LiquidityPoolEntry { PoolID liquidityPoolID;\n\nunion switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } body; }; ```", - "type": "object", - "required": [ - "body", - "liquidity_pool_id" - ], - "properties": { - "body": { - "$ref": "#/definitions/LiquidityPoolEntryBody" - }, - "liquidity_pool_id": { - "$ref": "#/definitions/PoolId" - } - } - }, - "LiquidityPoolEntryBody": { - "description": "LiquidityPoolEntryBody is an XDR NestedUnion defined as:\n\n```text union switch (LiquidityPoolType type) { case LIQUIDITY_POOL_CONSTANT_PRODUCT: struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } constantProduct; } ```", - "oneOf": [ - { - "type": "object", - "required": [ - "liquidity_pool_constant_product" - ], - "properties": { - "liquidity_pool_constant_product": { - "$ref": "#/definitions/LiquidityPoolEntryConstantProduct" - } - } - } - ] - }, - "LiquidityPoolEntryConstantProduct": { - "description": "LiquidityPoolEntryConstantProduct is an XDR NestedStruct defined as:\n\n```text struct { LiquidityPoolConstantProductParameters params;\n\nint64 reserveA; // amount of A in the pool int64 reserveB; // amount of B in the pool int64 totalPoolShares; // total number of pool shares issued int64 poolSharesTrustLineCount; // number of trust lines for the // associated pool shares } ```", - "type": "object", - "required": [ - "params", - "pool_shares_trust_line_count", - "reserve_a", - "reserve_b", - "total_pool_shares" - ], - "properties": { - "params": { - "$ref": "#/definitions/LiquidityPoolConstantProductParameters" - }, - "pool_shares_trust_line_count": { - "type": "string" - }, - "reserve_a": { - "type": "string" - }, - "reserve_b": { - "type": "string" - }, - "total_pool_shares": { - "type": "string" - } - } - }, - "OfferEntry": { - "description": "OfferEntry is an XDR Struct defined as:\n\n```text struct OfferEntry { AccountID sellerID; int64 offerID; Asset selling; // A Asset buying; // B int64 amount; // amount of A\n\n/* price for this offer: price of A in terms of B price=AmountB/AmountA=priceNumerator/priceDenominator price is after fees */ Price price; uint32 flags; // see OfferEntryFlags\n\n// reserved for future use union switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "amount", - "buying", - "ext", - "flags", - "offer_id", - "price", - "seller_id", - "selling" - ], - "properties": { - "amount": { - "type": "string" - }, - "buying": { - "$ref": "#/definitions/Asset" - }, - "ext": { - "$ref": "#/definitions/OfferEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "offer_id": { - "type": "string" - }, - "price": { - "$ref": "#/definitions/Price" - }, - "seller_id": { - "$ref": "#/definitions/AccountId" - }, - "selling": { - "$ref": "#/definitions/Asset" - } - } - }, - "OfferEntryExt": { - "description": "OfferEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "PoolId": { - "type": "string" - }, - "Price": { - "description": "Price is an XDR Struct defined as:\n\n```text struct Price { int32 n; // numerator int32 d; // denominator }; ```", - "type": "object", - "required": [ - "d", - "n" - ], - "properties": { - "d": { - "type": "integer", - "format": "int32" - }, - "n": { - "type": "integer", - "format": "int32" - } - } - }, - "ScAddress": { - "type": "string" - }, - "ScBytes": { - "description": "ScBytes is an XDR Typedef defined as:\n\n```text typedef opaque SCBytes<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "ScContractInstance": { - "description": "ScContractInstance is an XDR Struct defined as:\n\n```text struct SCContractInstance { ContractExecutable executable; SCMap* storage; }; ```", - "type": "object", - "required": [ - "executable" - ], - "properties": { - "executable": { - "$ref": "#/definitions/ContractExecutable" - }, - "storage": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - "ScError": { - "description": "ScError is an XDR Union defined as:\n\n```text union SCError switch (SCErrorType type) { case SCE_CONTRACT: uint32 contractCode; case SCE_WASM_VM: case SCE_CONTEXT: case SCE_STORAGE: case SCE_OBJECT: case SCE_CRYPTO: case SCE_EVENTS: case SCE_BUDGET: case SCE_VALUE: case SCE_AUTH: SCErrorCode code; }; ```", - "oneOf": [ - { - "type": "object", - "required": [ - "contract" - ], - "properties": { - "contract": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "wasm_vm" - ], - "properties": { - "wasm_vm": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "context" - ], - "properties": { - "context": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "storage" - ], - "properties": { - "storage": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "object" - ], - "properties": { - "object": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "crypto" - ], - "properties": { - "crypto": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "events" - ], - "properties": { - "events": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "budget" - ], - "properties": { - "budget": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "$ref": "#/definitions/ScErrorCode" - } - } - }, - { - "type": "object", - "required": [ - "auth" - ], - "properties": { - "auth": { - "$ref": "#/definitions/ScErrorCode" - } - } - } - ] - }, - "ScErrorCode": { - "description": "ScErrorCode is an XDR Enum defined as:\n\n```text enum SCErrorCode { SCEC_ARITH_DOMAIN = 0, // Some arithmetic was undefined (overflow, divide-by-zero). SCEC_INDEX_BOUNDS = 1, // Something was indexed beyond its bounds. SCEC_INVALID_INPUT = 2, // User provided some otherwise-bad data. SCEC_MISSING_VALUE = 3, // Some value was required but not provided. SCEC_EXISTING_VALUE = 4, // Some value was provided where not allowed. SCEC_EXCEEDED_LIMIT = 5, // Some arbitrary limit -- gas or otherwise -- was hit. SCEC_INVALID_ACTION = 6, // Data was valid but action requested was not. SCEC_INTERNAL_ERROR = 7, // The host detected an error in its own logic. SCEC_UNEXPECTED_TYPE = 8, // Some type wasn't as expected. SCEC_UNEXPECTED_SIZE = 9 // Something's size wasn't as expected. }; ```", - "type": "string", - "enum": [ - "arith_domain", - "index_bounds", - "invalid_input", - "missing_value", - "existing_value", - "exceeded_limit", - "invalid_action", - "internal_error", - "unexpected_type", - "unexpected_size" - ] - }, - "ScMap": { - "description": "ScMap is an XDR Typedef defined as:\n\n```text typedef SCMapEntry SCMap<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScMapEntry" - }, - "maxItems": 4294967295 - }, - "ScMapEntry": { - "description": "ScMapEntry is an XDR Struct defined as:\n\n```text struct SCMapEntry { SCVal key; SCVal val; }; ```", - "type": "object", - "required": [ - "key", - "val" - ], - "properties": { - "key": { - "$ref": "#/definitions/ScVal" - }, - "val": { - "$ref": "#/definitions/ScVal" - } - } - }, - "ScNonceKey": { - "description": "ScNonceKey is an XDR Struct defined as:\n\n```text struct SCNonceKey { int64 nonce; }; ```", - "type": "object", - "required": [ - "nonce" - ], - "properties": { - "nonce": { - "type": "string" - } - } - }, - "ScString": { - "description": "ScString is an XDR Typedef defined as:\n\n```text typedef string SCString<>; ```", - "$ref": "#/definitions/StringM<4294967295>" - }, - "ScSymbol": { - "description": "ScSymbol is an XDR Typedef defined as:\n\n```text typedef string SCSymbol; ```", - "$ref": "#/definitions/StringM<32>" - }, - "ScVal": { - "description": "ScVal is an XDR Union defined as:\n\n```text union SCVal switch (SCValType type) {\n\ncase SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error;\n\ncase SCV_U32: uint32 u32; case SCV_I32: int32 i32;\n\ncase SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration;\n\ncase SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128;\n\ncase SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256;\n\ncase SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym;\n\n// Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map;\n\ncase SCV_ADDRESS: SCAddress address;\n\n// Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "void", - "ledger_key_contract_instance" - ] - }, - { - "type": "object", - "required": [ - "bool" - ], - "properties": { - "bool": { - "type": "boolean" - } - } - }, - { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/definitions/ScError" - } - } - }, - { - "type": "object", - "required": [ - "u32" - ], - "properties": { - "u32": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - { - "type": "object", - "required": [ - "i32" - ], - "properties": { - "i32": { - "type": "integer", - "format": "int32" - } - } - }, - { - "type": "object", - "required": [ - "u64" - ], - "properties": { - "u64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "i64" - ], - "properties": { - "i64": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "timepoint" - ], - "properties": { - "timepoint": { - "$ref": "#/definitions/TimePoint" - } - } - }, - { - "type": "object", - "required": [ - "duration" - ], - "properties": { - "duration": { - "$ref": "#/definitions/Duration" - } - } - }, - { - "type": "object", - "required": [ - "u128" - ], - "properties": { - "u128": { - "$ref": "#/definitions/UInt128Parts" - } - } - }, - { - "type": "object", - "required": [ - "i128" - ], - "properties": { - "i128": { - "$ref": "#/definitions/Int128Parts" - } - } - }, - { - "type": "object", - "required": [ - "u256" - ], - "properties": { - "u256": { - "$ref": "#/definitions/UInt256Parts" - } - } - }, - { - "type": "object", - "required": [ - "i256" - ], - "properties": { - "i256": { - "$ref": "#/definitions/Int256Parts" - } - } - }, - { - "type": "object", - "required": [ - "bytes" - ], - "properties": { - "bytes": { - "$ref": "#/definitions/ScBytes" - } - } - }, - { - "type": "object", - "required": [ - "string" - ], - "properties": { - "string": { - "$ref": "#/definitions/ScString" - } - } - }, - { - "type": "object", - "required": [ - "symbol" - ], - "properties": { - "symbol": { - "$ref": "#/definitions/ScSymbol" - } - } - }, - { - "type": "object", - "required": [ - "vec" - ], - "properties": { - "vec": { - "anyOf": [ - { - "$ref": "#/definitions/ScVec" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "map" - ], - "properties": { - "map": { - "anyOf": [ - { - "$ref": "#/definitions/ScMap" - }, - { - "type": "null" - } - ] - } - } - }, - { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "$ref": "#/definitions/ScAddress" - } - } - }, - { - "type": "object", - "required": [ - "contract_instance" - ], - "properties": { - "contract_instance": { - "$ref": "#/definitions/ScContractInstance" - } - } - }, - { - "type": "object", - "required": [ - "ledger_key_nonce" - ], - "properties": { - "ledger_key_nonce": { - "$ref": "#/definitions/ScNonceKey" - } - } - } - ] - }, - "ScVec": { - "description": "ScVec is an XDR Typedef defined as:\n\n```text typedef SCVal SCVec<>; ```", - "type": "array", - "items": { - "$ref": "#/definitions/ScVal" - }, - "maxItems": 4294967295 - }, - "SequenceNumber": { - "description": "SequenceNumber is an XDR Typedef defined as:\n\n```text typedef int64 SequenceNumber; ```", - "type": "string" - }, - "Signer": { - "description": "Signer is an XDR Struct defined as:\n\n```text struct Signer { SignerKey key; uint32 weight; // really only need 1 byte }; ```", - "type": "object", - "required": [ - "key", - "weight" - ], - "properties": { - "key": { - "$ref": "#/definitions/SignerKey" - }, - "weight": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "SignerKey": { - "type": "string" - }, - "SponsorshipDescriptor": { - "description": "SponsorshipDescriptor is an XDR Typedef defined as:\n\n```text typedef AccountID* SponsorshipDescriptor; ```", - "anyOf": [ - { - "$ref": "#/definitions/AccountId" - }, - { - "type": "null" - } - ] - }, - "StateArchivalSettings": { - "description": "StateArchivalSettings is an XDR Struct defined as:\n\n```text struct StateArchivalSettings { uint32 maxEntryTTL; uint32 minTemporaryTTL; uint32 minPersistentTTL;\n\n// rent_fee = wfee_rate_average / rent_rate_denominator_for_type int64 persistentRentRateDenominator; int64 tempRentRateDenominator;\n\n// max number of entries that emit archival meta in a single ledger uint32 maxEntriesToArchive;\n\n// Number of snapshots to use when calculating average live Soroban State size uint32 liveSorobanStateSizeWindowSampleSize;\n\n// How often to sample the live Soroban State size for the average, in ledgers uint32 liveSorobanStateSizeWindowSamplePeriod;\n\n// Maximum number of bytes that we scan for eviction per ledger uint32 evictionScanSize;\n\n// Lowest BucketList level to be scanned to evict entries uint32 startingEvictionScanLevel; }; ```", - "type": "object", - "required": [ - "eviction_scan_size", - "live_soroban_state_size_window_sample_period", - "live_soroban_state_size_window_sample_size", - "max_entries_to_archive", - "max_entry_ttl", - "min_persistent_ttl", - "min_temporary_ttl", - "persistent_rent_rate_denominator", - "starting_eviction_scan_level", - "temp_rent_rate_denominator" - ], - "properties": { - "eviction_scan_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_period": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "live_soroban_state_size_window_sample_size": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entries_to_archive": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "max_entry_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_persistent_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "min_temporary_ttl": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "persistent_rent_rate_denominator": { - "type": "string" - }, - "starting_eviction_scan_level": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "temp_rent_rate_denominator": { - "type": "string" - } - } - }, - "String32": { - "description": "String32 is an XDR Typedef defined as:\n\n```text typedef string string32<32>; ```", - "$ref": "#/definitions/StringM<32>" - }, - "String64": { - "description": "String64 is an XDR Typedef defined as:\n\n```text typedef string string64<64>; ```", - "$ref": "#/definitions/StringM<64>" - }, - "StringM<32>": { - "type": "string", - "maxLength": 32 - }, - "StringM<4294967295>": { - "type": "string", - "maxLength": 4294967295 - }, - "StringM<64>": { - "type": "string", - "maxLength": 64 - }, - "TimePoint": { - "description": "TimePoint is an XDR Typedef defined as:\n\n```text typedef uint64 TimePoint; ```", - "type": "string" - }, - "TrustLineAsset": { - "description": "TrustLineAsset is an XDR Union defined as:\n\n```text union TrustLineAsset switch (AssetType type) { case ASSET_TYPE_NATIVE: // Not credit void;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM4: AlphaNum4 alphaNum4;\n\ncase ASSET_TYPE_CREDIT_ALPHANUM12: AlphaNum12 alphaNum12;\n\ncase ASSET_TYPE_POOL_SHARE: PoolID liquidityPoolID;\n\n// add other asset types here in the future }; ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "native" - ] - }, - { - "type": "object", - "required": [ - "credit_alphanum4" - ], - "properties": { - "credit_alphanum4": { - "$ref": "#/definitions/AlphaNum4" - } - } - }, - { - "type": "object", - "required": [ - "credit_alphanum12" - ], - "properties": { - "credit_alphanum12": { - "$ref": "#/definitions/AlphaNum12" - } - } - }, - { - "type": "object", - "required": [ - "pool_share" - ], - "properties": { - "pool_share": { - "$ref": "#/definitions/PoolId" - } - } - } - ] - }, - "TrustLineEntry": { - "description": "TrustLineEntry is an XDR Struct defined as:\n\n```text struct TrustLineEntry { AccountID accountID; // account this trustline belongs to TrustLineAsset asset; // type of asset (with issuer) int64 balance; // how much of this asset the user has. // Asset defines the unit for this;\n\nint64 limit; // balance cannot be above this uint32 flags; // see TrustLineFlags\n\n// reserved for future use union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ext; }; ```", - "type": "object", - "required": [ - "account_id", - "asset", - "balance", - "ext", - "flags", - "limit" - ], - "properties": { - "account_id": { - "$ref": "#/definitions/AccountId" - }, - "asset": { - "$ref": "#/definitions/TrustLineAsset" - }, - "balance": { - "type": "string" - }, - "ext": { - "$ref": "#/definitions/TrustLineEntryExt" - }, - "flags": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "limit": { - "type": "string" - } - } - }, - "TrustLineEntryExt": { - "description": "TrustLineEntryExt is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 1: struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } v1; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v1" - ], - "properties": { - "v1": { - "$ref": "#/definitions/TrustLineEntryV1" - } - } - } - ] - }, - "TrustLineEntryExtensionV2": { - "description": "TrustLineEntryExtensionV2 is an XDR Struct defined as:\n\n```text struct TrustLineEntryExtensionV2 { int32 liquidityPoolUseCount;\n\nunion switch (int v) { case 0: void; } ext; }; ```", - "type": "object", - "required": [ - "ext", - "liquidity_pool_use_count" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryExtensionV2Ext" - }, - "liquidity_pool_use_count": { - "type": "integer", - "format": "int32" - } - } - }, - "TrustLineEntryExtensionV2Ext": { - "description": "TrustLineEntryExtensionV2Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; } ```", - "type": "string", - "enum": [ - "v0" - ] - }, - "TrustLineEntryV1": { - "description": "TrustLineEntryV1 is an XDR NestedStruct defined as:\n\n```text struct { Liabilities liabilities;\n\nunion switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ext; } ```", - "type": "object", - "required": [ - "ext", - "liabilities" - ], - "properties": { - "ext": { - "$ref": "#/definitions/TrustLineEntryV1Ext" - }, - "liabilities": { - "$ref": "#/definitions/Liabilities" - } - } - }, - "TrustLineEntryV1Ext": { - "description": "TrustLineEntryV1Ext is an XDR NestedUnion defined as:\n\n```text union switch (int v) { case 0: void; case 2: TrustLineEntryExtensionV2 v2; } ```", - "oneOf": [ - { - "type": "string", - "enum": [ - "v0" - ] - }, - { - "type": "object", - "required": [ - "v2" - ], - "properties": { - "v2": { - "$ref": "#/definitions/TrustLineEntryExtensionV2" - } - } - } - ] - }, - "TtlEntry": { - "description": "TtlEntry is an XDR Struct defined as:\n\n```text struct TTLEntry { // Hash of the LedgerKey that is associated with this TTLEntry Hash keyHash; uint32 liveUntilLedgerSeq; }; ```", - "type": "object", - "required": [ - "key_hash", - "live_until_ledger_seq" - ], - "properties": { - "key_hash": { - "type": "string", - "maxLength": 64, - "minLength": 64, - "contentEncoding": "hex", - "contentMediaType": "application/binary" - }, - "live_until_ledger_seq": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - } - }, - "UInt128Parts": { - "type": "string" - }, - "UInt256Parts": { - "type": "string" - } - } -} \ No newline at end of file diff --git a/xdr-json/next/UpgradeType.json b/xdr-json/next/UpgradeType.json deleted file mode 100644 index 7c735142..00000000 --- a/xdr-json/next/UpgradeType.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "UpgradeType", - "description": "UpgradeType is an XDR Typedef defined as:\n\n```text typedef opaque UpgradeType<128>; ```", - "type": "string", - "maxLength": 256, - "contentEncoding": "hex", - "contentMediaType": "application/binary" -} \ No newline at end of file diff --git a/xdr-json/next/Value.json b/xdr-json/next/Value.json deleted file mode 100644 index ab519ac7..00000000 --- a/xdr-json/next/Value.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Value", - "description": "Value is an XDR Typedef defined as:\n\n```text typedef opaque Value<>; ```", - "type": "string", - "contentEncoding": "hex", - "contentMediaType": "application/binary" -} \ No newline at end of file diff --git a/xdr-version b/xdr-version index 06b2eb1f..210659ff 100644 --- a/xdr-version +++ b/xdr-version @@ -1 +1 @@ -cff714a5ebaaaf2dac343b3546c2df73f0b7a36e \ No newline at end of file +8e4d2715336508f45bb0034b3cba3764519895ac \ No newline at end of file From d12c41fe0955e2c3f9985b93466a030d07d192db Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 25 Mar 2026 15:20:52 +1000 Subject: [PATCH 27/28] remove redundant `use stellar_xdr` from tests --- tests/account_conversions.rs | 2 +- tests/default.rs | 2 +- tests/ledgerkey_to_key.rs | 2 +- tests/serde.rs | 2 +- tests/serde_ints.rs | 2 +- tests/serde_tx.rs | 2 +- tests/serde_tx_schema.rs | 2 +- tests/str.rs | 2 +- tests/stringm.rs | 2 +- tests/tx_auths.rs | 2 +- tests/tx_base64_skip_whitespace.rs | 2 +- tests/tx_debug_display.rs | 2 +- tests/tx_hash.rs | 2 +- tests/tx_prot18.rs | 2 +- tests/tx_read_edge_cases.rs | 2 +- tests/tx_small.rs | 2 +- tests/vecm.rs | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/account_conversions.rs b/tests/account_conversions.rs index b1504452..b607c447 100644 --- a/tests/account_conversions.rs +++ b/tests/account_conversions.rs @@ -1,6 +1,6 @@ #![cfg(feature = "std")] -use stellar_xdr; + use stellar_xdr::{AccountId, MuxedAccount, MuxedAccountMed25519, PublicKey, Uint256}; diff --git a/tests/default.rs b/tests/default.rs index f3a39350..aff33716 100644 --- a/tests/default.rs +++ b/tests/default.rs @@ -1,6 +1,6 @@ #![cfg(feature = "alloc")] -use stellar_xdr; + use stellar_xdr::{Hash, TransactionEnvelope, Uint32}; diff --git a/tests/ledgerkey_to_key.rs b/tests/ledgerkey_to_key.rs index 7dfaa031..af0bd4c9 100644 --- a/tests/ledgerkey_to_key.rs +++ b/tests/ledgerkey_to_key.rs @@ -1,6 +1,6 @@ #![cfg(feature = "std")] -use stellar_xdr; + use stellar_xdr::{ AccountEntry, AccountEntryExt, AccountId, AlphaNum4, Asset, AssetCode4, ClaimableBalanceEntry, diff --git a/tests/serde.rs b/tests/serde.rs index b42c6101..93287145 100644 --- a/tests/serde.rs +++ b/tests/serde.rs @@ -1,6 +1,6 @@ #![cfg(all(feature = "std", feature = "serde"))] -use stellar_xdr; + use stellar_xdr::{BytesM, Hash, StringM, VecM}; diff --git a/tests/serde_ints.rs b/tests/serde_ints.rs index d18842c3..c28ae1db 100644 --- a/tests/serde_ints.rs +++ b/tests/serde_ints.rs @@ -1,6 +1,6 @@ #![cfg(all(feature = "std", feature = "serde"))] -use stellar_xdr; + use stellar_xdr::{ConfigSettingEntry, ScNonceKey, ScVal, SequenceNumber}; #[test] diff --git a/tests/serde_tx.rs b/tests/serde_tx.rs index 3047d172..d460233d 100644 --- a/tests/serde_tx.rs +++ b/tests/serde_tx.rs @@ -1,6 +1,6 @@ #![cfg(all(feature = "std", feature = "serde"))] -use stellar_xdr; + use stellar_xdr::{ AccountId, AlphaNum4, AssetCode4, ChangeTrustAsset, ChangeTrustOp, Memo, MuxedAccount, diff --git a/tests/serde_tx_schema.rs b/tests/serde_tx_schema.rs index b356df5c..43277444 100644 --- a/tests/serde_tx_schema.rs +++ b/tests/serde_tx_schema.rs @@ -1,6 +1,6 @@ #![cfg(all(feature = "schemars", feature = "serde", feature = "alloc"))] -use stellar_xdr; + #[allow(clippy::too_many_lines)] #[test] diff --git a/tests/str.rs b/tests/str.rs index 285b37b1..829e1d1f 100644 --- a/tests/str.rs +++ b/tests/str.rs @@ -1,6 +1,6 @@ #![cfg(feature = "std")] -use stellar_xdr; + use stellar_xdr::{ AccountId, AssetCode, AssetCode12, AssetCode4, ClaimableBalanceId, ContractId, Error, Hash, diff --git a/tests/stringm.rs b/tests/stringm.rs index 52c0d1dd..76ebbd0c 100644 --- a/tests/stringm.rs +++ b/tests/stringm.rs @@ -1,6 +1,6 @@ #![cfg(feature = "std")] -use stellar_xdr; + use stellar_xdr::{Error, StringM}; diff --git a/tests/tx_auths.rs b/tests/tx_auths.rs index 79d1413e..cbddfc10 100644 --- a/tests/tx_auths.rs +++ b/tests/tx_auths.rs @@ -1,6 +1,6 @@ #![cfg(feature = "alloc")] -use stellar_xdr; + use stellar_xdr::{ Asset, ContractId, Error, FeeBumpTransaction, FeeBumpTransactionEnvelope, diff --git a/tests/tx_base64_skip_whitespace.rs b/tests/tx_base64_skip_whitespace.rs index 1a80f946..1fc80e09 100644 --- a/tests/tx_base64_skip_whitespace.rs +++ b/tests/tx_base64_skip_whitespace.rs @@ -1,6 +1,6 @@ #![cfg(all(feature = "std", feature = "base64"))] -use stellar_xdr; + use base64::Engine; use std::assert_eq; diff --git a/tests/tx_debug_display.rs b/tests/tx_debug_display.rs index f682e18b..be71dd07 100644 --- a/tests/tx_debug_display.rs +++ b/tests/tx_debug_display.rs @@ -1,5 +1,5 @@ -use stellar_xdr; + use stellar_xdr::{BytesM, Error, Hash, StringM, VecM}; diff --git a/tests/tx_hash.rs b/tests/tx_hash.rs index e2a131bb..89d1de6b 100644 --- a/tests/tx_hash.rs +++ b/tests/tx_hash.rs @@ -2,7 +2,7 @@ use bytes_lit::bytes; -use stellar_xdr; + use stellar_xdr::{ FeeBumpTransaction, FeeBumpTransactionEnvelope, FeeBumpTransactionInnerTx, Limits, Memo, diff --git a/tests/tx_prot18.rs b/tests/tx_prot18.rs index 1d95f26d..161d596a 100644 --- a/tests/tx_prot18.rs +++ b/tests/tx_prot18.rs @@ -1,6 +1,6 @@ #![cfg(all(feature = "std", feature = "base64"))] -use stellar_xdr; + use stellar_xdr::{Error, Limits, OperationBody, ReadXdr, SequenceNumber, TransactionEnvelope}; diff --git a/tests/tx_read_edge_cases.rs b/tests/tx_read_edge_cases.rs index 62e1e7f5..d9e93a9e 100644 --- a/tests/tx_read_edge_cases.rs +++ b/tests/tx_read_edge_cases.rs @@ -1,6 +1,6 @@ #![cfg(all(feature = "std", feature = "base64"))] -use stellar_xdr; + use std::io::{self, Cursor}; use stellar_xdr::Error; diff --git a/tests/tx_small.rs b/tests/tx_small.rs index a3928541..e2ad6228 100644 --- a/tests/tx_small.rs +++ b/tests/tx_small.rs @@ -1,5 +1,5 @@ -use stellar_xdr; + use stellar_xdr::{ Error, Memo, MuxedAccount, Preconditions, SequenceNumber, Transaction, TransactionEnvelope, diff --git a/tests/vecm.rs b/tests/vecm.rs index 9da251bd..bac5dc51 100644 --- a/tests/vecm.rs +++ b/tests/vecm.rs @@ -1,6 +1,6 @@ #![cfg(feature = "std")] -use stellar_xdr; + use stellar_xdr::{BytesM, Limits, ReadXdr, ScVal, VecM}; From 968445f4c4c63bf6578c2efee7701947af14fad4 Mon Sep 17 00:00:00 2001 From: Leigh <351529+leighmcculloch@users.noreply.github.com> Date: Wed, 25 Mar 2026 16:38:27 +1000 Subject: [PATCH 28/28] remove blank lines and unused serde_json imports --- src/generated.rs | 1 - tests/account_conversions.rs | 2 -- tests/default.rs | 2 -- tests/ledgerkey_to_key.rs | 2 -- tests/serde.rs | 6 ++---- tests/serde_ints.rs | 1 - tests/serde_tx.rs | 2 -- tests/serde_tx_schema.rs | 2 -- tests/str.rs | 2 -- tests/stringm.rs | 2 -- tests/tx_auths.rs | 2 -- tests/tx_base64_skip_whitespace.rs | 2 -- tests/tx_debug_display.rs | 3 --- tests/tx_hash.rs | 2 -- tests/tx_prot18.rs | 2 -- tests/tx_read_edge_cases.rs | 2 -- tests/tx_small.rs | 3 --- tests/vecm.rs | 2 -- xdr-generator-rust/generator/header.rs | 1 - 19 files changed, 2 insertions(+), 39 deletions(-) diff --git a/src/generated.rs b/src/generated.rs index aec5b243..32478725 100644 --- a/src/generated.rs +++ b/src/generated.rs @@ -3199,7 +3199,6 @@ mod test { mod tests_for_number_or_string { use super::*; use serde::{Deserialize, Serialize}; - use serde_json; use serde_with::serde_as; // --- Helper Structs --- diff --git a/tests/account_conversions.rs b/tests/account_conversions.rs index b607c447..ebfcf87c 100644 --- a/tests/account_conversions.rs +++ b/tests/account_conversions.rs @@ -1,7 +1,5 @@ #![cfg(feature = "std")] - - use stellar_xdr::{AccountId, MuxedAccount, MuxedAccountMed25519, PublicKey, Uint256}; #[test] diff --git a/tests/default.rs b/tests/default.rs index aff33716..3645bb5f 100644 --- a/tests/default.rs +++ b/tests/default.rs @@ -1,7 +1,5 @@ #![cfg(feature = "alloc")] - - use stellar_xdr::{Hash, TransactionEnvelope, Uint32}; #[test] diff --git a/tests/ledgerkey_to_key.rs b/tests/ledgerkey_to_key.rs index af0bd4c9..0c87f359 100644 --- a/tests/ledgerkey_to_key.rs +++ b/tests/ledgerkey_to_key.rs @@ -1,7 +1,5 @@ #![cfg(feature = "std")] - - use stellar_xdr::{ AccountEntry, AccountEntryExt, AccountId, AlphaNum4, Asset, AssetCode4, ClaimableBalanceEntry, ClaimableBalanceEntryExt, ClaimableBalanceId, ConfigSettingContractBandwidthV0, diff --git a/tests/serde.rs b/tests/serde.rs index 93287145..dd5322ca 100644 --- a/tests/serde.rs +++ b/tests/serde.rs @@ -1,7 +1,5 @@ #![cfg(all(feature = "std", feature = "serde"))] - - use stellar_xdr::{BytesM, Hash, StringM, VecM}; use stellar_xdr::{AccountId, Int128Parts}; @@ -28,7 +26,7 @@ fn test_serde_ser() -> Result<(), Box> { ))?, "\"3031323334353637383930313233343536373839303133343536373839303132\"" ); - assert_eq!( + assert_eq!( serde_json::to_string(&AccountId::from_str( "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF" )?)?, @@ -56,7 +54,7 @@ fn test_serde_der() -> Result<(), Box> { <_ as Into>::into(*b"01234567890123456789013456789012"), ); - assert_eq!( + assert_eq!( AccountId::from_str("GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF")?, serde_json::from_str("\"GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF\"")?, ); diff --git a/tests/serde_ints.rs b/tests/serde_ints.rs index c28ae1db..8c2d5bc4 100644 --- a/tests/serde_ints.rs +++ b/tests/serde_ints.rs @@ -1,6 +1,5 @@ #![cfg(all(feature = "std", feature = "serde"))] - use stellar_xdr::{ConfigSettingEntry, ScNonceKey, ScVal, SequenceNumber}; #[test] diff --git a/tests/serde_tx.rs b/tests/serde_tx.rs index d460233d..995598f6 100644 --- a/tests/serde_tx.rs +++ b/tests/serde_tx.rs @@ -1,7 +1,5 @@ #![cfg(all(feature = "std", feature = "serde"))] - - use stellar_xdr::{ AccountId, AlphaNum4, AssetCode4, ChangeTrustAsset, ChangeTrustOp, Memo, MuxedAccount, Operation, OperationBody, Preconditions, SequenceNumber, Transaction, TransactionEnvelope, diff --git a/tests/serde_tx_schema.rs b/tests/serde_tx_schema.rs index 43277444..8e0b61ea 100644 --- a/tests/serde_tx_schema.rs +++ b/tests/serde_tx_schema.rs @@ -1,7 +1,5 @@ #![cfg(all(feature = "schemars", feature = "serde", feature = "alloc"))] - - #[allow(clippy::too_many_lines)] #[test] fn test_serde_tx_schema() -> Result<(), Box> { diff --git a/tests/str.rs b/tests/str.rs index 829e1d1f..6b1c2394 100644 --- a/tests/str.rs +++ b/tests/str.rs @@ -1,7 +1,5 @@ #![cfg(feature = "std")] - - use stellar_xdr::{ AccountId, AssetCode, AssetCode12, AssetCode4, ClaimableBalanceId, ContractId, Error, Hash, Int128Parts, Int256Parts, MuxedAccount, MuxedAccountMed25519, MuxedEd25519Account, NodeId, diff --git a/tests/stringm.rs b/tests/stringm.rs index 76ebbd0c..afa9f98a 100644 --- a/tests/stringm.rs +++ b/tests/stringm.rs @@ -1,7 +1,5 @@ #![cfg(feature = "std")] - - use stellar_xdr::{Error, StringM}; use std::str::FromStr; diff --git a/tests/tx_auths.rs b/tests/tx_auths.rs index cbddfc10..8e924f77 100644 --- a/tests/tx_auths.rs +++ b/tests/tx_auths.rs @@ -1,7 +1,5 @@ #![cfg(feature = "alloc")] - - use stellar_xdr::{ Asset, ContractId, Error, FeeBumpTransaction, FeeBumpTransactionEnvelope, FeeBumpTransactionExt, FeeBumpTransactionInnerTx, Hash, HostFunction, InvokeContractArgs, diff --git a/tests/tx_base64_skip_whitespace.rs b/tests/tx_base64_skip_whitespace.rs index 1fc80e09..366dc858 100644 --- a/tests/tx_base64_skip_whitespace.rs +++ b/tests/tx_base64_skip_whitespace.rs @@ -1,7 +1,5 @@ #![cfg(all(feature = "std", feature = "base64"))] - - use base64::Engine; use std::assert_eq; use std::io::Cursor; diff --git a/tests/tx_debug_display.rs b/tests/tx_debug_display.rs index be71dd07..89f90031 100644 --- a/tests/tx_debug_display.rs +++ b/tests/tx_debug_display.rs @@ -1,6 +1,3 @@ - - - use stellar_xdr::{BytesM, Error, Hash, StringM, VecM}; #[test] diff --git a/tests/tx_hash.rs b/tests/tx_hash.rs index 89d1de6b..f5d50053 100644 --- a/tests/tx_hash.rs +++ b/tests/tx_hash.rs @@ -2,8 +2,6 @@ use bytes_lit::bytes; - - use stellar_xdr::{ FeeBumpTransaction, FeeBumpTransactionEnvelope, FeeBumpTransactionInnerTx, Limits, Memo, MuxedAccount, Preconditions, SequenceNumber, Transaction, TransactionEnvelope, TransactionExt, diff --git a/tests/tx_prot18.rs b/tests/tx_prot18.rs index 161d596a..fa3d1f49 100644 --- a/tests/tx_prot18.rs +++ b/tests/tx_prot18.rs @@ -1,7 +1,5 @@ #![cfg(all(feature = "std", feature = "base64"))] - - use stellar_xdr::{Error, Limits, OperationBody, ReadXdr, SequenceNumber, TransactionEnvelope}; #[test] diff --git a/tests/tx_read_edge_cases.rs b/tests/tx_read_edge_cases.rs index d9e93a9e..e27bb67d 100644 --- a/tests/tx_read_edge_cases.rs +++ b/tests/tx_read_edge_cases.rs @@ -1,7 +1,5 @@ #![cfg(all(feature = "std", feature = "base64"))] - - use std::io::{self, Cursor}; use stellar_xdr::Error; use stellar_xdr::{Limited, Limits, ReadXdr, WriteXdr}; diff --git a/tests/tx_small.rs b/tests/tx_small.rs index e2ad6228..9d58ca06 100644 --- a/tests/tx_small.rs +++ b/tests/tx_small.rs @@ -1,6 +1,3 @@ - - - use stellar_xdr::{ Error, Memo, MuxedAccount, Preconditions, SequenceNumber, Transaction, TransactionEnvelope, TransactionExt, TransactionV1Envelope, Uint256, diff --git a/tests/vecm.rs b/tests/vecm.rs index bac5dc51..c0cb1f35 100644 --- a/tests/vecm.rs +++ b/tests/vecm.rs @@ -1,7 +1,5 @@ #![cfg(feature = "std")] - - use stellar_xdr::{BytesM, Limits, ReadXdr, ScVal, VecM}; #[test] diff --git a/xdr-generator-rust/generator/header.rs b/xdr-generator-rust/generator/header.rs index a9fa22a6..7418b9f6 100644 --- a/xdr-generator-rust/generator/header.rs +++ b/xdr-generator-rust/generator/header.rs @@ -3126,7 +3126,6 @@ mod test { mod tests_for_number_or_string { use super::*; use serde::{Deserialize, Serialize}; - use serde_json; use serde_with::serde_as; // --- Helper Structs ---